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 values are omitted from API requests. However, any non-pointer, 377 // non-interface field appearing in ForceSendFields will be sent to the 378 // server regardless of whether the field is empty or not. This may be 379 // 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 values are omitted from API requests. However, any non-pointer, 421 // non-interface field appearing in ForceSendFields will be sent to the 422 // server regardless of whether the field is empty or not. This may be 423 // 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 values are omitted from API requests. However, any non-pointer, 461 // non-interface field appearing in ForceSendFields will be sent to the 462 // server regardless of whether the field is empty or not. This may be 463 // used to include empty fields in Patch requests. 464 ForceSendFields []string `json:"-"` 465 466 // NullFields is a list of field names (e.g. "AdwordsId") to include in 467 // API requests with the JSON null value. By default, fields with empty 468 // values are omitted from API requests. However, any field with an 469 // empty value appearing in NullFields will be sent to the server as 470 // null. It is an error if a field in this list has a non-empty value. 471 // This may be used to include null fields in Patch requests. 472 NullFields []string `json:"-"` 473} 474 475func (s *AccountAdwordsLink) MarshalJSON() ([]byte, error) { 476 type NoMethod AccountAdwordsLink 477 raw := NoMethod(*s) 478 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 479} 480 481type AccountBusinessInformation struct { 482 // Address: The address of the business. 483 Address *AccountAddress `json:"address,omitempty"` 484 485 // CustomerService: The customer service information of the business. 486 CustomerService *AccountCustomerService `json:"customerService,omitempty"` 487 488 // PhoneNumber: The phone number of the business. 489 PhoneNumber string `json:"phoneNumber,omitempty"` 490 491 // ForceSendFields is a list of field names (e.g. "Address") to 492 // unconditionally include in API requests. By default, fields with 493 // empty values are omitted from API requests. However, any non-pointer, 494 // non-interface field appearing in ForceSendFields will be sent to the 495 // server regardless of whether the field is empty or not. This may be 496 // used to include empty fields in Patch requests. 497 ForceSendFields []string `json:"-"` 498 499 // NullFields is a list of field names (e.g. "Address") to include in 500 // API requests with the JSON null value. By default, fields with empty 501 // values are omitted from API requests. However, any field with an 502 // empty value appearing in NullFields will be sent to the server as 503 // null. It is an error if a field in this list has a non-empty value. 504 // This may be used to include null fields in Patch requests. 505 NullFields []string `json:"-"` 506} 507 508func (s *AccountBusinessInformation) MarshalJSON() ([]byte, error) { 509 type NoMethod AccountBusinessInformation 510 raw := NoMethod(*s) 511 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 512} 513 514type AccountCustomerService struct { 515 // Email: Customer service email. 516 Email string `json:"email,omitempty"` 517 518 // PhoneNumber: Customer service phone number. 519 PhoneNumber string `json:"phoneNumber,omitempty"` 520 521 // Url: Customer service URL. 522 Url string `json:"url,omitempty"` 523 524 // ForceSendFields is a list of field names (e.g. "Email") to 525 // unconditionally include in API requests. By default, fields with 526 // empty values are omitted from API requests. However, any non-pointer, 527 // non-interface field appearing in ForceSendFields will be sent to the 528 // server regardless of whether the field is empty or not. This may be 529 // used to include empty fields in Patch requests. 530 ForceSendFields []string `json:"-"` 531 532 // NullFields is a list of field names (e.g. "Email") to include in API 533 // requests with the JSON null value. By default, fields with empty 534 // values are omitted from API requests. However, any field with an 535 // empty value appearing in NullFields will be sent to the server as 536 // null. It is an error if a field in this list has a non-empty value. 537 // This may be used to include null fields in Patch requests. 538 NullFields []string `json:"-"` 539} 540 541func (s *AccountCustomerService) MarshalJSON() ([]byte, error) { 542 type NoMethod AccountCustomerService 543 raw := NoMethod(*s) 544 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 545} 546 547type AccountGoogleMyBusinessLink struct { 548 // GmbEmail: The GMB email address of which a specific account within a 549 // GMB account. A sample account within a GMB account could be a 550 // business account with set of locations, managed under the GMB 551 // account. 552 GmbEmail string `json:"gmbEmail,omitempty"` 553 554 // Status: Status of the link between this Merchant Center account and 555 // the GMB account. Acceptable values are: - "active" - "pending" 556 Status string `json:"status,omitempty"` 557 558 // ForceSendFields is a list of field names (e.g. "GmbEmail") to 559 // unconditionally include in API requests. By default, fields with 560 // empty values are omitted from API requests. However, any non-pointer, 561 // non-interface field appearing in ForceSendFields will be sent to the 562 // server regardless of whether the field is empty or not. This may be 563 // used to include empty fields in Patch requests. 564 ForceSendFields []string `json:"-"` 565 566 // NullFields is a list of field names (e.g. "GmbEmail") to include in 567 // API requests with the JSON null value. By default, fields with empty 568 // values are omitted from API requests. However, any field with an 569 // empty value appearing in NullFields will be sent to the server as 570 // null. It is an error if a field in this list has a non-empty value. 571 // This may be used to include null fields in Patch requests. 572 NullFields []string `json:"-"` 573} 574 575func (s *AccountGoogleMyBusinessLink) MarshalJSON() ([]byte, error) { 576 type NoMethod AccountGoogleMyBusinessLink 577 raw := NoMethod(*s) 578 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 579} 580 581type AccountIdentifier struct { 582 // AggregatorId: The aggregator ID, set for aggregators and subaccounts 583 // (in that case, it represents the aggregator of the subaccount). 584 AggregatorId uint64 `json:"aggregatorId,omitempty,string"` 585 586 // MerchantId: The merchant account ID, set for individual accounts and 587 // subaccounts. 588 MerchantId uint64 `json:"merchantId,omitempty,string"` 589 590 // ForceSendFields is a list of field names (e.g. "AggregatorId") to 591 // unconditionally include in API requests. By default, fields with 592 // empty values are omitted from API requests. However, any non-pointer, 593 // non-interface field appearing in ForceSendFields will be sent to the 594 // server regardless of whether the field is empty or not. This may be 595 // used to include empty fields in Patch requests. 596 ForceSendFields []string `json:"-"` 597 598 // NullFields is a list of field names (e.g. "AggregatorId") to include 599 // in API requests with the JSON null value. By default, fields with 600 // empty values are omitted from API requests. However, any field with 601 // an empty value appearing in NullFields will be sent to the server as 602 // null. It is an error if a field in this list has a non-empty value. 603 // This may be used to include null fields in Patch requests. 604 NullFields []string `json:"-"` 605} 606 607func (s *AccountIdentifier) MarshalJSON() ([]byte, error) { 608 type NoMethod AccountIdentifier 609 raw := NoMethod(*s) 610 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 611} 612 613// AccountStatus: The status of an account, i.e., information about its 614// products, which is computed offline and not returned immediately at 615// insertion time. 616type AccountStatus struct { 617 // AccountId: The ID of the account for which the status is reported. 618 AccountId string `json:"accountId,omitempty"` 619 620 // AccountLevelIssues: A list of account level issues. 621 AccountLevelIssues []*AccountStatusAccountLevelIssue `json:"accountLevelIssues,omitempty"` 622 623 // DataQualityIssues: DEPRECATED - never populated. 624 DataQualityIssues []*AccountStatusDataQualityIssue `json:"dataQualityIssues,omitempty"` 625 626 // Kind: Identifies what kind of resource this is. Value: the fixed 627 // string "content#accountStatus" 628 Kind string `json:"kind,omitempty"` 629 630 // Products: List of product-related data by channel, destination, and 631 // country. Data in this field may be delayed by up to 30 minutes. 632 Products []*AccountStatusProducts `json:"products,omitempty"` 633 634 // WebsiteClaimed: Whether the account's website is claimed or not. 635 WebsiteClaimed bool `json:"websiteClaimed,omitempty"` 636 637 // ServerResponse contains the HTTP response code and headers from the 638 // server. 639 googleapi.ServerResponse `json:"-"` 640 641 // ForceSendFields is a list of field names (e.g. "AccountId") to 642 // unconditionally include in API requests. By default, fields with 643 // empty values are omitted from API requests. However, any non-pointer, 644 // non-interface field appearing in ForceSendFields will be sent to the 645 // server regardless of whether the field is empty or not. This may be 646 // used to include empty fields in Patch requests. 647 ForceSendFields []string `json:"-"` 648 649 // NullFields is a list of field names (e.g. "AccountId") to include in 650 // API requests with the JSON null value. By default, fields with empty 651 // values are omitted from API requests. However, any field with an 652 // empty value appearing in NullFields will be sent to the server as 653 // null. It is an error if a field in this list has a non-empty value. 654 // This may be used to include null fields in Patch requests. 655 NullFields []string `json:"-"` 656} 657 658func (s *AccountStatus) MarshalJSON() ([]byte, error) { 659 type NoMethod AccountStatus 660 raw := NoMethod(*s) 661 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 662} 663 664type AccountStatusAccountLevelIssue struct { 665 // Country: Country for which this issue is reported. 666 Country string `json:"country,omitempty"` 667 668 // Destination: The destination the issue applies to. If this field is 669 // empty then the issue applies to all available destinations. 670 Destination string `json:"destination,omitempty"` 671 672 // Detail: Additional details about the issue. 673 Detail string `json:"detail,omitempty"` 674 675 // Documentation: The URL of a web page to help resolving this issue. 676 Documentation string `json:"documentation,omitempty"` 677 678 // Id: Issue identifier. 679 Id string `json:"id,omitempty"` 680 681 // Severity: Severity of the issue. Acceptable values are: - 682 // "critical" - "error" - "suggestion" 683 Severity string `json:"severity,omitempty"` 684 685 // Title: Short description of the issue. 686 Title string `json:"title,omitempty"` 687 688 // ForceSendFields is a list of field names (e.g. "Country") to 689 // unconditionally include in API requests. By default, fields with 690 // empty values are omitted from API requests. However, any non-pointer, 691 // non-interface field appearing in ForceSendFields will be sent to the 692 // server regardless of whether the field is empty or not. This may be 693 // used to include empty fields in Patch requests. 694 ForceSendFields []string `json:"-"` 695 696 // NullFields is a list of field names (e.g. "Country") to include in 697 // API requests with the JSON null value. By default, fields with empty 698 // values are omitted from API requests. However, any field with an 699 // empty value appearing in NullFields will be sent to the server as 700 // null. It is an error if a field in this list has a non-empty value. 701 // This may be used to include null fields in Patch requests. 702 NullFields []string `json:"-"` 703} 704 705func (s *AccountStatusAccountLevelIssue) MarshalJSON() ([]byte, error) { 706 type NoMethod AccountStatusAccountLevelIssue 707 raw := NoMethod(*s) 708 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 709} 710 711type AccountStatusDataQualityIssue struct { 712 Country string `json:"country,omitempty"` 713 714 Destination string `json:"destination,omitempty"` 715 716 Detail string `json:"detail,omitempty"` 717 718 DisplayedValue string `json:"displayedValue,omitempty"` 719 720 ExampleItems []*AccountStatusExampleItem `json:"exampleItems,omitempty"` 721 722 Id string `json:"id,omitempty"` 723 724 LastChecked string `json:"lastChecked,omitempty"` 725 726 Location string `json:"location,omitempty"` 727 728 NumItems int64 `json:"numItems,omitempty"` 729 730 // Severity: Acceptable values are: - "critical" - "error" - 731 // "suggestion" 732 Severity string `json:"severity,omitempty"` 733 734 SubmittedValue string `json:"submittedValue,omitempty"` 735 736 // ForceSendFields is a list of field names (e.g. "Country") to 737 // unconditionally include in API requests. By default, fields with 738 // empty values are omitted from API requests. However, any non-pointer, 739 // non-interface field appearing in ForceSendFields will be sent to the 740 // server regardless of whether the field is empty or not. This may be 741 // used to include empty fields in Patch requests. 742 ForceSendFields []string `json:"-"` 743 744 // NullFields is a list of field names (e.g. "Country") to include in 745 // API requests with the JSON null value. By default, fields with empty 746 // values are omitted from API requests. However, any field with an 747 // empty value appearing in NullFields will be sent to the server as 748 // null. It is an error if a field in this list has a non-empty value. 749 // This may be used to include null fields in Patch requests. 750 NullFields []string `json:"-"` 751} 752 753func (s *AccountStatusDataQualityIssue) MarshalJSON() ([]byte, error) { 754 type NoMethod AccountStatusDataQualityIssue 755 raw := NoMethod(*s) 756 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 757} 758 759type AccountStatusExampleItem struct { 760 ItemId string `json:"itemId,omitempty"` 761 762 Link string `json:"link,omitempty"` 763 764 SubmittedValue string `json:"submittedValue,omitempty"` 765 766 Title string `json:"title,omitempty"` 767 768 ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"` 769 770 // ForceSendFields is a list of field names (e.g. "ItemId") to 771 // unconditionally include in API requests. By default, fields with 772 // empty values are omitted from API requests. However, any non-pointer, 773 // non-interface field appearing in ForceSendFields will be sent to the 774 // server regardless of whether the field is empty or not. This may be 775 // used to include empty fields in Patch requests. 776 ForceSendFields []string `json:"-"` 777 778 // NullFields is a list of field names (e.g. "ItemId") to include in API 779 // requests with the JSON null value. By default, fields with empty 780 // values are omitted from API requests. However, any field with an 781 // empty value appearing in NullFields will be sent to the server as 782 // null. It is an error if a field in this list has a non-empty value. 783 // This may be used to include null fields in Patch requests. 784 NullFields []string `json:"-"` 785} 786 787func (s *AccountStatusExampleItem) MarshalJSON() ([]byte, error) { 788 type NoMethod AccountStatusExampleItem 789 raw := NoMethod(*s) 790 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 791} 792 793type AccountStatusItemLevelIssue struct { 794 // AttributeName: The attribute's name, if the issue is caused by a 795 // single attribute. 796 AttributeName string `json:"attributeName,omitempty"` 797 798 // Code: The error code of the issue. 799 Code string `json:"code,omitempty"` 800 801 // Description: A short issue description in English. 802 Description string `json:"description,omitempty"` 803 804 // Detail: A detailed issue description in English. 805 Detail string `json:"detail,omitempty"` 806 807 // Documentation: The URL of a web page to help with resolving this 808 // issue. 809 Documentation string `json:"documentation,omitempty"` 810 811 // NumItems: Number of items with this issue. 812 NumItems int64 `json:"numItems,omitempty,string"` 813 814 // Resolution: Whether the issue can be resolved by the merchant. 815 Resolution string `json:"resolution,omitempty"` 816 817 // Servability: How this issue affects serving of the offer. 818 Servability string `json:"servability,omitempty"` 819 820 // ForceSendFields is a list of field names (e.g. "AttributeName") to 821 // unconditionally include in API requests. By default, fields with 822 // empty values are omitted from API requests. However, any non-pointer, 823 // non-interface field appearing in ForceSendFields will be sent to the 824 // server regardless of whether the field is empty or not. This may be 825 // used to include empty fields in Patch requests. 826 ForceSendFields []string `json:"-"` 827 828 // NullFields is a list of field names (e.g. "AttributeName") to include 829 // in API requests with the JSON null value. By default, fields with 830 // empty values are omitted from API requests. However, any field with 831 // an empty value appearing in NullFields will be sent to the server as 832 // null. It is an error if a field in this list has a non-empty value. 833 // This may be used to include null fields in Patch requests. 834 NullFields []string `json:"-"` 835} 836 837func (s *AccountStatusItemLevelIssue) MarshalJSON() ([]byte, error) { 838 type NoMethod AccountStatusItemLevelIssue 839 raw := NoMethod(*s) 840 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 841} 842 843type AccountStatusProducts struct { 844 // Channel: The channel the data applies to. Acceptable values are: - 845 // "local" - "online" 846 Channel string `json:"channel,omitempty"` 847 848 // Country: The country the data applies to. 849 Country string `json:"country,omitempty"` 850 851 // Destination: The destination the data applies to. 852 Destination string `json:"destination,omitempty"` 853 854 // ItemLevelIssues: List of item-level issues. 855 ItemLevelIssues []*AccountStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` 856 857 // Statistics: Aggregated product statistics. 858 Statistics *AccountStatusStatistics `json:"statistics,omitempty"` 859 860 // ForceSendFields is a list of field names (e.g. "Channel") to 861 // unconditionally include in API requests. By default, fields with 862 // empty values are omitted from API requests. However, any non-pointer, 863 // non-interface field appearing in ForceSendFields will be sent to the 864 // server regardless of whether the field is empty or not. This may be 865 // used to include empty fields in Patch requests. 866 ForceSendFields []string `json:"-"` 867 868 // NullFields is a list of field names (e.g. "Channel") to include in 869 // API requests with the JSON null value. By default, fields with empty 870 // values are omitted from API requests. However, any field with an 871 // empty value appearing in NullFields will be sent to the server as 872 // null. It is an error if a field in this list has a non-empty value. 873 // This may be used to include null fields in Patch requests. 874 NullFields []string `json:"-"` 875} 876 877func (s *AccountStatusProducts) MarshalJSON() ([]byte, error) { 878 type NoMethod AccountStatusProducts 879 raw := NoMethod(*s) 880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 881} 882 883type AccountStatusStatistics struct { 884 // Active: Number of active offers. 885 Active int64 `json:"active,omitempty,string"` 886 887 // Disapproved: Number of disapproved offers. 888 Disapproved int64 `json:"disapproved,omitempty,string"` 889 890 // Expiring: Number of expiring offers. 891 Expiring int64 `json:"expiring,omitempty,string"` 892 893 // Pending: Number of pending offers. 894 Pending int64 `json:"pending,omitempty,string"` 895 896 // ForceSendFields is a list of field names (e.g. "Active") to 897 // unconditionally include in API requests. By default, fields with 898 // empty values are omitted from API requests. However, any non-pointer, 899 // non-interface field appearing in ForceSendFields will be sent to the 900 // server regardless of whether the field is empty or not. This may be 901 // used to include empty fields in Patch requests. 902 ForceSendFields []string `json:"-"` 903 904 // NullFields is a list of field names (e.g. "Active") to include in API 905 // requests with the JSON null value. By default, fields with empty 906 // values are omitted from API requests. However, any field with an 907 // empty value appearing in NullFields will be sent to the server as 908 // null. It is an error if a field in this list has a non-empty value. 909 // This may be used to include null fields in Patch requests. 910 NullFields []string `json:"-"` 911} 912 913func (s *AccountStatusStatistics) MarshalJSON() ([]byte, error) { 914 type NoMethod AccountStatusStatistics 915 raw := NoMethod(*s) 916 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 917} 918 919// AccountTax: The tax settings of a merchant account. All methods 920// require the admin role. 921type AccountTax struct { 922 // AccountId: Required. The ID of the account to which these account tax 923 // settings belong. 924 AccountId uint64 `json:"accountId,omitempty,string"` 925 926 // Kind: Identifies what kind of resource this is. Value: the fixed 927 // string "content#accountTax". 928 Kind string `json:"kind,omitempty"` 929 930 // Rules: Tax rules. Updating the tax rules will enable US taxes (not 931 // reversible). Defining no rules is equivalent to not charging tax at 932 // all. 933 Rules []*AccountTaxTaxRule `json:"rules,omitempty"` 934 935 // ServerResponse contains the HTTP response code and headers from the 936 // server. 937 googleapi.ServerResponse `json:"-"` 938 939 // ForceSendFields is a list of field names (e.g. "AccountId") to 940 // unconditionally include in API requests. By default, fields with 941 // empty values are omitted from API requests. However, any non-pointer, 942 // non-interface field appearing in ForceSendFields will be sent to the 943 // server regardless of whether the field is empty or not. This may be 944 // used to include empty fields in Patch requests. 945 ForceSendFields []string `json:"-"` 946 947 // NullFields is a list of field names (e.g. "AccountId") to include in 948 // API requests with the JSON null value. By default, fields with empty 949 // values are omitted from API requests. However, any field with an 950 // empty value appearing in NullFields will be sent to the server as 951 // null. It is an error if a field in this list has a non-empty value. 952 // This may be used to include null fields in Patch requests. 953 NullFields []string `json:"-"` 954} 955 956func (s *AccountTax) MarshalJSON() ([]byte, error) { 957 type NoMethod AccountTax 958 raw := NoMethod(*s) 959 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 960} 961 962// AccountTaxTaxRule: Tax calculation rule to apply in a state or 963// province (USA only). 964type AccountTaxTaxRule struct { 965 // Country: Country code in which tax is applicable. 966 Country string `json:"country,omitempty"` 967 968 // LocationId: Required. State (or province) is which the tax is 969 // applicable, described by its location ID (also called criteria ID). 970 LocationId uint64 `json:"locationId,omitempty,string"` 971 972 // RatePercent: Explicit tax rate in percent, represented as a floating 973 // point number without the percentage character. Must not be negative. 974 RatePercent string `json:"ratePercent,omitempty"` 975 976 // ShippingTaxed: If true, shipping charges are also taxed. 977 ShippingTaxed bool `json:"shippingTaxed,omitempty"` 978 979 // UseGlobalRate: Whether the tax rate is taken from a global tax table 980 // or specified explicitly. 981 UseGlobalRate bool `json:"useGlobalRate,omitempty"` 982 983 // ForceSendFields is a list of field names (e.g. "Country") to 984 // unconditionally include in API requests. By default, fields with 985 // empty values are omitted from API requests. However, any non-pointer, 986 // non-interface field appearing in ForceSendFields will be sent to the 987 // server regardless of whether the field is empty or not. This may be 988 // used to include empty fields in Patch requests. 989 ForceSendFields []string `json:"-"` 990 991 // NullFields is a list of field names (e.g. "Country") to include in 992 // API requests with the JSON null value. By default, fields with empty 993 // values are omitted from API requests. However, any field with an 994 // empty value appearing in NullFields will be sent to the server as 995 // null. It is an error if a field in this list has a non-empty value. 996 // This may be used to include null fields in Patch requests. 997 NullFields []string `json:"-"` 998} 999 1000func (s *AccountTaxTaxRule) MarshalJSON() ([]byte, error) { 1001 type NoMethod AccountTaxTaxRule 1002 raw := NoMethod(*s) 1003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1004} 1005 1006type AccountUser struct { 1007 // Admin: Whether user is an admin. 1008 Admin *bool `json:"admin,omitempty"` 1009 1010 // EmailAddress: User's email address. 1011 EmailAddress string `json:"emailAddress,omitempty"` 1012 1013 // OrderManager: Whether user is an order manager. 1014 OrderManager bool `json:"orderManager,omitempty"` 1015 1016 // PaymentsAnalyst: Whether user can access payment statements. 1017 PaymentsAnalyst bool `json:"paymentsAnalyst,omitempty"` 1018 1019 // PaymentsManager: Whether user can manage payment settings. 1020 PaymentsManager bool `json:"paymentsManager,omitempty"` 1021 1022 // ForceSendFields is a list of field names (e.g. "Admin") to 1023 // unconditionally include in API requests. By default, fields with 1024 // empty values are omitted from API requests. However, any non-pointer, 1025 // non-interface field appearing in ForceSendFields will be sent to the 1026 // server regardless of whether the field is empty or not. This may be 1027 // used to include empty fields in Patch requests. 1028 ForceSendFields []string `json:"-"` 1029 1030 // NullFields is a list of field names (e.g. "Admin") to include in API 1031 // requests with the JSON null value. By default, fields with empty 1032 // values are omitted from API requests. However, any field with an 1033 // empty value appearing in NullFields will be sent to the server as 1034 // null. It is an error if a field in this list has a non-empty value. 1035 // This may be used to include null fields in Patch requests. 1036 NullFields []string `json:"-"` 1037} 1038 1039func (s *AccountUser) MarshalJSON() ([]byte, error) { 1040 type NoMethod AccountUser 1041 raw := NoMethod(*s) 1042 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1043} 1044 1045type AccountYouTubeChannelLink struct { 1046 // ChannelId: Channel ID. 1047 ChannelId string `json:"channelId,omitempty"` 1048 1049 // Status: Status of the link between this Merchant Center account and 1050 // the YouTube channel. Upon retrieval, it represents the actual status 1051 // of the link and can be either `active` if it was approved in YT 1052 // Creator Studio or `pending` if it's pending approval. Upon insertion, 1053 // it represents the *intended* status of the link. Re-uploading a link 1054 // with status `active` when it's still pending or with status `pending` 1055 // when it's already active will have no effect: the status will remain 1056 // unchanged. Re-uploading a link with deprecated status `inactive` is 1057 // equivalent to not submitting the link at all and will delete the link 1058 // if it was active or cancel the link request if it was pending. 1059 Status string `json:"status,omitempty"` 1060 1061 // ForceSendFields is a list of field names (e.g. "ChannelId") to 1062 // unconditionally include in API requests. By default, fields with 1063 // empty values are omitted from API requests. However, any non-pointer, 1064 // non-interface field appearing in ForceSendFields will be sent to the 1065 // server regardless of whether the field is empty or not. This may be 1066 // used to include empty fields in Patch requests. 1067 ForceSendFields []string `json:"-"` 1068 1069 // NullFields is a list of field names (e.g. "ChannelId") to include in 1070 // API requests with the JSON null value. By default, fields with empty 1071 // values are omitted from API requests. However, any field with an 1072 // empty value appearing in NullFields will be sent to the server as 1073 // null. It is an error if a field in this list has a non-empty value. 1074 // This may be used to include null fields in Patch requests. 1075 NullFields []string `json:"-"` 1076} 1077 1078func (s *AccountYouTubeChannelLink) MarshalJSON() ([]byte, error) { 1079 type NoMethod AccountYouTubeChannelLink 1080 raw := NoMethod(*s) 1081 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1082} 1083 1084type AccountsAuthInfoResponse struct { 1085 // AccountIdentifiers: The account identifiers corresponding to the 1086 // authenticated user. - For an individual account: only the merchant ID 1087 // is defined - For an aggregator: only the aggregator ID is defined - 1088 // For a subaccount of an MCA: both the merchant ID and the aggregator 1089 // ID are defined. 1090 AccountIdentifiers []*AccountIdentifier `json:"accountIdentifiers,omitempty"` 1091 1092 // Kind: Identifies what kind of resource this is. Value: the fixed 1093 // string "content#accountsAuthInfoResponse". 1094 Kind string `json:"kind,omitempty"` 1095 1096 // ServerResponse contains the HTTP response code and headers from the 1097 // server. 1098 googleapi.ServerResponse `json:"-"` 1099 1100 // ForceSendFields is a list of field names (e.g. "AccountIdentifiers") 1101 // to unconditionally include in API requests. By default, fields with 1102 // empty values are omitted from API requests. However, any non-pointer, 1103 // non-interface field appearing in ForceSendFields will be sent to the 1104 // server regardless of whether the field is empty or not. This may be 1105 // used to include empty fields in Patch requests. 1106 ForceSendFields []string `json:"-"` 1107 1108 // NullFields is a list of field names (e.g. "AccountIdentifiers") to 1109 // include in API requests with the JSON null value. By default, fields 1110 // with empty values are omitted from API requests. However, any field 1111 // with an empty value appearing in NullFields will be sent to the 1112 // server as null. It is an error if a field in this list has a 1113 // non-empty value. This may be used to include null fields in Patch 1114 // requests. 1115 NullFields []string `json:"-"` 1116} 1117 1118func (s *AccountsAuthInfoResponse) MarshalJSON() ([]byte, error) { 1119 type NoMethod AccountsAuthInfoResponse 1120 raw := NoMethod(*s) 1121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1122} 1123 1124type AccountsClaimWebsiteResponse struct { 1125 // Kind: Identifies what kind of resource this is. Value: the fixed 1126 // string "content#accountsClaimWebsiteResponse". 1127 Kind string `json:"kind,omitempty"` 1128 1129 // ServerResponse contains the HTTP response code and headers from the 1130 // server. 1131 googleapi.ServerResponse `json:"-"` 1132 1133 // ForceSendFields is a list of field names (e.g. "Kind") to 1134 // unconditionally include in API requests. By default, fields with 1135 // empty values are omitted from API requests. However, any non-pointer, 1136 // non-interface field appearing in ForceSendFields will be sent to the 1137 // server regardless of whether the field is empty or not. This may be 1138 // used to include empty fields in Patch requests. 1139 ForceSendFields []string `json:"-"` 1140 1141 // NullFields is a list of field names (e.g. "Kind") to include in API 1142 // requests with the JSON null value. By default, fields with empty 1143 // values are omitted from API requests. However, any field with an 1144 // empty value appearing in NullFields will be sent to the server as 1145 // null. It is an error if a field in this list has a non-empty value. 1146 // This may be used to include null fields in Patch requests. 1147 NullFields []string `json:"-"` 1148} 1149 1150func (s *AccountsClaimWebsiteResponse) MarshalJSON() ([]byte, error) { 1151 type NoMethod AccountsClaimWebsiteResponse 1152 raw := NoMethod(*s) 1153 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1154} 1155 1156type AccountsCustomBatchRequest struct { 1157 // Entries: The request entries to be processed in the batch. 1158 Entries []*AccountsCustomBatchRequestEntry `json:"entries,omitempty"` 1159 1160 // ForceSendFields is a list of field names (e.g. "Entries") to 1161 // unconditionally include in API requests. By default, fields with 1162 // empty values are omitted from API requests. However, any non-pointer, 1163 // non-interface field appearing in ForceSendFields will be sent to the 1164 // server regardless of whether the field is empty or not. This may be 1165 // used to include empty fields in Patch requests. 1166 ForceSendFields []string `json:"-"` 1167 1168 // NullFields is a list of field names (e.g. "Entries") to include in 1169 // API requests with the JSON null value. By default, fields with empty 1170 // values are omitted from API requests. However, any field with an 1171 // empty value appearing in NullFields will be sent to the server as 1172 // null. It is an error if a field in this list has a non-empty value. 1173 // This may be used to include null fields in Patch requests. 1174 NullFields []string `json:"-"` 1175} 1176 1177func (s *AccountsCustomBatchRequest) MarshalJSON() ([]byte, error) { 1178 type NoMethod AccountsCustomBatchRequest 1179 raw := NoMethod(*s) 1180 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1181} 1182 1183// AccountsCustomBatchRequestEntry: A batch entry encoding a single 1184// non-batch accounts request. 1185type AccountsCustomBatchRequestEntry struct { 1186 // Account: The account to create or update. Only defined if the method 1187 // is `insert` or `update`. 1188 Account *Account `json:"account,omitempty"` 1189 1190 // AccountId: The ID of the targeted account. Only defined if the method 1191 // is not `insert`. 1192 AccountId uint64 `json:"accountId,omitempty,string"` 1193 1194 // BatchId: An entry ID, unique within the batch request. 1195 BatchId int64 `json:"batchId,omitempty"` 1196 1197 // Force: Whether the account should be deleted if the account has 1198 // offers. Only applicable if the method is `delete`. 1199 Force bool `json:"force,omitempty"` 1200 1201 // LabelIds: Label IDs for the 'updatelabels' request. 1202 LabelIds googleapi.Uint64s `json:"labelIds,omitempty"` 1203 1204 // LinkRequest: Details about the `link` request. 1205 LinkRequest *AccountsCustomBatchRequestEntryLinkRequest `json:"linkRequest,omitempty"` 1206 1207 // MerchantId: The ID of the managing account. 1208 MerchantId uint64 `json:"merchantId,omitempty,string"` 1209 1210 // Method: The method of the batch entry. Acceptable values are: - 1211 // "claimWebsite" - "delete" - "get" - "insert" - "link" - 1212 // "update" 1213 Method string `json:"method,omitempty"` 1214 1215 // Overwrite: Only applicable if the method is `claimwebsite`. Indicates 1216 // whether or not to take the claim from another account in case there 1217 // is a conflict. 1218 Overwrite bool `json:"overwrite,omitempty"` 1219 1220 // ForceSendFields is a list of field names (e.g. "Account") to 1221 // unconditionally include in API requests. By default, fields with 1222 // empty values are omitted from API requests. However, any non-pointer, 1223 // non-interface field appearing in ForceSendFields will be sent to the 1224 // server regardless of whether the field is empty or not. This may be 1225 // used to include empty fields in Patch requests. 1226 ForceSendFields []string `json:"-"` 1227 1228 // NullFields is a list of field names (e.g. "Account") to include in 1229 // API requests with the JSON null value. By default, fields with empty 1230 // values are omitted from API requests. However, any field with an 1231 // empty value appearing in NullFields will be sent to the server as 1232 // null. It is an error if a field in this list has a non-empty value. 1233 // This may be used to include null fields in Patch requests. 1234 NullFields []string `json:"-"` 1235} 1236 1237func (s *AccountsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1238 type NoMethod AccountsCustomBatchRequestEntry 1239 raw := NoMethod(*s) 1240 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1241} 1242 1243type AccountsCustomBatchRequestEntryLinkRequest struct { 1244 // Action: Action to perform for this link. The "request" action is 1245 // only available to select merchants. Acceptable values are: - 1246 // "approve" - "remove" - "request" 1247 Action string `json:"action,omitempty"` 1248 1249 // LinkType: Type of the link between the two accounts. Acceptable 1250 // values are: - "channelPartner" - "eCommercePlatform" 1251 LinkType string `json:"linkType,omitempty"` 1252 1253 // LinkedAccountId: The ID of the linked account. 1254 LinkedAccountId string `json:"linkedAccountId,omitempty"` 1255 1256 // ForceSendFields is a list of field names (e.g. "Action") to 1257 // unconditionally include in API requests. By default, fields with 1258 // empty values are omitted from API requests. However, any non-pointer, 1259 // non-interface field appearing in ForceSendFields will be sent to the 1260 // server regardless of whether the field is empty or not. This may be 1261 // used to include empty fields in Patch requests. 1262 ForceSendFields []string `json:"-"` 1263 1264 // NullFields is a list of field names (e.g. "Action") to include in API 1265 // requests with the JSON null value. By default, fields with empty 1266 // values are omitted from API requests. However, any field with an 1267 // empty value appearing in NullFields will be sent to the server as 1268 // null. It is an error if a field in this list has a non-empty value. 1269 // This may be used to include null fields in Patch requests. 1270 NullFields []string `json:"-"` 1271} 1272 1273func (s *AccountsCustomBatchRequestEntryLinkRequest) MarshalJSON() ([]byte, error) { 1274 type NoMethod AccountsCustomBatchRequestEntryLinkRequest 1275 raw := NoMethod(*s) 1276 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1277} 1278 1279type AccountsCustomBatchResponse struct { 1280 // Entries: The result of the execution of the batch requests. 1281 Entries []*AccountsCustomBatchResponseEntry `json:"entries,omitempty"` 1282 1283 // Kind: Identifies what kind of resource this is. Value: the fixed 1284 // string "content#accountsCustomBatchResponse". 1285 Kind string `json:"kind,omitempty"` 1286 1287 // ServerResponse contains the HTTP response code and headers from the 1288 // server. 1289 googleapi.ServerResponse `json:"-"` 1290 1291 // ForceSendFields is a list of field names (e.g. "Entries") to 1292 // unconditionally include in API requests. By default, fields with 1293 // empty values are omitted from API requests. However, any non-pointer, 1294 // non-interface field appearing in ForceSendFields will be sent to the 1295 // server regardless of whether the field is empty or not. This may be 1296 // used to include empty fields in Patch requests. 1297 ForceSendFields []string `json:"-"` 1298 1299 // NullFields is a list of field names (e.g. "Entries") to include in 1300 // API requests with the JSON null value. By default, fields with empty 1301 // values are omitted from API requests. However, any field with an 1302 // empty value appearing in NullFields will be sent to the server as 1303 // null. It is an error if a field in this list has a non-empty value. 1304 // This may be used to include null fields in Patch requests. 1305 NullFields []string `json:"-"` 1306} 1307 1308func (s *AccountsCustomBatchResponse) MarshalJSON() ([]byte, error) { 1309 type NoMethod AccountsCustomBatchResponse 1310 raw := NoMethod(*s) 1311 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1312} 1313 1314// AccountsCustomBatchResponseEntry: A batch entry encoding a single 1315// non-batch accounts response. 1316type AccountsCustomBatchResponseEntry struct { 1317 // Account: The retrieved, created, or updated account. Not defined if 1318 // the method was `delete`, `claimwebsite` or `link`. 1319 Account *Account `json:"account,omitempty"` 1320 1321 // BatchId: The ID of the request entry this entry responds to. 1322 BatchId int64 `json:"batchId,omitempty"` 1323 1324 // Errors: A list of errors defined if and only if the request failed. 1325 Errors *Errors `json:"errors,omitempty"` 1326 1327 // Kind: Identifies what kind of resource this is. Value: the fixed 1328 // string "content#accountsCustomBatchResponseEntry" 1329 Kind string `json:"kind,omitempty"` 1330 1331 // LinkStatus: Deprecated. This field is never set. Acceptable values 1332 // are: - "active" - "inactive" - "pending" 1333 LinkStatus string `json:"linkStatus,omitempty"` 1334 1335 // ForceSendFields is a list of field names (e.g. "Account") to 1336 // unconditionally include in API requests. By default, fields with 1337 // empty values are omitted from API requests. However, any non-pointer, 1338 // non-interface field appearing in ForceSendFields will be sent to the 1339 // server regardless of whether the field is empty or not. This may be 1340 // used to include empty fields in Patch requests. 1341 ForceSendFields []string `json:"-"` 1342 1343 // NullFields is a list of field names (e.g. "Account") to include in 1344 // API requests with the JSON null value. By default, fields with empty 1345 // values are omitted from API requests. However, any field with an 1346 // empty value appearing in NullFields will be sent to the server as 1347 // null. It is an error if a field in this list has a non-empty value. 1348 // This may be used to include null fields in Patch requests. 1349 NullFields []string `json:"-"` 1350} 1351 1352func (s *AccountsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1353 type NoMethod AccountsCustomBatchResponseEntry 1354 raw := NoMethod(*s) 1355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1356} 1357 1358type AccountsLinkRequest struct { 1359 // Action: Action to perform for this link. The "request" action is 1360 // only available to select merchants. Acceptable values are: - 1361 // "approve" - "remove" - "request" 1362 Action string `json:"action,omitempty"` 1363 1364 // LinkType: Type of the link between the two accounts. Acceptable 1365 // values are: - "channelPartner" - "eCommercePlatform" 1366 LinkType string `json:"linkType,omitempty"` 1367 1368 // LinkedAccountId: The ID of the linked account. 1369 LinkedAccountId string `json:"linkedAccountId,omitempty"` 1370 1371 // ForceSendFields is a list of field names (e.g. "Action") to 1372 // unconditionally include in API requests. By default, fields with 1373 // empty values are omitted from API requests. However, any non-pointer, 1374 // non-interface field appearing in ForceSendFields will be sent to the 1375 // server regardless of whether the field is empty or not. This may be 1376 // used to include empty fields in Patch requests. 1377 ForceSendFields []string `json:"-"` 1378 1379 // NullFields is a list of field names (e.g. "Action") to include in API 1380 // requests with the JSON null value. By default, fields with empty 1381 // values are omitted from API requests. However, any field with an 1382 // empty value appearing in NullFields will be sent to the server as 1383 // null. It is an error if a field in this list has a non-empty value. 1384 // This may be used to include null fields in Patch requests. 1385 NullFields []string `json:"-"` 1386} 1387 1388func (s *AccountsLinkRequest) MarshalJSON() ([]byte, error) { 1389 type NoMethod AccountsLinkRequest 1390 raw := NoMethod(*s) 1391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1392} 1393 1394type AccountsLinkResponse struct { 1395 // Kind: Identifies what kind of resource this is. Value: the fixed 1396 // string "content#accountsLinkResponse". 1397 Kind string `json:"kind,omitempty"` 1398 1399 // ServerResponse contains the HTTP response code and headers from the 1400 // server. 1401 googleapi.ServerResponse `json:"-"` 1402 1403 // ForceSendFields is a list of field names (e.g. "Kind") to 1404 // unconditionally include in API requests. By default, fields with 1405 // empty values are omitted from API requests. However, any non-pointer, 1406 // non-interface field appearing in ForceSendFields will be sent to the 1407 // server regardless of whether the field is empty or not. This may be 1408 // used to include empty fields in Patch requests. 1409 ForceSendFields []string `json:"-"` 1410 1411 // NullFields is a list of field names (e.g. "Kind") to include in API 1412 // requests with the JSON null value. By default, fields with empty 1413 // values are omitted from API requests. However, any field with an 1414 // empty value appearing in NullFields will be sent to the server as 1415 // null. It is an error if a field in this list has a non-empty value. 1416 // This may be used to include null fields in Patch requests. 1417 NullFields []string `json:"-"` 1418} 1419 1420func (s *AccountsLinkResponse) MarshalJSON() ([]byte, error) { 1421 type NoMethod AccountsLinkResponse 1422 raw := NoMethod(*s) 1423 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1424} 1425 1426type AccountsListResponse struct { 1427 // Kind: Identifies what kind of resource this is. Value: the fixed 1428 // string "content#accountsListResponse". 1429 Kind string `json:"kind,omitempty"` 1430 1431 // NextPageToken: The token for the retrieval of the next page of 1432 // accounts. 1433 NextPageToken string `json:"nextPageToken,omitempty"` 1434 1435 Resources []*Account `json:"resources,omitempty"` 1436 1437 // ServerResponse contains the HTTP response code and headers from the 1438 // server. 1439 googleapi.ServerResponse `json:"-"` 1440 1441 // ForceSendFields is a list of field names (e.g. "Kind") to 1442 // unconditionally include in API requests. By default, fields with 1443 // empty values are omitted from API requests. However, any non-pointer, 1444 // non-interface field appearing in ForceSendFields will be sent to the 1445 // server regardless of whether the field is empty or not. This may be 1446 // used to include empty fields in Patch requests. 1447 ForceSendFields []string `json:"-"` 1448 1449 // NullFields is a list of field names (e.g. "Kind") to include in API 1450 // requests with the JSON null value. By default, fields with empty 1451 // values are omitted from API requests. However, any field with an 1452 // empty value appearing in NullFields will be sent to the server as 1453 // null. It is an error if a field in this list has a non-empty value. 1454 // This may be used to include null fields in Patch requests. 1455 NullFields []string `json:"-"` 1456} 1457 1458func (s *AccountsListResponse) MarshalJSON() ([]byte, error) { 1459 type NoMethod AccountsListResponse 1460 raw := NoMethod(*s) 1461 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1462} 1463 1464type AccountstatusesCustomBatchRequest struct { 1465 // Entries: The request entries to be processed in the batch. 1466 Entries []*AccountstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 1467 1468 // ForceSendFields is a list of field names (e.g. "Entries") to 1469 // unconditionally include in API requests. By default, fields with 1470 // empty values are omitted from API requests. However, any non-pointer, 1471 // non-interface field appearing in ForceSendFields will be sent to the 1472 // server regardless of whether the field is empty or not. This may be 1473 // used to include empty fields in Patch requests. 1474 ForceSendFields []string `json:"-"` 1475 1476 // NullFields is a list of field names (e.g. "Entries") to include in 1477 // API requests with the JSON null value. By default, fields with empty 1478 // values are omitted from API requests. However, any field with an 1479 // empty value appearing in NullFields will be sent to the server as 1480 // null. It is an error if a field in this list has a non-empty value. 1481 // This may be used to include null fields in Patch requests. 1482 NullFields []string `json:"-"` 1483} 1484 1485func (s *AccountstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 1486 type NoMethod AccountstatusesCustomBatchRequest 1487 raw := NoMethod(*s) 1488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1489} 1490 1491// AccountstatusesCustomBatchRequestEntry: A batch entry encoding a 1492// single non-batch accountstatuses request. 1493type AccountstatusesCustomBatchRequestEntry struct { 1494 // AccountId: The ID of the (sub-)account whose status to get. 1495 AccountId uint64 `json:"accountId,omitempty,string"` 1496 1497 // BatchId: An entry ID, unique within the batch request. 1498 BatchId int64 `json:"batchId,omitempty"` 1499 1500 // Destinations: If set, only issues for the specified destinations are 1501 // returned, otherwise only issues for the Shopping destination. 1502 Destinations []string `json:"destinations,omitempty"` 1503 1504 // MerchantId: The ID of the managing account. 1505 MerchantId uint64 `json:"merchantId,omitempty,string"` 1506 1507 // Method: The method of the batch entry. Acceptable values are: - 1508 // "get" 1509 Method string `json:"method,omitempty"` 1510 1511 // ForceSendFields is a list of field names (e.g. "AccountId") to 1512 // unconditionally include in API requests. By default, fields with 1513 // empty values are omitted from API requests. However, any non-pointer, 1514 // non-interface field appearing in ForceSendFields will be sent to the 1515 // server regardless of whether the field is empty or not. This may be 1516 // used to include empty fields in Patch requests. 1517 ForceSendFields []string `json:"-"` 1518 1519 // NullFields is a list of field names (e.g. "AccountId") to include in 1520 // API requests with the JSON null value. By default, fields with empty 1521 // values are omitted from API requests. However, any field with an 1522 // empty value appearing in NullFields will be sent to the server as 1523 // null. It is an error if a field in this list has a non-empty value. 1524 // This may be used to include null fields in Patch requests. 1525 NullFields []string `json:"-"` 1526} 1527 1528func (s *AccountstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1529 type NoMethod AccountstatusesCustomBatchRequestEntry 1530 raw := NoMethod(*s) 1531 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1532} 1533 1534type AccountstatusesCustomBatchResponse struct { 1535 // Entries: The result of the execution of the batch requests. 1536 Entries []*AccountstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 1537 1538 // Kind: Identifies what kind of resource this is. Value: the fixed 1539 // string "content#accountstatusesCustomBatchResponse". 1540 Kind string `json:"kind,omitempty"` 1541 1542 // ServerResponse contains the HTTP response code and headers from the 1543 // server. 1544 googleapi.ServerResponse `json:"-"` 1545 1546 // ForceSendFields is a list of field names (e.g. "Entries") to 1547 // unconditionally include in API requests. By default, fields with 1548 // empty values are omitted from API requests. However, any non-pointer, 1549 // non-interface field appearing in ForceSendFields will be sent to the 1550 // server regardless of whether the field is empty or not. This may be 1551 // used to include empty fields in Patch requests. 1552 ForceSendFields []string `json:"-"` 1553 1554 // NullFields is a list of field names (e.g. "Entries") to include in 1555 // API requests with the JSON null value. By default, fields with empty 1556 // values are omitted from API requests. However, any field with an 1557 // empty value appearing in NullFields will be sent to the server as 1558 // null. It is an error if a field in this list has a non-empty value. 1559 // This may be used to include null fields in Patch requests. 1560 NullFields []string `json:"-"` 1561} 1562 1563func (s *AccountstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 1564 type NoMethod AccountstatusesCustomBatchResponse 1565 raw := NoMethod(*s) 1566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1567} 1568 1569// AccountstatusesCustomBatchResponseEntry: A batch entry encoding a 1570// single non-batch accountstatuses response. 1571type AccountstatusesCustomBatchResponseEntry struct { 1572 // AccountStatus: The requested account status. Defined if and only if 1573 // the request was successful. 1574 AccountStatus *AccountStatus `json:"accountStatus,omitempty"` 1575 1576 // BatchId: The ID of the request entry this entry responds to. 1577 BatchId int64 `json:"batchId,omitempty"` 1578 1579 // Errors: A list of errors defined if and only if the request failed. 1580 Errors *Errors `json:"errors,omitempty"` 1581 1582 // ForceSendFields is a list of field names (e.g. "AccountStatus") to 1583 // unconditionally include in API requests. By default, fields with 1584 // empty values are omitted from API requests. However, any non-pointer, 1585 // non-interface field appearing in ForceSendFields will be sent to the 1586 // server regardless of whether the field is empty or not. This may be 1587 // used to include empty fields in Patch requests. 1588 ForceSendFields []string `json:"-"` 1589 1590 // NullFields is a list of field names (e.g. "AccountStatus") to include 1591 // in API requests with the JSON null value. By default, fields with 1592 // empty values are omitted from API requests. However, any field with 1593 // an empty value appearing in NullFields will be sent to the server as 1594 // null. It is an error if a field in this list has a non-empty value. 1595 // This may be used to include null fields in Patch requests. 1596 NullFields []string `json:"-"` 1597} 1598 1599func (s *AccountstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1600 type NoMethod AccountstatusesCustomBatchResponseEntry 1601 raw := NoMethod(*s) 1602 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1603} 1604 1605type AccountstatusesListResponse struct { 1606 // Kind: Identifies what kind of resource this is. Value: the fixed 1607 // string "content#accountstatusesListResponse". 1608 Kind string `json:"kind,omitempty"` 1609 1610 // NextPageToken: The token for the retrieval of the next page of 1611 // account statuses. 1612 NextPageToken string `json:"nextPageToken,omitempty"` 1613 1614 Resources []*AccountStatus `json:"resources,omitempty"` 1615 1616 // ServerResponse contains the HTTP response code and headers from the 1617 // server. 1618 googleapi.ServerResponse `json:"-"` 1619 1620 // ForceSendFields is a list of field names (e.g. "Kind") to 1621 // unconditionally include in API requests. By default, fields with 1622 // empty values are omitted from API requests. However, any non-pointer, 1623 // non-interface field appearing in ForceSendFields will be sent to the 1624 // server regardless of whether the field is empty or not. This may be 1625 // used to include empty fields in Patch requests. 1626 ForceSendFields []string `json:"-"` 1627 1628 // NullFields is a list of field names (e.g. "Kind") to include in API 1629 // requests with the JSON null value. By default, fields with empty 1630 // values are omitted from API requests. However, any field with an 1631 // empty value appearing in NullFields will be sent to the server as 1632 // null. It is an error if a field in this list has a non-empty value. 1633 // This may be used to include null fields in Patch requests. 1634 NullFields []string `json:"-"` 1635} 1636 1637func (s *AccountstatusesListResponse) MarshalJSON() ([]byte, error) { 1638 type NoMethod AccountstatusesListResponse 1639 raw := NoMethod(*s) 1640 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1641} 1642 1643type AccounttaxCustomBatchRequest struct { 1644 // Entries: The request entries to be processed in the batch. 1645 Entries []*AccounttaxCustomBatchRequestEntry `json:"entries,omitempty"` 1646 1647 // ForceSendFields is a list of field names (e.g. "Entries") to 1648 // unconditionally include in API requests. By default, fields with 1649 // empty values are omitted from API requests. However, any non-pointer, 1650 // non-interface field appearing in ForceSendFields will be sent to the 1651 // server regardless of whether the field is empty or not. This may be 1652 // used to include empty fields in Patch requests. 1653 ForceSendFields []string `json:"-"` 1654 1655 // NullFields is a list of field names (e.g. "Entries") to include in 1656 // API requests with the JSON null value. By default, fields with empty 1657 // values are omitted from API requests. However, any field with an 1658 // empty value appearing in NullFields will be sent to the server as 1659 // null. It is an error if a field in this list has a non-empty value. 1660 // This may be used to include null fields in Patch requests. 1661 NullFields []string `json:"-"` 1662} 1663 1664func (s *AccounttaxCustomBatchRequest) MarshalJSON() ([]byte, error) { 1665 type NoMethod AccounttaxCustomBatchRequest 1666 raw := NoMethod(*s) 1667 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1668} 1669 1670// AccounttaxCustomBatchRequestEntry: A batch entry encoding a single 1671// non-batch accounttax request. 1672type AccounttaxCustomBatchRequestEntry struct { 1673 // AccountId: The ID of the account for which to get/update account tax 1674 // settings. 1675 AccountId uint64 `json:"accountId,omitempty,string"` 1676 1677 // AccountTax: The account tax settings to update. Only defined if the 1678 // method is `update`. 1679 AccountTax *AccountTax `json:"accountTax,omitempty"` 1680 1681 // BatchId: An entry ID, unique within the batch request. 1682 BatchId int64 `json:"batchId,omitempty"` 1683 1684 // MerchantId: The ID of the managing account. 1685 MerchantId uint64 `json:"merchantId,omitempty,string"` 1686 1687 // Method: The method of the batch entry. Acceptable values are: - 1688 // "get" - "update" 1689 Method string `json:"method,omitempty"` 1690 1691 // ForceSendFields is a list of field names (e.g. "AccountId") to 1692 // unconditionally include in API requests. By default, fields with 1693 // empty values are omitted from API requests. However, any non-pointer, 1694 // non-interface field appearing in ForceSendFields will be sent to the 1695 // server regardless of whether the field is empty or not. This may be 1696 // used to include empty fields in Patch requests. 1697 ForceSendFields []string `json:"-"` 1698 1699 // NullFields is a list of field names (e.g. "AccountId") to include in 1700 // API requests with the JSON null value. By default, fields with empty 1701 // values are omitted from API requests. However, any field with an 1702 // empty value appearing in NullFields will be sent to the server as 1703 // null. It is an error if a field in this list has a non-empty value. 1704 // This may be used to include null fields in Patch requests. 1705 NullFields []string `json:"-"` 1706} 1707 1708func (s *AccounttaxCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 1709 type NoMethod AccounttaxCustomBatchRequestEntry 1710 raw := NoMethod(*s) 1711 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1712} 1713 1714type AccounttaxCustomBatchResponse struct { 1715 // Entries: The result of the execution of the batch requests. 1716 Entries []*AccounttaxCustomBatchResponseEntry `json:"entries,omitempty"` 1717 1718 // Kind: Identifies what kind of resource this is. Value: the fixed 1719 // string "content#accounttaxCustomBatchResponse". 1720 Kind string `json:"kind,omitempty"` 1721 1722 // ServerResponse contains the HTTP response code and headers from the 1723 // server. 1724 googleapi.ServerResponse `json:"-"` 1725 1726 // ForceSendFields is a list of field names (e.g. "Entries") to 1727 // unconditionally include in API requests. By default, fields with 1728 // empty values are omitted from API requests. However, any non-pointer, 1729 // non-interface field appearing in ForceSendFields will be sent to the 1730 // server regardless of whether the field is empty or not. This may be 1731 // used to include empty fields in Patch requests. 1732 ForceSendFields []string `json:"-"` 1733 1734 // NullFields is a list of field names (e.g. "Entries") to include in 1735 // API requests with the JSON null value. By default, fields with empty 1736 // values are omitted from API requests. However, any field with an 1737 // empty value appearing in NullFields will be sent to the server as 1738 // null. It is an error if a field in this list has a non-empty value. 1739 // This may be used to include null fields in Patch requests. 1740 NullFields []string `json:"-"` 1741} 1742 1743func (s *AccounttaxCustomBatchResponse) MarshalJSON() ([]byte, error) { 1744 type NoMethod AccounttaxCustomBatchResponse 1745 raw := NoMethod(*s) 1746 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1747} 1748 1749// AccounttaxCustomBatchResponseEntry: A batch entry encoding a single 1750// non-batch accounttax response. 1751type AccounttaxCustomBatchResponseEntry struct { 1752 // AccountTax: The retrieved or updated account tax settings. 1753 AccountTax *AccountTax `json:"accountTax,omitempty"` 1754 1755 // BatchId: The ID of the request entry this entry responds to. 1756 BatchId int64 `json:"batchId,omitempty"` 1757 1758 // Errors: A list of errors defined if and only if the request failed. 1759 Errors *Errors `json:"errors,omitempty"` 1760 1761 // Kind: Identifies what kind of resource this is. Value: the fixed 1762 // string "content#accounttaxCustomBatchResponseEntry" 1763 Kind string `json:"kind,omitempty"` 1764 1765 // ForceSendFields is a list of field names (e.g. "AccountTax") to 1766 // unconditionally include in API requests. By default, fields with 1767 // empty values are omitted from API requests. However, any non-pointer, 1768 // non-interface field appearing in ForceSendFields will be sent to the 1769 // server regardless of whether the field is empty or not. This may be 1770 // used to include empty fields in Patch requests. 1771 ForceSendFields []string `json:"-"` 1772 1773 // NullFields is a list of field names (e.g. "AccountTax") to include in 1774 // API requests with the JSON null value. By default, fields with empty 1775 // values are omitted from API requests. However, any field with an 1776 // empty value appearing in NullFields will be sent to the server as 1777 // null. It is an error if a field in this list has a non-empty value. 1778 // This may be used to include null fields in Patch requests. 1779 NullFields []string `json:"-"` 1780} 1781 1782func (s *AccounttaxCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 1783 type NoMethod AccounttaxCustomBatchResponseEntry 1784 raw := NoMethod(*s) 1785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1786} 1787 1788type AccounttaxListResponse struct { 1789 // Kind: Identifies what kind of resource this is. Value: the fixed 1790 // string "content#accounttaxListResponse". 1791 Kind string `json:"kind,omitempty"` 1792 1793 // NextPageToken: The token for the retrieval of the next page of 1794 // account tax settings. 1795 NextPageToken string `json:"nextPageToken,omitempty"` 1796 1797 Resources []*AccountTax `json:"resources,omitempty"` 1798 1799 // ServerResponse contains the HTTP response code and headers from the 1800 // server. 1801 googleapi.ServerResponse `json:"-"` 1802 1803 // ForceSendFields is a list of field names (e.g. "Kind") to 1804 // unconditionally include in API requests. By default, fields with 1805 // empty values are omitted from API requests. However, any non-pointer, 1806 // non-interface field appearing in ForceSendFields will be sent to the 1807 // server regardless of whether the field is empty or not. This may be 1808 // used to include empty fields in Patch requests. 1809 ForceSendFields []string `json:"-"` 1810 1811 // NullFields is a list of field names (e.g. "Kind") to include in API 1812 // requests with the JSON null value. By default, fields with empty 1813 // values are omitted from API requests. However, any field with an 1814 // empty value appearing in NullFields will be sent to the server as 1815 // null. It is an error if a field in this list has a non-empty value. 1816 // This may be used to include null fields in Patch requests. 1817 NullFields []string `json:"-"` 1818} 1819 1820func (s *AccounttaxListResponse) MarshalJSON() ([]byte, error) { 1821 type NoMethod AccounttaxListResponse 1822 raw := NoMethod(*s) 1823 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1824} 1825 1826type Amount struct { 1827 // Pretax: [required] Value before taxes. 1828 Pretax *Price `json:"pretax,omitempty"` 1829 1830 // Tax: [required] Tax value. 1831 Tax *Price `json:"tax,omitempty"` 1832 1833 // ForceSendFields is a list of field names (e.g. "Pretax") to 1834 // unconditionally include in API requests. By default, fields with 1835 // empty values are omitted from API requests. However, any non-pointer, 1836 // non-interface field appearing in ForceSendFields will be sent to the 1837 // server regardless of whether the field is empty or not. This may be 1838 // used to include empty fields in Patch requests. 1839 ForceSendFields []string `json:"-"` 1840 1841 // NullFields is a list of field names (e.g. "Pretax") to include in API 1842 // requests with the JSON null value. By default, fields with empty 1843 // values are omitted from API requests. However, any field with an 1844 // empty value appearing in NullFields will be sent to the server as 1845 // null. It is an error if a field in this list has a non-empty value. 1846 // This may be used to include null fields in Patch requests. 1847 NullFields []string `json:"-"` 1848} 1849 1850func (s *Amount) MarshalJSON() ([]byte, error) { 1851 type NoMethod Amount 1852 raw := NoMethod(*s) 1853 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1854} 1855 1856type BusinessDayConfig struct { 1857 // BusinessDays: Regular business days. May not be empty. 1858 BusinessDays []string `json:"businessDays,omitempty"` 1859 1860 // ForceSendFields is a list of field names (e.g. "BusinessDays") to 1861 // unconditionally include in API requests. By default, fields with 1862 // empty values are omitted from API requests. However, any non-pointer, 1863 // non-interface field appearing in ForceSendFields will be sent to the 1864 // server regardless of whether the field is empty or not. This may be 1865 // used to include empty fields in Patch requests. 1866 ForceSendFields []string `json:"-"` 1867 1868 // NullFields is a list of field names (e.g. "BusinessDays") to include 1869 // in API requests with the JSON null value. By default, fields with 1870 // empty values are omitted from API requests. However, any field with 1871 // an empty value appearing in NullFields will be sent to the server as 1872 // null. It is an error if a field in this list has a non-empty value. 1873 // This may be used to include null fields in Patch requests. 1874 NullFields []string `json:"-"` 1875} 1876 1877func (s *BusinessDayConfig) MarshalJSON() ([]byte, error) { 1878 type NoMethod BusinessDayConfig 1879 raw := NoMethod(*s) 1880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1881} 1882 1883type CarrierRate struct { 1884 // CarrierName: Carrier service, such as "UPS" or "Fedex". The list 1885 // of supported carriers can be retrieved via the `getSupportedCarriers` 1886 // method. Required. 1887 CarrierName string `json:"carrierName,omitempty"` 1888 1889 // CarrierService: Carrier service, such as "ground" or "2 days". 1890 // The list of supported services for a carrier can be retrieved via the 1891 // `getSupportedCarriers` method. Required. 1892 CarrierService string `json:"carrierService,omitempty"` 1893 1894 // FlatAdjustment: Additive shipping rate modifier. Can be negative. For 1895 // example `{ "value": "1", "currency" : "USD" }` adds $1 to the rate, 1896 // `{ "value": "-3", "currency" : "USD" }` removes $3 from the rate. 1897 // Optional. 1898 FlatAdjustment *Price `json:"flatAdjustment,omitempty"` 1899 1900 // Name: Name of the carrier rate. Must be unique per rate group. 1901 // Required. 1902 Name string `json:"name,omitempty"` 1903 1904 // OriginPostalCode: Shipping origin for this carrier rate. Required. 1905 OriginPostalCode string `json:"originPostalCode,omitempty"` 1906 1907 // PercentageAdjustment: Multiplicative shipping rate modifier as a 1908 // number in decimal notation. Can be negative. For example "5.4" 1909 // increases the rate by 5.4%, "-3" decreases the rate by 3%. 1910 // Optional. 1911 PercentageAdjustment string `json:"percentageAdjustment,omitempty"` 1912 1913 // ForceSendFields is a list of field names (e.g. "CarrierName") to 1914 // unconditionally include in API requests. By default, fields with 1915 // empty values are omitted from API requests. However, any non-pointer, 1916 // non-interface field appearing in ForceSendFields will be sent to the 1917 // server regardless of whether the field is empty or not. This may be 1918 // used to include empty fields in Patch requests. 1919 ForceSendFields []string `json:"-"` 1920 1921 // NullFields is a list of field names (e.g. "CarrierName") to include 1922 // in API requests with the JSON null value. By default, fields with 1923 // empty values are omitted from API requests. However, any field with 1924 // an empty value appearing in NullFields will be sent to the server as 1925 // null. It is an error if a field in this list has a non-empty value. 1926 // This may be used to include null fields in Patch requests. 1927 NullFields []string `json:"-"` 1928} 1929 1930func (s *CarrierRate) MarshalJSON() ([]byte, error) { 1931 type NoMethod CarrierRate 1932 raw := NoMethod(*s) 1933 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1934} 1935 1936type CarriersCarrier struct { 1937 // Country: The CLDR country code of the carrier (e.g., "US"). Always 1938 // present. 1939 Country string `json:"country,omitempty"` 1940 1941 // EddServices: A list of services supported for EDD (Estimated Delivery 1942 // Date) calculation. This is the list of valid values for 1943 // WarehouseBasedDeliveryTime.carrierService. 1944 EddServices []string `json:"eddServices,omitempty"` 1945 1946 // Name: The name of the carrier (e.g., "UPS"). Always present. 1947 Name string `json:"name,omitempty"` 1948 1949 // Services: A list of supported services (e.g., "ground") for that 1950 // carrier. Contains at least one service. This is the list of valid 1951 // values for CarrierRate.carrierService. 1952 Services []string `json:"services,omitempty"` 1953 1954 // ForceSendFields is a list of field names (e.g. "Country") to 1955 // unconditionally include in API requests. By default, fields with 1956 // empty values are omitted from API requests. However, any non-pointer, 1957 // non-interface field appearing in ForceSendFields will be sent to the 1958 // server regardless of whether the field is empty or not. This may be 1959 // used to include empty fields in Patch requests. 1960 ForceSendFields []string `json:"-"` 1961 1962 // NullFields is a list of field names (e.g. "Country") to include in 1963 // API requests with the JSON null value. By default, fields with empty 1964 // values are omitted from API requests. However, any field with an 1965 // empty value appearing in NullFields will be sent to the server as 1966 // null. It is an error if a field in this list has a non-empty value. 1967 // This may be used to include null fields in Patch requests. 1968 NullFields []string `json:"-"` 1969} 1970 1971func (s *CarriersCarrier) MarshalJSON() ([]byte, error) { 1972 type NoMethod CarriersCarrier 1973 raw := NoMethod(*s) 1974 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1975} 1976 1977type CustomAttribute struct { 1978 // Name: The name of the attribute. Underscores will be replaced by 1979 // spaces upon insertion. 1980 Name string `json:"name,omitempty"` 1981 1982 // Type: The type of the attribute. Acceptable values are: - "boolean" 1983 // - "datetimerange" - "float" - "group" - "int" - "price" - 1984 // "text" - "time" - "url" 1985 Type string `json:"type,omitempty"` 1986 1987 // Unit: Free-form unit of the attribute. Unit can only be used for 1988 // values of type int, float, or price. 1989 Unit string `json:"unit,omitempty"` 1990 1991 // Value: The value of the attribute. 1992 Value string `json:"value,omitempty"` 1993 1994 // ForceSendFields is a list of field names (e.g. "Name") to 1995 // unconditionally include in API requests. By default, fields with 1996 // empty values are omitted from API requests. However, any non-pointer, 1997 // non-interface field appearing in ForceSendFields will be sent to the 1998 // server regardless of whether the field is empty or not. This may be 1999 // used to include empty fields in Patch requests. 2000 ForceSendFields []string `json:"-"` 2001 2002 // NullFields is a list of field names (e.g. "Name") to include in API 2003 // requests with the JSON null value. By default, fields with empty 2004 // values are omitted from API requests. However, any field with an 2005 // empty value appearing in NullFields will be sent to the server as 2006 // null. It is an error if a field in this list has a non-empty value. 2007 // This may be used to include null fields in Patch requests. 2008 NullFields []string `json:"-"` 2009} 2010 2011func (s *CustomAttribute) MarshalJSON() ([]byte, error) { 2012 type NoMethod CustomAttribute 2013 raw := NoMethod(*s) 2014 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2015} 2016 2017type CustomGroup struct { 2018 // Attributes: The sub-attributes. 2019 Attributes []*CustomAttribute `json:"attributes,omitempty"` 2020 2021 // Name: The name of the group. Underscores will be replaced by spaces 2022 // upon insertion. 2023 Name string `json:"name,omitempty"` 2024 2025 // ForceSendFields is a list of field names (e.g. "Attributes") to 2026 // unconditionally include in API requests. By default, fields with 2027 // empty values are omitted from API requests. However, any non-pointer, 2028 // non-interface field appearing in ForceSendFields will be sent to the 2029 // server regardless of whether the field is empty or not. This may be 2030 // used to include empty fields in Patch requests. 2031 ForceSendFields []string `json:"-"` 2032 2033 // NullFields is a list of field names (e.g. "Attributes") to include in 2034 // API requests with the JSON null value. By default, fields with empty 2035 // values are omitted from API requests. However, any field with an 2036 // empty value appearing in NullFields will be sent to the server as 2037 // null. It is an error if a field in this list has a non-empty value. 2038 // This may be used to include null fields in Patch requests. 2039 NullFields []string `json:"-"` 2040} 2041 2042func (s *CustomGroup) MarshalJSON() ([]byte, error) { 2043 type NoMethod CustomGroup 2044 raw := NoMethod(*s) 2045 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2046} 2047 2048type CustomerReturnReason struct { 2049 // Description: Description of the reason. 2050 Description string `json:"description,omitempty"` 2051 2052 // ReasonCode: Code of the return reason. Acceptable values are: - 2053 // "betterPriceFound" - "changedMind" - "damagedOrDefectiveItem" - 2054 // "didNotMatchDescription" - "doesNotFit" - "expiredItem" - 2055 // "incorrectItemReceived" - "noLongerNeeded" - "notSpecified" - 2056 // "orderedWrongItem" - "other" - "qualityNotExpected" - 2057 // "receivedTooLate" - "undeliverable" 2058 ReasonCode string `json:"reasonCode,omitempty"` 2059 2060 // ForceSendFields is a list of field names (e.g. "Description") to 2061 // unconditionally include in API requests. By default, fields with 2062 // empty values are omitted from API requests. However, any non-pointer, 2063 // non-interface field appearing in ForceSendFields will be sent to the 2064 // server regardless of whether the field is empty or not. This may be 2065 // used to include empty fields in Patch requests. 2066 ForceSendFields []string `json:"-"` 2067 2068 // NullFields is a list of field names (e.g. "Description") to include 2069 // in API requests with the JSON null value. By default, fields with 2070 // empty values are omitted from API requests. However, any field with 2071 // an empty value appearing in NullFields will be sent to the server as 2072 // null. It is an error if a field in this list has a non-empty value. 2073 // This may be used to include null fields in Patch requests. 2074 NullFields []string `json:"-"` 2075} 2076 2077func (s *CustomerReturnReason) MarshalJSON() ([]byte, error) { 2078 type NoMethod CustomerReturnReason 2079 raw := NoMethod(*s) 2080 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2081} 2082 2083type CutoffTime struct { 2084 // Hour: Hour of the cutoff time until which an order has to be placed 2085 // to be processed in the same day. Required. 2086 Hour int64 `json:"hour,omitempty"` 2087 2088 // Minute: Minute of the cutoff time until which an order has to be 2089 // placed to be processed in the same day. Required. 2090 Minute int64 `json:"minute,omitempty"` 2091 2092 // Timezone: Timezone identifier for the cutoff time. A list of 2093 // identifiers can be found in the AdWords API documentation. E.g. 2094 // "Europe/Zurich". Required. 2095 Timezone string `json:"timezone,omitempty"` 2096 2097 // ForceSendFields is a list of field names (e.g. "Hour") to 2098 // unconditionally include in API requests. By default, fields with 2099 // empty values are omitted from API requests. However, any non-pointer, 2100 // non-interface field appearing in ForceSendFields will be sent to the 2101 // server regardless of whether the field is empty or not. This may be 2102 // used to include empty fields in Patch requests. 2103 ForceSendFields []string `json:"-"` 2104 2105 // NullFields is a list of field names (e.g. "Hour") to include in API 2106 // requests with the JSON null value. By default, fields with empty 2107 // values are omitted from API requests. However, any field with an 2108 // empty value appearing in NullFields will be sent to the server as 2109 // null. It is an error if a field in this list has a non-empty value. 2110 // This may be used to include null fields in Patch requests. 2111 NullFields []string `json:"-"` 2112} 2113 2114func (s *CutoffTime) MarshalJSON() ([]byte, error) { 2115 type NoMethod CutoffTime 2116 raw := NoMethod(*s) 2117 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2118} 2119 2120// Datafeed: Datafeed configuration data. 2121type Datafeed struct { 2122 // AttributeLanguage: The two-letter ISO 639-1 language in which the 2123 // attributes are defined in the data feed. 2124 AttributeLanguage string `json:"attributeLanguage,omitempty"` 2125 2126 // ContentLanguage: [DEPRECATED] Please use targets[].language instead. 2127 // The two-letter ISO 639-1 language of the items in the feed. Must be a 2128 // valid language for `targetCountry`. 2129 ContentLanguage string `json:"contentLanguage,omitempty"` 2130 2131 // ContentType: Required. The type of data feed. For product inventory 2132 // feeds, only feeds for local stores, not online stores, are supported. 2133 // Acceptable values are: - "local products" - "product inventory" - 2134 // "products" 2135 ContentType string `json:"contentType,omitempty"` 2136 2137 // FetchSchedule: Fetch schedule for the feed file. 2138 FetchSchedule *DatafeedFetchSchedule `json:"fetchSchedule,omitempty"` 2139 2140 // FileName: Required. The filename of the feed. All feeds must have a 2141 // unique file name. 2142 FileName string `json:"fileName,omitempty"` 2143 2144 // Format: Format of the feed file. 2145 Format *DatafeedFormat `json:"format,omitempty"` 2146 2147 // Id: Required for update. The ID of the data feed. 2148 Id int64 `json:"id,omitempty,string"` 2149 2150 // IntendedDestinations: [DEPRECATED] Please use 2151 // targets[].includedDestinations instead. The list of intended 2152 // destinations (corresponds to checked check boxes in Merchant Center). 2153 IntendedDestinations []string `json:"intendedDestinations,omitempty"` 2154 2155 // Kind: Identifies what kind of resource this is. Value: the fixed 2156 // string "content#datafeed" 2157 Kind string `json:"kind,omitempty"` 2158 2159 // Name: Required for insert. A descriptive name of the data feed. 2160 Name string `json:"name,omitempty"` 2161 2162 // TargetCountry: [DEPRECATED] Please use targets[].country instead. The 2163 // country where the items in the feed will be included in the search 2164 // index, represented as a CLDR territory code. 2165 TargetCountry string `json:"targetCountry,omitempty"` 2166 2167 // Targets: The targets this feed should apply to (country, language, 2168 // destinations). 2169 Targets []*DatafeedTarget `json:"targets,omitempty"` 2170 2171 // ServerResponse contains the HTTP response code and headers from the 2172 // server. 2173 googleapi.ServerResponse `json:"-"` 2174 2175 // ForceSendFields is a list of field names (e.g. "AttributeLanguage") 2176 // to unconditionally include in API requests. By default, fields with 2177 // empty values are omitted from API requests. However, any non-pointer, 2178 // non-interface field appearing in ForceSendFields will be sent to the 2179 // server regardless of whether the field is empty or not. This may be 2180 // used to include empty fields in Patch requests. 2181 ForceSendFields []string `json:"-"` 2182 2183 // NullFields is a list of field names (e.g. "AttributeLanguage") to 2184 // include in API requests with the JSON null value. By default, fields 2185 // with empty values are omitted from API requests. However, any field 2186 // with an empty value appearing in NullFields will be sent to the 2187 // server as null. It is an error if a field in this list has a 2188 // non-empty value. This may be used to include null fields in Patch 2189 // requests. 2190 NullFields []string `json:"-"` 2191} 2192 2193func (s *Datafeed) MarshalJSON() ([]byte, error) { 2194 type NoMethod Datafeed 2195 raw := NoMethod(*s) 2196 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2197} 2198 2199// DatafeedFetchSchedule: The required fields vary based on the 2200// frequency of fetching. For a monthly fetch schedule, day_of_month and 2201// hour are required. For a weekly fetch schedule, weekday and hour are 2202// required. For a daily fetch schedule, only hour is required. 2203type DatafeedFetchSchedule struct { 2204 // DayOfMonth: The day of the month the feed file should be fetched 2205 // (1-31). 2206 DayOfMonth int64 `json:"dayOfMonth,omitempty"` 2207 2208 // FetchUrl: The URL where the feed file can be fetched. Google Merchant 2209 // Center will support automatic scheduled uploads using the HTTP, 2210 // HTTPS, FTP, or SFTP protocols, so the value will need to be a valid 2211 // link using one of those four protocols. 2212 FetchUrl string `json:"fetchUrl,omitempty"` 2213 2214 // Hour: The hour of the day the feed file should be fetched (0-23). 2215 Hour int64 `json:"hour,omitempty"` 2216 2217 // MinuteOfHour: The minute of the hour the feed file should be fetched 2218 // (0-59). Read-only. 2219 MinuteOfHour int64 `json:"minuteOfHour,omitempty"` 2220 2221 // Password: An optional password for fetch_url. 2222 Password string `json:"password,omitempty"` 2223 2224 // Paused: Whether the scheduled fetch is paused or not. 2225 Paused bool `json:"paused,omitempty"` 2226 2227 // TimeZone: Time zone used for schedule. UTC by default. E.g., 2228 // "America/Los_Angeles". 2229 TimeZone string `json:"timeZone,omitempty"` 2230 2231 // Username: An optional user name for fetch_url. 2232 Username string `json:"username,omitempty"` 2233 2234 // Weekday: The day of the week the feed file should be fetched. 2235 // Acceptable values are: - "monday" - "tuesday" - "wednesday" - 2236 // "thursday" - "friday" - "saturday" - "sunday" 2237 Weekday string `json:"weekday,omitempty"` 2238 2239 // ForceSendFields is a list of field names (e.g. "DayOfMonth") to 2240 // unconditionally include in API requests. By default, fields with 2241 // empty values are omitted from API requests. However, any non-pointer, 2242 // non-interface field appearing in ForceSendFields will be sent to the 2243 // server regardless of whether the field is empty or not. This may be 2244 // used to include empty fields in Patch requests. 2245 ForceSendFields []string `json:"-"` 2246 2247 // NullFields is a list of field names (e.g. "DayOfMonth") to include in 2248 // API requests with the JSON null value. By default, fields with empty 2249 // values are omitted from API requests. However, any field with an 2250 // empty value appearing in NullFields will be sent to the server as 2251 // null. It is an error if a field in this list has a non-empty value. 2252 // This may be used to include null fields in Patch requests. 2253 NullFields []string `json:"-"` 2254} 2255 2256func (s *DatafeedFetchSchedule) MarshalJSON() ([]byte, error) { 2257 type NoMethod DatafeedFetchSchedule 2258 raw := NoMethod(*s) 2259 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2260} 2261 2262type DatafeedFormat struct { 2263 // ColumnDelimiter: Delimiter for the separation of values in a 2264 // delimiter-separated values feed. If not specified, the delimiter will 2265 // be auto-detected. Ignored for non-DSV data feeds. Acceptable values 2266 // are: - "pipe" - "tab" - "tilde" 2267 ColumnDelimiter string `json:"columnDelimiter,omitempty"` 2268 2269 // FileEncoding: Character encoding scheme of the data feed. If not 2270 // specified, the encoding will be auto-detected. Acceptable values are: 2271 // - "latin-1" - "utf-16be" - "utf-16le" - "utf-8" - 2272 // "windows-1252" 2273 FileEncoding string `json:"fileEncoding,omitempty"` 2274 2275 // QuotingMode: Specifies how double quotes are interpreted. If not 2276 // specified, the mode will be auto-detected. Ignored for non-DSV data 2277 // feeds. Acceptable values are: - "normal character" - "value 2278 // quoting" 2279 QuotingMode string `json:"quotingMode,omitempty"` 2280 2281 // ForceSendFields is a list of field names (e.g. "ColumnDelimiter") to 2282 // unconditionally include in API requests. By default, fields with 2283 // empty values are omitted from API requests. However, any non-pointer, 2284 // non-interface field appearing in ForceSendFields will be sent to the 2285 // server regardless of whether the field is empty or not. This may be 2286 // used to include empty fields in Patch requests. 2287 ForceSendFields []string `json:"-"` 2288 2289 // NullFields is a list of field names (e.g. "ColumnDelimiter") to 2290 // include in API requests with the JSON null value. By default, fields 2291 // with empty values are omitted from API requests. However, any field 2292 // with an empty value appearing in NullFields will be sent to the 2293 // server as null. It is an error if a field in this list has a 2294 // non-empty value. This may be used to include null fields in Patch 2295 // requests. 2296 NullFields []string `json:"-"` 2297} 2298 2299func (s *DatafeedFormat) MarshalJSON() ([]byte, error) { 2300 type NoMethod DatafeedFormat 2301 raw := NoMethod(*s) 2302 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2303} 2304 2305// DatafeedStatus: The status of a datafeed, i.e., the result of the 2306// last retrieval of the datafeed computed asynchronously when the feed 2307// processing is finished. 2308type DatafeedStatus struct { 2309 // Country: The country for which the status is reported, represented as 2310 // a CLDR territory code. 2311 Country string `json:"country,omitempty"` 2312 2313 // DatafeedId: The ID of the feed for which the status is reported. 2314 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2315 2316 // Errors: The list of errors occurring in the feed. 2317 Errors []*DatafeedStatusError `json:"errors,omitempty"` 2318 2319 // ItemsTotal: The number of items in the feed that were processed. 2320 ItemsTotal uint64 `json:"itemsTotal,omitempty,string"` 2321 2322 // ItemsValid: The number of items in the feed that were valid. 2323 ItemsValid uint64 `json:"itemsValid,omitempty,string"` 2324 2325 // Kind: Identifies what kind of resource this is. Value: the fixed 2326 // string "content#datafeedStatus" 2327 Kind string `json:"kind,omitempty"` 2328 2329 // Language: The two-letter ISO 639-1 language for which the status is 2330 // reported. 2331 Language string `json:"language,omitempty"` 2332 2333 // LastUploadDate: The last date at which the feed was uploaded. 2334 LastUploadDate string `json:"lastUploadDate,omitempty"` 2335 2336 // ProcessingStatus: The processing status of the feed. Acceptable 2337 // values are: - ""failure": The feed could not be processed or all 2338 // items had errors." - "in progress": The feed is being processed. - 2339 // "none": The feed has not yet been processed. For example, a feed 2340 // that has never been uploaded will have this processing status. - 2341 // "success": The feed was processed successfully, though some items 2342 // might have had errors. 2343 ProcessingStatus string `json:"processingStatus,omitempty"` 2344 2345 // Warnings: The list of errors occurring in the feed. 2346 Warnings []*DatafeedStatusError `json:"warnings,omitempty"` 2347 2348 // ServerResponse contains the HTTP response code and headers from the 2349 // server. 2350 googleapi.ServerResponse `json:"-"` 2351 2352 // ForceSendFields is a list of field names (e.g. "Country") to 2353 // unconditionally include in API requests. By default, fields with 2354 // empty values are omitted from API requests. However, any non-pointer, 2355 // non-interface field appearing in ForceSendFields will be sent to the 2356 // server regardless of whether the field is empty or not. This may be 2357 // used to include empty fields in Patch requests. 2358 ForceSendFields []string `json:"-"` 2359 2360 // NullFields is a list of field names (e.g. "Country") to include in 2361 // API requests with the JSON null value. By default, fields with empty 2362 // values are omitted from API requests. However, any field with an 2363 // empty value appearing in NullFields will be sent to the server as 2364 // null. It is an error if a field in this list has a non-empty value. 2365 // This may be used to include null fields in Patch requests. 2366 NullFields []string `json:"-"` 2367} 2368 2369func (s *DatafeedStatus) MarshalJSON() ([]byte, error) { 2370 type NoMethod DatafeedStatus 2371 raw := NoMethod(*s) 2372 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2373} 2374 2375// DatafeedStatusError: An error occurring in the feed, like "invalid 2376// price". 2377type DatafeedStatusError struct { 2378 // Code: The code of the error, e.g., "validation/invalid_value". 2379 Code string `json:"code,omitempty"` 2380 2381 // Count: The number of occurrences of the error in the feed. 2382 Count uint64 `json:"count,omitempty,string"` 2383 2384 // Examples: A list of example occurrences of the error, grouped by 2385 // product. 2386 Examples []*DatafeedStatusExample `json:"examples,omitempty"` 2387 2388 // Message: The error message, e.g., "Invalid price". 2389 Message string `json:"message,omitempty"` 2390 2391 // ForceSendFields is a list of field names (e.g. "Code") to 2392 // unconditionally include in API requests. By default, fields with 2393 // empty values are omitted from API requests. However, any non-pointer, 2394 // non-interface field appearing in ForceSendFields will be sent to the 2395 // server regardless of whether the field is empty or not. This may be 2396 // used to include empty fields in Patch requests. 2397 ForceSendFields []string `json:"-"` 2398 2399 // NullFields is a list of field names (e.g. "Code") to include in API 2400 // requests with the JSON null value. By default, fields with empty 2401 // values are omitted from API requests. However, any field with an 2402 // empty value appearing in NullFields will be sent to the server as 2403 // null. It is an error if a field in this list has a non-empty value. 2404 // This may be used to include null fields in Patch requests. 2405 NullFields []string `json:"-"` 2406} 2407 2408func (s *DatafeedStatusError) MarshalJSON() ([]byte, error) { 2409 type NoMethod DatafeedStatusError 2410 raw := NoMethod(*s) 2411 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2412} 2413 2414// DatafeedStatusExample: An example occurrence for a particular error. 2415type DatafeedStatusExample struct { 2416 // ItemId: The ID of the example item. 2417 ItemId string `json:"itemId,omitempty"` 2418 2419 // LineNumber: Line number in the data feed where the example is found. 2420 LineNumber uint64 `json:"lineNumber,omitempty,string"` 2421 2422 // Value: The problematic value. 2423 Value string `json:"value,omitempty"` 2424 2425 // ForceSendFields is a list of field names (e.g. "ItemId") to 2426 // unconditionally include in API requests. By default, fields with 2427 // empty values are omitted from API requests. However, any non-pointer, 2428 // non-interface field appearing in ForceSendFields will be sent to the 2429 // server regardless of whether the field is empty or not. This may be 2430 // used to include empty fields in Patch requests. 2431 ForceSendFields []string `json:"-"` 2432 2433 // NullFields is a list of field names (e.g. "ItemId") to include in API 2434 // requests with the JSON null value. By default, fields with empty 2435 // values are omitted from API requests. However, any field with an 2436 // empty value appearing in NullFields will be sent to the server as 2437 // null. It is an error if a field in this list has a non-empty value. 2438 // This may be used to include null fields in Patch requests. 2439 NullFields []string `json:"-"` 2440} 2441 2442func (s *DatafeedStatusExample) MarshalJSON() ([]byte, error) { 2443 type NoMethod DatafeedStatusExample 2444 raw := NoMethod(*s) 2445 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2446} 2447 2448type DatafeedTarget struct { 2449 // Country: The country where the items in the feed will be included in 2450 // the search index, represented as a CLDR territory code. 2451 Country string `json:"country,omitempty"` 2452 2453 // ExcludedDestinations: The list of destinations to exclude for this 2454 // target (corresponds to unchecked check boxes in Merchant Center). 2455 ExcludedDestinations []string `json:"excludedDestinations,omitempty"` 2456 2457 // IncludedDestinations: The list of destinations to include for this 2458 // target (corresponds to checked check boxes in Merchant Center). 2459 // Default destinations are always included unless provided in 2460 // `excludedDestinations`. List of supported destinations (if available 2461 // to the account): - DisplayAds - Shopping - ShoppingActions - 2462 // SurfacesAcrossGoogle 2463 IncludedDestinations []string `json:"includedDestinations,omitempty"` 2464 2465 // Language: The two-letter ISO 639-1 language of the items in the feed. 2466 // Must be a valid language for `targets[].country`. 2467 Language string `json:"language,omitempty"` 2468 2469 // ForceSendFields is a list of field names (e.g. "Country") to 2470 // unconditionally include in API requests. By default, fields with 2471 // empty values are omitted from API requests. However, any non-pointer, 2472 // non-interface field appearing in ForceSendFields will be sent to the 2473 // server regardless of whether the field is empty or not. This may be 2474 // used to include empty fields in Patch requests. 2475 ForceSendFields []string `json:"-"` 2476 2477 // NullFields is a list of field names (e.g. "Country") to include in 2478 // API requests with the JSON null value. By default, fields with empty 2479 // values are omitted from API requests. However, any field with an 2480 // empty value appearing in NullFields will be sent to the server as 2481 // null. It is an error if a field in this list has a non-empty value. 2482 // This may be used to include null fields in Patch requests. 2483 NullFields []string `json:"-"` 2484} 2485 2486func (s *DatafeedTarget) MarshalJSON() ([]byte, error) { 2487 type NoMethod DatafeedTarget 2488 raw := NoMethod(*s) 2489 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2490} 2491 2492type DatafeedsCustomBatchRequest struct { 2493 // Entries: The request entries to be processed in the batch. 2494 Entries []*DatafeedsCustomBatchRequestEntry `json:"entries,omitempty"` 2495 2496 // ForceSendFields is a list of field names (e.g. "Entries") to 2497 // unconditionally include in API requests. By default, fields with 2498 // empty values are omitted from API requests. However, any non-pointer, 2499 // non-interface field appearing in ForceSendFields will be sent to the 2500 // server regardless of whether the field is empty or not. This may be 2501 // used to include empty fields in Patch requests. 2502 ForceSendFields []string `json:"-"` 2503 2504 // NullFields is a list of field names (e.g. "Entries") to include in 2505 // API requests with the JSON null value. By default, fields with empty 2506 // values are omitted from API requests. However, any field with an 2507 // empty value appearing in NullFields will be sent to the server as 2508 // null. It is an error if a field in this list has a non-empty value. 2509 // This may be used to include null fields in Patch requests. 2510 NullFields []string `json:"-"` 2511} 2512 2513func (s *DatafeedsCustomBatchRequest) MarshalJSON() ([]byte, error) { 2514 type NoMethod DatafeedsCustomBatchRequest 2515 raw := NoMethod(*s) 2516 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2517} 2518 2519// DatafeedsCustomBatchRequestEntry: A batch entry encoding a single 2520// non-batch datafeeds request. 2521type DatafeedsCustomBatchRequestEntry struct { 2522 // BatchId: An entry ID, unique within the batch request. 2523 BatchId int64 `json:"batchId,omitempty"` 2524 2525 // Datafeed: The data feed to insert. 2526 Datafeed *Datafeed `json:"datafeed,omitempty"` 2527 2528 // DatafeedId: The ID of the data feed to get, delete or fetch. 2529 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2530 2531 // MerchantId: The ID of the managing account. 2532 MerchantId uint64 `json:"merchantId,omitempty,string"` 2533 2534 // Method: The method of the batch entry. Acceptable values are: - 2535 // "delete" - "fetchNow" - "get" - "insert" - "update" 2536 Method string `json:"method,omitempty"` 2537 2538 // ForceSendFields is a list of field names (e.g. "BatchId") to 2539 // unconditionally include in API requests. By default, fields with 2540 // empty values are omitted from API requests. However, any non-pointer, 2541 // non-interface field appearing in ForceSendFields will be sent to the 2542 // server regardless of whether the field is empty or not. This may be 2543 // used to include empty fields in Patch requests. 2544 ForceSendFields []string `json:"-"` 2545 2546 // NullFields is a list of field names (e.g. "BatchId") to include in 2547 // API requests with the JSON null value. By default, fields with empty 2548 // values are omitted from API requests. However, any field with an 2549 // empty value appearing in NullFields will be sent to the server as 2550 // null. It is an error if a field in this list has a non-empty value. 2551 // This may be used to include null fields in Patch requests. 2552 NullFields []string `json:"-"` 2553} 2554 2555func (s *DatafeedsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 2556 type NoMethod DatafeedsCustomBatchRequestEntry 2557 raw := NoMethod(*s) 2558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2559} 2560 2561type DatafeedsCustomBatchResponse struct { 2562 // Entries: The result of the execution of the batch requests. 2563 Entries []*DatafeedsCustomBatchResponseEntry `json:"entries,omitempty"` 2564 2565 // Kind: Identifies what kind of resource this is. Value: the fixed 2566 // string "content#datafeedsCustomBatchResponse". 2567 Kind string `json:"kind,omitempty"` 2568 2569 // ServerResponse contains the HTTP response code and headers from the 2570 // server. 2571 googleapi.ServerResponse `json:"-"` 2572 2573 // ForceSendFields is a list of field names (e.g. "Entries") to 2574 // unconditionally include in API requests. By default, fields with 2575 // empty values are omitted from API requests. However, any non-pointer, 2576 // non-interface field appearing in ForceSendFields will be sent to the 2577 // server regardless of whether the field is empty or not. This may be 2578 // used to include empty fields in Patch requests. 2579 ForceSendFields []string `json:"-"` 2580 2581 // NullFields is a list of field names (e.g. "Entries") to include in 2582 // API requests with the JSON null value. By default, fields with empty 2583 // values are omitted from API requests. However, any field with an 2584 // empty value appearing in NullFields will be sent to the server as 2585 // null. It is an error if a field in this list has a non-empty value. 2586 // This may be used to include null fields in Patch requests. 2587 NullFields []string `json:"-"` 2588} 2589 2590func (s *DatafeedsCustomBatchResponse) MarshalJSON() ([]byte, error) { 2591 type NoMethod DatafeedsCustomBatchResponse 2592 raw := NoMethod(*s) 2593 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2594} 2595 2596// DatafeedsCustomBatchResponseEntry: A batch entry encoding a single 2597// non-batch datafeeds response. 2598type DatafeedsCustomBatchResponseEntry struct { 2599 // BatchId: The ID of the request entry this entry responds to. 2600 BatchId int64 `json:"batchId,omitempty"` 2601 2602 // Datafeed: The requested data feed. Defined if and only if the request 2603 // was successful. 2604 Datafeed *Datafeed `json:"datafeed,omitempty"` 2605 2606 // Errors: A list of errors defined if and only if the request failed. 2607 Errors *Errors `json:"errors,omitempty"` 2608 2609 // ForceSendFields is a list of field names (e.g. "BatchId") to 2610 // unconditionally include in API requests. By default, fields with 2611 // empty values are omitted from API requests. However, any non-pointer, 2612 // non-interface field appearing in ForceSendFields will be sent to the 2613 // server regardless of whether the field is empty or not. This may be 2614 // used to include empty fields in Patch requests. 2615 ForceSendFields []string `json:"-"` 2616 2617 // NullFields is a list of field names (e.g. "BatchId") to include in 2618 // API requests with the JSON null value. By default, fields with empty 2619 // values are omitted from API requests. However, any field with an 2620 // empty value appearing in NullFields will be sent to the server as 2621 // null. It is an error if a field in this list has a non-empty value. 2622 // This may be used to include null fields in Patch requests. 2623 NullFields []string `json:"-"` 2624} 2625 2626func (s *DatafeedsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 2627 type NoMethod DatafeedsCustomBatchResponseEntry 2628 raw := NoMethod(*s) 2629 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2630} 2631 2632type DatafeedsFetchNowResponse struct { 2633 // Kind: Identifies what kind of resource this is. Value: the fixed 2634 // string "content#datafeedsFetchNowResponse". 2635 Kind string `json:"kind,omitempty"` 2636 2637 // ServerResponse contains the HTTP response code and headers from the 2638 // server. 2639 googleapi.ServerResponse `json:"-"` 2640 2641 // ForceSendFields is a list of field names (e.g. "Kind") to 2642 // unconditionally include in API requests. By default, fields with 2643 // empty values are omitted from API requests. However, any non-pointer, 2644 // non-interface field appearing in ForceSendFields will be sent to the 2645 // server regardless of whether the field is empty or not. This may be 2646 // used to include empty fields in Patch requests. 2647 ForceSendFields []string `json:"-"` 2648 2649 // NullFields is a list of field names (e.g. "Kind") to include in API 2650 // requests with the JSON null value. By default, fields with empty 2651 // values are omitted from API requests. However, any field with an 2652 // empty value appearing in NullFields will be sent to the server as 2653 // null. It is an error if a field in this list has a non-empty value. 2654 // This may be used to include null fields in Patch requests. 2655 NullFields []string `json:"-"` 2656} 2657 2658func (s *DatafeedsFetchNowResponse) MarshalJSON() ([]byte, error) { 2659 type NoMethod DatafeedsFetchNowResponse 2660 raw := NoMethod(*s) 2661 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2662} 2663 2664type DatafeedsListResponse struct { 2665 // Kind: Identifies what kind of resource this is. Value: the fixed 2666 // string "content#datafeedsListResponse". 2667 Kind string `json:"kind,omitempty"` 2668 2669 // NextPageToken: The token for the retrieval of the next page of 2670 // datafeeds. 2671 NextPageToken string `json:"nextPageToken,omitempty"` 2672 2673 Resources []*Datafeed `json:"resources,omitempty"` 2674 2675 // ServerResponse contains the HTTP response code and headers from the 2676 // server. 2677 googleapi.ServerResponse `json:"-"` 2678 2679 // ForceSendFields is a list of field names (e.g. "Kind") to 2680 // unconditionally include in API requests. By default, fields with 2681 // empty values are omitted from API requests. However, any non-pointer, 2682 // non-interface field appearing in ForceSendFields will be sent to the 2683 // server regardless of whether the field is empty or not. This may be 2684 // used to include empty fields in Patch requests. 2685 ForceSendFields []string `json:"-"` 2686 2687 // NullFields is a list of field names (e.g. "Kind") to include in API 2688 // requests with the JSON null value. By default, fields with empty 2689 // values are omitted from API requests. However, any field with an 2690 // empty value appearing in NullFields will be sent to the server as 2691 // null. It is an error if a field in this list has a non-empty value. 2692 // This may be used to include null fields in Patch requests. 2693 NullFields []string `json:"-"` 2694} 2695 2696func (s *DatafeedsListResponse) MarshalJSON() ([]byte, error) { 2697 type NoMethod DatafeedsListResponse 2698 raw := NoMethod(*s) 2699 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2700} 2701 2702type DatafeedstatusesCustomBatchRequest struct { 2703 // Entries: The request entries to be processed in the batch. 2704 Entries []*DatafeedstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 2705 2706 // ForceSendFields is a list of field names (e.g. "Entries") to 2707 // unconditionally include in API requests. By default, fields with 2708 // empty values are omitted from API requests. However, any non-pointer, 2709 // non-interface field appearing in ForceSendFields will be sent to the 2710 // server regardless of whether the field is empty or not. This may be 2711 // used to include empty fields in Patch requests. 2712 ForceSendFields []string `json:"-"` 2713 2714 // NullFields is a list of field names (e.g. "Entries") to include in 2715 // API requests with the JSON null value. By default, fields with empty 2716 // values are omitted from API requests. However, any field with an 2717 // empty value appearing in NullFields will be sent to the server as 2718 // null. It is an error if a field in this list has a non-empty value. 2719 // This may be used to include null fields in Patch requests. 2720 NullFields []string `json:"-"` 2721} 2722 2723func (s *DatafeedstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 2724 type NoMethod DatafeedstatusesCustomBatchRequest 2725 raw := NoMethod(*s) 2726 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2727} 2728 2729// DatafeedstatusesCustomBatchRequestEntry: A batch entry encoding a 2730// single non-batch datafeedstatuses request. 2731type DatafeedstatusesCustomBatchRequestEntry struct { 2732 // BatchId: An entry ID, unique within the batch request. 2733 BatchId int64 `json:"batchId,omitempty"` 2734 2735 // Country: The country for which to get the datafeed status. If this 2736 // parameter is provided then language must also be provided. Note that 2737 // for multi-target datafeeds this parameter is required. 2738 Country string `json:"country,omitempty"` 2739 2740 // DatafeedId: The ID of the data feed to get. 2741 DatafeedId uint64 `json:"datafeedId,omitempty,string"` 2742 2743 // Language: The language for which to get the datafeed status. If this 2744 // parameter is provided then country must also be provided. Note that 2745 // for multi-target datafeeds this parameter is required. 2746 Language string `json:"language,omitempty"` 2747 2748 // MerchantId: The ID of the managing account. 2749 MerchantId uint64 `json:"merchantId,omitempty,string"` 2750 2751 // Method: The method of the batch entry. Acceptable values are: - 2752 // "get" 2753 Method string `json:"method,omitempty"` 2754 2755 // ForceSendFields is a list of field names (e.g. "BatchId") to 2756 // unconditionally include in API requests. By default, fields with 2757 // empty values are omitted from API requests. However, any non-pointer, 2758 // non-interface field appearing in ForceSendFields will be sent to the 2759 // server regardless of whether the field is empty or not. This may be 2760 // used to include empty fields in Patch requests. 2761 ForceSendFields []string `json:"-"` 2762 2763 // NullFields is a list of field names (e.g. "BatchId") to include in 2764 // API requests with the JSON null value. By default, fields with empty 2765 // values are omitted from API requests. However, any field with an 2766 // empty value appearing in NullFields will be sent to the server as 2767 // null. It is an error if a field in this list has a non-empty value. 2768 // This may be used to include null fields in Patch requests. 2769 NullFields []string `json:"-"` 2770} 2771 2772func (s *DatafeedstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 2773 type NoMethod DatafeedstatusesCustomBatchRequestEntry 2774 raw := NoMethod(*s) 2775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2776} 2777 2778type DatafeedstatusesCustomBatchResponse struct { 2779 // Entries: The result of the execution of the batch requests. 2780 Entries []*DatafeedstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 2781 2782 // Kind: Identifies what kind of resource this is. Value: the fixed 2783 // string "content#datafeedstatusesCustomBatchResponse". 2784 Kind string `json:"kind,omitempty"` 2785 2786 // ServerResponse contains the HTTP response code and headers from the 2787 // server. 2788 googleapi.ServerResponse `json:"-"` 2789 2790 // ForceSendFields is a list of field names (e.g. "Entries") to 2791 // unconditionally include in API requests. By default, fields with 2792 // empty values are omitted from API requests. However, any non-pointer, 2793 // non-interface field appearing in ForceSendFields will be sent to the 2794 // server regardless of whether the field is empty or not. This may be 2795 // used to include empty fields in Patch requests. 2796 ForceSendFields []string `json:"-"` 2797 2798 // NullFields is a list of field names (e.g. "Entries") to include in 2799 // API requests with the JSON null value. By default, fields with empty 2800 // values are omitted from API requests. However, any field with an 2801 // empty value appearing in NullFields will be sent to the server as 2802 // null. It is an error if a field in this list has a non-empty value. 2803 // This may be used to include null fields in Patch requests. 2804 NullFields []string `json:"-"` 2805} 2806 2807func (s *DatafeedstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 2808 type NoMethod DatafeedstatusesCustomBatchResponse 2809 raw := NoMethod(*s) 2810 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2811} 2812 2813// DatafeedstatusesCustomBatchResponseEntry: A batch entry encoding a 2814// single non-batch datafeedstatuses response. 2815type DatafeedstatusesCustomBatchResponseEntry struct { 2816 // BatchId: The ID of the request entry this entry responds to. 2817 BatchId int64 `json:"batchId,omitempty"` 2818 2819 // DatafeedStatus: The requested data feed status. Defined if and only 2820 // if the request was successful. 2821 DatafeedStatus *DatafeedStatus `json:"datafeedStatus,omitempty"` 2822 2823 // Errors: A list of errors defined if and only if the request failed. 2824 Errors *Errors `json:"errors,omitempty"` 2825 2826 // ForceSendFields is a list of field names (e.g. "BatchId") to 2827 // unconditionally include in API requests. By default, fields with 2828 // empty values are omitted from API requests. However, any non-pointer, 2829 // non-interface field appearing in ForceSendFields will be sent to the 2830 // server regardless of whether the field is empty or not. This may be 2831 // used to include empty fields in Patch requests. 2832 ForceSendFields []string `json:"-"` 2833 2834 // NullFields is a list of field names (e.g. "BatchId") to include in 2835 // API requests with the JSON null value. By default, fields with empty 2836 // values are omitted from API requests. However, any field with an 2837 // empty value appearing in NullFields will be sent to the server as 2838 // null. It is an error if a field in this list has a non-empty value. 2839 // This may be used to include null fields in Patch requests. 2840 NullFields []string `json:"-"` 2841} 2842 2843func (s *DatafeedstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 2844 type NoMethod DatafeedstatusesCustomBatchResponseEntry 2845 raw := NoMethod(*s) 2846 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2847} 2848 2849type DatafeedstatusesListResponse struct { 2850 // Kind: Identifies what kind of resource this is. Value: the fixed 2851 // string "content#datafeedstatusesListResponse". 2852 Kind string `json:"kind,omitempty"` 2853 2854 // NextPageToken: The token for the retrieval of the next page of 2855 // datafeed statuses. 2856 NextPageToken string `json:"nextPageToken,omitempty"` 2857 2858 Resources []*DatafeedStatus `json:"resources,omitempty"` 2859 2860 // ServerResponse contains the HTTP response code and headers from the 2861 // server. 2862 googleapi.ServerResponse `json:"-"` 2863 2864 // ForceSendFields is a list of field names (e.g. "Kind") to 2865 // unconditionally include in API requests. By default, fields with 2866 // empty values are omitted from API requests. However, any non-pointer, 2867 // non-interface field appearing in ForceSendFields will be sent to the 2868 // server regardless of whether the field is empty or not. This may be 2869 // used to include empty fields in Patch requests. 2870 ForceSendFields []string `json:"-"` 2871 2872 // NullFields is a list of field names (e.g. "Kind") to include in API 2873 // requests with the JSON null value. By default, fields with empty 2874 // values are omitted from API requests. However, any field with an 2875 // empty value appearing in NullFields will be sent to the server as 2876 // null. It is an error if a field in this list has a non-empty value. 2877 // This may be used to include null fields in Patch requests. 2878 NullFields []string `json:"-"` 2879} 2880 2881func (s *DatafeedstatusesListResponse) MarshalJSON() ([]byte, error) { 2882 type NoMethod DatafeedstatusesListResponse 2883 raw := NoMethod(*s) 2884 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2885} 2886 2887type DeliveryTime struct { 2888 // CutoffTime: Business days cutoff time definition. If not configured 2889 // the cutoff time will be defaulted to 8AM PST. 2890 CutoffTime *CutoffTime `json:"cutoffTime,omitempty"` 2891 2892 // HandlingBusinessDayConfig: The business days during which orders can 2893 // be handled. If not provided, Monday to Friday business days will be 2894 // assumed. 2895 HandlingBusinessDayConfig *BusinessDayConfig `json:"handlingBusinessDayConfig,omitempty"` 2896 2897 // HolidayCutoffs: Holiday cutoff definitions. If configured, they 2898 // specify order cutoff times for holiday-specific shipping. 2899 HolidayCutoffs []*HolidayCutoff `json:"holidayCutoffs,omitempty"` 2900 2901 // MaxHandlingTimeInDays: Maximum number of business days spent before 2902 // an order is shipped. 0 means same day shipped, 1 means next day 2903 // shipped. Must be greater than or equal to `minHandlingTimeInDays`. 2904 MaxHandlingTimeInDays int64 `json:"maxHandlingTimeInDays,omitempty"` 2905 2906 // MaxTransitTimeInDays: Maximum number of business days that is spent 2907 // in transit. 0 means same day delivery, 1 means next day delivery. 2908 // Must be greater than or equal to `minTransitTimeInDays`. 2909 MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` 2910 2911 // MinHandlingTimeInDays: Minimum number of business days spent before 2912 // an order is shipped. 0 means same day shipped, 1 means next day 2913 // shipped. 2914 MinHandlingTimeInDays int64 `json:"minHandlingTimeInDays,omitempty"` 2915 2916 // MinTransitTimeInDays: Minimum number of business days that is spent 2917 // in transit. 0 means same day delivery, 1 means next day delivery. 2918 // Either `{min,max}TransitTimeInDays` or `transitTimeTable` must be 2919 // set, but not both. 2920 MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` 2921 2922 // TransitBusinessDayConfig: The business days during which orders can 2923 // be in-transit. If not provided, Monday to Friday business days will 2924 // be assumed. 2925 TransitBusinessDayConfig *BusinessDayConfig `json:"transitBusinessDayConfig,omitempty"` 2926 2927 // TransitTimeTable: Transit time table, number of business days spent 2928 // in transit based on row and column dimensions. Either 2929 // `{min,max}TransitTimeInDays` or `transitTimeTable` can be set, but 2930 // not both. 2931 TransitTimeTable *TransitTable `json:"transitTimeTable,omitempty"` 2932 2933 // WarehouseBasedDeliveryTimes: Indicates that the delivery time should 2934 // be calculated per warehouse (shipping origin location) based on the 2935 // settings of the selected carrier. When set, no other transit time 2936 // related field in DeliveryTime should be set. 2937 WarehouseBasedDeliveryTimes []*WarehouseBasedDeliveryTime `json:"warehouseBasedDeliveryTimes,omitempty"` 2938 2939 // ForceSendFields is a list of field names (e.g. "CutoffTime") to 2940 // unconditionally include in API requests. By default, fields with 2941 // empty values are omitted from API requests. However, any non-pointer, 2942 // non-interface field appearing in ForceSendFields will be sent to the 2943 // server regardless of whether the field is empty or not. This may be 2944 // used to include empty fields in Patch requests. 2945 ForceSendFields []string `json:"-"` 2946 2947 // NullFields is a list of field names (e.g. "CutoffTime") to include in 2948 // API requests with the JSON null value. By default, fields with empty 2949 // values are omitted from API requests. However, any field with an 2950 // empty value appearing in NullFields will be sent to the server as 2951 // null. It is an error if a field in this list has a non-empty value. 2952 // This may be used to include null fields in Patch requests. 2953 NullFields []string `json:"-"` 2954} 2955 2956func (s *DeliveryTime) MarshalJSON() ([]byte, error) { 2957 type NoMethod DeliveryTime 2958 raw := NoMethod(*s) 2959 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2960} 2961 2962// Error: An error returned by the API. 2963type Error struct { 2964 // Domain: The domain of the error. 2965 Domain string `json:"domain,omitempty"` 2966 2967 // Message: A description of the error. 2968 Message string `json:"message,omitempty"` 2969 2970 // Reason: The error code. 2971 Reason string `json:"reason,omitempty"` 2972 2973 // ForceSendFields is a list of field names (e.g. "Domain") to 2974 // unconditionally include in API requests. By default, fields with 2975 // empty values are omitted from API requests. However, any non-pointer, 2976 // non-interface field appearing in ForceSendFields will be sent to the 2977 // server regardless of whether the field is empty or not. This may be 2978 // used to include empty fields in Patch requests. 2979 ForceSendFields []string `json:"-"` 2980 2981 // NullFields is a list of field names (e.g. "Domain") to include in API 2982 // requests with the JSON null value. By default, fields with empty 2983 // values are omitted from API requests. However, any field with an 2984 // empty value appearing in NullFields will be sent to the server as 2985 // null. It is an error if a field in this list has a non-empty value. 2986 // This may be used to include null fields in Patch requests. 2987 NullFields []string `json:"-"` 2988} 2989 2990func (s *Error) MarshalJSON() ([]byte, error) { 2991 type NoMethod Error 2992 raw := NoMethod(*s) 2993 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2994} 2995 2996// Errors: A list of errors returned by a failed batch entry. 2997type Errors struct { 2998 // Code: The HTTP status of the first error in `errors`. 2999 Code int64 `json:"code,omitempty"` 3000 3001 // Errors: A list of errors. 3002 Errors []*Error `json:"errors,omitempty"` 3003 3004 // Message: The message of the first error in `errors`. 3005 Message string `json:"message,omitempty"` 3006 3007 // ForceSendFields is a list of field names (e.g. "Code") to 3008 // unconditionally include in API requests. By default, fields with 3009 // empty values are omitted from API requests. However, any non-pointer, 3010 // non-interface field appearing in ForceSendFields will be sent to the 3011 // server regardless of whether the field is empty or not. This may be 3012 // used to include empty fields in Patch requests. 3013 ForceSendFields []string `json:"-"` 3014 3015 // NullFields is a list of field names (e.g. "Code") to include in API 3016 // requests with the JSON null value. By default, fields with empty 3017 // values are omitted from API requests. However, any field with an 3018 // empty value appearing in NullFields will be sent to the server as 3019 // null. It is an error if a field in this list has a non-empty value. 3020 // This may be used to include null fields in Patch requests. 3021 NullFields []string `json:"-"` 3022} 3023 3024func (s *Errors) MarshalJSON() ([]byte, error) { 3025 type NoMethod Errors 3026 raw := NoMethod(*s) 3027 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3028} 3029 3030type GmbAccounts struct { 3031 // AccountId: The ID of the Merchant Center account. 3032 AccountId uint64 `json:"accountId,omitempty,string"` 3033 3034 // GmbAccounts: A list of GMB accounts which are available to the 3035 // merchant. 3036 GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` 3037 3038 // ForceSendFields is a list of field names (e.g. "AccountId") to 3039 // unconditionally include in API requests. By default, fields with 3040 // empty values are omitted from API requests. However, any non-pointer, 3041 // non-interface field appearing in ForceSendFields will be sent to the 3042 // server regardless of whether the field is empty or not. This may be 3043 // used to include empty fields in Patch requests. 3044 ForceSendFields []string `json:"-"` 3045 3046 // NullFields is a list of field names (e.g. "AccountId") to include in 3047 // API requests with the JSON null value. By default, fields with empty 3048 // values are omitted from API requests. However, any field with an 3049 // empty value appearing in NullFields will be sent to the server as 3050 // null. It is an error if a field in this list has a non-empty value. 3051 // This may be used to include null fields in Patch requests. 3052 NullFields []string `json:"-"` 3053} 3054 3055func (s *GmbAccounts) MarshalJSON() ([]byte, error) { 3056 type NoMethod GmbAccounts 3057 raw := NoMethod(*s) 3058 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3059} 3060 3061type GmbAccountsGmbAccount struct { 3062 // Email: The email which identifies the GMB account. 3063 Email string `json:"email,omitempty"` 3064 3065 // ListingCount: Number of listings under this account. 3066 ListingCount uint64 `json:"listingCount,omitempty,string"` 3067 3068 // Name: The name of the GMB account. 3069 Name string `json:"name,omitempty"` 3070 3071 // Type: The type of the GMB account (User or Business). 3072 Type string `json:"type,omitempty"` 3073 3074 // ForceSendFields is a list of field names (e.g. "Email") to 3075 // unconditionally include in API requests. By default, fields with 3076 // empty values are omitted from API requests. However, any non-pointer, 3077 // non-interface field appearing in ForceSendFields will be sent to the 3078 // server regardless of whether the field is empty or not. This may be 3079 // used to include empty fields in Patch requests. 3080 ForceSendFields []string `json:"-"` 3081 3082 // NullFields is a list of field names (e.g. "Email") to include in API 3083 // requests with the JSON null value. By default, fields with empty 3084 // values are omitted from API requests. However, any field with an 3085 // empty value appearing in NullFields will be sent to the server as 3086 // null. It is an error if a field in this list has a non-empty value. 3087 // This may be used to include null fields in Patch requests. 3088 NullFields []string `json:"-"` 3089} 3090 3091func (s *GmbAccountsGmbAccount) MarshalJSON() ([]byte, error) { 3092 type NoMethod GmbAccountsGmbAccount 3093 raw := NoMethod(*s) 3094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3095} 3096 3097// Headers: A non-empty list of row or column headers for a table. 3098// Exactly one of `prices`, `weights`, `numItems`, 3099// `postalCodeGroupNames`, or `location` must be set. 3100type Headers struct { 3101 // Locations: A list of location ID sets. Must be non-empty. Can only be 3102 // set if all other fields are not set. 3103 Locations []*LocationIdSet `json:"locations,omitempty"` 3104 3105 // NumberOfItems: A list of inclusive number of items upper bounds. The 3106 // last value can be "infinity". For example `["10", "50", 3107 // "infinity"]` represents the headers "<= 10 items", "<= 50 items", and 3108 // "> 50 items". Must be non-empty. Can only be set if all other fields 3109 // are not set. 3110 NumberOfItems []string `json:"numberOfItems,omitempty"` 3111 3112 // PostalCodeGroupNames: A list of postal group names. The last value 3113 // can be "all other locations". Example: `["zone 1", "zone 2", "all 3114 // other locations"]`. The referred postal code groups must match the 3115 // delivery country of the service. Must be non-empty. Can only be set 3116 // if all other fields are not set. 3117 PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` 3118 3119 // Prices: A list of inclusive order price upper bounds. The last 3120 // price's value can be "infinity". For example `[{"value": "10", 3121 // "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": 3122 // "infinity", "currency": "USD"}]` represents the headers "<= $10", "<= 3123 // $500", and "> $500". All prices within a service must have the same 3124 // currency. Must be non-empty. Can only be set if all other fields are 3125 // not set. 3126 Prices []*Price `json:"prices,omitempty"` 3127 3128 // Weights: A list of inclusive order weight upper bounds. The last 3129 // weight's value can be "infinity". For example `[{"value": "10", 3130 // "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", 3131 // "unit": "kg"}]` represents the headers "<= 10kg", "<= 50kg", and "> 3132 // 50kg". All weights within a service must have the same unit. Must be 3133 // non-empty. Can only be set if all other fields are not set. 3134 Weights []*Weight `json:"weights,omitempty"` 3135 3136 // ForceSendFields is a list of field names (e.g. "Locations") to 3137 // unconditionally include in API requests. By default, fields with 3138 // empty values are omitted from API requests. However, any non-pointer, 3139 // non-interface field appearing in ForceSendFields will be sent to the 3140 // server regardless of whether the field is empty or not. This may be 3141 // used to include empty fields in Patch requests. 3142 ForceSendFields []string `json:"-"` 3143 3144 // NullFields is a list of field names (e.g. "Locations") to include in 3145 // API requests with the JSON null value. By default, fields with empty 3146 // values are omitted from API requests. However, any field with an 3147 // empty value appearing in NullFields will be sent to the server as 3148 // null. It is an error if a field in this list has a non-empty value. 3149 // This may be used to include null fields in Patch requests. 3150 NullFields []string `json:"-"` 3151} 3152 3153func (s *Headers) MarshalJSON() ([]byte, error) { 3154 type NoMethod Headers 3155 raw := NoMethod(*s) 3156 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3157} 3158 3159type HolidayCutoff struct { 3160 // DeadlineDate: Date of the order deadline, in ISO 8601 format. E.g. 3161 // "2016-11-29" for 29th November 2016. Required. 3162 DeadlineDate string `json:"deadlineDate,omitempty"` 3163 3164 // DeadlineHour: Hour of the day on the deadline date until which the 3165 // order has to be placed to qualify for the delivery guarantee. 3166 // Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. 3167 // Required. 3168 DeadlineHour int64 `json:"deadlineHour,omitempty"` 3169 3170 // DeadlineTimezone: Timezone identifier for the deadline hour. A list 3171 // of identifiers can be found in the AdWords API documentation. E.g. 3172 // "Europe/Zurich". Required. 3173 DeadlineTimezone string `json:"deadlineTimezone,omitempty"` 3174 3175 // HolidayId: Unique identifier for the holiday. Required. 3176 HolidayId string `json:"holidayId,omitempty"` 3177 3178 // VisibleFromDate: Date on which the deadline will become visible to 3179 // consumers in ISO 8601 format. E.g. "2016-10-31" for 31st October 3180 // 2016. Required. 3181 VisibleFromDate string `json:"visibleFromDate,omitempty"` 3182 3183 // ForceSendFields is a list of field names (e.g. "DeadlineDate") to 3184 // unconditionally include in API requests. By default, fields with 3185 // empty values are omitted from API requests. However, any non-pointer, 3186 // non-interface field appearing in ForceSendFields will be sent to the 3187 // server regardless of whether the field is empty or not. This may be 3188 // used to include empty fields in Patch requests. 3189 ForceSendFields []string `json:"-"` 3190 3191 // NullFields is a list of field names (e.g. "DeadlineDate") to include 3192 // in API requests with the JSON null value. By default, fields with 3193 // empty values are omitted from API requests. However, any field with 3194 // an empty value appearing in NullFields will be sent to the server as 3195 // null. It is an error if a field in this list has a non-empty value. 3196 // This may be used to include null fields in Patch requests. 3197 NullFields []string `json:"-"` 3198} 3199 3200func (s *HolidayCutoff) MarshalJSON() ([]byte, error) { 3201 type NoMethod HolidayCutoff 3202 raw := NoMethod(*s) 3203 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3204} 3205 3206type HolidaysHoliday struct { 3207 // CountryCode: The CLDR territory code of the country in which the 3208 // holiday is available. E.g. "US", "DE", "GB". A holiday cutoff can 3209 // only be configured in a shipping settings service with matching 3210 // delivery country. Always present. 3211 CountryCode string `json:"countryCode,omitempty"` 3212 3213 // Date: Date of the holiday, in ISO 8601 format. E.g. "2016-12-25" for 3214 // Christmas 2016. Always present. 3215 Date string `json:"date,omitempty"` 3216 3217 // DeliveryGuaranteeDate: Date on which the order has to arrive at the 3218 // customer's, in ISO 8601 format. E.g. "2016-12-24" for 24th December 3219 // 2016. Always present. 3220 DeliveryGuaranteeDate string `json:"deliveryGuaranteeDate,omitempty"` 3221 3222 // DeliveryGuaranteeHour: Hour of the day in the delivery location's 3223 // timezone on the guaranteed delivery date by which the order has to 3224 // arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 3225 // 12 (noon), 13, ..., 23. Always present. 3226 DeliveryGuaranteeHour uint64 `json:"deliveryGuaranteeHour,omitempty,string"` 3227 3228 // Id: Unique identifier for the holiday to be used when configuring 3229 // holiday cutoffs. Always present. 3230 Id string `json:"id,omitempty"` 3231 3232 // Type: The holiday type. Always present. Acceptable values are: - 3233 // "Christmas" - "Easter" - "Father's Day" - "Halloween" - 3234 // "Independence Day (USA)" - "Mother's Day" - "Thanksgiving" - 3235 // "Valentine's Day" 3236 Type string `json:"type,omitempty"` 3237 3238 // ForceSendFields is a list of field names (e.g. "CountryCode") to 3239 // unconditionally include in API requests. By default, fields with 3240 // empty values are omitted from API requests. However, any non-pointer, 3241 // non-interface field appearing in ForceSendFields will be sent to the 3242 // server regardless of whether the field is empty or not. This may be 3243 // used to include empty fields in Patch requests. 3244 ForceSendFields []string `json:"-"` 3245 3246 // NullFields is a list of field names (e.g. "CountryCode") to include 3247 // in API requests with the JSON null value. By default, fields with 3248 // empty values are omitted from API requests. However, any field with 3249 // an empty value appearing in NullFields will be sent to the server as 3250 // null. It is an error if a field in this list has a non-empty value. 3251 // This may be used to include null fields in Patch requests. 3252 NullFields []string `json:"-"` 3253} 3254 3255func (s *HolidaysHoliday) MarshalJSON() ([]byte, error) { 3256 type NoMethod HolidaysHoliday 3257 raw := NoMethod(*s) 3258 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3259} 3260 3261type Installment struct { 3262 // Amount: The amount the buyer has to pay per month. 3263 Amount *Price `json:"amount,omitempty"` 3264 3265 // Months: The number of installments the buyer has to pay. 3266 Months int64 `json:"months,omitempty,string"` 3267 3268 // ForceSendFields is a list of field names (e.g. "Amount") to 3269 // unconditionally include in API requests. By default, fields with 3270 // empty values are omitted from API requests. However, any non-pointer, 3271 // non-interface field appearing in ForceSendFields will be sent to the 3272 // server regardless of whether the field is empty or not. This may be 3273 // used to include empty fields in Patch requests. 3274 ForceSendFields []string `json:"-"` 3275 3276 // NullFields is a list of field names (e.g. "Amount") to include in API 3277 // requests with the JSON null value. By default, fields with empty 3278 // values are omitted from API requests. However, any field with an 3279 // empty value appearing in NullFields will be sent to the server as 3280 // null. It is an error if a field in this list has a non-empty value. 3281 // This may be used to include null fields in Patch requests. 3282 NullFields []string `json:"-"` 3283} 3284 3285func (s *Installment) MarshalJSON() ([]byte, error) { 3286 type NoMethod Installment 3287 raw := NoMethod(*s) 3288 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3289} 3290 3291type Inventory struct { 3292 // Availability: The availability of the product. Acceptable values are: 3293 // - "in stock" - "out of stock" - "preorder" 3294 Availability string `json:"availability,omitempty"` 3295 3296 // CustomLabel0: Custom label 0 for custom grouping of items in a 3297 // Shopping campaign. Only supported for online products. 3298 CustomLabel0 string `json:"customLabel0,omitempty"` 3299 3300 // CustomLabel1: Custom label 1 for custom grouping of items in a 3301 // Shopping campaign. Only supported for online products. 3302 CustomLabel1 string `json:"customLabel1,omitempty"` 3303 3304 // CustomLabel2: Custom label 2 for custom grouping of items in a 3305 // Shopping campaign. Only supported for online products. 3306 CustomLabel2 string `json:"customLabel2,omitempty"` 3307 3308 // CustomLabel3: Custom label 3 for custom grouping of items in a 3309 // Shopping campaign. Only supported for online products. 3310 CustomLabel3 string `json:"customLabel3,omitempty"` 3311 3312 // CustomLabel4: Custom label 3 for custom grouping of items in a 3313 // Shopping campaign. Only supported for online products. 3314 CustomLabel4 string `json:"customLabel4,omitempty"` 3315 3316 // Installment: Number and amount of installments to pay for an item. 3317 // Brazil only. 3318 Installment *Installment `json:"installment,omitempty"` 3319 3320 // InstoreProductLocation: The instore product location. Supported only 3321 // for local products. 3322 InstoreProductLocation string `json:"instoreProductLocation,omitempty"` 3323 3324 // Kind: Identifies what kind of resource this is. Value: the fixed 3325 // string "content#inventory" 3326 Kind string `json:"kind,omitempty"` 3327 3328 // LoyaltyPoints: Loyalty points that users receive after purchasing the 3329 // item. Japan only. 3330 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 3331 3332 // Pickup: Store pickup information. Only supported for local inventory. 3333 // Not setting `pickup` means "don't update" while setting it to the 3334 // empty value (`{}` in JSON) means "delete". Otherwise, `pickupMethod` 3335 // and `pickupSla` must be set together, unless `pickupMethod` is "not 3336 // supported". 3337 Pickup *InventoryPickup `json:"pickup,omitempty"` 3338 3339 // Price: The price of the product. 3340 Price *Price `json:"price,omitempty"` 3341 3342 // Quantity: The quantity of the product. Must be equal to or greater 3343 // than zero. Supported only for local products. 3344 Quantity int64 `json:"quantity,omitempty"` 3345 3346 // SalePrice: The sale price of the product. Mandatory if 3347 // `sale_price_effective_date` is defined. 3348 SalePrice *Price `json:"salePrice,omitempty"` 3349 3350 // SalePriceEffectiveDate: A date range represented by a pair of ISO 3351 // 8601 dates separated by a space, comma, or slash. Both dates might be 3352 // specified as 'null' if undecided. 3353 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 3354 3355 // SellOnGoogleQuantity: The quantity of the product that is available 3356 // for selling on Google. Supported only for online products. 3357 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` 3358 3359 // ForceSendFields is a list of field names (e.g. "Availability") to 3360 // unconditionally include in API requests. By default, fields with 3361 // empty values are omitted from API requests. However, any non-pointer, 3362 // non-interface field appearing in ForceSendFields will be sent to the 3363 // server regardless of whether the field is empty or not. This may be 3364 // used to include empty fields in Patch requests. 3365 ForceSendFields []string `json:"-"` 3366 3367 // NullFields is a list of field names (e.g. "Availability") to include 3368 // in API requests with the JSON null value. By default, fields with 3369 // empty values are omitted from API requests. However, any field with 3370 // an empty value appearing in NullFields will be sent to the server as 3371 // null. It is an error if a field in this list has a non-empty value. 3372 // This may be used to include null fields in Patch requests. 3373 NullFields []string `json:"-"` 3374} 3375 3376func (s *Inventory) MarshalJSON() ([]byte, error) { 3377 type NoMethod Inventory 3378 raw := NoMethod(*s) 3379 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3380} 3381 3382type InventoryCustomBatchRequest struct { 3383 // Entries: The request entries to be processed in the batch. 3384 Entries []*InventoryCustomBatchRequestEntry `json:"entries,omitempty"` 3385 3386 // ForceSendFields is a list of field names (e.g. "Entries") to 3387 // unconditionally include in API requests. By default, fields with 3388 // empty values are omitted from API requests. However, any non-pointer, 3389 // non-interface field appearing in ForceSendFields will be sent to the 3390 // server regardless of whether the field is empty or not. This may be 3391 // used to include empty fields in Patch requests. 3392 ForceSendFields []string `json:"-"` 3393 3394 // NullFields is a list of field names (e.g. "Entries") to include in 3395 // API requests with the JSON null value. By default, fields with empty 3396 // values are omitted from API requests. However, any field with an 3397 // empty value appearing in NullFields will be sent to the server as 3398 // null. It is an error if a field in this list has a non-empty value. 3399 // This may be used to include null fields in Patch requests. 3400 NullFields []string `json:"-"` 3401} 3402 3403func (s *InventoryCustomBatchRequest) MarshalJSON() ([]byte, error) { 3404 type NoMethod InventoryCustomBatchRequest 3405 raw := NoMethod(*s) 3406 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3407} 3408 3409// InventoryCustomBatchRequestEntry: A batch entry encoding a single 3410// non-batch inventory request. 3411type InventoryCustomBatchRequestEntry struct { 3412 // BatchId: An entry ID, unique within the batch request. 3413 BatchId int64 `json:"batchId,omitempty"` 3414 3415 // Inventory: Price and availability of the product. 3416 Inventory *Inventory `json:"inventory,omitempty"` 3417 3418 // MerchantId: The ID of the managing account. 3419 MerchantId uint64 `json:"merchantId,omitempty,string"` 3420 3421 // ProductId: The ID of the product for which to update price and 3422 // availability. 3423 ProductId string `json:"productId,omitempty"` 3424 3425 // StoreCode: The code of the store for which to update price and 3426 // availability. Use `online` to update price and availability of an 3427 // online product. 3428 StoreCode string `json:"storeCode,omitempty"` 3429 3430 // ForceSendFields is a list of field names (e.g. "BatchId") to 3431 // unconditionally include in API requests. By default, fields with 3432 // empty values are omitted from API requests. However, any non-pointer, 3433 // non-interface field appearing in ForceSendFields will be sent to the 3434 // server regardless of whether the field is empty or not. This may be 3435 // used to include empty fields in Patch requests. 3436 ForceSendFields []string `json:"-"` 3437 3438 // NullFields is a list of field names (e.g. "BatchId") to include in 3439 // API requests with the JSON null value. By default, fields with empty 3440 // values are omitted from API requests. However, any field with an 3441 // empty value appearing in NullFields will be sent to the server as 3442 // null. It is an error if a field in this list has a non-empty value. 3443 // This may be used to include null fields in Patch requests. 3444 NullFields []string `json:"-"` 3445} 3446 3447func (s *InventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 3448 type NoMethod InventoryCustomBatchRequestEntry 3449 raw := NoMethod(*s) 3450 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3451} 3452 3453type InventoryCustomBatchResponse struct { 3454 // Entries: The result of the execution of the batch requests. 3455 Entries []*InventoryCustomBatchResponseEntry `json:"entries,omitempty"` 3456 3457 // Kind: Identifies what kind of resource this is. Value: the fixed 3458 // string "content#inventoryCustomBatchResponse". 3459 Kind string `json:"kind,omitempty"` 3460 3461 // ServerResponse contains the HTTP response code and headers from the 3462 // server. 3463 googleapi.ServerResponse `json:"-"` 3464 3465 // ForceSendFields is a list of field names (e.g. "Entries") to 3466 // unconditionally include in API requests. By default, fields with 3467 // empty values are omitted from API requests. However, any non-pointer, 3468 // non-interface field appearing in ForceSendFields will be sent to the 3469 // server regardless of whether the field is empty or not. This may be 3470 // used to include empty fields in Patch requests. 3471 ForceSendFields []string `json:"-"` 3472 3473 // NullFields is a list of field names (e.g. "Entries") to include in 3474 // API requests with the JSON null value. By default, fields with empty 3475 // values are omitted from API requests. However, any field with an 3476 // empty value appearing in NullFields will be sent to the server as 3477 // null. It is an error if a field in this list has a non-empty value. 3478 // This may be used to include null fields in Patch requests. 3479 NullFields []string `json:"-"` 3480} 3481 3482func (s *InventoryCustomBatchResponse) MarshalJSON() ([]byte, error) { 3483 type NoMethod InventoryCustomBatchResponse 3484 raw := NoMethod(*s) 3485 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3486} 3487 3488// InventoryCustomBatchResponseEntry: A batch entry encoding a single 3489// non-batch inventory response. 3490type InventoryCustomBatchResponseEntry struct { 3491 // BatchId: The ID of the request entry this entry responds to. 3492 BatchId int64 `json:"batchId,omitempty"` 3493 3494 // Errors: A list of errors defined if and only if the request failed. 3495 Errors *Errors `json:"errors,omitempty"` 3496 3497 // Kind: Identifies what kind of resource this is. Value: the fixed 3498 // string "content#inventoryCustomBatchResponseEntry" 3499 Kind string `json:"kind,omitempty"` 3500 3501 // ForceSendFields is a list of field names (e.g. "BatchId") to 3502 // unconditionally include in API requests. By default, fields with 3503 // empty values are omitted from API requests. However, any non-pointer, 3504 // non-interface field appearing in ForceSendFields will be sent to the 3505 // server regardless of whether the field is empty or not. This may be 3506 // used to include empty fields in Patch requests. 3507 ForceSendFields []string `json:"-"` 3508 3509 // NullFields is a list of field names (e.g. "BatchId") to include in 3510 // API requests with the JSON null value. By default, fields with empty 3511 // values are omitted from API requests. However, any field with an 3512 // empty value appearing in NullFields will be sent to the server as 3513 // null. It is an error if a field in this list has a non-empty value. 3514 // This may be used to include null fields in Patch requests. 3515 NullFields []string `json:"-"` 3516} 3517 3518func (s *InventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 3519 type NoMethod InventoryCustomBatchResponseEntry 3520 raw := NoMethod(*s) 3521 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3522} 3523 3524type InventoryPickup struct { 3525 // PickupMethod: Whether store pickup is available for this offer and 3526 // whether the pickup option should be shown as buy, reserve, or not 3527 // supported. Only supported for local inventory. Unless the value is 3528 // "not supported", must be submitted together with `pickupSla`. 3529 // Acceptable values are: - "buy" - "not supported" - "reserve" - 3530 // "ship to store" 3531 PickupMethod string `json:"pickupMethod,omitempty"` 3532 3533 // PickupSla: The expected date that an order will be ready for pickup, 3534 // relative to when the order is placed. Only supported for local 3535 // inventory. Must be submitted together with `pickupMethod`. Acceptable 3536 // values are: - "five day" - "four day" - "multi day" - "multi 3537 // week" - "next day" - "same day" - "seven day" - "six day" - 3538 // "three day" - "two day" 3539 PickupSla string `json:"pickupSla,omitempty"` 3540 3541 // ForceSendFields is a list of field names (e.g. "PickupMethod") to 3542 // unconditionally include in API requests. By default, fields with 3543 // empty values are omitted from API requests. However, any non-pointer, 3544 // non-interface field appearing in ForceSendFields will be sent to the 3545 // server regardless of whether the field is empty or not. This may be 3546 // used to include empty fields in Patch requests. 3547 ForceSendFields []string `json:"-"` 3548 3549 // NullFields is a list of field names (e.g. "PickupMethod") to include 3550 // in API requests with the JSON null value. By default, fields with 3551 // empty values are omitted from API requests. However, any field with 3552 // an empty value appearing in NullFields will be sent to the server as 3553 // null. It is an error if a field in this list has a non-empty value. 3554 // This may be used to include null fields in Patch requests. 3555 NullFields []string `json:"-"` 3556} 3557 3558func (s *InventoryPickup) MarshalJSON() ([]byte, error) { 3559 type NoMethod InventoryPickup 3560 raw := NoMethod(*s) 3561 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3562} 3563 3564type InventorySetRequest struct { 3565 // Availability: The availability of the product. Acceptable values are: 3566 // - "in stock" - "out of stock" - "preorder" 3567 Availability string `json:"availability,omitempty"` 3568 3569 // CustomLabel0: Custom label 0 for custom grouping of items in a 3570 // Shopping campaign. Only supported for online products. 3571 CustomLabel0 string `json:"customLabel0,omitempty"` 3572 3573 // CustomLabel1: Custom label 1 for custom grouping of items in a 3574 // Shopping campaign. Only supported for online products. 3575 CustomLabel1 string `json:"customLabel1,omitempty"` 3576 3577 // CustomLabel2: Custom label 2 for custom grouping of items in a 3578 // Shopping campaign. Only supported for online products. 3579 CustomLabel2 string `json:"customLabel2,omitempty"` 3580 3581 // CustomLabel3: Custom label 3 for custom grouping of items in a 3582 // Shopping campaign. Only supported for online products. 3583 CustomLabel3 string `json:"customLabel3,omitempty"` 3584 3585 // CustomLabel4: Custom label 3 for custom grouping of items in a 3586 // Shopping campaign. Only supported for online products. 3587 CustomLabel4 string `json:"customLabel4,omitempty"` 3588 3589 // Installment: Number and amount of installments to pay for an item. 3590 // Brazil only. 3591 Installment *Installment `json:"installment,omitempty"` 3592 3593 // InstoreProductLocation: The instore product location. Supported only 3594 // for local products. 3595 InstoreProductLocation string `json:"instoreProductLocation,omitempty"` 3596 3597 // LoyaltyPoints: Loyalty points that users receive after purchasing the 3598 // item. Japan only. 3599 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 3600 3601 // Pickup: Store pickup information. Only supported for local inventory. 3602 // Not setting `pickup` means "don't update" while setting it to the 3603 // empty value (`{}` in JSON) means "delete". Otherwise, `pickupMethod` 3604 // and `pickupSla` must be set together, unless `pickupMethod` is "not 3605 // supported". 3606 Pickup *InventoryPickup `json:"pickup,omitempty"` 3607 3608 // Price: The price of the product. 3609 Price *Price `json:"price,omitempty"` 3610 3611 // Quantity: The quantity of the product. Must be equal to or greater 3612 // than zero. Supported only for local products. 3613 Quantity int64 `json:"quantity,omitempty"` 3614 3615 // SalePrice: The sale price of the product. Mandatory if 3616 // `sale_price_effective_date` is defined. 3617 SalePrice *Price `json:"salePrice,omitempty"` 3618 3619 // SalePriceEffectiveDate: A date range represented by a pair of ISO 3620 // 8601 dates separated by a space, comma, or slash. Both dates might be 3621 // specified as 'null' if undecided. 3622 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 3623 3624 // SellOnGoogleQuantity: The quantity of the product that is available 3625 // for selling on Google. Supported only for online products. 3626 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"` 3627 3628 // ForceSendFields is a list of field names (e.g. "Availability") to 3629 // unconditionally include in API requests. By default, fields with 3630 // empty values are omitted from API requests. However, any non-pointer, 3631 // non-interface field appearing in ForceSendFields will be sent to the 3632 // server regardless of whether the field is empty or not. This may be 3633 // used to include empty fields in Patch requests. 3634 ForceSendFields []string `json:"-"` 3635 3636 // NullFields is a list of field names (e.g. "Availability") to include 3637 // in API requests with the JSON null value. By default, fields with 3638 // empty values are omitted from API requests. However, any field with 3639 // an empty value appearing in NullFields will be sent to the server as 3640 // null. It is an error if a field in this list has a non-empty value. 3641 // This may be used to include null fields in Patch requests. 3642 NullFields []string `json:"-"` 3643} 3644 3645func (s *InventorySetRequest) MarshalJSON() ([]byte, error) { 3646 type NoMethod InventorySetRequest 3647 raw := NoMethod(*s) 3648 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3649} 3650 3651type InventorySetResponse struct { 3652 // Kind: Identifies what kind of resource this is. Value: the fixed 3653 // string "content#inventorySetResponse". 3654 Kind string `json:"kind,omitempty"` 3655 3656 // ServerResponse contains the HTTP response code and headers from the 3657 // server. 3658 googleapi.ServerResponse `json:"-"` 3659 3660 // ForceSendFields is a list of field names (e.g. "Kind") to 3661 // unconditionally include in API requests. By default, fields with 3662 // empty values are omitted from API requests. However, any non-pointer, 3663 // non-interface field appearing in ForceSendFields will be sent to the 3664 // server regardless of whether the field is empty or not. This may be 3665 // used to include empty fields in Patch requests. 3666 ForceSendFields []string `json:"-"` 3667 3668 // NullFields is a list of field names (e.g. "Kind") to include in API 3669 // requests with the JSON null value. By default, fields with empty 3670 // values are omitted from API requests. However, any field with an 3671 // empty value appearing in NullFields will be sent to the server as 3672 // null. It is an error if a field in this list has a non-empty value. 3673 // This may be used to include null fields in Patch requests. 3674 NullFields []string `json:"-"` 3675} 3676 3677func (s *InventorySetResponse) MarshalJSON() ([]byte, error) { 3678 type NoMethod InventorySetResponse 3679 raw := NoMethod(*s) 3680 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3681} 3682 3683type InvoiceSummary struct { 3684 // AdditionalChargeSummaries: Summary of the total amounts of the 3685 // additional charges. 3686 AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"` 3687 3688 // CustomerBalance: Deprecated. 3689 CustomerBalance *Amount `json:"customerBalance,omitempty"` 3690 3691 // GoogleBalance: Deprecated. 3692 GoogleBalance *Amount `json:"googleBalance,omitempty"` 3693 3694 // MerchantBalance: Deprecated. 3695 MerchantBalance *Amount `json:"merchantBalance,omitempty"` 3696 3697 // ProductTotal: [required] Total price for the product. 3698 ProductTotal *Amount `json:"productTotal,omitempty"` 3699 3700 // PromotionSummaries: Deprecated. 3701 PromotionSummaries []*Promotion `json:"promotionSummaries,omitempty"` 3702 3703 // ForceSendFields is a list of field names (e.g. 3704 // "AdditionalChargeSummaries") to unconditionally include in API 3705 // requests. By default, fields with empty values are omitted from API 3706 // requests. However, any non-pointer, non-interface field appearing in 3707 // ForceSendFields will be sent to the server regardless of whether the 3708 // field is empty or not. This may be used to include empty fields in 3709 // Patch requests. 3710 ForceSendFields []string `json:"-"` 3711 3712 // NullFields is a list of field names (e.g. 3713 // "AdditionalChargeSummaries") to include in API requests with the JSON 3714 // null value. By default, fields with empty values are omitted from API 3715 // requests. However, any field with an empty value appearing in 3716 // NullFields will be sent to the server as null. It is an error if a 3717 // field in this list has a non-empty value. This may be used to include 3718 // null fields in Patch requests. 3719 NullFields []string `json:"-"` 3720} 3721 3722func (s *InvoiceSummary) MarshalJSON() ([]byte, error) { 3723 type NoMethod InvoiceSummary 3724 raw := NoMethod(*s) 3725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3726} 3727 3728type InvoiceSummaryAdditionalChargeSummary struct { 3729 // TotalAmount: [required] Total additional charge for this type. 3730 TotalAmount *Amount `json:"totalAmount,omitempty"` 3731 3732 // Type: [required] Type of the additional charge. Acceptable values 3733 // are: - "shipping" 3734 Type string `json:"type,omitempty"` 3735 3736 // ForceSendFields is a list of field names (e.g. "TotalAmount") to 3737 // unconditionally include in API requests. By default, fields with 3738 // empty values are omitted from API requests. However, any non-pointer, 3739 // non-interface field appearing in ForceSendFields will be sent to the 3740 // server regardless of whether the field is empty or not. This may be 3741 // used to include empty fields in Patch requests. 3742 ForceSendFields []string `json:"-"` 3743 3744 // NullFields is a list of field names (e.g. "TotalAmount") to include 3745 // in API requests with the JSON null value. By default, fields with 3746 // empty values are omitted from API requests. However, any field with 3747 // an empty value appearing in NullFields will be sent to the server as 3748 // null. It is an error if a field in this list has a non-empty value. 3749 // This may be used to include null fields in Patch requests. 3750 NullFields []string `json:"-"` 3751} 3752 3753func (s *InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) { 3754 type NoMethod InvoiceSummaryAdditionalChargeSummary 3755 raw := NoMethod(*s) 3756 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3757} 3758 3759type LiaAboutPageSettings struct { 3760 // Status: The status of the verification process for the About page. 3761 // Acceptable values are: - "active" - "inactive" - "pending" 3762 Status string `json:"status,omitempty"` 3763 3764 // Url: The URL for the About page. 3765 Url string `json:"url,omitempty"` 3766 3767 // ForceSendFields is a list of field names (e.g. "Status") to 3768 // unconditionally include in API requests. By default, fields with 3769 // empty values are omitted from API requests. However, any non-pointer, 3770 // non-interface field appearing in ForceSendFields will be sent to the 3771 // server regardless of whether the field is empty or not. This may be 3772 // used to include empty fields in Patch requests. 3773 ForceSendFields []string `json:"-"` 3774 3775 // NullFields is a list of field names (e.g. "Status") to include in API 3776 // requests with the JSON null value. By default, fields with empty 3777 // values are omitted from API requests. However, any field with an 3778 // empty value appearing in NullFields will be sent to the server as 3779 // null. It is an error if a field in this list has a non-empty value. 3780 // This may be used to include null fields in Patch requests. 3781 NullFields []string `json:"-"` 3782} 3783 3784func (s *LiaAboutPageSettings) MarshalJSON() ([]byte, error) { 3785 type NoMethod LiaAboutPageSettings 3786 raw := NoMethod(*s) 3787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3788} 3789 3790type LiaCountrySettings struct { 3791 // About: The settings for the About page. 3792 About *LiaAboutPageSettings `json:"about,omitempty"` 3793 3794 // Country: Required. CLDR country code (e.g. "US"). 3795 Country string `json:"country,omitempty"` 3796 3797 // HostedLocalStorefrontActive: The status of the "Merchant hosted local 3798 // storefront" feature. 3799 HostedLocalStorefrontActive bool `json:"hostedLocalStorefrontActive,omitempty"` 3800 3801 // Inventory: LIA inventory verification settings. 3802 Inventory *LiaInventorySettings `json:"inventory,omitempty"` 3803 3804 // OnDisplayToOrder: LIA "On Display To Order" settings. 3805 OnDisplayToOrder *LiaOnDisplayToOrderSettings `json:"onDisplayToOrder,omitempty"` 3806 3807 // PosDataProvider: The POS data provider linked with this country. 3808 PosDataProvider *LiaPosDataProvider `json:"posDataProvider,omitempty"` 3809 3810 // StorePickupActive: The status of the "Store pickup" feature. 3811 StorePickupActive bool `json:"storePickupActive,omitempty"` 3812 3813 // ForceSendFields is a list of field names (e.g. "About") to 3814 // unconditionally include in API requests. By default, fields with 3815 // empty values are omitted from API requests. However, any non-pointer, 3816 // non-interface field appearing in ForceSendFields will be sent to the 3817 // server regardless of whether the field is empty or not. This may be 3818 // used to include empty fields in Patch requests. 3819 ForceSendFields []string `json:"-"` 3820 3821 // NullFields is a list of field names (e.g. "About") to include in API 3822 // requests with the JSON null value. By default, fields with empty 3823 // values are omitted from API requests. However, any field with an 3824 // empty value appearing in NullFields will be sent to the server as 3825 // null. It is an error if a field in this list has a non-empty value. 3826 // This may be used to include null fields in Patch requests. 3827 NullFields []string `json:"-"` 3828} 3829 3830func (s *LiaCountrySettings) MarshalJSON() ([]byte, error) { 3831 type NoMethod LiaCountrySettings 3832 raw := NoMethod(*s) 3833 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3834} 3835 3836type LiaInventorySettings struct { 3837 // InventoryVerificationContactEmail: The email of the contact for the 3838 // inventory verification process. 3839 InventoryVerificationContactEmail string `json:"inventoryVerificationContactEmail,omitempty"` 3840 3841 // InventoryVerificationContactName: The name of the contact for the 3842 // inventory verification process. 3843 InventoryVerificationContactName string `json:"inventoryVerificationContactName,omitempty"` 3844 3845 // InventoryVerificationContactStatus: The status of the verification 3846 // contact. Acceptable values are: - "active" - "inactive" - 3847 // "pending" 3848 InventoryVerificationContactStatus string `json:"inventoryVerificationContactStatus,omitempty"` 3849 3850 // Status: The status of the inventory verification process. Acceptable 3851 // values are: - "active" - "inactive" - "pending" 3852 Status string `json:"status,omitempty"` 3853 3854 // ForceSendFields is a list of field names (e.g. 3855 // "InventoryVerificationContactEmail") to unconditionally include in 3856 // API requests. By default, fields with empty values are omitted from 3857 // API requests. However, any non-pointer, non-interface field appearing 3858 // in ForceSendFields will be sent to the server regardless of whether 3859 // the field is empty or not. This may be used to include empty fields 3860 // in Patch requests. 3861 ForceSendFields []string `json:"-"` 3862 3863 // NullFields is a list of field names (e.g. 3864 // "InventoryVerificationContactEmail") to include in API requests with 3865 // the JSON null value. By default, fields with empty values are omitted 3866 // from API requests. However, any field with an empty value appearing 3867 // in NullFields will be sent to the server as null. It is an error if a 3868 // field in this list has a non-empty value. This may be used to include 3869 // null fields in Patch requests. 3870 NullFields []string `json:"-"` 3871} 3872 3873func (s *LiaInventorySettings) MarshalJSON() ([]byte, error) { 3874 type NoMethod LiaInventorySettings 3875 raw := NoMethod(*s) 3876 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3877} 3878 3879type LiaOnDisplayToOrderSettings struct { 3880 // ShippingCostPolicyUrl: Shipping cost and policy URL. 3881 ShippingCostPolicyUrl string `json:"shippingCostPolicyUrl,omitempty"` 3882 3883 // Status: The status of the ?On display to order? feature. Acceptable 3884 // values are: - "active" - "inactive" - "pending" 3885 Status string `json:"status,omitempty"` 3886 3887 // ForceSendFields is a list of field names (e.g. 3888 // "ShippingCostPolicyUrl") to unconditionally include in API requests. 3889 // By default, fields with empty values are omitted from API requests. 3890 // However, any non-pointer, non-interface field appearing in 3891 // ForceSendFields will be sent to the server regardless of whether the 3892 // field is empty or not. This may be used to include empty fields in 3893 // Patch requests. 3894 ForceSendFields []string `json:"-"` 3895 3896 // NullFields is a list of field names (e.g. "ShippingCostPolicyUrl") to 3897 // include in API requests with the JSON null value. By default, fields 3898 // with empty values are omitted from API requests. However, any field 3899 // with an empty value appearing in NullFields will be sent to the 3900 // server as null. It is an error if a field in this list has a 3901 // non-empty value. This may be used to include null fields in Patch 3902 // requests. 3903 NullFields []string `json:"-"` 3904} 3905 3906func (s *LiaOnDisplayToOrderSettings) MarshalJSON() ([]byte, error) { 3907 type NoMethod LiaOnDisplayToOrderSettings 3908 raw := NoMethod(*s) 3909 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3910} 3911 3912type LiaPosDataProvider struct { 3913 // PosDataProviderId: The ID of the POS data provider. 3914 PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` 3915 3916 // PosExternalAccountId: The account ID by which this merchant is known 3917 // to the POS data provider. 3918 PosExternalAccountId string `json:"posExternalAccountId,omitempty"` 3919 3920 // ForceSendFields is a list of field names (e.g. "PosDataProviderId") 3921 // to unconditionally include in API requests. By default, fields with 3922 // empty values are omitted from API requests. However, any non-pointer, 3923 // non-interface field appearing in ForceSendFields will be sent to the 3924 // server regardless of whether the field is empty or not. This may be 3925 // used to include empty fields in Patch requests. 3926 ForceSendFields []string `json:"-"` 3927 3928 // NullFields is a list of field names (e.g. "PosDataProviderId") to 3929 // include in API requests with the JSON null value. By default, fields 3930 // with empty values are omitted from API requests. However, any field 3931 // with an empty value appearing in NullFields will be sent to the 3932 // server as null. It is an error if a field in this list has a 3933 // non-empty value. This may be used to include null fields in Patch 3934 // requests. 3935 NullFields []string `json:"-"` 3936} 3937 3938func (s *LiaPosDataProvider) MarshalJSON() ([]byte, error) { 3939 type NoMethod LiaPosDataProvider 3940 raw := NoMethod(*s) 3941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3942} 3943 3944// LiaSettings: Local Inventory ads (LIA) settings. All methods except 3945// listposdataproviders require the admin role. 3946type LiaSettings struct { 3947 // AccountId: The ID of the account to which these LIA settings belong. 3948 // Ignored upon update, always present in get request responses. 3949 AccountId uint64 `json:"accountId,omitempty,string"` 3950 3951 // CountrySettings: The LIA settings for each country. 3952 CountrySettings []*LiaCountrySettings `json:"countrySettings,omitempty"` 3953 3954 // Kind: Identifies what kind of resource this is. Value: the fixed 3955 // string "content#liaSettings" 3956 Kind string `json:"kind,omitempty"` 3957 3958 // ServerResponse contains the HTTP response code and headers from the 3959 // server. 3960 googleapi.ServerResponse `json:"-"` 3961 3962 // ForceSendFields is a list of field names (e.g. "AccountId") to 3963 // unconditionally include in API requests. By default, fields with 3964 // empty values are omitted from API requests. However, any non-pointer, 3965 // non-interface field appearing in ForceSendFields will be sent to the 3966 // server regardless of whether the field is empty or not. This may be 3967 // used to include empty fields in Patch requests. 3968 ForceSendFields []string `json:"-"` 3969 3970 // NullFields is a list of field names (e.g. "AccountId") to include in 3971 // API requests with the JSON null value. By default, fields with empty 3972 // values are omitted from API requests. However, any field with an 3973 // empty value appearing in NullFields will be sent to the server as 3974 // null. It is an error if a field in this list has a non-empty value. 3975 // This may be used to include null fields in Patch requests. 3976 NullFields []string `json:"-"` 3977} 3978 3979func (s *LiaSettings) MarshalJSON() ([]byte, error) { 3980 type NoMethod LiaSettings 3981 raw := NoMethod(*s) 3982 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3983} 3984 3985type LiasettingsCustomBatchRequest struct { 3986 // Entries: The request entries to be processed in the batch. 3987 Entries []*LiasettingsCustomBatchRequestEntry `json:"entries,omitempty"` 3988 3989 // ForceSendFields is a list of field names (e.g. "Entries") to 3990 // unconditionally include in API requests. By default, fields with 3991 // empty values are omitted from API requests. However, any non-pointer, 3992 // non-interface field appearing in ForceSendFields will be sent to the 3993 // server regardless of whether the field is empty or not. This may be 3994 // used to include empty fields in Patch requests. 3995 ForceSendFields []string `json:"-"` 3996 3997 // NullFields is a list of field names (e.g. "Entries") to include in 3998 // API requests with the JSON null value. By default, fields with empty 3999 // values are omitted from API requests. However, any field with an 4000 // empty value appearing in NullFields will be sent to the server as 4001 // null. It is an error if a field in this list has a non-empty value. 4002 // This may be used to include null fields in Patch requests. 4003 NullFields []string `json:"-"` 4004} 4005 4006func (s *LiasettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { 4007 type NoMethod LiasettingsCustomBatchRequest 4008 raw := NoMethod(*s) 4009 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4010} 4011 4012type LiasettingsCustomBatchRequestEntry struct { 4013 // AccountId: The ID of the account for which to get/update account LIA 4014 // settings. 4015 AccountId uint64 `json:"accountId,omitempty,string"` 4016 4017 // BatchId: An entry ID, unique within the batch request. 4018 BatchId int64 `json:"batchId,omitempty"` 4019 4020 // ContactEmail: Inventory validation contact email. Required only for 4021 // SetInventoryValidationContact. 4022 ContactEmail string `json:"contactEmail,omitempty"` 4023 4024 // ContactName: Inventory validation contact name. Required only for 4025 // SetInventoryValidationContact. 4026 ContactName string `json:"contactName,omitempty"` 4027 4028 // Country: The country code. Required only for 4029 // RequestInventoryVerification. 4030 Country string `json:"country,omitempty"` 4031 4032 // GmbEmail: The GMB account. Required only for RequestGmbAccess. 4033 GmbEmail string `json:"gmbEmail,omitempty"` 4034 4035 // LiaSettings: The account Lia settings to update. Only defined if the 4036 // method is `update`. 4037 LiaSettings *LiaSettings `json:"liaSettings,omitempty"` 4038 4039 // MerchantId: The ID of the managing account. 4040 MerchantId uint64 `json:"merchantId,omitempty,string"` 4041 4042 // Method: The method of the batch entry. Acceptable values are: - 4043 // "get" - "getAccessibleGmbAccounts" - "requestGmbAccess" - 4044 // "requestInventoryVerification" - 4045 // "setInventoryVerificationContact" - "update" 4046 Method string `json:"method,omitempty"` 4047 4048 // PosDataProviderId: The ID of POS data provider. Required only for 4049 // SetPosProvider. 4050 PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"` 4051 4052 // PosExternalAccountId: The account ID by which this merchant is known 4053 // to the POS provider. 4054 PosExternalAccountId string `json:"posExternalAccountId,omitempty"` 4055 4056 // ForceSendFields is a list of field names (e.g. "AccountId") to 4057 // unconditionally include in API requests. By default, fields with 4058 // empty values are omitted from API requests. However, any non-pointer, 4059 // non-interface field appearing in ForceSendFields will be sent to the 4060 // server regardless of whether the field is empty or not. This may be 4061 // used to include empty fields in Patch requests. 4062 ForceSendFields []string `json:"-"` 4063 4064 // NullFields is a list of field names (e.g. "AccountId") to include in 4065 // API requests with the JSON null value. By default, fields with empty 4066 // values are omitted from API requests. However, any field with an 4067 // empty value appearing in NullFields will be sent to the server as 4068 // null. It is an error if a field in this list has a non-empty value. 4069 // This may be used to include null fields in Patch requests. 4070 NullFields []string `json:"-"` 4071} 4072 4073func (s *LiasettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 4074 type NoMethod LiasettingsCustomBatchRequestEntry 4075 raw := NoMethod(*s) 4076 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4077} 4078 4079type LiasettingsCustomBatchResponse struct { 4080 // Entries: The result of the execution of the batch requests. 4081 Entries []*LiasettingsCustomBatchResponseEntry `json:"entries,omitempty"` 4082 4083 // Kind: Identifies what kind of resource this is. Value: the fixed 4084 // string "content#liasettingsCustomBatchResponse". 4085 Kind string `json:"kind,omitempty"` 4086 4087 // ServerResponse contains the HTTP response code and headers from the 4088 // server. 4089 googleapi.ServerResponse `json:"-"` 4090 4091 // ForceSendFields is a list of field names (e.g. "Entries") to 4092 // unconditionally include in API requests. By default, fields with 4093 // empty values are omitted from API requests. However, any non-pointer, 4094 // non-interface field appearing in ForceSendFields will be sent to the 4095 // server regardless of whether the field is empty or not. This may be 4096 // used to include empty fields in Patch requests. 4097 ForceSendFields []string `json:"-"` 4098 4099 // NullFields is a list of field names (e.g. "Entries") to include in 4100 // API requests with the JSON null value. By default, fields with empty 4101 // values are omitted from API requests. However, any field with an 4102 // empty value appearing in NullFields will be sent to the server as 4103 // null. It is an error if a field in this list has a non-empty value. 4104 // This may be used to include null fields in Patch requests. 4105 NullFields []string `json:"-"` 4106} 4107 4108func (s *LiasettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { 4109 type NoMethod LiasettingsCustomBatchResponse 4110 raw := NoMethod(*s) 4111 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4112} 4113 4114type LiasettingsCustomBatchResponseEntry struct { 4115 // BatchId: The ID of the request entry to which this entry responds. 4116 BatchId int64 `json:"batchId,omitempty"` 4117 4118 // Errors: A list of errors defined if, and only if, the request failed. 4119 Errors *Errors `json:"errors,omitempty"` 4120 4121 // GmbAccounts: The list of accessible GMB accounts. 4122 GmbAccounts *GmbAccounts `json:"gmbAccounts,omitempty"` 4123 4124 // Kind: Identifies what kind of resource this is. Value: the fixed 4125 // string "content#liasettingsCustomBatchResponseEntry" 4126 Kind string `json:"kind,omitempty"` 4127 4128 // LiaSettings: The retrieved or updated Lia settings. 4129 LiaSettings *LiaSettings `json:"liaSettings,omitempty"` 4130 4131 // PosDataProviders: The list of POS data providers. 4132 PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` 4133 4134 // ForceSendFields is a list of field names (e.g. "BatchId") to 4135 // unconditionally include in API requests. By default, fields with 4136 // empty values are omitted from API requests. However, any non-pointer, 4137 // non-interface field appearing in ForceSendFields will be sent to the 4138 // server regardless of whether the field is empty or not. This may be 4139 // used to include empty fields in Patch requests. 4140 ForceSendFields []string `json:"-"` 4141 4142 // NullFields is a list of field names (e.g. "BatchId") to include in 4143 // API requests with the JSON null value. By default, fields with empty 4144 // values are omitted from API requests. However, any field with an 4145 // empty value appearing in NullFields will be sent to the server as 4146 // null. It is an error if a field in this list has a non-empty value. 4147 // This may be used to include null fields in Patch requests. 4148 NullFields []string `json:"-"` 4149} 4150 4151func (s *LiasettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 4152 type NoMethod LiasettingsCustomBatchResponseEntry 4153 raw := NoMethod(*s) 4154 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4155} 4156 4157type LiasettingsGetAccessibleGmbAccountsResponse struct { 4158 // AccountId: The ID of the Merchant Center account. 4159 AccountId uint64 `json:"accountId,omitempty,string"` 4160 4161 // GmbAccounts: A list of GMB accounts which are available to the 4162 // merchant. 4163 GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"` 4164 4165 // Kind: Identifies what kind of resource this is. Value: the fixed 4166 // string "content#liasettingsGetAccessibleGmbAccountsResponse". 4167 Kind string `json:"kind,omitempty"` 4168 4169 // ServerResponse contains the HTTP response code and headers from the 4170 // server. 4171 googleapi.ServerResponse `json:"-"` 4172 4173 // ForceSendFields is a list of field names (e.g. "AccountId") to 4174 // unconditionally include in API requests. By default, fields with 4175 // empty values are omitted from API requests. However, any non-pointer, 4176 // non-interface field appearing in ForceSendFields will be sent to the 4177 // server regardless of whether the field is empty or not. This may be 4178 // used to include empty fields in Patch requests. 4179 ForceSendFields []string `json:"-"` 4180 4181 // NullFields is a list of field names (e.g. "AccountId") to include in 4182 // API requests with the JSON null value. By default, fields with empty 4183 // values are omitted from API requests. However, any field with an 4184 // empty value appearing in NullFields will be sent to the server as 4185 // null. It is an error if a field in this list has a non-empty value. 4186 // This may be used to include null fields in Patch requests. 4187 NullFields []string `json:"-"` 4188} 4189 4190func (s *LiasettingsGetAccessibleGmbAccountsResponse) MarshalJSON() ([]byte, error) { 4191 type NoMethod LiasettingsGetAccessibleGmbAccountsResponse 4192 raw := NoMethod(*s) 4193 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4194} 4195 4196type LiasettingsListPosDataProvidersResponse struct { 4197 // Kind: Identifies what kind of resource this is. Value: the fixed 4198 // string "content#liasettingsListPosDataProvidersResponse". 4199 Kind string `json:"kind,omitempty"` 4200 4201 // PosDataProviders: The list of POS data providers for each eligible 4202 // country 4203 PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"` 4204 4205 // ServerResponse contains the HTTP response code and headers from the 4206 // server. 4207 googleapi.ServerResponse `json:"-"` 4208 4209 // ForceSendFields is a list of field names (e.g. "Kind") to 4210 // unconditionally include in API requests. By default, fields with 4211 // empty values are omitted from API requests. However, any non-pointer, 4212 // non-interface field appearing in ForceSendFields will be sent to the 4213 // server regardless of whether the field is empty or not. This may be 4214 // used to include empty fields in Patch requests. 4215 ForceSendFields []string `json:"-"` 4216 4217 // NullFields is a list of field names (e.g. "Kind") to include in API 4218 // requests with the JSON null value. By default, fields with empty 4219 // values are omitted from API requests. However, any field with an 4220 // empty value appearing in NullFields will be sent to the server as 4221 // null. It is an error if a field in this list has a non-empty value. 4222 // This may be used to include null fields in Patch requests. 4223 NullFields []string `json:"-"` 4224} 4225 4226func (s *LiasettingsListPosDataProvidersResponse) MarshalJSON() ([]byte, error) { 4227 type NoMethod LiasettingsListPosDataProvidersResponse 4228 raw := NoMethod(*s) 4229 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4230} 4231 4232type LiasettingsListResponse struct { 4233 // Kind: Identifies what kind of resource this is. Value: the fixed 4234 // string "content#liasettingsListResponse". 4235 Kind string `json:"kind,omitempty"` 4236 4237 // NextPageToken: The token for the retrieval of the next page of LIA 4238 // settings. 4239 NextPageToken string `json:"nextPageToken,omitempty"` 4240 4241 Resources []*LiaSettings `json:"resources,omitempty"` 4242 4243 // ServerResponse contains the HTTP response code and headers from the 4244 // server. 4245 googleapi.ServerResponse `json:"-"` 4246 4247 // ForceSendFields is a list of field names (e.g. "Kind") to 4248 // unconditionally include in API requests. By default, fields with 4249 // empty values are omitted from API requests. However, any non-pointer, 4250 // non-interface field appearing in ForceSendFields will be sent to the 4251 // server regardless of whether the field is empty or not. This may be 4252 // used to include empty fields in Patch requests. 4253 ForceSendFields []string `json:"-"` 4254 4255 // NullFields is a list of field names (e.g. "Kind") to include in API 4256 // requests with the JSON null value. By default, fields with empty 4257 // values are omitted from API requests. However, any field with an 4258 // empty value appearing in NullFields will be sent to the server as 4259 // null. It is an error if a field in this list has a non-empty value. 4260 // This may be used to include null fields in Patch requests. 4261 NullFields []string `json:"-"` 4262} 4263 4264func (s *LiasettingsListResponse) MarshalJSON() ([]byte, error) { 4265 type NoMethod LiasettingsListResponse 4266 raw := NoMethod(*s) 4267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4268} 4269 4270type LiasettingsRequestGmbAccessResponse struct { 4271 // Kind: Identifies what kind of resource this is. Value: the fixed 4272 // string "content#liasettingsRequestGmbAccessResponse". 4273 Kind string `json:"kind,omitempty"` 4274 4275 // ServerResponse contains the HTTP response code and headers from the 4276 // server. 4277 googleapi.ServerResponse `json:"-"` 4278 4279 // ForceSendFields is a list of field names (e.g. "Kind") to 4280 // unconditionally include in API requests. By default, fields with 4281 // empty values are omitted from API requests. However, any non-pointer, 4282 // non-interface field appearing in ForceSendFields will be sent to the 4283 // server regardless of whether the field is empty or not. This may be 4284 // used to include empty fields in Patch requests. 4285 ForceSendFields []string `json:"-"` 4286 4287 // NullFields is a list of field names (e.g. "Kind") to include in API 4288 // requests with the JSON null value. By default, fields with empty 4289 // values are omitted from API requests. However, any field with an 4290 // empty value appearing in NullFields will be sent to the server as 4291 // null. It is an error if a field in this list has a non-empty value. 4292 // This may be used to include null fields in Patch requests. 4293 NullFields []string `json:"-"` 4294} 4295 4296func (s *LiasettingsRequestGmbAccessResponse) MarshalJSON() ([]byte, error) { 4297 type NoMethod LiasettingsRequestGmbAccessResponse 4298 raw := NoMethod(*s) 4299 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4300} 4301 4302type LiasettingsRequestInventoryVerificationResponse struct { 4303 // Kind: Identifies what kind of resource this is. Value: the fixed 4304 // string "content#liasettingsRequestInventoryVerificationResponse". 4305 Kind string `json:"kind,omitempty"` 4306 4307 // ServerResponse contains the HTTP response code and headers from the 4308 // server. 4309 googleapi.ServerResponse `json:"-"` 4310 4311 // ForceSendFields is a list of field names (e.g. "Kind") to 4312 // unconditionally include in API requests. By default, fields with 4313 // empty values are omitted from API requests. However, any non-pointer, 4314 // non-interface field appearing in ForceSendFields will be sent to the 4315 // server regardless of whether the field is empty or not. This may be 4316 // used to include empty fields in Patch requests. 4317 ForceSendFields []string `json:"-"` 4318 4319 // NullFields is a list of field names (e.g. "Kind") to include in API 4320 // requests with the JSON null value. By default, fields with empty 4321 // values are omitted from API requests. However, any field with an 4322 // empty value appearing in NullFields will be sent to the server as 4323 // null. It is an error if a field in this list has a non-empty value. 4324 // This may be used to include null fields in Patch requests. 4325 NullFields []string `json:"-"` 4326} 4327 4328func (s *LiasettingsRequestInventoryVerificationResponse) MarshalJSON() ([]byte, error) { 4329 type NoMethod LiasettingsRequestInventoryVerificationResponse 4330 raw := NoMethod(*s) 4331 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4332} 4333 4334type LiasettingsSetInventoryVerificationContactResponse struct { 4335 // Kind: Identifies what kind of resource this is. Value: the fixed 4336 // string "content#liasettingsSetInventoryVerificationContactResponse". 4337 Kind string `json:"kind,omitempty"` 4338 4339 // ServerResponse contains the HTTP response code and headers from the 4340 // server. 4341 googleapi.ServerResponse `json:"-"` 4342 4343 // ForceSendFields is a list of field names (e.g. "Kind") to 4344 // unconditionally include in API requests. By default, fields with 4345 // empty values are omitted from API requests. However, any non-pointer, 4346 // non-interface field appearing in ForceSendFields will be sent to the 4347 // server regardless of whether the field is empty or not. This may be 4348 // used to include empty fields in Patch requests. 4349 ForceSendFields []string `json:"-"` 4350 4351 // NullFields is a list of field names (e.g. "Kind") to include in API 4352 // requests with the JSON null value. By default, fields with empty 4353 // values are omitted from API requests. However, any field with an 4354 // empty value appearing in NullFields will be sent to the server as 4355 // null. It is an error if a field in this list has a non-empty value. 4356 // This may be used to include null fields in Patch requests. 4357 NullFields []string `json:"-"` 4358} 4359 4360func (s *LiasettingsSetInventoryVerificationContactResponse) MarshalJSON() ([]byte, error) { 4361 type NoMethod LiasettingsSetInventoryVerificationContactResponse 4362 raw := NoMethod(*s) 4363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4364} 4365 4366type LiasettingsSetPosDataProviderResponse struct { 4367 // Kind: Identifies what kind of resource this is. Value: the fixed 4368 // string "content#liasettingsSetPosDataProviderResponse". 4369 Kind string `json:"kind,omitempty"` 4370 4371 // ServerResponse contains the HTTP response code and headers from the 4372 // server. 4373 googleapi.ServerResponse `json:"-"` 4374 4375 // ForceSendFields is a list of field names (e.g. "Kind") to 4376 // unconditionally include in API requests. By default, fields with 4377 // empty values are omitted from API requests. However, any non-pointer, 4378 // non-interface field appearing in ForceSendFields will be sent to the 4379 // server regardless of whether the field is empty or not. This may be 4380 // used to include empty fields in Patch requests. 4381 ForceSendFields []string `json:"-"` 4382 4383 // NullFields is a list of field names (e.g. "Kind") to include in API 4384 // requests with the JSON null value. By default, fields with empty 4385 // values are omitted from API requests. However, any field with an 4386 // empty value appearing in NullFields will be sent to the server as 4387 // null. It is an error if a field in this list has a non-empty value. 4388 // This may be used to include null fields in Patch requests. 4389 NullFields []string `json:"-"` 4390} 4391 4392func (s *LiasettingsSetPosDataProviderResponse) MarshalJSON() ([]byte, error) { 4393 type NoMethod LiasettingsSetPosDataProviderResponse 4394 raw := NoMethod(*s) 4395 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4396} 4397 4398type LocationIdSet struct { 4399 // LocationIds: A non-empty list of location IDs. They must all be of 4400 // the same location type (e.g., state). 4401 LocationIds []string `json:"locationIds,omitempty"` 4402 4403 // ForceSendFields is a list of field names (e.g. "LocationIds") to 4404 // unconditionally include in API requests. By default, fields with 4405 // empty values are omitted from API requests. However, any non-pointer, 4406 // non-interface field appearing in ForceSendFields will be sent to the 4407 // server regardless of whether the field is empty or not. This may be 4408 // used to include empty fields in Patch requests. 4409 ForceSendFields []string `json:"-"` 4410 4411 // NullFields is a list of field names (e.g. "LocationIds") to include 4412 // in API requests with the JSON null value. By default, fields with 4413 // empty values are omitted from API requests. However, any field with 4414 // an empty value appearing in NullFields will be sent to the server as 4415 // null. It is an error if a field in this list has a non-empty value. 4416 // This may be used to include null fields in Patch requests. 4417 NullFields []string `json:"-"` 4418} 4419 4420func (s *LocationIdSet) MarshalJSON() ([]byte, error) { 4421 type NoMethod LocationIdSet 4422 raw := NoMethod(*s) 4423 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4424} 4425 4426type LoyaltyPoints struct { 4427 // Name: Name of loyalty points program. It is recommended to limit the 4428 // name to 12 full-width characters or 24 Roman characters. 4429 Name string `json:"name,omitempty"` 4430 4431 // PointsValue: The retailer's loyalty points in absolute value. 4432 PointsValue int64 `json:"pointsValue,omitempty,string"` 4433 4434 // Ratio: The ratio of a point when converted to currency. Google 4435 // assumes currency based on Merchant Center settings. If ratio is left 4436 // out, it defaults to 1.0. 4437 Ratio float64 `json:"ratio,omitempty"` 4438 4439 // ForceSendFields is a list of field names (e.g. "Name") to 4440 // unconditionally include in API requests. By default, fields with 4441 // empty values are omitted from API requests. However, any non-pointer, 4442 // non-interface field appearing in ForceSendFields will be sent to the 4443 // server regardless of whether the field is empty or not. This may be 4444 // used to include empty fields in Patch requests. 4445 ForceSendFields []string `json:"-"` 4446 4447 // NullFields is a list of field names (e.g. "Name") to include in API 4448 // requests with the JSON null value. By default, fields with empty 4449 // values are omitted from API requests. However, any field with an 4450 // empty value appearing in NullFields will be sent to the server as 4451 // null. It is an error if a field in this list has a non-empty value. 4452 // This may be used to include null fields in Patch requests. 4453 NullFields []string `json:"-"` 4454} 4455 4456func (s *LoyaltyPoints) MarshalJSON() ([]byte, error) { 4457 type NoMethod LoyaltyPoints 4458 raw := NoMethod(*s) 4459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4460} 4461 4462func (s *LoyaltyPoints) UnmarshalJSON(data []byte) error { 4463 type NoMethod LoyaltyPoints 4464 var s1 struct { 4465 Ratio gensupport.JSONFloat64 `json:"ratio"` 4466 *NoMethod 4467 } 4468 s1.NoMethod = (*NoMethod)(s) 4469 if err := json.Unmarshal(data, &s1); err != nil { 4470 return err 4471 } 4472 s.Ratio = float64(s1.Ratio) 4473 return nil 4474} 4475 4476// MerchantOrderReturn: Order return. Production access (all methods) 4477// requires the order manager role. Sandbox access does not. 4478type MerchantOrderReturn struct { 4479 // CreationDate: The date of creation of the return, in ISO 8601 format. 4480 CreationDate string `json:"creationDate,omitempty"` 4481 4482 // MerchantOrderId: Merchant defined order ID. 4483 MerchantOrderId string `json:"merchantOrderId,omitempty"` 4484 4485 // OrderId: Google order ID. 4486 OrderId string `json:"orderId,omitempty"` 4487 4488 // OrderReturnId: Order return ID generated by Google. 4489 OrderReturnId string `json:"orderReturnId,omitempty"` 4490 4491 // ReturnItems: Items of the return. 4492 ReturnItems []*MerchantOrderReturnItem `json:"returnItems,omitempty"` 4493 4494 // ReturnShipments: Shipments of the return. 4495 ReturnShipments []*ReturnShipment `json:"returnShipments,omitempty"` 4496 4497 // ServerResponse contains the HTTP response code and headers from the 4498 // server. 4499 googleapi.ServerResponse `json:"-"` 4500 4501 // ForceSendFields is a list of field names (e.g. "CreationDate") to 4502 // unconditionally include in API requests. By default, fields with 4503 // empty values are omitted from API requests. However, any non-pointer, 4504 // non-interface field appearing in ForceSendFields will be sent to the 4505 // server regardless of whether the field is empty or not. This may be 4506 // used to include empty fields in Patch requests. 4507 ForceSendFields []string `json:"-"` 4508 4509 // NullFields is a list of field names (e.g. "CreationDate") to include 4510 // in API requests with the JSON null value. By default, fields with 4511 // empty values are omitted from API requests. However, any field with 4512 // an empty value appearing in NullFields will be sent to the server as 4513 // null. It is an error if a field in this list has a non-empty value. 4514 // This may be used to include null fields in Patch requests. 4515 NullFields []string `json:"-"` 4516} 4517 4518func (s *MerchantOrderReturn) MarshalJSON() ([]byte, error) { 4519 type NoMethod MerchantOrderReturn 4520 raw := NoMethod(*s) 4521 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4522} 4523 4524type MerchantOrderReturnItem struct { 4525 // CustomerReturnReason: The reason that the customer chooses to return 4526 // an item. 4527 CustomerReturnReason *CustomerReturnReason `json:"customerReturnReason,omitempty"` 4528 4529 // ItemId: Product level item ID. If the returned items are of the same 4530 // product, they will have the same ID. 4531 ItemId string `json:"itemId,omitempty"` 4532 4533 // MerchantReturnReason: The reason that merchant chooses to accept a 4534 // return item. 4535 MerchantReturnReason *RefundReason `json:"merchantReturnReason,omitempty"` 4536 4537 // Product: Product data from the time of the order placement. 4538 Product *OrderLineItemProduct `json:"product,omitempty"` 4539 4540 // ReturnShipmentIds: IDs of the return shipments that this return item 4541 // belongs to. 4542 ReturnShipmentIds []string `json:"returnShipmentIds,omitempty"` 4543 4544 // State: State of the item. Acceptable values are: - "canceled" - 4545 // "new" - "received" - "refunded" - "rejected" 4546 State string `json:"state,omitempty"` 4547 4548 // ForceSendFields is a list of field names (e.g. 4549 // "CustomerReturnReason") to unconditionally include in API requests. 4550 // By default, fields with empty values are omitted from API requests. 4551 // However, any non-pointer, non-interface field appearing in 4552 // ForceSendFields will be sent to the server regardless of whether the 4553 // field is empty or not. This may be used to include empty fields in 4554 // Patch requests. 4555 ForceSendFields []string `json:"-"` 4556 4557 // NullFields is a list of field names (e.g. "CustomerReturnReason") to 4558 // include in API requests with the JSON null value. By default, fields 4559 // with empty values are omitted from API requests. However, any field 4560 // with an empty value appearing in NullFields will be sent to the 4561 // server as null. It is an error if a field in this list has a 4562 // non-empty value. This may be used to include null fields in Patch 4563 // requests. 4564 NullFields []string `json:"-"` 4565} 4566 4567func (s *MerchantOrderReturnItem) MarshalJSON() ([]byte, error) { 4568 type NoMethod MerchantOrderReturnItem 4569 raw := NoMethod(*s) 4570 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4571} 4572 4573type MinimumOrderValueTable struct { 4574 StoreCodeSetWithMovs []*MinimumOrderValueTableStoreCodeSetWithMov `json:"storeCodeSetWithMovs,omitempty"` 4575 4576 // ForceSendFields is a list of field names (e.g. 4577 // "StoreCodeSetWithMovs") to unconditionally include in API requests. 4578 // By default, fields with empty values are omitted from API requests. 4579 // However, any non-pointer, non-interface field appearing in 4580 // ForceSendFields will be sent to the server regardless of whether the 4581 // field is empty or not. This may be used to include empty fields in 4582 // Patch requests. 4583 ForceSendFields []string `json:"-"` 4584 4585 // NullFields is a list of field names (e.g. "StoreCodeSetWithMovs") to 4586 // include in API requests with the JSON null value. By default, fields 4587 // with empty values are omitted from API requests. However, any field 4588 // with an empty value appearing in NullFields will be sent to the 4589 // server as null. It is an error if a field in this list has a 4590 // non-empty value. This may be used to include null fields in Patch 4591 // requests. 4592 NullFields []string `json:"-"` 4593} 4594 4595func (s *MinimumOrderValueTable) MarshalJSON() ([]byte, error) { 4596 type NoMethod MinimumOrderValueTable 4597 raw := NoMethod(*s) 4598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4599} 4600 4601// MinimumOrderValueTableStoreCodeSetWithMov: A list of store code sets 4602// sharing the same minimum order value. At least two sets are required 4603// and the last one must be empty, which signifies 'MOV for all other 4604// stores'. Each store code can only appear once across all the sets. 4605// All prices within a service must have the same currency. 4606type MinimumOrderValueTableStoreCodeSetWithMov struct { 4607 // StoreCodes: A list of unique store codes or empty for the catch all. 4608 StoreCodes []string `json:"storeCodes,omitempty"` 4609 4610 // Value: The minimum order value for the given stores. 4611 Value *Price `json:"value,omitempty"` 4612 4613 // ForceSendFields is a list of field names (e.g. "StoreCodes") to 4614 // unconditionally include in API requests. By default, fields with 4615 // empty values are omitted from API requests. However, any non-pointer, 4616 // non-interface field appearing in ForceSendFields will be sent to the 4617 // server regardless of whether the field is empty or not. This may be 4618 // used to include empty fields in Patch requests. 4619 ForceSendFields []string `json:"-"` 4620 4621 // NullFields is a list of field names (e.g. "StoreCodes") to include in 4622 // API requests with the JSON null value. By default, fields with empty 4623 // values are omitted from API requests. However, any field with an 4624 // empty value appearing in NullFields will be sent to the server as 4625 // null. It is an error if a field in this list has a non-empty value. 4626 // This may be used to include null fields in Patch requests. 4627 NullFields []string `json:"-"` 4628} 4629 4630func (s *MinimumOrderValueTableStoreCodeSetWithMov) MarshalJSON() ([]byte, error) { 4631 type NoMethod MinimumOrderValueTableStoreCodeSetWithMov 4632 raw := NoMethod(*s) 4633 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4634} 4635 4636// Order: Order. Production access (all methods) requires the order 4637// manager role. Sandbox access does not. 4638type Order struct { 4639 // Acknowledged: Whether the order was acknowledged. 4640 Acknowledged bool `json:"acknowledged,omitempty"` 4641 4642 // ChannelType: Deprecated. Acceptable values are: - "googleExpress" - 4643 // "purchasesOnGoogle" 4644 ChannelType string `json:"channelType,omitempty"` 4645 4646 // Customer: The details of the customer who placed the order. 4647 Customer *OrderCustomer `json:"customer,omitempty"` 4648 4649 // DeliveryDetails: Delivery details for shipments of type `delivery`. 4650 DeliveryDetails *OrderDeliveryDetails `json:"deliveryDetails,omitempty"` 4651 4652 // Id: The REST ID of the order. Globally unique. 4653 Id string `json:"id,omitempty"` 4654 4655 // Kind: Identifies what kind of resource this is. Value: the fixed 4656 // string "content#order" 4657 Kind string `json:"kind,omitempty"` 4658 4659 // LineItems: Line items that are ordered. 4660 LineItems []*OrderLineItem `json:"lineItems,omitempty"` 4661 4662 MerchantId uint64 `json:"merchantId,omitempty,string"` 4663 4664 // MerchantOrderId: Merchant-provided ID of the order. 4665 MerchantOrderId string `json:"merchantOrderId,omitempty"` 4666 4667 // NetAmount: The net amount for the order. For example, if an order was 4668 // originally for a grand total of $100 and a refund was issued for $20, 4669 // the net amount will be $80. 4670 NetAmount *Price `json:"netAmount,omitempty"` 4671 4672 // PaymentMethod: The details of the payment method. 4673 PaymentMethod *OrderPaymentMethod `json:"paymentMethod,omitempty"` 4674 4675 // PaymentStatus: The status of the payment. Acceptable values are: - 4676 // "paymentCaptured" - "paymentRejected" - "paymentSecured" - 4677 // "pendingAuthorization" 4678 PaymentStatus string `json:"paymentStatus,omitempty"` 4679 4680 // PickupDetails: Pickup details for shipments of type `pickup`. 4681 PickupDetails *OrderPickupDetails `json:"pickupDetails,omitempty"` 4682 4683 // PlacedDate: The date when the order was placed, in ISO 8601 format. 4684 PlacedDate string `json:"placedDate,omitempty"` 4685 4686 // Promotions: The details of the merchant provided promotions applied 4687 // to the order. To determine which promotions apply to which products, 4688 // check the `Promotions[].Benefits[].OfferIds` field against the 4689 // `LineItems[].Product.OfferId` field for each promotion. If a 4690 // promotion is applied to more than 1 `offerId`, divide the discount 4691 // value by the number of affected offers to determine how much discount 4692 // to apply to each `offerId`. Examples: 1. To calculate the line item 4693 // level discount for a single specific item: For each promotion, 4694 // subtract the `Promotions[].Benefits[].Discount.value` amount from the 4695 // `LineItems[].Price.value`. 2. To calculate the line item level 4696 // discount for multiple quantity of a specific item: For each 4697 // promotion, divide the `Promotions[].Benefits[].Discount.value` by the 4698 // quantity of products and substract it from 4699 // `LineItems[].Product.Price.value` for each quantity item. Only 1 4700 // promotion can be applied to an offerId in a given order. To refund an 4701 // item which had a promotion applied to it, make sure to refund the 4702 // amount after first subtracting the promotion discount from the item 4703 // price. More details about the program are here. 4704 Promotions []*OrderLegacyPromotion `json:"promotions,omitempty"` 4705 4706 // Refunds: Refunds for the order. 4707 Refunds []*OrderRefund `json:"refunds,omitempty"` 4708 4709 // Shipments: Shipments of the order. 4710 Shipments []*OrderShipment `json:"shipments,omitempty"` 4711 4712 // ShippingCost: The total cost of shipping for all items. 4713 ShippingCost *Price `json:"shippingCost,omitempty"` 4714 4715 // ShippingCostTax: The tax for the total shipping cost. 4716 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 4717 4718 // ShippingOption: Deprecated. Shipping details are provided with line 4719 // items instead. Acceptable values are: - "economy" - "expedited" - 4720 // "oneDay" - "sameDay" - "standard" - "twoDay" 4721 ShippingOption string `json:"shippingOption,omitempty"` 4722 4723 // Status: The status of the order. Acceptable values are: - 4724 // "canceled" - "delivered" - "inProgress" - 4725 // "partiallyDelivered" - "partiallyReturned" - "partiallyShipped" 4726 // - "pendingShipment" - "returned" - "shipped" 4727 Status string `json:"status,omitempty"` 4728 4729 // TaxCollector: The party responsible for collecting and remitting 4730 // taxes. Acceptable values are: - "marketplaceFacilitator" - 4731 // "merchant" 4732 TaxCollector string `json:"taxCollector,omitempty"` 4733 4734 // ServerResponse contains the HTTP response code and headers from the 4735 // server. 4736 googleapi.ServerResponse `json:"-"` 4737 4738 // ForceSendFields is a list of field names (e.g. "Acknowledged") to 4739 // unconditionally include in API requests. By default, fields with 4740 // empty values are omitted from API requests. However, any non-pointer, 4741 // non-interface field appearing in ForceSendFields will be sent to the 4742 // server regardless of whether the field is empty or not. This may be 4743 // used to include empty fields in Patch requests. 4744 ForceSendFields []string `json:"-"` 4745 4746 // NullFields is a list of field names (e.g. "Acknowledged") to include 4747 // in API requests with the JSON null value. By default, fields with 4748 // empty values are omitted from API requests. However, any field with 4749 // an empty value appearing in NullFields will be sent to the server as 4750 // null. It is an error if a field in this list has a non-empty value. 4751 // This may be used to include null fields in Patch requests. 4752 NullFields []string `json:"-"` 4753} 4754 4755func (s *Order) MarshalJSON() ([]byte, error) { 4756 type NoMethod Order 4757 raw := NoMethod(*s) 4758 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4759} 4760 4761type OrderAddress struct { 4762 // Country: CLDR country code (e.g. "US"). 4763 Country string `json:"country,omitempty"` 4764 4765 // FullAddress: Strings representing the lines of the printed label for 4766 // mailing the order, for example: John Smith 1600 Amphitheatre Parkway 4767 // Mountain View, CA, 94043 United States 4768 FullAddress []string `json:"fullAddress,omitempty"` 4769 4770 // IsPostOfficeBox: Whether the address is a post office box. 4771 IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"` 4772 4773 // Locality: City, town or commune. May also include dependent 4774 // localities or sublocalities (e.g. neighborhoods or suburbs). 4775 Locality string `json:"locality,omitempty"` 4776 4777 // PostalCode: Postal Code or ZIP (e.g. "94043"). 4778 PostalCode string `json:"postalCode,omitempty"` 4779 4780 // RecipientName: Name of the recipient. 4781 RecipientName string `json:"recipientName,omitempty"` 4782 4783 // Region: Top-level administrative subdivision of the country. For 4784 // example, a state like California ("CA") or a province like Quebec 4785 // ("QC"). 4786 Region string `json:"region,omitempty"` 4787 4788 // StreetAddress: Street-level part of the address. 4789 StreetAddress []string `json:"streetAddress,omitempty"` 4790 4791 // ForceSendFields is a list of field names (e.g. "Country") to 4792 // unconditionally include in API requests. By default, fields with 4793 // empty values are omitted from API requests. However, any non-pointer, 4794 // non-interface field appearing in ForceSendFields will be sent to the 4795 // server regardless of whether the field is empty or not. This may be 4796 // used to include empty fields in Patch requests. 4797 ForceSendFields []string `json:"-"` 4798 4799 // NullFields is a list of field names (e.g. "Country") to include in 4800 // API requests with the JSON null value. By default, fields with empty 4801 // values are omitted from API requests. However, any field with an 4802 // empty value appearing in NullFields will be sent to the server as 4803 // null. It is an error if a field in this list has a non-empty value. 4804 // This may be used to include null fields in Patch requests. 4805 NullFields []string `json:"-"` 4806} 4807 4808func (s *OrderAddress) MarshalJSON() ([]byte, error) { 4809 type NoMethod OrderAddress 4810 raw := NoMethod(*s) 4811 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4812} 4813 4814type OrderCancellation struct { 4815 // Actor: The actor that created the cancellation. Acceptable values 4816 // are: - "customer" - "googleBot" - "googleCustomerService" - 4817 // "googlePayments" - "googleSabre" - "merchant" 4818 Actor string `json:"actor,omitempty"` 4819 4820 // CreationDate: Date on which the cancellation has been created, in ISO 4821 // 8601 format. 4822 CreationDate string `json:"creationDate,omitempty"` 4823 4824 // Quantity: The quantity that was canceled. 4825 Quantity int64 `json:"quantity,omitempty"` 4826 4827 // Reason: The reason for the cancellation. Orders that are canceled 4828 // with a noInventory reason will lead to the removal of the product 4829 // from Buy on Google until you make an update to that product. This 4830 // will not affect your Shopping ads. Acceptable values are: - 4831 // "autoPostInternal" - "autoPostInvalidBillingAddress" - 4832 // "autoPostNoInventory" - "autoPostPriceError" - 4833 // "autoPostUndeliverableShippingAddress" - "couponAbuse" - 4834 // "customerCanceled" - "customerInitiatedCancel" - 4835 // "customerSupportRequested" - "failToPushOrderGoogleError" - 4836 // "failToPushOrderMerchantError" - 4837 // "failToPushOrderMerchantFulfillmentError" - 4838 // "failToPushOrderToMerchant" - 4839 // "failToPushOrderToMerchantOutOfStock" - "invalidCoupon" - 4840 // "malformedShippingAddress" - "merchantDidNotShipOnTime" - 4841 // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - 4842 // "paymentDeclined" - "priceError" - "returnRefundAbuse" - 4843 // "shippingPriceError" - "taxError" - 4844 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 4845 Reason string `json:"reason,omitempty"` 4846 4847 // ReasonText: The explanation of the reason. 4848 ReasonText string `json:"reasonText,omitempty"` 4849 4850 // ForceSendFields is a list of field names (e.g. "Actor") to 4851 // unconditionally include in API requests. By default, fields with 4852 // empty values are omitted from API requests. However, any non-pointer, 4853 // non-interface field appearing in ForceSendFields will be sent to the 4854 // server regardless of whether the field is empty or not. This may be 4855 // used to include empty fields in Patch requests. 4856 ForceSendFields []string `json:"-"` 4857 4858 // NullFields is a list of field names (e.g. "Actor") to include in API 4859 // requests with the JSON null value. By default, fields with empty 4860 // values are omitted from API requests. However, any field with an 4861 // empty value appearing in NullFields will be sent to the server as 4862 // null. It is an error if a field in this list has a non-empty value. 4863 // This may be used to include null fields in Patch requests. 4864 NullFields []string `json:"-"` 4865} 4866 4867func (s *OrderCancellation) MarshalJSON() ([]byte, error) { 4868 type NoMethod OrderCancellation 4869 raw := NoMethod(*s) 4870 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4871} 4872 4873type OrderCustomer struct { 4874 // Email: Deprecated. 4875 Email string `json:"email,omitempty"` 4876 4877 // ExplicitMarketingPreference: Deprecated. Please use 4878 // marketingRightsInfo instead. 4879 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 4880 4881 // FullName: Full name of the customer. 4882 FullName string `json:"fullName,omitempty"` 4883 4884 // InvoiceReceivingEmail: Email address for the merchant to send 4885 // value-added tax or invoice documentation of the order. Only the last 4886 // document sent is made available to the customer. For more 4887 // information, see About automated VAT invoicing for Buy on Google. 4888 InvoiceReceivingEmail string `json:"invoiceReceivingEmail,omitempty"` 4889 4890 // MarketingRightsInfo: Customer's marketing preferences. Contains the 4891 // marketing opt-in information that is current at the time that the 4892 // merchant call. User preference selections can change from one order 4893 // to the next so preferences must be checked with every order. 4894 MarketingRightsInfo *OrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 4895 4896 // ForceSendFields is a list of field names (e.g. "Email") to 4897 // unconditionally include in API requests. By default, fields with 4898 // empty values are omitted from API requests. However, any non-pointer, 4899 // non-interface field appearing in ForceSendFields will be sent to the 4900 // server regardless of whether the field is empty or not. This may be 4901 // used to include empty fields in Patch requests. 4902 ForceSendFields []string `json:"-"` 4903 4904 // NullFields is a list of field names (e.g. "Email") to include in API 4905 // requests with the JSON null value. By default, fields with empty 4906 // values are omitted from API requests. However, any field with an 4907 // empty value appearing in NullFields will be sent to the server as 4908 // null. It is an error if a field in this list has a non-empty value. 4909 // This may be used to include null fields in Patch requests. 4910 NullFields []string `json:"-"` 4911} 4912 4913func (s *OrderCustomer) MarshalJSON() ([]byte, error) { 4914 type NoMethod OrderCustomer 4915 raw := NoMethod(*s) 4916 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4917} 4918 4919type OrderCustomerMarketingRightsInfo struct { 4920 // ExplicitMarketingPreference: Last known customer selection regarding 4921 // marketing preferences. In certain cases this selection might not be 4922 // known, so this field would be empty. If a customer selected `granted` 4923 // in their most recent order, they can be subscribed to marketing 4924 // emails. Customers who have chosen `denied` must not be subscribed, or 4925 // must be unsubscribed if already opted-in. Acceptable values are: - 4926 // "denied" - "granted" 4927 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 4928 4929 // LastUpdatedTimestamp: Timestamp when last time marketing preference 4930 // was updated. Could be empty, if user wasn't offered a selection yet. 4931 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 4932 4933 // MarketingEmailAddress: Email address that can be used for marketing 4934 // purposes. The field may be empty even if 4935 // `explicitMarketingPreference` is 'granted'. This happens when 4936 // retrieving an old order from the customer who deleted their account. 4937 MarketingEmailAddress string `json:"marketingEmailAddress,omitempty"` 4938 4939 // ForceSendFields is a list of field names (e.g. 4940 // "ExplicitMarketingPreference") to unconditionally include in API 4941 // requests. By default, fields with empty values are omitted from API 4942 // requests. However, any non-pointer, non-interface field appearing in 4943 // ForceSendFields will be sent to the server regardless of whether the 4944 // field is empty or not. This may be used to include empty fields in 4945 // Patch requests. 4946 ForceSendFields []string `json:"-"` 4947 4948 // NullFields is a list of field names (e.g. 4949 // "ExplicitMarketingPreference") to include in API requests with the 4950 // JSON null value. By default, fields with empty values are omitted 4951 // from API requests. However, any field with an empty value appearing 4952 // in NullFields will be sent to the server as null. It is an error if a 4953 // field in this list has a non-empty value. This may be used to include 4954 // null fields in Patch requests. 4955 NullFields []string `json:"-"` 4956} 4957 4958func (s *OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 4959 type NoMethod OrderCustomerMarketingRightsInfo 4960 raw := NoMethod(*s) 4961 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4962} 4963 4964type OrderDeliveryDetails struct { 4965 // Address: The delivery address 4966 Address *OrderAddress `json:"address,omitempty"` 4967 4968 // PhoneNumber: The phone number of the person receiving the delivery. 4969 PhoneNumber string `json:"phoneNumber,omitempty"` 4970 4971 // ForceSendFields is a list of field names (e.g. "Address") to 4972 // unconditionally include in API requests. By default, fields with 4973 // empty values are omitted from API requests. However, any non-pointer, 4974 // non-interface field appearing in ForceSendFields will be sent to the 4975 // server regardless of whether the field is empty or not. This may be 4976 // used to include empty fields in Patch requests. 4977 ForceSendFields []string `json:"-"` 4978 4979 // NullFields is a list of field names (e.g. "Address") to include in 4980 // API requests with the JSON null value. By default, fields with empty 4981 // values are omitted from API requests. However, any field with an 4982 // empty value appearing in NullFields will be sent to the server as 4983 // null. It is an error if a field in this list has a non-empty value. 4984 // This may be used to include null fields in Patch requests. 4985 NullFields []string `json:"-"` 4986} 4987 4988func (s *OrderDeliveryDetails) MarshalJSON() ([]byte, error) { 4989 type NoMethod OrderDeliveryDetails 4990 raw := NoMethod(*s) 4991 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4992} 4993 4994type OrderLegacyPromotion struct { 4995 Benefits []*OrderLegacyPromotionBenefit `json:"benefits,omitempty"` 4996 4997 // EffectiveDates: The date and time frame when the promotion is active 4998 // and ready for validation review. Note that the promotion live time 4999 // may be delayed for a few hours due to the validation review. Start 5000 // date and end date are separated by a forward slash (/). The start 5001 // date is specified by the format (YYYY-MM-DD), followed by the letter 5002 // ?T?, the time of the day when the sale starts (in Greenwich Mean 5003 // Time, GMT), followed by an expression of the time zone for the sale. 5004 // The end date is in the same format. 5005 EffectiveDates string `json:"effectiveDates,omitempty"` 5006 5007 // GenericRedemptionCode: Optional. The text code that corresponds to 5008 // the promotion when applied on the retailer?s website. 5009 GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"` 5010 5011 // Id: The unique ID of the promotion. 5012 Id string `json:"id,omitempty"` 5013 5014 // LongTitle: The full title of the promotion. 5015 LongTitle string `json:"longTitle,omitempty"` 5016 5017 // ProductApplicability: Whether the promotion is applicable to all 5018 // products or only specific products. Acceptable values are: - 5019 // "allProducts" - "specificProducts" 5020 ProductApplicability string `json:"productApplicability,omitempty"` 5021 5022 // RedemptionChannel: Indicates that the promotion is valid online. 5023 // Acceptable values are: - "online" 5024 RedemptionChannel string `json:"redemptionChannel,omitempty"` 5025 5026 // ForceSendFields is a list of field names (e.g. "Benefits") to 5027 // unconditionally include in API requests. By default, fields with 5028 // empty values are omitted from API requests. However, any non-pointer, 5029 // non-interface field appearing in ForceSendFields will be sent to the 5030 // server regardless of whether the field is empty or not. This may be 5031 // used to include empty fields in Patch requests. 5032 ForceSendFields []string `json:"-"` 5033 5034 // NullFields is a list of field names (e.g. "Benefits") to include in 5035 // API requests with the JSON null value. By default, fields with empty 5036 // values are omitted from API requests. However, any field with an 5037 // empty value appearing in NullFields will be sent to the server as 5038 // null. It is an error if a field in this list has a non-empty value. 5039 // This may be used to include null fields in Patch requests. 5040 NullFields []string `json:"-"` 5041} 5042 5043func (s *OrderLegacyPromotion) MarshalJSON() ([]byte, error) { 5044 type NoMethod OrderLegacyPromotion 5045 raw := NoMethod(*s) 5046 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5047} 5048 5049type OrderLegacyPromotionBenefit struct { 5050 // Discount: The discount in the order price when the promotion is 5051 // applied. 5052 Discount *Price `json:"discount,omitempty"` 5053 5054 // OfferIds: The OfferId(s) that were purchased in this order and map to 5055 // this specific benefit of the promotion. 5056 OfferIds []string `json:"offerIds,omitempty"` 5057 5058 // SubType: Further describes the benefit of the promotion. Note that we 5059 // will expand on this enumeration as we support new promotion 5060 // sub-types. Acceptable values are: - "buyMGetMoneyOff" - 5061 // "buyMGetNMoneyOff" - "buyMGetNPercentOff" - "buyMGetPercentOff" 5062 // - "freeGift" - "freeGiftWithItemId" - "freeGiftWithValue" - 5063 // "freeOvernightShipping" - "freeShipping" - "freeTwoDayShipping" 5064 // - "moneyOff" - "percentageOff" - "rewardPoints" - "salePrice" 5065 SubType string `json:"subType,omitempty"` 5066 5067 // TaxImpact: The impact on tax when the promotion is applied. 5068 TaxImpact *Price `json:"taxImpact,omitempty"` 5069 5070 // Type: Describes whether the promotion applies to products (e.g. 20% 5071 // off) or to shipping (e.g. Free Shipping). Acceptable values are: - 5072 // "product" - "shipping" 5073 Type string `json:"type,omitempty"` 5074 5075 // ForceSendFields is a list of field names (e.g. "Discount") to 5076 // unconditionally include in API requests. By default, fields with 5077 // empty values are omitted from API requests. However, any non-pointer, 5078 // non-interface field appearing in ForceSendFields will be sent to the 5079 // server regardless of whether the field is empty or not. This may be 5080 // used to include empty fields in Patch requests. 5081 ForceSendFields []string `json:"-"` 5082 5083 // NullFields is a list of field names (e.g. "Discount") to include in 5084 // API requests with the JSON null value. By default, fields with empty 5085 // values are omitted from API requests. However, any field with an 5086 // empty value appearing in NullFields will be sent to the server as 5087 // null. It is an error if a field in this list has a non-empty value. 5088 // This may be used to include null fields in Patch requests. 5089 NullFields []string `json:"-"` 5090} 5091 5092func (s *OrderLegacyPromotionBenefit) MarshalJSON() ([]byte, error) { 5093 type NoMethod OrderLegacyPromotionBenefit 5094 raw := NoMethod(*s) 5095 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5096} 5097 5098type OrderLineItem struct { 5099 // Annotations: Annotations that are attached to the line item. 5100 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 5101 5102 // Cancellations: Cancellations of the line item. 5103 Cancellations []*OrderCancellation `json:"cancellations,omitempty"` 5104 5105 // Id: The ID of the line item. 5106 Id string `json:"id,omitempty"` 5107 5108 // Price: Total price for the line item. For example, if two items for 5109 // $10 are purchased, the total price will be $20. 5110 Price *Price `json:"price,omitempty"` 5111 5112 // Product: Product data as seen by customer from the time of the order 5113 // placement. Note that certain attributes values (e.g. title or gtin) 5114 // might be reformatted and no longer match values submitted via product 5115 // feed. 5116 Product *OrderLineItemProduct `json:"product,omitempty"` 5117 5118 // QuantityCanceled: Number of items canceled. 5119 QuantityCanceled int64 `json:"quantityCanceled,omitempty"` 5120 5121 // QuantityDelivered: Number of items delivered. 5122 QuantityDelivered int64 `json:"quantityDelivered,omitempty"` 5123 5124 // QuantityOrdered: Number of items ordered. 5125 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 5126 5127 // QuantityPending: Number of items pending. 5128 QuantityPending int64 `json:"quantityPending,omitempty"` 5129 5130 // QuantityReadyForPickup: Number of items ready for pickup. 5131 QuantityReadyForPickup int64 `json:"quantityReadyForPickup,omitempty"` 5132 5133 // QuantityReturned: Number of items returned. 5134 QuantityReturned int64 `json:"quantityReturned,omitempty"` 5135 5136 // QuantityShipped: Number of items shipped. 5137 QuantityShipped int64 `json:"quantityShipped,omitempty"` 5138 5139 // ReturnInfo: Details of the return policy for the line item. 5140 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 5141 5142 // Returns: Returns of the line item. 5143 Returns []*OrderReturn `json:"returns,omitempty"` 5144 5145 // ShippingDetails: Details of the requested shipping for the line item. 5146 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 5147 5148 // Tax: Total tax amount for the line item. For example, if two items 5149 // are purchased, and each have a cost tax of $2, the total tax amount 5150 // will be $4. 5151 Tax *Price `json:"tax,omitempty"` 5152 5153 // ForceSendFields is a list of field names (e.g. "Annotations") to 5154 // unconditionally include in API requests. By default, fields with 5155 // empty values are omitted from API requests. However, any non-pointer, 5156 // non-interface field appearing in ForceSendFields will be sent to the 5157 // server regardless of whether the field is empty or not. This may be 5158 // used to include empty fields in Patch requests. 5159 ForceSendFields []string `json:"-"` 5160 5161 // NullFields is a list of field names (e.g. "Annotations") to include 5162 // in API requests with the JSON null value. By default, fields with 5163 // empty values are omitted from API requests. However, any field with 5164 // an empty value appearing in NullFields will be sent to the server as 5165 // null. It is an error if a field in this list has a non-empty value. 5166 // This may be used to include null fields in Patch requests. 5167 NullFields []string `json:"-"` 5168} 5169 5170func (s *OrderLineItem) MarshalJSON() ([]byte, error) { 5171 type NoMethod OrderLineItem 5172 raw := NoMethod(*s) 5173 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5174} 5175 5176type OrderLineItemProduct struct { 5177 // Brand: Brand of the item. 5178 Brand string `json:"brand,omitempty"` 5179 5180 // Channel: The item's channel (online or local). Acceptable values are: 5181 // - "local" - "online" 5182 Channel string `json:"channel,omitempty"` 5183 5184 // Condition: Condition or state of the item. Acceptable values are: - 5185 // "new" - "refurbished" - "used" 5186 Condition string `json:"condition,omitempty"` 5187 5188 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 5189 ContentLanguage string `json:"contentLanguage,omitempty"` 5190 5191 // Fees: Associated fees at order creation time. 5192 Fees []*OrderLineItemProductFee `json:"fees,omitempty"` 5193 5194 // Gtin: Global Trade Item Number (GTIN) of the item. 5195 Gtin string `json:"gtin,omitempty"` 5196 5197 // Id: The REST ID of the product. 5198 Id string `json:"id,omitempty"` 5199 5200 // ImageLink: URL of an image of the item. 5201 ImageLink string `json:"imageLink,omitempty"` 5202 5203 // ItemGroupId: Shared identifier for all variants of the same product. 5204 ItemGroupId string `json:"itemGroupId,omitempty"` 5205 5206 // Mpn: Manufacturer Part Number (MPN) of the item. 5207 Mpn string `json:"mpn,omitempty"` 5208 5209 // OfferId: An identifier of the item. 5210 OfferId string `json:"offerId,omitempty"` 5211 5212 // Price: Price of the item. 5213 Price *Price `json:"price,omitempty"` 5214 5215 // ShownImage: URL to the cached image shown to the user when order was 5216 // placed. 5217 ShownImage string `json:"shownImage,omitempty"` 5218 5219 // TargetCountry: The CLDR territory // code of the target country of 5220 // the product. 5221 TargetCountry string `json:"targetCountry,omitempty"` 5222 5223 // Title: The title of the product. 5224 Title string `json:"title,omitempty"` 5225 5226 // VariantAttributes: Variant attributes for the item. These are 5227 // dimensions of the product, such as color, gender, material, pattern, 5228 // and size. You can find a comprehensive list of variant attributes 5229 // here. 5230 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 5231 5232 // ForceSendFields is a list of field names (e.g. "Brand") to 5233 // unconditionally include in API requests. By default, fields with 5234 // empty values are omitted from API requests. However, any non-pointer, 5235 // non-interface field appearing in ForceSendFields will be sent to the 5236 // server regardless of whether the field is empty or not. This may be 5237 // used to include empty fields in Patch requests. 5238 ForceSendFields []string `json:"-"` 5239 5240 // NullFields is a list of field names (e.g. "Brand") to include in API 5241 // requests with the JSON null value. By default, fields with empty 5242 // values are omitted from API requests. However, any field with an 5243 // empty value appearing in NullFields will be sent to the server as 5244 // null. It is an error if a field in this list has a non-empty value. 5245 // This may be used to include null fields in Patch requests. 5246 NullFields []string `json:"-"` 5247} 5248 5249func (s *OrderLineItemProduct) MarshalJSON() ([]byte, error) { 5250 type NoMethod OrderLineItemProduct 5251 raw := NoMethod(*s) 5252 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5253} 5254 5255type OrderLineItemProductFee struct { 5256 // Amount: Amount of the fee. 5257 Amount *Price `json:"amount,omitempty"` 5258 5259 // Name: Name of the fee. 5260 Name string `json:"name,omitempty"` 5261 5262 // ForceSendFields is a list of field names (e.g. "Amount") to 5263 // unconditionally include in API requests. By default, fields with 5264 // empty values are omitted from API requests. However, any non-pointer, 5265 // non-interface field appearing in ForceSendFields will be sent to the 5266 // server regardless of whether the field is empty or not. This may be 5267 // used to include empty fields in Patch requests. 5268 ForceSendFields []string `json:"-"` 5269 5270 // NullFields is a list of field names (e.g. "Amount") to include in API 5271 // requests with the JSON null value. By default, fields with empty 5272 // values are omitted from API requests. However, any field with an 5273 // empty value appearing in NullFields will be sent to the server as 5274 // null. It is an error if a field in this list has a non-empty value. 5275 // This may be used to include null fields in Patch requests. 5276 NullFields []string `json:"-"` 5277} 5278 5279func (s *OrderLineItemProductFee) MarshalJSON() ([]byte, error) { 5280 type NoMethod OrderLineItemProductFee 5281 raw := NoMethod(*s) 5282 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5283} 5284 5285type OrderLineItemProductVariantAttribute struct { 5286 // Dimension: The dimension of the variant. 5287 Dimension string `json:"dimension,omitempty"` 5288 5289 // Value: The value for the dimension. 5290 Value string `json:"value,omitempty"` 5291 5292 // ForceSendFields is a list of field names (e.g. "Dimension") to 5293 // unconditionally include in API requests. By default, fields with 5294 // empty values are omitted from API requests. However, any non-pointer, 5295 // non-interface field appearing in ForceSendFields will be sent to the 5296 // server regardless of whether the field is empty or not. This may be 5297 // used to include empty fields in Patch requests. 5298 ForceSendFields []string `json:"-"` 5299 5300 // NullFields is a list of field names (e.g. "Dimension") to include in 5301 // API requests with the JSON null value. By default, fields with empty 5302 // values are omitted from API requests. However, any field with an 5303 // empty value appearing in NullFields will be sent to the server as 5304 // null. It is an error if a field in this list has a non-empty value. 5305 // This may be used to include null fields in Patch requests. 5306 NullFields []string `json:"-"` 5307} 5308 5309func (s *OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) { 5310 type NoMethod OrderLineItemProductVariantAttribute 5311 raw := NoMethod(*s) 5312 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5313} 5314 5315type OrderLineItemReturnInfo struct { 5316 // DaysToReturn: Required. How many days later the item can be returned. 5317 DaysToReturn int64 `json:"daysToReturn,omitempty"` 5318 5319 // IsReturnable: Required. Whether the item is returnable. 5320 IsReturnable bool `json:"isReturnable,omitempty"` 5321 5322 // PolicyUrl: Required. URL of the item return policy. 5323 PolicyUrl string `json:"policyUrl,omitempty"` 5324 5325 // ForceSendFields is a list of field names (e.g. "DaysToReturn") to 5326 // unconditionally include in API requests. By default, fields with 5327 // empty values are omitted from API requests. However, any non-pointer, 5328 // non-interface field appearing in ForceSendFields will be sent to the 5329 // server regardless of whether the field is empty or not. This may be 5330 // used to include empty fields in Patch requests. 5331 ForceSendFields []string `json:"-"` 5332 5333 // NullFields is a list of field names (e.g. "DaysToReturn") to include 5334 // in API requests with the JSON null value. By default, fields with 5335 // empty values are omitted from API requests. However, any field with 5336 // an empty value appearing in NullFields will be sent to the server as 5337 // null. It is an error if a field in this list has a non-empty value. 5338 // This may be used to include null fields in Patch requests. 5339 NullFields []string `json:"-"` 5340} 5341 5342func (s *OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) { 5343 type NoMethod OrderLineItemReturnInfo 5344 raw := NoMethod(*s) 5345 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5346} 5347 5348type OrderLineItemShippingDetails struct { 5349 // DeliverByDate: Required. The delivery by date, in ISO 8601 format. 5350 DeliverByDate string `json:"deliverByDate,omitempty"` 5351 5352 // Method: Required. Details of the shipping method. 5353 Method *OrderLineItemShippingDetailsMethod `json:"method,omitempty"` 5354 5355 // ShipByDate: Required. The ship by date, in ISO 8601 format. 5356 ShipByDate string `json:"shipByDate,omitempty"` 5357 5358 // Type: Type of shipment. Indicates whether `deliveryDetails` or 5359 // `pickupDetails` is applicable for this shipment. Acceptable values 5360 // are: - "delivery" - "pickup" 5361 Type string `json:"type,omitempty"` 5362 5363 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 5364 // unconditionally include in API requests. By default, fields with 5365 // empty values are omitted from API requests. However, any non-pointer, 5366 // non-interface field appearing in ForceSendFields will be sent to the 5367 // server regardless of whether the field is empty or not. This may be 5368 // used to include empty fields in Patch requests. 5369 ForceSendFields []string `json:"-"` 5370 5371 // NullFields is a list of field names (e.g. "DeliverByDate") to include 5372 // in API requests with the JSON null value. By default, fields with 5373 // empty values are omitted from API requests. However, any field with 5374 // an empty value appearing in NullFields will be sent to the server as 5375 // null. It is an error if a field in this list has a non-empty value. 5376 // This may be used to include null fields in Patch requests. 5377 NullFields []string `json:"-"` 5378} 5379 5380func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) { 5381 type NoMethod OrderLineItemShippingDetails 5382 raw := NoMethod(*s) 5383 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5384} 5385 5386type OrderLineItemShippingDetailsMethod struct { 5387 // Carrier: The carrier for the shipping. Optional. See 5388 // `shipments[].carrier` for a list of acceptable values. 5389 Carrier string `json:"carrier,omitempty"` 5390 5391 // MaxDaysInTransit: Required. Maximum transit time. 5392 MaxDaysInTransit int64 `json:"maxDaysInTransit,omitempty"` 5393 5394 // MethodName: Required. The name of the shipping method. 5395 MethodName string `json:"methodName,omitempty"` 5396 5397 // MinDaysInTransit: Required. Minimum transit time. 5398 MinDaysInTransit int64 `json:"minDaysInTransit,omitempty"` 5399 5400 // ForceSendFields is a list of field names (e.g. "Carrier") to 5401 // unconditionally include in API requests. By default, fields with 5402 // empty values are omitted from API requests. However, any non-pointer, 5403 // non-interface field appearing in ForceSendFields will be sent to the 5404 // server regardless of whether the field is empty or not. This may be 5405 // used to include empty fields in Patch requests. 5406 ForceSendFields []string `json:"-"` 5407 5408 // NullFields is a list of field names (e.g. "Carrier") to include in 5409 // API requests with the JSON null value. By default, fields with empty 5410 // values are omitted from API requests. However, any field with an 5411 // empty value appearing in NullFields will be sent to the server as 5412 // null. It is an error if a field in this list has a non-empty value. 5413 // This may be used to include null fields in Patch requests. 5414 NullFields []string `json:"-"` 5415} 5416 5417func (s *OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) { 5418 type NoMethod OrderLineItemShippingDetailsMethod 5419 raw := NoMethod(*s) 5420 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5421} 5422 5423type OrderMerchantProvidedAnnotation struct { 5424 // Key: Key for additional merchant provided (as key-value pairs) 5425 // annotation about the line item. 5426 Key string `json:"key,omitempty"` 5427 5428 // Value: Value for additional merchant provided (as key-value pairs) 5429 // annotation about the line item. 5430 Value string `json:"value,omitempty"` 5431 5432 // ForceSendFields is a list of field names (e.g. "Key") to 5433 // unconditionally include in API requests. By default, fields with 5434 // empty values are omitted from API requests. However, any non-pointer, 5435 // non-interface field appearing in ForceSendFields will be sent to the 5436 // server regardless of whether the field is empty or not. This may be 5437 // used to include empty fields in Patch requests. 5438 ForceSendFields []string `json:"-"` 5439 5440 // NullFields is a list of field names (e.g. "Key") to include in API 5441 // requests with the JSON null value. By default, fields with empty 5442 // values are omitted from API requests. However, any field with an 5443 // empty value appearing in NullFields will be sent to the server as 5444 // null. It is an error if a field in this list has a non-empty value. 5445 // This may be used to include null fields in Patch requests. 5446 NullFields []string `json:"-"` 5447} 5448 5449func (s *OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) { 5450 type NoMethod OrderMerchantProvidedAnnotation 5451 raw := NoMethod(*s) 5452 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5453} 5454 5455type OrderPaymentMethod struct { 5456 // BillingAddress: The billing address. 5457 BillingAddress *OrderAddress `json:"billingAddress,omitempty"` 5458 5459 // ExpirationMonth: The card expiration month (January = 1, February = 2 5460 // etc.). 5461 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 5462 5463 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 5464 ExpirationYear int64 `json:"expirationYear,omitempty"` 5465 5466 // LastFourDigits: The last four digits of the card number. 5467 LastFourDigits string `json:"lastFourDigits,omitempty"` 5468 5469 // PhoneNumber: The billing phone number. 5470 PhoneNumber string `json:"phoneNumber,omitempty"` 5471 5472 // Type: The type of instrument. Acceptable values are: - "AMEX" - 5473 // "DISCOVER" - "JCB" - "MASTERCARD" - "UNIONPAY" - "VISA" - 5474 // "" 5475 Type string `json:"type,omitempty"` 5476 5477 // ForceSendFields is a list of field names (e.g. "BillingAddress") to 5478 // unconditionally include in API requests. By default, fields with 5479 // empty values are omitted from API requests. However, any non-pointer, 5480 // non-interface field appearing in ForceSendFields will be sent to the 5481 // server regardless of whether the field is empty or not. This may be 5482 // used to include empty fields in Patch requests. 5483 ForceSendFields []string `json:"-"` 5484 5485 // NullFields is a list of field names (e.g. "BillingAddress") to 5486 // include in API requests with the JSON null value. By default, fields 5487 // with empty values are omitted from API requests. However, any field 5488 // with an empty value appearing in NullFields will be sent to the 5489 // server as null. It is an error if a field in this list has a 5490 // non-empty value. This may be used to include null fields in Patch 5491 // requests. 5492 NullFields []string `json:"-"` 5493} 5494 5495func (s *OrderPaymentMethod) MarshalJSON() ([]byte, error) { 5496 type NoMethod OrderPaymentMethod 5497 raw := NoMethod(*s) 5498 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5499} 5500 5501type OrderPickupDetails struct { 5502 // Address: Address of the pickup location where the shipment should be 5503 // sent. Note that `recipientName` in the address is the name of the 5504 // business at the pickup location. 5505 Address *OrderAddress `json:"address,omitempty"` 5506 5507 // Collectors: Collectors authorized to pick up shipment from the pickup 5508 // location. 5509 Collectors []*OrderPickupDetailsCollector `json:"collectors,omitempty"` 5510 5511 // LocationId: ID of the pickup location. 5512 LocationId string `json:"locationId,omitempty"` 5513 5514 // ForceSendFields is a list of field names (e.g. "Address") to 5515 // unconditionally include in API requests. By default, fields with 5516 // empty values are omitted from API requests. However, any non-pointer, 5517 // non-interface field appearing in ForceSendFields will be sent to the 5518 // server regardless of whether the field is empty or not. This may be 5519 // used to include empty fields in Patch requests. 5520 ForceSendFields []string `json:"-"` 5521 5522 // NullFields is a list of field names (e.g. "Address") to include in 5523 // API requests with the JSON null value. By default, fields with empty 5524 // values are omitted from API requests. However, any field with an 5525 // empty value appearing in NullFields will be sent to the server as 5526 // null. It is an error if a field in this list has a non-empty value. 5527 // This may be used to include null fields in Patch requests. 5528 NullFields []string `json:"-"` 5529} 5530 5531func (s *OrderPickupDetails) MarshalJSON() ([]byte, error) { 5532 type NoMethod OrderPickupDetails 5533 raw := NoMethod(*s) 5534 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5535} 5536 5537type OrderPickupDetailsCollector struct { 5538 // Name: Name of the person picking up the shipment. 5539 Name string `json:"name,omitempty"` 5540 5541 // PhoneNumber: Phone number of the person picking up the shipment. 5542 PhoneNumber string `json:"phoneNumber,omitempty"` 5543 5544 // ForceSendFields is a list of field names (e.g. "Name") to 5545 // unconditionally include in API requests. By default, fields with 5546 // empty values are omitted from API requests. However, any non-pointer, 5547 // non-interface field appearing in ForceSendFields will be sent to the 5548 // server regardless of whether the field is empty or not. This may be 5549 // used to include empty fields in Patch requests. 5550 ForceSendFields []string `json:"-"` 5551 5552 // NullFields is a list of field names (e.g. "Name") to include in API 5553 // requests with the JSON null value. By default, fields with empty 5554 // values are omitted from API requests. However, any field with an 5555 // empty value appearing in NullFields will be sent to the server as 5556 // null. It is an error if a field in this list has a non-empty value. 5557 // This may be used to include null fields in Patch requests. 5558 NullFields []string `json:"-"` 5559} 5560 5561func (s *OrderPickupDetailsCollector) MarshalJSON() ([]byte, error) { 5562 type NoMethod OrderPickupDetailsCollector 5563 raw := NoMethod(*s) 5564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5565} 5566 5567type OrderRefund struct { 5568 // Actor: The actor that created the refund. Acceptable values are: - 5569 // "customer" - "googleBot" - "googleCustomerService" - 5570 // "googlePayments" - "googleSabre" - "merchant" 5571 Actor string `json:"actor,omitempty"` 5572 5573 // Amount: The amount that is refunded. 5574 Amount *Price `json:"amount,omitempty"` 5575 5576 // CreationDate: Date on which the item has been created, in ISO 8601 5577 // format. 5578 CreationDate string `json:"creationDate,omitempty"` 5579 5580 // Reason: The reason for the refund. Acceptable values are: - 5581 // "adjustment" - "autoPostInternal" - 5582 // "autoPostInvalidBillingAddress" - "autoPostNoInventory" - 5583 // "autoPostPriceError" - "autoPostUndeliverableShippingAddress" - 5584 // "couponAbuse" - "courtesyAdjustment" - "customerCanceled" - 5585 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 5586 // - "customerSupportRequested" - "deliveredLateByCarrier" - 5587 // "deliveredTooLate" - "expiredItem" - 5588 // "failToPushOrderGoogleError" - "failToPushOrderMerchantError" - 5589 // "failToPushOrderMerchantFulfillmentError" - 5590 // "failToPushOrderToMerchant" - 5591 // "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - 5592 // "invalidCoupon" - "lateShipmentCredit" - 5593 // "malformedShippingAddress" - "merchantDidNotShipOnTime" - 5594 // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - 5595 // "paymentDeclined" - "priceAdjustment" - "priceError" - 5596 // "productArrivedDamaged" - "productNotAsDescribed" - 5597 // "promoReallocation" - "qualityNotAsExpected" - 5598 // "returnRefundAbuse" - "shippingCostAdjustment" - 5599 // "shippingPriceError" - "taxAdjustment" - "taxError" - 5600 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 5601 // "wrongProductShipped" 5602 Reason string `json:"reason,omitempty"` 5603 5604 // ReasonText: The explanation of the reason. 5605 ReasonText string `json:"reasonText,omitempty"` 5606 5607 // ForceSendFields is a list of field names (e.g. "Actor") to 5608 // unconditionally include in API requests. By default, fields with 5609 // empty values are omitted from API requests. However, any non-pointer, 5610 // non-interface field appearing in ForceSendFields will be sent to the 5611 // server regardless of whether the field is empty or not. This may be 5612 // used to include empty fields in Patch requests. 5613 ForceSendFields []string `json:"-"` 5614 5615 // NullFields is a list of field names (e.g. "Actor") to include in API 5616 // requests with the JSON null value. By default, fields with empty 5617 // values are omitted from API requests. However, any field with an 5618 // empty value appearing in NullFields will be sent to the server as 5619 // null. It is an error if a field in this list has a non-empty value. 5620 // This may be used to include null fields in Patch requests. 5621 NullFields []string `json:"-"` 5622} 5623 5624func (s *OrderRefund) MarshalJSON() ([]byte, error) { 5625 type NoMethod OrderRefund 5626 raw := NoMethod(*s) 5627 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5628} 5629 5630// OrderReportDisbursement: Order disbursement. All methods require the 5631// payment analyst role. 5632type OrderReportDisbursement struct { 5633 // DisbursementAmount: The disbursement amount. 5634 DisbursementAmount *Price `json:"disbursementAmount,omitempty"` 5635 5636 // DisbursementCreationDate: The disbursement date, in ISO 8601 format. 5637 DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` 5638 5639 // DisbursementDate: The date the disbursement was initiated, in ISO 5640 // 8601 format. 5641 DisbursementDate string `json:"disbursementDate,omitempty"` 5642 5643 // DisbursementId: The ID of the disbursement. 5644 DisbursementId string `json:"disbursementId,omitempty"` 5645 5646 // MerchantId: The ID of the managing account. 5647 MerchantId uint64 `json:"merchantId,omitempty,string"` 5648 5649 // ForceSendFields is a list of field names (e.g. "DisbursementAmount") 5650 // to unconditionally include in API requests. By default, fields with 5651 // empty values are omitted from API requests. However, any non-pointer, 5652 // non-interface field appearing in ForceSendFields will be sent to the 5653 // server regardless of whether the field is empty or not. This may be 5654 // used to include empty fields in Patch requests. 5655 ForceSendFields []string `json:"-"` 5656 5657 // NullFields is a list of field names (e.g. "DisbursementAmount") to 5658 // include in API requests with the JSON null value. By default, fields 5659 // with empty values are omitted from API requests. However, any field 5660 // with an empty value appearing in NullFields will be sent to the 5661 // server as null. It is an error if a field in this list has a 5662 // non-empty value. This may be used to include null fields in Patch 5663 // requests. 5664 NullFields []string `json:"-"` 5665} 5666 5667func (s *OrderReportDisbursement) MarshalJSON() ([]byte, error) { 5668 type NoMethod OrderReportDisbursement 5669 raw := NoMethod(*s) 5670 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5671} 5672 5673type OrderReportTransaction struct { 5674 // DisbursementAmount: The disbursement amount. 5675 DisbursementAmount *Price `json:"disbursementAmount,omitempty"` 5676 5677 // DisbursementCreationDate: The date the disbursement was created, in 5678 // ISO 8601 format. 5679 DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` 5680 5681 // DisbursementDate: The date the disbursement was initiated, in ISO 5682 // 8601 format. 5683 DisbursementDate string `json:"disbursementDate,omitempty"` 5684 5685 // DisbursementId: The ID of the disbursement. 5686 DisbursementId string `json:"disbursementId,omitempty"` 5687 5688 // MerchantId: The ID of the managing account. 5689 MerchantId uint64 `json:"merchantId,omitempty,string"` 5690 5691 // MerchantOrderId: Merchant-provided ID of the order. 5692 MerchantOrderId string `json:"merchantOrderId,omitempty"` 5693 5694 // OrderId: The ID of the order. 5695 OrderId string `json:"orderId,omitempty"` 5696 5697 // ProductAmount: Total amount for the items. 5698 ProductAmount *Amount `json:"productAmount,omitempty"` 5699 5700 // ProductAmountWithRemittedTax: Total amount with remitted tax for the 5701 // items. 5702 ProductAmountWithRemittedTax *ProductAmount `json:"productAmountWithRemittedTax,omitempty"` 5703 5704 // TransactionDate: The date of the transaction, in ISO 8601 format. 5705 TransactionDate string `json:"transactionDate,omitempty"` 5706 5707 // ForceSendFields is a list of field names (e.g. "DisbursementAmount") 5708 // to unconditionally include in API requests. By default, fields with 5709 // empty values are omitted from API requests. However, any non-pointer, 5710 // non-interface field appearing in ForceSendFields will be sent to the 5711 // server regardless of whether the field is empty or not. This may be 5712 // used to include empty fields in Patch requests. 5713 ForceSendFields []string `json:"-"` 5714 5715 // NullFields is a list of field names (e.g. "DisbursementAmount") to 5716 // include in API requests with the JSON null value. By default, fields 5717 // with empty values are omitted from API requests. However, any field 5718 // with an empty value appearing in NullFields will be sent to the 5719 // server as null. It is an error if a field in this list has a 5720 // non-empty value. This may be used to include null fields in Patch 5721 // requests. 5722 NullFields []string `json:"-"` 5723} 5724 5725func (s *OrderReportTransaction) MarshalJSON() ([]byte, error) { 5726 type NoMethod OrderReportTransaction 5727 raw := NoMethod(*s) 5728 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5729} 5730 5731type OrderReturn struct { 5732 // Actor: The actor that created the refund. Acceptable values are: - 5733 // "customer" - "googleBot" - "googleCustomerService" - 5734 // "googlePayments" - "googleSabre" - "merchant" 5735 Actor string `json:"actor,omitempty"` 5736 5737 // CreationDate: Date on which the item has been created, in ISO 8601 5738 // format. 5739 CreationDate string `json:"creationDate,omitempty"` 5740 5741 // Quantity: Quantity that is returned. 5742 Quantity int64 `json:"quantity,omitempty"` 5743 5744 // Reason: The reason for the return. Acceptable values are: - 5745 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 5746 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 5747 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 5748 // - "productNotAsDescribed" - "qualityNotAsExpected" - 5749 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 5750 // "wrongProductShipped" 5751 Reason string `json:"reason,omitempty"` 5752 5753 // ReasonText: The explanation of the reason. 5754 ReasonText string `json:"reasonText,omitempty"` 5755 5756 // ForceSendFields is a list of field names (e.g. "Actor") to 5757 // unconditionally include in API requests. By default, fields with 5758 // empty values are omitted from API requests. However, any non-pointer, 5759 // non-interface field appearing in ForceSendFields will be sent to the 5760 // server regardless of whether the field is empty or not. This may be 5761 // used to include empty fields in Patch requests. 5762 ForceSendFields []string `json:"-"` 5763 5764 // NullFields is a list of field names (e.g. "Actor") to include in API 5765 // requests with the JSON null value. By default, fields with empty 5766 // values are omitted from API requests. However, any field with an 5767 // empty value appearing in NullFields will be sent to the server as 5768 // null. It is an error if a field in this list has a non-empty value. 5769 // This may be used to include null fields in Patch requests. 5770 NullFields []string `json:"-"` 5771} 5772 5773func (s *OrderReturn) MarshalJSON() ([]byte, error) { 5774 type NoMethod OrderReturn 5775 raw := NoMethod(*s) 5776 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5777} 5778 5779type OrderShipment struct { 5780 // Carrier: The carrier handling the shipment. For supported carriers, 5781 // Google includes the carrier name and tracking URL in emails to 5782 // customers. For select supported carriers, Google also automatically 5783 // updates the shipment status based on the provided shipment ID. 5784 // *Note:* You can also use unsupported carriers, but emails to 5785 // customers will not include the carrier name or tracking URL, and 5786 // there will be no automatic order status updates. Supported carriers 5787 // for US are: - "ups" (United Parcel Service) *automatic status 5788 // updates* - "usps" (United States Postal Service) *automatic status 5789 // updates* - "fedex" (FedEx) *automatic status updates * - "dhl" 5790 // (DHL eCommerce) *automatic status updates* (US only) - "ontrac" 5791 // (OnTrac) *automatic status updates * - "dhl express" (DHL Express) 5792 // - "deliv" (Deliv) - "dynamex" (TForce) - "lasership" 5793 // (LaserShip) - "mpx" (Military Parcel Xpress) - "uds" (United 5794 // Delivery Service) - "efw" (Estes Forwarding Worldwide) - "jd 5795 // logistics" (JD Logistics) - "yunexpress" (YunExpress) - "china 5796 // post" (China Post) - "china ems" (China Post Express Mail Service) 5797 // - "singapore post" (Singapore Post) - "pos malaysia" (Pos 5798 // Malaysia) - "postnl" (PostNL) - "ptt" (PTT Turkish Post) - 5799 // "eub" (ePacket) - "chukou1" (Chukou1 Logistics) - "bestex" 5800 // (Best Express) - "canada post" (Canada Post) - "purolator" 5801 // (Purolator) - "canpar" (Canpar) - "india post" (India Post) - 5802 // "blue dart" (Blue Dart) - "delhivery" (Delhivery) - "dtdc" 5803 // (DTDC) - "tpc india" (TPC India) Supported carriers for FR are: - 5804 // "la poste" (La Poste) *automatic status updates * - "colissimo" 5805 // (Colissimo by La Poste) *automatic status updates* - "ups" (United 5806 // Parcel Service) *automatic status updates * - "chronopost" 5807 // (Chronopost by La Poste) - "gls" (General Logistics Systems France) 5808 // - "dpd" (DPD Group by GeoPost) - "bpost" (Belgian Post Group) - 5809 // "colis prive" (Colis Privé) - "boxtal" (Boxtal) - "geodis" 5810 // (GEODIS) - "tnt" (TNT) - "db schenker" (DB Schenker) - "aramex" 5811 // (Aramex) 5812 Carrier string `json:"carrier,omitempty"` 5813 5814 // CreationDate: Date on which the shipment has been created, in ISO 5815 // 8601 format. 5816 CreationDate string `json:"creationDate,omitempty"` 5817 5818 // DeliveryDate: Date on which the shipment has been delivered, in ISO 5819 // 8601 format. Present only if `status` is `delivered` 5820 DeliveryDate string `json:"deliveryDate,omitempty"` 5821 5822 // Id: The ID of the shipment. 5823 Id string `json:"id,omitempty"` 5824 5825 // LineItems: The line items that are shipped. 5826 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 5827 5828 // ScheduledDeliveryDetails: Delivery details of the shipment if 5829 // scheduling is needed. 5830 ScheduledDeliveryDetails *OrderShipmentScheduledDeliveryDetails `json:"scheduledDeliveryDetails,omitempty"` 5831 5832 // Status: The status of the shipment. Acceptable values are: - 5833 // "delivered" - "readyForPickup" - "shipped" - "undeliverable" 5834 Status string `json:"status,omitempty"` 5835 5836 // TrackingId: The tracking ID for the shipment. 5837 TrackingId string `json:"trackingId,omitempty"` 5838 5839 // ForceSendFields is a list of field names (e.g. "Carrier") to 5840 // unconditionally include in API requests. By default, fields with 5841 // empty values are omitted from API requests. However, any non-pointer, 5842 // non-interface field appearing in ForceSendFields will be sent to the 5843 // server regardless of whether the field is empty or not. This may be 5844 // used to include empty fields in Patch requests. 5845 ForceSendFields []string `json:"-"` 5846 5847 // NullFields is a list of field names (e.g. "Carrier") to include in 5848 // API requests with the JSON null value. By default, fields with empty 5849 // values are omitted from API requests. However, any field with an 5850 // empty value appearing in NullFields will be sent to the server as 5851 // null. It is an error if a field in this list has a non-empty value. 5852 // This may be used to include null fields in Patch requests. 5853 NullFields []string `json:"-"` 5854} 5855 5856func (s *OrderShipment) MarshalJSON() ([]byte, error) { 5857 type NoMethod OrderShipment 5858 raw := NoMethod(*s) 5859 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5860} 5861 5862type OrderShipmentLineItemShipment struct { 5863 // LineItemId: The ID of the line item that is shipped. This value is 5864 // assigned by Google when an order is created. Either lineItemId or 5865 // productId is required. 5866 LineItemId string `json:"lineItemId,omitempty"` 5867 5868 // ProductId: The ID of the product to ship. This is the REST ID used in 5869 // the products service. Either lineItemId or productId is required. 5870 ProductId string `json:"productId,omitempty"` 5871 5872 // Quantity: The quantity that is shipped. 5873 Quantity int64 `json:"quantity,omitempty"` 5874 5875 // ForceSendFields is a list of field names (e.g. "LineItemId") to 5876 // unconditionally include in API requests. By default, fields with 5877 // empty values are omitted from API requests. However, any non-pointer, 5878 // non-interface field appearing in ForceSendFields will be sent to the 5879 // server regardless of whether the field is empty or not. This may be 5880 // used to include empty fields in Patch requests. 5881 ForceSendFields []string `json:"-"` 5882 5883 // NullFields is a list of field names (e.g. "LineItemId") to include in 5884 // API requests with the JSON null value. By default, fields with empty 5885 // values are omitted from API requests. However, any field with an 5886 // empty value appearing in NullFields will be sent to the server as 5887 // null. It is an error if a field in this list has a non-empty value. 5888 // This may be used to include null fields in Patch requests. 5889 NullFields []string `json:"-"` 5890} 5891 5892func (s *OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) { 5893 type NoMethod OrderShipmentLineItemShipment 5894 raw := NoMethod(*s) 5895 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5896} 5897 5898type OrderShipmentScheduledDeliveryDetails struct { 5899 // CarrierPhoneNumber: The phone number of the carrier fulfilling the 5900 // delivery. The phone number is formatted as the international notation 5901 // in ITU-T Recommendation E.123 (e.g., "+41 44 668 1800"). 5902 CarrierPhoneNumber string `json:"carrierPhoneNumber,omitempty"` 5903 5904 // ScheduledDate: The date a shipment is scheduled for delivery, in ISO 5905 // 8601 format. 5906 ScheduledDate string `json:"scheduledDate,omitempty"` 5907 5908 // ForceSendFields is a list of field names (e.g. "CarrierPhoneNumber") 5909 // to unconditionally include in API requests. By default, fields with 5910 // empty values are omitted from API requests. However, any non-pointer, 5911 // non-interface field appearing in ForceSendFields will be sent to the 5912 // server regardless of whether the field is empty or not. This may be 5913 // used to include empty fields in Patch requests. 5914 ForceSendFields []string `json:"-"` 5915 5916 // NullFields is a list of field names (e.g. "CarrierPhoneNumber") to 5917 // include in API requests with the JSON null value. By default, fields 5918 // with empty values are omitted from API requests. However, any field 5919 // with an empty value appearing in NullFields will be sent to the 5920 // server as null. It is an error if a field in this list has a 5921 // non-empty value. This may be used to include null fields in Patch 5922 // requests. 5923 NullFields []string `json:"-"` 5924} 5925 5926func (s *OrderShipmentScheduledDeliveryDetails) MarshalJSON() ([]byte, error) { 5927 type NoMethod OrderShipmentScheduledDeliveryDetails 5928 raw := NoMethod(*s) 5929 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5930} 5931 5932type OrderinvoicesCreateChargeInvoiceRequest struct { 5933 // InvoiceId: [required] The ID of the invoice. 5934 InvoiceId string `json:"invoiceId,omitempty"` 5935 5936 // InvoiceSummary: [required] Invoice summary. 5937 InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` 5938 5939 // LineItemInvoices: [required] Invoice details per line item. 5940 LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` 5941 5942 // OperationId: [required] The ID of the operation, unique across all 5943 // operations for a given order. 5944 OperationId string `json:"operationId,omitempty"` 5945 5946 // ShipmentGroupId: [required] ID of the shipment group. It is assigned 5947 // by the merchant in the `shipLineItems` method and is used to group 5948 // multiple line items that have the same kind of shipping charges. 5949 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 5950 5951 // ForceSendFields is a list of field names (e.g. "InvoiceId") to 5952 // unconditionally include in API requests. By default, fields with 5953 // empty values are omitted from API requests. However, any non-pointer, 5954 // non-interface field appearing in ForceSendFields will be sent to the 5955 // server regardless of whether the field is empty or not. This may be 5956 // used to include empty fields in Patch requests. 5957 ForceSendFields []string `json:"-"` 5958 5959 // NullFields is a list of field names (e.g. "InvoiceId") to include in 5960 // API requests with the JSON null value. By default, fields with empty 5961 // values are omitted from API requests. However, any field with an 5962 // empty value appearing in NullFields will be sent to the server as 5963 // null. It is an error if a field in this list has a non-empty value. 5964 // This may be used to include null fields in Patch requests. 5965 NullFields []string `json:"-"` 5966} 5967 5968func (s *OrderinvoicesCreateChargeInvoiceRequest) MarshalJSON() ([]byte, error) { 5969 type NoMethod OrderinvoicesCreateChargeInvoiceRequest 5970 raw := NoMethod(*s) 5971 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5972} 5973 5974type OrderinvoicesCreateChargeInvoiceResponse struct { 5975 // ExecutionStatus: The status of the execution. Acceptable values are: 5976 // - "duplicate" - "executed" 5977 ExecutionStatus string `json:"executionStatus,omitempty"` 5978 5979 // Kind: Identifies what kind of resource this is. Value: the fixed 5980 // string "content#orderinvoicesCreateChargeInvoiceResponse". 5981 Kind string `json:"kind,omitempty"` 5982 5983 // ServerResponse contains the HTTP response code and headers from the 5984 // server. 5985 googleapi.ServerResponse `json:"-"` 5986 5987 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 5988 // unconditionally include in API requests. By default, fields with 5989 // empty values are omitted from API requests. However, any non-pointer, 5990 // non-interface field appearing in ForceSendFields will be sent to the 5991 // server regardless of whether the field is empty or not. This may be 5992 // used to include empty fields in Patch requests. 5993 ForceSendFields []string `json:"-"` 5994 5995 // NullFields is a list of field names (e.g. "ExecutionStatus") to 5996 // include in API requests with the JSON null value. By default, fields 5997 // with empty values are omitted from API requests. However, any field 5998 // with an empty value appearing in NullFields will be sent to the 5999 // server as null. It is an error if a field in this list has a 6000 // non-empty value. This may be used to include null fields in Patch 6001 // requests. 6002 NullFields []string `json:"-"` 6003} 6004 6005func (s *OrderinvoicesCreateChargeInvoiceResponse) MarshalJSON() ([]byte, error) { 6006 type NoMethod OrderinvoicesCreateChargeInvoiceResponse 6007 raw := NoMethod(*s) 6008 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6009} 6010 6011type OrderinvoicesCreateRefundInvoiceRequest struct { 6012 // InvoiceId: [required] The ID of the invoice. 6013 InvoiceId string `json:"invoiceId,omitempty"` 6014 6015 // OperationId: [required] The ID of the operation, unique across all 6016 // operations for a given order. 6017 OperationId string `json:"operationId,omitempty"` 6018 6019 // RefundOnlyOption: Option to create a refund-only invoice. Exactly one 6020 // of `refundOnlyOption` or `returnOption` must be provided. 6021 RefundOnlyOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption `json:"refundOnlyOption,omitempty"` 6022 6023 // ReturnOption: Option to create an invoice for a refund and mark all 6024 // items within the invoice as returned. Exactly one of 6025 // `refundOnlyOption` or `returnOption` must be provided. 6026 ReturnOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption `json:"returnOption,omitempty"` 6027 6028 // ShipmentInvoices: Invoice details for different shipment groups. 6029 ShipmentInvoices []*ShipmentInvoice `json:"shipmentInvoices,omitempty"` 6030 6031 // ForceSendFields is a list of field names (e.g. "InvoiceId") to 6032 // unconditionally include in API requests. By default, fields with 6033 // empty values are omitted from API requests. However, any non-pointer, 6034 // non-interface field appearing in ForceSendFields will be sent to the 6035 // server regardless of whether the field is empty or not. This may be 6036 // used to include empty fields in Patch requests. 6037 ForceSendFields []string `json:"-"` 6038 6039 // NullFields is a list of field names (e.g. "InvoiceId") to include in 6040 // API requests with the JSON null value. By default, fields with empty 6041 // values are omitted from API requests. However, any field with an 6042 // empty value appearing in NullFields will be sent to the server as 6043 // null. It is an error if a field in this list has a non-empty value. 6044 // This may be used to include null fields in Patch requests. 6045 NullFields []string `json:"-"` 6046} 6047 6048func (s *OrderinvoicesCreateRefundInvoiceRequest) MarshalJSON() ([]byte, error) { 6049 type NoMethod OrderinvoicesCreateRefundInvoiceRequest 6050 raw := NoMethod(*s) 6051 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6052} 6053 6054type OrderinvoicesCreateRefundInvoiceResponse struct { 6055 // ExecutionStatus: The status of the execution. Acceptable values are: 6056 // - "duplicate" - "executed" 6057 ExecutionStatus string `json:"executionStatus,omitempty"` 6058 6059 // Kind: Identifies what kind of resource this is. Value: the fixed 6060 // string "content#orderinvoicesCreateRefundInvoiceResponse". 6061 Kind string `json:"kind,omitempty"` 6062 6063 // ServerResponse contains the HTTP response code and headers from the 6064 // server. 6065 googleapi.ServerResponse `json:"-"` 6066 6067 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6068 // unconditionally include in API requests. By default, fields with 6069 // empty values are omitted from API requests. However, any non-pointer, 6070 // non-interface field appearing in ForceSendFields will be sent to the 6071 // server regardless of whether the field is empty or not. This may be 6072 // used to include empty fields in Patch requests. 6073 ForceSendFields []string `json:"-"` 6074 6075 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6076 // include in API requests with the JSON null value. By default, fields 6077 // with empty values are omitted from API requests. However, any field 6078 // with an empty value appearing in NullFields will be sent to the 6079 // server as null. It is an error if a field in this list has a 6080 // non-empty value. This may be used to include null fields in Patch 6081 // requests. 6082 NullFields []string `json:"-"` 6083} 6084 6085func (s *OrderinvoicesCreateRefundInvoiceResponse) MarshalJSON() ([]byte, error) { 6086 type NoMethod OrderinvoicesCreateRefundInvoiceResponse 6087 raw := NoMethod(*s) 6088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6089} 6090 6091type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption struct { 6092 // Description: Optional description of the refund reason. 6093 Description string `json:"description,omitempty"` 6094 6095 // Reason: [required] Reason for the refund. Acceptable values are: - 6096 // "adjustment" - "autoPostInternal" - 6097 // "autoPostInvalidBillingAddress" - "autoPostNoInventory" - 6098 // "autoPostPriceError" - "autoPostUndeliverableShippingAddress" - 6099 // "couponAbuse" - "courtesyAdjustment" - "customerCanceled" - 6100 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 6101 // - "customerSupportRequested" - "deliveredLateByCarrier" - 6102 // "deliveredTooLate" - "expiredItem" - 6103 // "failToPushOrderGoogleError" - "failToPushOrderMerchantError" - 6104 // "failToPushOrderMerchantFulfillmentError" - 6105 // "failToPushOrderToMerchant" - 6106 // "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - 6107 // "invalidCoupon" - "lateShipmentCredit" - 6108 // "malformedShippingAddress" - "merchantDidNotShipOnTime" - 6109 // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - 6110 // "paymentDeclined" - "priceAdjustment" - "priceError" - 6111 // "productArrivedDamaged" - "productNotAsDescribed" - 6112 // "promoReallocation" - "qualityNotAsExpected" - 6113 // "returnRefundAbuse" - "shippingCostAdjustment" - 6114 // "shippingPriceError" - "taxAdjustment" - "taxError" - 6115 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 6116 // "wrongProductShipped" 6117 Reason string `json:"reason,omitempty"` 6118 6119 // ForceSendFields is a list of field names (e.g. "Description") to 6120 // unconditionally include in API requests. By default, fields with 6121 // empty values are omitted from API requests. However, any non-pointer, 6122 // non-interface field appearing in ForceSendFields will be sent to the 6123 // server regardless of whether the field is empty or not. This may be 6124 // used to include empty fields in Patch requests. 6125 ForceSendFields []string `json:"-"` 6126 6127 // NullFields is a list of field names (e.g. "Description") to include 6128 // in API requests with the JSON null value. By default, fields with 6129 // empty values are omitted from API requests. However, any field with 6130 // an empty value appearing in NullFields will be sent to the server as 6131 // null. It is an error if a field in this list has a non-empty value. 6132 // This may be used to include null fields in Patch requests. 6133 NullFields []string `json:"-"` 6134} 6135 6136func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption) MarshalJSON() ([]byte, error) { 6137 type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption 6138 raw := NoMethod(*s) 6139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6140} 6141 6142type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption struct { 6143 // Description: Optional description of the return reason. 6144 Description string `json:"description,omitempty"` 6145 6146 // Reason: [required] Reason for the return. Acceptable values are: - 6147 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 6148 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 6149 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 6150 // - "productNotAsDescribed" - "qualityNotAsExpected" - 6151 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 6152 // "wrongProductShipped" 6153 Reason string `json:"reason,omitempty"` 6154 6155 // ForceSendFields is a list of field names (e.g. "Description") to 6156 // unconditionally include in API requests. By default, fields with 6157 // empty values are omitted from API requests. However, any non-pointer, 6158 // non-interface field appearing in ForceSendFields will be sent to the 6159 // server regardless of whether the field is empty or not. This may be 6160 // used to include empty fields in Patch requests. 6161 ForceSendFields []string `json:"-"` 6162 6163 // NullFields is a list of field names (e.g. "Description") to include 6164 // in API requests with the JSON null value. By default, fields with 6165 // empty values are omitted from API requests. However, any field with 6166 // an empty value appearing in NullFields will be sent to the server as 6167 // null. It is an error if a field in this list has a non-empty value. 6168 // This may be used to include null fields in Patch requests. 6169 NullFields []string `json:"-"` 6170} 6171 6172func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption) MarshalJSON() ([]byte, error) { 6173 type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption 6174 raw := NoMethod(*s) 6175 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6176} 6177 6178type OrderreportsListDisbursementsResponse struct { 6179 // Disbursements: The list of disbursements. 6180 Disbursements []*OrderReportDisbursement `json:"disbursements,omitempty"` 6181 6182 // Kind: Identifies what kind of resource this is. Value: the fixed 6183 // string "content#orderreportsListDisbursementsResponse". 6184 Kind string `json:"kind,omitempty"` 6185 6186 // NextPageToken: The token for the retrieval of the next page of 6187 // disbursements. 6188 NextPageToken string `json:"nextPageToken,omitempty"` 6189 6190 // ServerResponse contains the HTTP response code and headers from the 6191 // server. 6192 googleapi.ServerResponse `json:"-"` 6193 6194 // ForceSendFields is a list of field names (e.g. "Disbursements") to 6195 // unconditionally include in API requests. By default, fields with 6196 // empty values are omitted from API requests. However, any non-pointer, 6197 // non-interface field appearing in ForceSendFields will be sent to the 6198 // server regardless of whether the field is empty or not. This may be 6199 // used to include empty fields in Patch requests. 6200 ForceSendFields []string `json:"-"` 6201 6202 // NullFields is a list of field names (e.g. "Disbursements") to include 6203 // in API requests with the JSON null value. By default, fields with 6204 // empty values are omitted from API requests. However, any field with 6205 // an empty value appearing in NullFields will be sent to the server as 6206 // null. It is an error if a field in this list has a non-empty value. 6207 // This may be used to include null fields in Patch requests. 6208 NullFields []string `json:"-"` 6209} 6210 6211func (s *OrderreportsListDisbursementsResponse) MarshalJSON() ([]byte, error) { 6212 type NoMethod OrderreportsListDisbursementsResponse 6213 raw := NoMethod(*s) 6214 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6215} 6216 6217type OrderreportsListTransactionsResponse struct { 6218 // Kind: Identifies what kind of resource this is. Value: the fixed 6219 // string "content#orderreportsListTransactionsResponse". 6220 Kind string `json:"kind,omitempty"` 6221 6222 // NextPageToken: The token for the retrieval of the next page of 6223 // transactions. 6224 NextPageToken string `json:"nextPageToken,omitempty"` 6225 6226 // Transactions: The list of transactions. 6227 Transactions []*OrderReportTransaction `json:"transactions,omitempty"` 6228 6229 // ServerResponse contains the HTTP response code and headers from the 6230 // server. 6231 googleapi.ServerResponse `json:"-"` 6232 6233 // ForceSendFields is a list of field names (e.g. "Kind") to 6234 // unconditionally include in API requests. By default, fields with 6235 // empty values are omitted from API requests. However, any non-pointer, 6236 // non-interface field appearing in ForceSendFields will be sent to the 6237 // server regardless of whether the field is empty or not. This may be 6238 // used to include empty fields in Patch requests. 6239 ForceSendFields []string `json:"-"` 6240 6241 // NullFields is a list of field names (e.g. "Kind") to include in API 6242 // requests with the JSON null value. By default, fields with empty 6243 // values are omitted from API requests. However, any field with an 6244 // empty value appearing in NullFields will be sent to the server as 6245 // null. It is an error if a field in this list has a non-empty value. 6246 // This may be used to include null fields in Patch requests. 6247 NullFields []string `json:"-"` 6248} 6249 6250func (s *OrderreportsListTransactionsResponse) MarshalJSON() ([]byte, error) { 6251 type NoMethod OrderreportsListTransactionsResponse 6252 raw := NoMethod(*s) 6253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6254} 6255 6256type OrderreturnsListResponse struct { 6257 // Kind: Identifies what kind of resource this is. Value: the fixed 6258 // string "content#orderreturnsListResponse". 6259 Kind string `json:"kind,omitempty"` 6260 6261 // NextPageToken: The token for the retrieval of the next page of 6262 // returns. 6263 NextPageToken string `json:"nextPageToken,omitempty"` 6264 6265 Resources []*MerchantOrderReturn `json:"resources,omitempty"` 6266 6267 // ServerResponse contains the HTTP response code and headers from the 6268 // server. 6269 googleapi.ServerResponse `json:"-"` 6270 6271 // ForceSendFields is a list of field names (e.g. "Kind") to 6272 // unconditionally include in API requests. By default, fields with 6273 // empty values are omitted from API requests. However, any non-pointer, 6274 // non-interface field appearing in ForceSendFields will be sent to the 6275 // server regardless of whether the field is empty or not. This may be 6276 // used to include empty fields in Patch requests. 6277 ForceSendFields []string `json:"-"` 6278 6279 // NullFields is a list of field names (e.g. "Kind") to include in API 6280 // requests with the JSON null value. By default, fields with empty 6281 // values are omitted from API requests. However, any field with an 6282 // empty value appearing in NullFields will be sent to the server as 6283 // null. It is an error if a field in this list has a non-empty value. 6284 // This may be used to include null fields in Patch requests. 6285 NullFields []string `json:"-"` 6286} 6287 6288func (s *OrderreturnsListResponse) MarshalJSON() ([]byte, error) { 6289 type NoMethod OrderreturnsListResponse 6290 raw := NoMethod(*s) 6291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6292} 6293 6294type OrdersAcknowledgeRequest struct { 6295 // OperationId: The ID of the operation. Unique across all operations 6296 // for a given order. 6297 OperationId string `json:"operationId,omitempty"` 6298 6299 // ForceSendFields is a list of field names (e.g. "OperationId") to 6300 // unconditionally include in API requests. By default, fields with 6301 // empty values are omitted from API requests. However, any non-pointer, 6302 // non-interface field appearing in ForceSendFields will be sent to the 6303 // server regardless of whether the field is empty or not. This may be 6304 // used to include empty fields in Patch requests. 6305 ForceSendFields []string `json:"-"` 6306 6307 // NullFields is a list of field names (e.g. "OperationId") to include 6308 // in API requests with the JSON null value. By default, fields with 6309 // empty values are omitted from API requests. However, any field with 6310 // an empty value appearing in NullFields will be sent to the server as 6311 // null. It is an error if a field in this list has a non-empty value. 6312 // This may be used to include null fields in Patch requests. 6313 NullFields []string `json:"-"` 6314} 6315 6316func (s *OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) { 6317 type NoMethod OrdersAcknowledgeRequest 6318 raw := NoMethod(*s) 6319 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6320} 6321 6322type OrdersAcknowledgeResponse struct { 6323 // ExecutionStatus: The status of the execution. Acceptable values are: 6324 // - "duplicate" - "executed" 6325 ExecutionStatus string `json:"executionStatus,omitempty"` 6326 6327 // Kind: Identifies what kind of resource this is. Value: the fixed 6328 // string "content#ordersAcknowledgeResponse". 6329 Kind string `json:"kind,omitempty"` 6330 6331 // ServerResponse contains the HTTP response code and headers from the 6332 // server. 6333 googleapi.ServerResponse `json:"-"` 6334 6335 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6336 // unconditionally include in API requests. By default, fields with 6337 // empty values are omitted from API requests. However, any non-pointer, 6338 // non-interface field appearing in ForceSendFields will be sent to the 6339 // server regardless of whether the field is empty or not. This may be 6340 // used to include empty fields in Patch requests. 6341 ForceSendFields []string `json:"-"` 6342 6343 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6344 // include in API requests with the JSON null value. By default, fields 6345 // with empty values are omitted from API requests. However, any field 6346 // with an empty value appearing in NullFields will be sent to the 6347 // server as null. It is an error if a field in this list has a 6348 // non-empty value. This may be used to include null fields in Patch 6349 // requests. 6350 NullFields []string `json:"-"` 6351} 6352 6353func (s *OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) { 6354 type NoMethod OrdersAcknowledgeResponse 6355 raw := NoMethod(*s) 6356 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6357} 6358 6359type OrdersAdvanceTestOrderResponse struct { 6360 // Kind: Identifies what kind of resource this is. Value: the fixed 6361 // string "content#ordersAdvanceTestOrderResponse". 6362 Kind string `json:"kind,omitempty"` 6363 6364 // ServerResponse contains the HTTP response code and headers from the 6365 // server. 6366 googleapi.ServerResponse `json:"-"` 6367 6368 // ForceSendFields is a list of field names (e.g. "Kind") to 6369 // unconditionally include in API requests. By default, fields with 6370 // empty values are omitted from API requests. However, any non-pointer, 6371 // non-interface field appearing in ForceSendFields will be sent to the 6372 // server regardless of whether the field is empty or not. This may be 6373 // used to include empty fields in Patch requests. 6374 ForceSendFields []string `json:"-"` 6375 6376 // NullFields is a list of field names (e.g. "Kind") to include in API 6377 // requests with the JSON null value. By default, fields with empty 6378 // values are omitted from API requests. However, any field with an 6379 // empty value appearing in NullFields will be sent to the server as 6380 // null. It is an error if a field in this list has a non-empty value. 6381 // This may be used to include null fields in Patch requests. 6382 NullFields []string `json:"-"` 6383} 6384 6385func (s *OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) { 6386 type NoMethod OrdersAdvanceTestOrderResponse 6387 raw := NoMethod(*s) 6388 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6389} 6390 6391type OrdersCancelLineItemRequest struct { 6392 // Amount: Deprecated. Please use amountPretax and amountTax instead. 6393 Amount *Price `json:"amount,omitempty"` 6394 6395 // AmountPretax: Amount to refund for the cancelation. Optional. If not 6396 // set, Google will calculate the default based on the price and tax of 6397 // the items involved. The amount must not be larger than the net amount 6398 // left on the order. 6399 AmountPretax *Price `json:"amountPretax,omitempty"` 6400 6401 // AmountTax: Tax amount that corresponds to cancellation amount in 6402 // amountPretax. Optional, but if filled, then amountPretax must be set. 6403 // Calculated automatically if not provided. 6404 AmountTax *Price `json:"amountTax,omitempty"` 6405 6406 // LineItemId: The ID of the line item to cancel. Either lineItemId or 6407 // productId is required. 6408 LineItemId string `json:"lineItemId,omitempty"` 6409 6410 // OperationId: The ID of the operation. Unique across all operations 6411 // for a given order. 6412 OperationId string `json:"operationId,omitempty"` 6413 6414 // ProductId: The ID of the product to cancel. This is the REST ID used 6415 // in the products service. Either lineItemId or productId is required. 6416 ProductId string `json:"productId,omitempty"` 6417 6418 // Quantity: The quantity to cancel. 6419 Quantity int64 `json:"quantity,omitempty"` 6420 6421 // Reason: The reason for the cancellation. Acceptable values are: - 6422 // "customerInitiatedCancel" - "invalidCoupon" - 6423 // "malformedShippingAddress" - "noInventory" - "other" - 6424 // "priceError" - "shippingPriceError" - "taxError" - 6425 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 6426 Reason string `json:"reason,omitempty"` 6427 6428 // ReasonText: The explanation of the reason. 6429 ReasonText string `json:"reasonText,omitempty"` 6430 6431 // ForceSendFields is a list of field names (e.g. "Amount") to 6432 // unconditionally include in API requests. By default, fields with 6433 // empty values are omitted from API requests. However, any non-pointer, 6434 // non-interface field appearing in ForceSendFields will be sent to the 6435 // server regardless of whether the field is empty or not. This may be 6436 // used to include empty fields in Patch requests. 6437 ForceSendFields []string `json:"-"` 6438 6439 // NullFields is a list of field names (e.g. "Amount") to include in API 6440 // requests with the JSON null value. By default, fields with empty 6441 // values are omitted from API requests. However, any field with an 6442 // empty value appearing in NullFields will be sent to the server as 6443 // null. It is an error if a field in this list has a non-empty value. 6444 // This may be used to include null fields in Patch requests. 6445 NullFields []string `json:"-"` 6446} 6447 6448func (s *OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) { 6449 type NoMethod OrdersCancelLineItemRequest 6450 raw := NoMethod(*s) 6451 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6452} 6453 6454type OrdersCancelLineItemResponse struct { 6455 // ExecutionStatus: The status of the execution. Acceptable values are: 6456 // - "duplicate" - "executed" 6457 ExecutionStatus string `json:"executionStatus,omitempty"` 6458 6459 // Kind: Identifies what kind of resource this is. Value: the fixed 6460 // string "content#ordersCancelLineItemResponse". 6461 Kind string `json:"kind,omitempty"` 6462 6463 // ServerResponse contains the HTTP response code and headers from the 6464 // server. 6465 googleapi.ServerResponse `json:"-"` 6466 6467 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6468 // unconditionally include in API requests. By default, fields with 6469 // empty values are omitted from API requests. However, any non-pointer, 6470 // non-interface field appearing in ForceSendFields will be sent to the 6471 // server regardless of whether the field is empty or not. This may be 6472 // used to include empty fields in Patch requests. 6473 ForceSendFields []string `json:"-"` 6474 6475 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6476 // include in API requests with the JSON null value. By default, fields 6477 // with empty values are omitted from API requests. However, any field 6478 // with an empty value appearing in NullFields will be sent to the 6479 // server as null. It is an error if a field in this list has a 6480 // non-empty value. This may be used to include null fields in Patch 6481 // requests. 6482 NullFields []string `json:"-"` 6483} 6484 6485func (s *OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) { 6486 type NoMethod OrdersCancelLineItemResponse 6487 raw := NoMethod(*s) 6488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6489} 6490 6491type OrdersCancelRequest struct { 6492 // OperationId: The ID of the operation. Unique across all operations 6493 // for a given order. 6494 OperationId string `json:"operationId,omitempty"` 6495 6496 // Reason: The reason for the cancellation. Acceptable values are: - 6497 // "customerInitiatedCancel" - "invalidCoupon" - 6498 // "malformedShippingAddress" - "noInventory" - "other" - 6499 // "priceError" - "shippingPriceError" - "taxError" - 6500 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 6501 Reason string `json:"reason,omitempty"` 6502 6503 // ReasonText: The explanation of the reason. 6504 ReasonText string `json:"reasonText,omitempty"` 6505 6506 // ForceSendFields is a list of field names (e.g. "OperationId") to 6507 // unconditionally include in API requests. By default, fields with 6508 // empty values are omitted from API requests. However, any non-pointer, 6509 // non-interface field appearing in ForceSendFields will be sent to the 6510 // server regardless of whether the field is empty or not. This may be 6511 // used to include empty fields in Patch requests. 6512 ForceSendFields []string `json:"-"` 6513 6514 // NullFields is a list of field names (e.g. "OperationId") to include 6515 // in API requests with the JSON null value. By default, fields with 6516 // empty values are omitted from API requests. However, any field with 6517 // an empty value appearing in NullFields will be sent to the server as 6518 // null. It is an error if a field in this list has a non-empty value. 6519 // This may be used to include null fields in Patch requests. 6520 NullFields []string `json:"-"` 6521} 6522 6523func (s *OrdersCancelRequest) MarshalJSON() ([]byte, error) { 6524 type NoMethod OrdersCancelRequest 6525 raw := NoMethod(*s) 6526 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6527} 6528 6529type OrdersCancelResponse struct { 6530 // ExecutionStatus: The status of the execution. Acceptable values are: 6531 // - "duplicate" - "executed" 6532 ExecutionStatus string `json:"executionStatus,omitempty"` 6533 6534 // Kind: Identifies what kind of resource this is. Value: the fixed 6535 // string "content#ordersCancelResponse". 6536 Kind string `json:"kind,omitempty"` 6537 6538 // ServerResponse contains the HTTP response code and headers from the 6539 // server. 6540 googleapi.ServerResponse `json:"-"` 6541 6542 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 6543 // unconditionally include in API requests. By default, fields with 6544 // empty values are omitted from API requests. However, any non-pointer, 6545 // non-interface field appearing in ForceSendFields will be sent to the 6546 // server regardless of whether the field is empty or not. This may be 6547 // used to include empty fields in Patch requests. 6548 ForceSendFields []string `json:"-"` 6549 6550 // NullFields is a list of field names (e.g. "ExecutionStatus") to 6551 // include in API requests with the JSON null value. By default, fields 6552 // with empty values are omitted from API requests. However, any field 6553 // with an empty value appearing in NullFields will be sent to the 6554 // server as null. It is an error if a field in this list has a 6555 // non-empty value. This may be used to include null fields in Patch 6556 // requests. 6557 NullFields []string `json:"-"` 6558} 6559 6560func (s *OrdersCancelResponse) MarshalJSON() ([]byte, error) { 6561 type NoMethod OrdersCancelResponse 6562 raw := NoMethod(*s) 6563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6564} 6565 6566type OrdersCancelTestOrderByCustomerRequest struct { 6567 // Reason: The reason for the cancellation. Acceptable values are: - 6568 // "changedMind" - "orderedWrongItem" - "other" 6569 Reason string `json:"reason,omitempty"` 6570 6571 // ForceSendFields is a list of field names (e.g. "Reason") to 6572 // unconditionally include in API requests. By default, fields with 6573 // empty values are omitted from API requests. However, any non-pointer, 6574 // non-interface field appearing in ForceSendFields will be sent to the 6575 // server regardless of whether the field is empty or not. This may be 6576 // used to include empty fields in Patch requests. 6577 ForceSendFields []string `json:"-"` 6578 6579 // NullFields is a list of field names (e.g. "Reason") to include in API 6580 // requests with the JSON null value. By default, fields with empty 6581 // values are omitted from API requests. However, any field with an 6582 // empty value appearing in NullFields will be sent to the server as 6583 // null. It is an error if a field in this list has a non-empty value. 6584 // This may be used to include null fields in Patch requests. 6585 NullFields []string `json:"-"` 6586} 6587 6588func (s *OrdersCancelTestOrderByCustomerRequest) MarshalJSON() ([]byte, error) { 6589 type NoMethod OrdersCancelTestOrderByCustomerRequest 6590 raw := NoMethod(*s) 6591 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6592} 6593 6594type OrdersCancelTestOrderByCustomerResponse struct { 6595 // Kind: Identifies what kind of resource this is. Value: the fixed 6596 // string "content#ordersCancelTestOrderByCustomerResponse". 6597 Kind string `json:"kind,omitempty"` 6598 6599 // ServerResponse contains the HTTP response code and headers from the 6600 // server. 6601 googleapi.ServerResponse `json:"-"` 6602 6603 // ForceSendFields is a list of field names (e.g. "Kind") to 6604 // unconditionally include in API requests. By default, fields with 6605 // empty values are omitted from API requests. However, any non-pointer, 6606 // non-interface field appearing in ForceSendFields will be sent to the 6607 // server regardless of whether the field is empty or not. This may be 6608 // used to include empty fields in Patch requests. 6609 ForceSendFields []string `json:"-"` 6610 6611 // NullFields is a list of field names (e.g. "Kind") to include in API 6612 // requests with the JSON null value. By default, fields with empty 6613 // values are omitted from API requests. However, any field with an 6614 // empty value appearing in NullFields will be sent to the server as 6615 // null. It is an error if a field in this list has a non-empty value. 6616 // This may be used to include null fields in Patch requests. 6617 NullFields []string `json:"-"` 6618} 6619 6620func (s *OrdersCancelTestOrderByCustomerResponse) MarshalJSON() ([]byte, error) { 6621 type NoMethod OrdersCancelTestOrderByCustomerResponse 6622 raw := NoMethod(*s) 6623 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6624} 6625 6626type OrdersCreateTestOrderRequest struct { 6627 // Country: The CLDR territory code of the country of the test order to 6628 // create. Affects the currency and addresses of orders created via 6629 // `template_name`, or the addresses of orders created via `test_order`. 6630 // Acceptable values are: - "US" - "FR" Defaults to `US`. 6631 Country string `json:"country,omitempty"` 6632 6633 // TemplateName: The test order template to use. Specify as an 6634 // alternative to `testOrder` as a shortcut for retrieving a template 6635 // and then creating an order using that template. Acceptable values 6636 // are: - "template1" - "template1a" - "template1b" - 6637 // "template2" - "template3" 6638 TemplateName string `json:"templateName,omitempty"` 6639 6640 // TestOrder: The test order to create. 6641 TestOrder *TestOrder `json:"testOrder,omitempty"` 6642 6643 // ForceSendFields is a list of field names (e.g. "Country") to 6644 // unconditionally include in API requests. By default, fields with 6645 // empty values are omitted from API requests. However, any non-pointer, 6646 // non-interface field appearing in ForceSendFields will be sent to the 6647 // server regardless of whether the field is empty or not. This may be 6648 // used to include empty fields in Patch requests. 6649 ForceSendFields []string `json:"-"` 6650 6651 // NullFields is a list of field names (e.g. "Country") to include in 6652 // API requests with the JSON null value. By default, fields with empty 6653 // values are omitted from API requests. However, any field with an 6654 // empty value appearing in NullFields will be sent to the server as 6655 // null. It is an error if a field in this list has a non-empty value. 6656 // This may be used to include null fields in Patch requests. 6657 NullFields []string `json:"-"` 6658} 6659 6660func (s *OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) { 6661 type NoMethod OrdersCreateTestOrderRequest 6662 raw := NoMethod(*s) 6663 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6664} 6665 6666type OrdersCreateTestOrderResponse struct { 6667 // Kind: Identifies what kind of resource this is. Value: the fixed 6668 // string "content#ordersCreateTestOrderResponse". 6669 Kind string `json:"kind,omitempty"` 6670 6671 // OrderId: The ID of the newly created test order. 6672 OrderId string `json:"orderId,omitempty"` 6673 6674 // ServerResponse contains the HTTP response code and headers from the 6675 // server. 6676 googleapi.ServerResponse `json:"-"` 6677 6678 // ForceSendFields is a list of field names (e.g. "Kind") to 6679 // unconditionally include in API requests. By default, fields with 6680 // empty values are omitted from API requests. However, any non-pointer, 6681 // non-interface field appearing in ForceSendFields will be sent to the 6682 // server regardless of whether the field is empty or not. This may be 6683 // used to include empty fields in Patch requests. 6684 ForceSendFields []string `json:"-"` 6685 6686 // NullFields is a list of field names (e.g. "Kind") to include in API 6687 // requests with the JSON null value. By default, fields with empty 6688 // values are omitted from API requests. However, any field with an 6689 // empty value appearing in NullFields will be sent to the server as 6690 // null. It is an error if a field in this list has a non-empty value. 6691 // This may be used to include null fields in Patch requests. 6692 NullFields []string `json:"-"` 6693} 6694 6695func (s *OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) { 6696 type NoMethod OrdersCreateTestOrderResponse 6697 raw := NoMethod(*s) 6698 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6699} 6700 6701type OrdersCreateTestReturnRequest struct { 6702 // Items: Returned items. 6703 Items []*OrdersCustomBatchRequestEntryCreateTestReturnReturnItem `json:"items,omitempty"` 6704 6705 // ForceSendFields is a list of field names (e.g. "Items") to 6706 // unconditionally include in API requests. By default, fields with 6707 // empty values are omitted from API requests. However, any non-pointer, 6708 // non-interface field appearing in ForceSendFields will be sent to the 6709 // server regardless of whether the field is empty or not. This may be 6710 // used to include empty fields in Patch requests. 6711 ForceSendFields []string `json:"-"` 6712 6713 // NullFields is a list of field names (e.g. "Items") to include in API 6714 // requests with the JSON null value. By default, fields with empty 6715 // values are omitted from API requests. However, any field with an 6716 // empty value appearing in NullFields will be sent to the server as 6717 // null. It is an error if a field in this list has a non-empty value. 6718 // This may be used to include null fields in Patch requests. 6719 NullFields []string `json:"-"` 6720} 6721 6722func (s *OrdersCreateTestReturnRequest) MarshalJSON() ([]byte, error) { 6723 type NoMethod OrdersCreateTestReturnRequest 6724 raw := NoMethod(*s) 6725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6726} 6727 6728type OrdersCreateTestReturnResponse struct { 6729 // Kind: Identifies what kind of resource this is. Value: the fixed 6730 // string "content#ordersCreateTestReturnResponse". 6731 Kind string `json:"kind,omitempty"` 6732 6733 // ReturnId: The ID of the newly created test order return. 6734 ReturnId string `json:"returnId,omitempty"` 6735 6736 // ServerResponse contains the HTTP response code and headers from the 6737 // server. 6738 googleapi.ServerResponse `json:"-"` 6739 6740 // ForceSendFields is a list of field names (e.g. "Kind") to 6741 // unconditionally include in API requests. By default, fields with 6742 // empty values are omitted from API requests. However, any non-pointer, 6743 // non-interface field appearing in ForceSendFields will be sent to the 6744 // server regardless of whether the field is empty or not. This may be 6745 // used to include empty fields in Patch requests. 6746 ForceSendFields []string `json:"-"` 6747 6748 // NullFields is a list of field names (e.g. "Kind") to include in API 6749 // requests with the JSON null value. By default, fields with empty 6750 // values are omitted from API requests. However, any field with an 6751 // empty value appearing in NullFields will be sent to the server as 6752 // null. It is an error if a field in this list has a non-empty value. 6753 // This may be used to include null fields in Patch requests. 6754 NullFields []string `json:"-"` 6755} 6756 6757func (s *OrdersCreateTestReturnResponse) MarshalJSON() ([]byte, error) { 6758 type NoMethod OrdersCreateTestReturnResponse 6759 raw := NoMethod(*s) 6760 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6761} 6762 6763type OrdersCustomBatchRequest struct { 6764 // Entries: The request entries to be processed in the batch. 6765 Entries []*OrdersCustomBatchRequestEntry `json:"entries,omitempty"` 6766 6767 // ForceSendFields is a list of field names (e.g. "Entries") to 6768 // unconditionally include in API requests. By default, fields with 6769 // empty values are omitted from API requests. However, any non-pointer, 6770 // non-interface field appearing in ForceSendFields will be sent to the 6771 // server regardless of whether the field is empty or not. This may be 6772 // used to include empty fields in Patch requests. 6773 ForceSendFields []string `json:"-"` 6774 6775 // NullFields is a list of field names (e.g. "Entries") to include in 6776 // API requests with the JSON null value. By default, fields with empty 6777 // values are omitted from API requests. However, any field with an 6778 // empty value appearing in NullFields will be sent to the server as 6779 // null. It is an error if a field in this list has a non-empty value. 6780 // This may be used to include null fields in Patch requests. 6781 NullFields []string `json:"-"` 6782} 6783 6784func (s *OrdersCustomBatchRequest) MarshalJSON() ([]byte, error) { 6785 type NoMethod OrdersCustomBatchRequest 6786 raw := NoMethod(*s) 6787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6788} 6789 6790type OrdersCustomBatchRequestEntry struct { 6791 // BatchId: An entry ID, unique within the batch request. 6792 BatchId int64 `json:"batchId,omitempty"` 6793 6794 // Cancel: Required for `cancel` method. 6795 Cancel *OrdersCustomBatchRequestEntryCancel `json:"cancel,omitempty"` 6796 6797 // CancelLineItem: Required for `cancelLineItem` method. 6798 CancelLineItem *OrdersCustomBatchRequestEntryCancelLineItem `json:"cancelLineItem,omitempty"` 6799 6800 // InStoreRefundLineItem: Required for `inStoreReturnLineItem` method. 6801 InStoreRefundLineItem *OrdersCustomBatchRequestEntryInStoreRefundLineItem `json:"inStoreRefundLineItem,omitempty"` 6802 6803 // MerchantId: The ID of the managing account. 6804 MerchantId uint64 `json:"merchantId,omitempty,string"` 6805 6806 // MerchantOrderId: The merchant order ID. Required for 6807 // `updateMerchantOrderId` and `getByMerchantOrderId` methods. 6808 MerchantOrderId string `json:"merchantOrderId,omitempty"` 6809 6810 // Method: The method of the batch entry. Acceptable values are: - 6811 // "acknowledge" - "cancel" - "cancelLineItem" - "get" - 6812 // "getByMerchantOrderId" - "inStoreRefundLineItem" - "refund" - 6813 // "rejectReturnLineItem" - "returnLineItem" - 6814 // "returnRefundLineItem" - "setLineItemMetadata" - 6815 // "shipLineItems" - "updateLineItemShippingDetails" - 6816 // "updateMerchantOrderId" - "updateShipment" 6817 Method string `json:"method,omitempty"` 6818 6819 // OperationId: The ID of the operation. Unique across all operations 6820 // for a given order. Required for all methods beside `get` and 6821 // `getByMerchantOrderId`. 6822 OperationId string `json:"operationId,omitempty"` 6823 6824 // OrderId: The ID of the order. Required for all methods beside 6825 // `getByMerchantOrderId`. 6826 OrderId string `json:"orderId,omitempty"` 6827 6828 // Refund: Required for `refund` method. 6829 Refund *OrdersCustomBatchRequestEntryRefund `json:"refund,omitempty"` 6830 6831 // RejectReturnLineItem: Required for `rejectReturnLineItem` method. 6832 RejectReturnLineItem *OrdersCustomBatchRequestEntryRejectReturnLineItem `json:"rejectReturnLineItem,omitempty"` 6833 6834 // ReturnLineItem: Required for `returnLineItem` method. 6835 ReturnLineItem *OrdersCustomBatchRequestEntryReturnLineItem `json:"returnLineItem,omitempty"` 6836 6837 // ReturnRefundLineItem: Required for `returnRefundLineItem` method. 6838 ReturnRefundLineItem *OrdersCustomBatchRequestEntryReturnRefundLineItem `json:"returnRefundLineItem,omitempty"` 6839 6840 // SetLineItemMetadata: Required for `setLineItemMetadata` method. 6841 SetLineItemMetadata *OrdersCustomBatchRequestEntrySetLineItemMetadata `json:"setLineItemMetadata,omitempty"` 6842 6843 // ShipLineItems: Required for `shipLineItems` method. 6844 ShipLineItems *OrdersCustomBatchRequestEntryShipLineItems `json:"shipLineItems,omitempty"` 6845 6846 // UpdateLineItemShippingDetails: Required for 6847 // `updateLineItemShippingDate` method. 6848 UpdateLineItemShippingDetails *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails `json:"updateLineItemShippingDetails,omitempty"` 6849 6850 // UpdateShipment: Required for `updateShipment` method. 6851 UpdateShipment *OrdersCustomBatchRequestEntryUpdateShipment `json:"updateShipment,omitempty"` 6852 6853 // ForceSendFields is a list of field names (e.g. "BatchId") to 6854 // unconditionally include in API requests. By default, fields with 6855 // empty values are omitted from API requests. However, any non-pointer, 6856 // non-interface field appearing in ForceSendFields will be sent to the 6857 // server regardless of whether the field is empty or not. This may be 6858 // used to include empty fields in Patch requests. 6859 ForceSendFields []string `json:"-"` 6860 6861 // NullFields is a list of field names (e.g. "BatchId") to include in 6862 // API requests with the JSON null value. By default, fields with empty 6863 // values are omitted from API requests. However, any field with an 6864 // empty value appearing in NullFields will be sent to the server as 6865 // null. It is an error if a field in this list has a non-empty value. 6866 // This may be used to include null fields in Patch requests. 6867 NullFields []string `json:"-"` 6868} 6869 6870func (s *OrdersCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 6871 type NoMethod OrdersCustomBatchRequestEntry 6872 raw := NoMethod(*s) 6873 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6874} 6875 6876type OrdersCustomBatchRequestEntryCancel struct { 6877 // Reason: The reason for the cancellation. Acceptable values are: - 6878 // "customerInitiatedCancel" - "invalidCoupon" - 6879 // "malformedShippingAddress" - "noInventory" - "other" - 6880 // "priceError" - "shippingPriceError" - "taxError" - 6881 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 6882 Reason string `json:"reason,omitempty"` 6883 6884 // ReasonText: The explanation of the reason. 6885 ReasonText string `json:"reasonText,omitempty"` 6886 6887 // ForceSendFields is a list of field names (e.g. "Reason") to 6888 // unconditionally include in API requests. By default, fields with 6889 // empty values are omitted from API requests. However, any non-pointer, 6890 // non-interface field appearing in ForceSendFields will be sent to the 6891 // server regardless of whether the field is empty or not. This may be 6892 // used to include empty fields in Patch requests. 6893 ForceSendFields []string `json:"-"` 6894 6895 // NullFields is a list of field names (e.g. "Reason") to include in API 6896 // requests with the JSON null value. By default, fields with empty 6897 // values are omitted from API requests. However, any field with an 6898 // empty value appearing in NullFields will be sent to the server as 6899 // null. It is an error if a field in this list has a non-empty value. 6900 // This may be used to include null fields in Patch requests. 6901 NullFields []string `json:"-"` 6902} 6903 6904func (s *OrdersCustomBatchRequestEntryCancel) MarshalJSON() ([]byte, error) { 6905 type NoMethod OrdersCustomBatchRequestEntryCancel 6906 raw := NoMethod(*s) 6907 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6908} 6909 6910type OrdersCustomBatchRequestEntryCancelLineItem struct { 6911 // Amount: Deprecated. Please use amountPretax and amountTax instead. 6912 Amount *Price `json:"amount,omitempty"` 6913 6914 // AmountPretax: Amount to refund for the cancelation. Optional. If not 6915 // set, Google will calculate the default based on the price and tax of 6916 // the items involved. The amount must not be larger than the net amount 6917 // left on the order. 6918 AmountPretax *Price `json:"amountPretax,omitempty"` 6919 6920 // AmountTax: Tax amount that corresponds to cancellation amount in 6921 // amountPretax. Optional, but if filled, then amountPretax must be set. 6922 // Calculated automatically if not provided. 6923 AmountTax *Price `json:"amountTax,omitempty"` 6924 6925 // LineItemId: The ID of the line item to cancel. Either lineItemId or 6926 // productId is required. 6927 LineItemId string `json:"lineItemId,omitempty"` 6928 6929 // ProductId: The ID of the product to cancel. This is the REST ID used 6930 // in the products service. Either lineItemId or productId is required. 6931 ProductId string `json:"productId,omitempty"` 6932 6933 // Quantity: The quantity to cancel. 6934 Quantity int64 `json:"quantity,omitempty"` 6935 6936 // Reason: The reason for the cancellation. Acceptable values are: - 6937 // "customerInitiatedCancel" - "invalidCoupon" - 6938 // "malformedShippingAddress" - "noInventory" - "other" - 6939 // "priceError" - "shippingPriceError" - "taxError" - 6940 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" 6941 Reason string `json:"reason,omitempty"` 6942 6943 // ReasonText: The explanation of the reason. 6944 ReasonText string `json:"reasonText,omitempty"` 6945 6946 // ForceSendFields is a list of field names (e.g. "Amount") to 6947 // unconditionally include in API requests. By default, fields with 6948 // empty values are omitted from API requests. However, any non-pointer, 6949 // non-interface field appearing in ForceSendFields will be sent to the 6950 // server regardless of whether the field is empty or not. This may be 6951 // used to include empty fields in Patch requests. 6952 ForceSendFields []string `json:"-"` 6953 6954 // NullFields is a list of field names (e.g. "Amount") to include in API 6955 // requests with the JSON null value. By default, fields with empty 6956 // values are omitted from API requests. However, any field with an 6957 // empty value appearing in NullFields will be sent to the server as 6958 // null. It is an error if a field in this list has a non-empty value. 6959 // This may be used to include null fields in Patch requests. 6960 NullFields []string `json:"-"` 6961} 6962 6963func (s *OrdersCustomBatchRequestEntryCancelLineItem) MarshalJSON() ([]byte, error) { 6964 type NoMethod OrdersCustomBatchRequestEntryCancelLineItem 6965 raw := NoMethod(*s) 6966 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6967} 6968 6969type OrdersCustomBatchRequestEntryCreateTestReturnReturnItem struct { 6970 // LineItemId: The ID of the line item to return. 6971 LineItemId string `json:"lineItemId,omitempty"` 6972 6973 // Quantity: Quantity that is returned. 6974 Quantity int64 `json:"quantity,omitempty"` 6975 6976 // ForceSendFields is a list of field names (e.g. "LineItemId") to 6977 // unconditionally include in API requests. By default, fields with 6978 // empty values are omitted from API requests. However, any non-pointer, 6979 // non-interface field appearing in ForceSendFields will be sent to the 6980 // server regardless of whether the field is empty or not. This may be 6981 // used to include empty fields in Patch requests. 6982 ForceSendFields []string `json:"-"` 6983 6984 // NullFields is a list of field names (e.g. "LineItemId") to include in 6985 // API requests with the JSON null value. By default, fields with empty 6986 // values are omitted from API requests. However, any field with an 6987 // empty value appearing in NullFields will be sent to the server as 6988 // null. It is an error if a field in this list has a non-empty value. 6989 // This may be used to include null fields in Patch requests. 6990 NullFields []string `json:"-"` 6991} 6992 6993func (s *OrdersCustomBatchRequestEntryCreateTestReturnReturnItem) MarshalJSON() ([]byte, error) { 6994 type NoMethod OrdersCustomBatchRequestEntryCreateTestReturnReturnItem 6995 raw := NoMethod(*s) 6996 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6997} 6998 6999type OrdersCustomBatchRequestEntryInStoreRefundLineItem struct { 7000 // AmountPretax: The amount that is refunded. Required. 7001 AmountPretax *Price `json:"amountPretax,omitempty"` 7002 7003 // AmountTax: Tax amount that correspond to refund amount in 7004 // amountPretax. Required. 7005 AmountTax *Price `json:"amountTax,omitempty"` 7006 7007 // LineItemId: The ID of the line item to return. Either lineItemId or 7008 // productId is required. 7009 LineItemId string `json:"lineItemId,omitempty"` 7010 7011 // ProductId: The ID of the product to return. This is the REST ID used 7012 // in the products service. Either lineItemId or productId is required. 7013 ProductId string `json:"productId,omitempty"` 7014 7015 // Quantity: The quantity to return and refund. 7016 Quantity int64 `json:"quantity,omitempty"` 7017 7018 // Reason: The reason for the return. Acceptable values are: - 7019 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7020 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7021 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7022 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7023 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7024 // "wrongProductShipped" 7025 Reason string `json:"reason,omitempty"` 7026 7027 // ReasonText: The explanation of the reason. 7028 ReasonText string `json:"reasonText,omitempty"` 7029 7030 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 7031 // unconditionally include in API requests. By default, fields with 7032 // empty values are omitted from API requests. However, any non-pointer, 7033 // non-interface field appearing in ForceSendFields will be sent to the 7034 // server regardless of whether the field is empty or not. This may be 7035 // used to include empty fields in Patch requests. 7036 ForceSendFields []string `json:"-"` 7037 7038 // NullFields is a list of field names (e.g. "AmountPretax") to include 7039 // in API requests with the JSON null value. By default, fields with 7040 // empty values are omitted from API requests. However, any field with 7041 // an empty value appearing in NullFields will be sent to the server as 7042 // null. It is an error if a field in this list has a non-empty value. 7043 // This may be used to include null fields in Patch requests. 7044 NullFields []string `json:"-"` 7045} 7046 7047func (s *OrdersCustomBatchRequestEntryInStoreRefundLineItem) MarshalJSON() ([]byte, error) { 7048 type NoMethod OrdersCustomBatchRequestEntryInStoreRefundLineItem 7049 raw := NoMethod(*s) 7050 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7051} 7052 7053type OrdersCustomBatchRequestEntryRefund struct { 7054 // Amount: Deprecated. Please use amountPretax and amountTax instead. 7055 Amount *Price `json:"amount,omitempty"` 7056 7057 // AmountPretax: The amount that is refunded. Either amount or 7058 // amountPretax should be filled. 7059 AmountPretax *Price `json:"amountPretax,omitempty"` 7060 7061 // AmountTax: Tax amount that corresponds to refund amount in 7062 // amountPretax. Optional, but if filled, amountPretax must be set. 7063 // Calculated automatically if not provided. 7064 AmountTax *Price `json:"amountTax,omitempty"` 7065 7066 // Reason: The reason for the refund. Acceptable values are: - 7067 // "adjustment" - "courtesyAdjustment" - "customerCanceled" - 7068 // "customerDiscretionaryReturn" - "deliveredLateByCarrier" - 7069 // "feeAdjustment" - "lateShipmentCredit" - "noInventory" - 7070 // "other" - "priceError" - "productArrivedDamaged" - 7071 // "productNotAsDescribed" - "shippingCostAdjustment" - 7072 // "taxAdjustment" - "undeliverableShippingAddress" - 7073 // "wrongProductShipped" 7074 Reason string `json:"reason,omitempty"` 7075 7076 // ReasonText: The explanation of the reason. 7077 ReasonText string `json:"reasonText,omitempty"` 7078 7079 // ForceSendFields is a list of field names (e.g. "Amount") to 7080 // unconditionally include in API requests. By default, fields with 7081 // empty values are omitted from API requests. However, any non-pointer, 7082 // non-interface field appearing in ForceSendFields will be sent to the 7083 // server regardless of whether the field is empty or not. This may be 7084 // used to include empty fields in Patch requests. 7085 ForceSendFields []string `json:"-"` 7086 7087 // NullFields is a list of field names (e.g. "Amount") to include in API 7088 // requests with the JSON null value. By default, fields with empty 7089 // values are omitted from API requests. However, any field with an 7090 // empty value appearing in NullFields will be sent to the server as 7091 // null. It is an error if a field in this list has a non-empty value. 7092 // This may be used to include null fields in Patch requests. 7093 NullFields []string `json:"-"` 7094} 7095 7096func (s *OrdersCustomBatchRequestEntryRefund) MarshalJSON() ([]byte, error) { 7097 type NoMethod OrdersCustomBatchRequestEntryRefund 7098 raw := NoMethod(*s) 7099 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7100} 7101 7102type OrdersCustomBatchRequestEntryRejectReturnLineItem struct { 7103 // LineItemId: The ID of the line item to return. Either lineItemId or 7104 // productId is required. 7105 LineItemId string `json:"lineItemId,omitempty"` 7106 7107 // ProductId: The ID of the product to return. This is the REST ID used 7108 // in the products service. Either lineItemId or productId is required. 7109 ProductId string `json:"productId,omitempty"` 7110 7111 // Quantity: The quantity to return and refund. 7112 Quantity int64 `json:"quantity,omitempty"` 7113 7114 // Reason: The reason for the return. Acceptable values are: - 7115 // "damagedOrUsed" - "missingComponent" - "notEligible" - 7116 // "other" - "outOfReturnWindow" 7117 Reason string `json:"reason,omitempty"` 7118 7119 // ReasonText: The explanation of the reason. 7120 ReasonText string `json:"reasonText,omitempty"` 7121 7122 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7123 // unconditionally include in API requests. By default, fields with 7124 // empty values are omitted from API requests. However, any non-pointer, 7125 // non-interface field appearing in ForceSendFields will be sent to the 7126 // server regardless of whether the field is empty or not. This may be 7127 // used to include empty fields in Patch requests. 7128 ForceSendFields []string `json:"-"` 7129 7130 // NullFields is a list of field names (e.g. "LineItemId") to include in 7131 // API requests with the JSON null value. By default, fields with empty 7132 // values are omitted from API requests. However, any field with an 7133 // empty value appearing in NullFields will be sent to the server as 7134 // null. It is an error if a field in this list has a non-empty value. 7135 // This may be used to include null fields in Patch requests. 7136 NullFields []string `json:"-"` 7137} 7138 7139func (s *OrdersCustomBatchRequestEntryRejectReturnLineItem) MarshalJSON() ([]byte, error) { 7140 type NoMethod OrdersCustomBatchRequestEntryRejectReturnLineItem 7141 raw := NoMethod(*s) 7142 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7143} 7144 7145type OrdersCustomBatchRequestEntryReturnLineItem struct { 7146 // LineItemId: The ID of the line item to return. Either lineItemId or 7147 // productId is required. 7148 LineItemId string `json:"lineItemId,omitempty"` 7149 7150 // ProductId: The ID of the product to return. This is the REST ID used 7151 // in the products service. Either lineItemId or productId is required. 7152 ProductId string `json:"productId,omitempty"` 7153 7154 // Quantity: The quantity to return. 7155 Quantity int64 `json:"quantity,omitempty"` 7156 7157 // Reason: The reason for the return. Acceptable values are: - 7158 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7159 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7160 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7161 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7162 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7163 // "wrongProductShipped" 7164 Reason string `json:"reason,omitempty"` 7165 7166 // ReasonText: The explanation of the reason. 7167 ReasonText string `json:"reasonText,omitempty"` 7168 7169 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7170 // unconditionally include in API requests. By default, fields with 7171 // empty values are omitted from API requests. However, any non-pointer, 7172 // non-interface field appearing in ForceSendFields will be sent to the 7173 // server regardless of whether the field is empty or not. This may be 7174 // used to include empty fields in Patch requests. 7175 ForceSendFields []string `json:"-"` 7176 7177 // NullFields is a list of field names (e.g. "LineItemId") to include in 7178 // API requests with the JSON null value. By default, fields with empty 7179 // values are omitted from API requests. However, any field with an 7180 // empty value appearing in NullFields will be sent to the server as 7181 // null. It is an error if a field in this list has a non-empty value. 7182 // This may be used to include null fields in Patch requests. 7183 NullFields []string `json:"-"` 7184} 7185 7186func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, error) { 7187 type NoMethod OrdersCustomBatchRequestEntryReturnLineItem 7188 raw := NoMethod(*s) 7189 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7190} 7191 7192type OrdersCustomBatchRequestEntryReturnRefundLineItem struct { 7193 // AmountPretax: The amount that is refunded. If omitted, refundless 7194 // return is assumed (same as calling returnLineItem method). 7195 AmountPretax *Price `json:"amountPretax,omitempty"` 7196 7197 // AmountTax: Tax amount that corresponds to refund amount in 7198 // amountPretax. Optional, but if filled, then amountPretax must be set. 7199 // Calculated automatically if not provided. 7200 AmountTax *Price `json:"amountTax,omitempty"` 7201 7202 // LineItemId: The ID of the line item to return. Either lineItemId or 7203 // productId is required. 7204 LineItemId string `json:"lineItemId,omitempty"` 7205 7206 // ProductId: The ID of the product to return. This is the REST ID used 7207 // in the products service. Either lineItemId or productId is required. 7208 ProductId string `json:"productId,omitempty"` 7209 7210 // Quantity: The quantity to return and refund. 7211 Quantity int64 `json:"quantity,omitempty"` 7212 7213 // Reason: The reason for the return. Acceptable values are: - 7214 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7215 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7216 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7217 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7218 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7219 // "wrongProductShipped" 7220 Reason string `json:"reason,omitempty"` 7221 7222 // ReasonText: The explanation of the reason. 7223 ReasonText string `json:"reasonText,omitempty"` 7224 7225 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 7226 // unconditionally include in API requests. By default, fields with 7227 // empty values are omitted from API requests. However, any non-pointer, 7228 // non-interface field appearing in ForceSendFields will be sent to the 7229 // server regardless of whether the field is empty or not. This may be 7230 // used to include empty fields in Patch requests. 7231 ForceSendFields []string `json:"-"` 7232 7233 // NullFields is a list of field names (e.g. "AmountPretax") to include 7234 // in API requests with the JSON null value. By default, fields with 7235 // empty values are omitted from API requests. However, any field with 7236 // an empty value appearing in NullFields will be sent to the server as 7237 // null. It is an error if a field in this list has a non-empty value. 7238 // This may be used to include null fields in Patch requests. 7239 NullFields []string `json:"-"` 7240} 7241 7242func (s *OrdersCustomBatchRequestEntryReturnRefundLineItem) MarshalJSON() ([]byte, error) { 7243 type NoMethod OrdersCustomBatchRequestEntryReturnRefundLineItem 7244 raw := NoMethod(*s) 7245 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7246} 7247 7248type OrdersCustomBatchRequestEntrySetLineItemMetadata struct { 7249 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 7250 7251 // LineItemId: The ID of the line item to set metadata. Either 7252 // lineItemId or productId is required. 7253 LineItemId string `json:"lineItemId,omitempty"` 7254 7255 // ProductId: The ID of the product to set metadata. This is the REST ID 7256 // used in the products service. Either lineItemId or productId is 7257 // required. 7258 ProductId string `json:"productId,omitempty"` 7259 7260 // ForceSendFields is a list of field names (e.g. "Annotations") to 7261 // unconditionally include in API requests. By default, fields with 7262 // empty values are omitted from API requests. However, any non-pointer, 7263 // non-interface field appearing in ForceSendFields will be sent to the 7264 // server regardless of whether the field is empty or not. This may be 7265 // used to include empty fields in Patch requests. 7266 ForceSendFields []string `json:"-"` 7267 7268 // NullFields is a list of field names (e.g. "Annotations") to include 7269 // in API requests with the JSON null value. By default, fields with 7270 // empty values are omitted from API requests. However, any field with 7271 // an empty value appearing in NullFields will be sent to the server as 7272 // null. It is an error if a field in this list has a non-empty value. 7273 // This may be used to include null fields in Patch requests. 7274 NullFields []string `json:"-"` 7275} 7276 7277func (s *OrdersCustomBatchRequestEntrySetLineItemMetadata) MarshalJSON() ([]byte, error) { 7278 type NoMethod OrdersCustomBatchRequestEntrySetLineItemMetadata 7279 raw := NoMethod(*s) 7280 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7281} 7282 7283type OrdersCustomBatchRequestEntryShipLineItems struct { 7284 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 7285 // handling the shipment. See `shipments[].carrier` in the Orders 7286 // resource representation for a list of acceptable values. 7287 Carrier string `json:"carrier,omitempty"` 7288 7289 // LineItems: Line items to ship. 7290 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 7291 7292 // ShipmentGroupId: ID of the shipment group. Required for orders that 7293 // use the orderinvoices service. 7294 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 7295 7296 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 7297 // the shipment. 7298 ShipmentId string `json:"shipmentId,omitempty"` 7299 7300 // ShipmentInfos: Shipment information. This field is repeated because a 7301 // single line item can be shipped in several packages (and have several 7302 // tracking IDs). 7303 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 7304 7305 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 7306 // ID for the shipment. 7307 TrackingId string `json:"trackingId,omitempty"` 7308 7309 // ForceSendFields is a list of field names (e.g. "Carrier") to 7310 // unconditionally include in API requests. By default, fields with 7311 // empty values are omitted from API requests. However, any non-pointer, 7312 // non-interface field appearing in ForceSendFields will be sent to the 7313 // server regardless of whether the field is empty or not. This may be 7314 // used to include empty fields in Patch requests. 7315 ForceSendFields []string `json:"-"` 7316 7317 // NullFields is a list of field names (e.g. "Carrier") to include in 7318 // API requests with the JSON null value. By default, fields with empty 7319 // values are omitted from API requests. However, any field with an 7320 // empty value appearing in NullFields will be sent to the server as 7321 // null. It is an error if a field in this list has a non-empty value. 7322 // This may be used to include null fields in Patch requests. 7323 NullFields []string `json:"-"` 7324} 7325 7326func (s *OrdersCustomBatchRequestEntryShipLineItems) MarshalJSON() ([]byte, error) { 7327 type NoMethod OrdersCustomBatchRequestEntryShipLineItems 7328 raw := NoMethod(*s) 7329 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7330} 7331 7332type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct { 7333 // Carrier: The carrier handling the shipment. See `shipments[].carrier` 7334 // in the Orders resource representation for a list of acceptable 7335 // values. 7336 Carrier string `json:"carrier,omitempty"` 7337 7338 // ShipmentId: Required. The ID of the shipment. This is assigned by the 7339 // merchant and is unique to each shipment. 7340 ShipmentId string `json:"shipmentId,omitempty"` 7341 7342 // TrackingId: The tracking ID for the shipment. 7343 TrackingId string `json:"trackingId,omitempty"` 7344 7345 // ForceSendFields is a list of field names (e.g. "Carrier") to 7346 // unconditionally include in API requests. By default, fields with 7347 // empty values are omitted from API requests. However, any non-pointer, 7348 // non-interface field appearing in ForceSendFields will be sent to the 7349 // server regardless of whether the field is empty or not. This may be 7350 // used to include empty fields in Patch requests. 7351 ForceSendFields []string `json:"-"` 7352 7353 // NullFields is a list of field names (e.g. "Carrier") to include in 7354 // API requests with the JSON null value. By default, fields with empty 7355 // values are omitted from API requests. However, any field with an 7356 // empty value appearing in NullFields will be sent to the server as 7357 // null. It is an error if a field in this list has a non-empty value. 7358 // This may be used to include null fields in Patch requests. 7359 NullFields []string `json:"-"` 7360} 7361 7362func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) { 7363 type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo 7364 raw := NoMethod(*s) 7365 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7366} 7367 7368type OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails struct { 7369 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 7370 // specified only ship by date is updated. Provided date should be 7371 // within 1 year timeframe and can not be a date in the past. 7372 DeliverByDate string `json:"deliverByDate,omitempty"` 7373 7374 // LineItemId: The ID of the line item to set metadata. Either 7375 // lineItemId or productId is required. 7376 LineItemId string `json:"lineItemId,omitempty"` 7377 7378 // ProductId: The ID of the product to set metadata. This is the REST ID 7379 // used in the products service. Either lineItemId or productId is 7380 // required. 7381 ProductId string `json:"productId,omitempty"` 7382 7383 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 7384 // specified only deliver by date is updated. Provided date should be 7385 // within 1 year timeframe and can not be a date in the past. 7386 ShipByDate string `json:"shipByDate,omitempty"` 7387 7388 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 7389 // unconditionally include in API requests. By default, fields with 7390 // empty values are omitted from API requests. However, any non-pointer, 7391 // non-interface field appearing in ForceSendFields will be sent to the 7392 // server regardless of whether the field is empty or not. This may be 7393 // used to include empty fields in Patch requests. 7394 ForceSendFields []string `json:"-"` 7395 7396 // NullFields is a list of field names (e.g. "DeliverByDate") to include 7397 // in API requests with the JSON null value. By default, fields with 7398 // empty values are omitted from API requests. However, any field with 7399 // an empty value appearing in NullFields will be sent to the server as 7400 // null. It is an error if a field in this list has a non-empty value. 7401 // This may be used to include null fields in Patch requests. 7402 NullFields []string `json:"-"` 7403} 7404 7405func (s *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails) MarshalJSON() ([]byte, error) { 7406 type NoMethod OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails 7407 raw := NoMethod(*s) 7408 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7409} 7410 7411type OrdersCustomBatchRequestEntryUpdateShipment struct { 7412 // Carrier: The carrier handling the shipment. Not updated if missing. 7413 // See `shipments[].carrier` in the Orders resource representation for a 7414 // list of acceptable values. 7415 Carrier string `json:"carrier,omitempty"` 7416 7417 // DeliveryDate: Date on which the shipment has been delivered, in ISO 7418 // 8601 format. Optional and can be provided only if `status` is 7419 // `delivered`. 7420 DeliveryDate string `json:"deliveryDate,omitempty"` 7421 7422 // ShipmentId: The ID of the shipment. 7423 ShipmentId string `json:"shipmentId,omitempty"` 7424 7425 // Status: New status for the shipment. Not updated if missing. 7426 // Acceptable values are: - "delivered" - "undeliverable" - 7427 // "readyForPickup" 7428 Status string `json:"status,omitempty"` 7429 7430 // TrackingId: The tracking ID for the shipment. Not updated if missing. 7431 TrackingId string `json:"trackingId,omitempty"` 7432 7433 // ForceSendFields is a list of field names (e.g. "Carrier") to 7434 // unconditionally include in API requests. By default, fields with 7435 // empty values are omitted from API requests. However, any non-pointer, 7436 // non-interface field appearing in ForceSendFields will be sent to the 7437 // server regardless of whether the field is empty or not. This may be 7438 // used to include empty fields in Patch requests. 7439 ForceSendFields []string `json:"-"` 7440 7441 // NullFields is a list of field names (e.g. "Carrier") to include in 7442 // API requests with the JSON null value. By default, fields with empty 7443 // values are omitted from API requests. However, any field with an 7444 // empty value appearing in NullFields will be sent to the server as 7445 // null. It is an error if a field in this list has a non-empty value. 7446 // This may be used to include null fields in Patch requests. 7447 NullFields []string `json:"-"` 7448} 7449 7450func (s *OrdersCustomBatchRequestEntryUpdateShipment) MarshalJSON() ([]byte, error) { 7451 type NoMethod OrdersCustomBatchRequestEntryUpdateShipment 7452 raw := NoMethod(*s) 7453 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7454} 7455 7456type OrdersCustomBatchResponse struct { 7457 // Entries: The result of the execution of the batch requests. 7458 Entries []*OrdersCustomBatchResponseEntry `json:"entries,omitempty"` 7459 7460 // Kind: Identifies what kind of resource this is. Value: the fixed 7461 // string "content#ordersCustomBatchResponse". 7462 Kind string `json:"kind,omitempty"` 7463 7464 // ServerResponse contains the HTTP response code and headers from the 7465 // server. 7466 googleapi.ServerResponse `json:"-"` 7467 7468 // ForceSendFields is a list of field names (e.g. "Entries") to 7469 // unconditionally include in API requests. By default, fields with 7470 // empty values are omitted from API requests. However, any non-pointer, 7471 // non-interface field appearing in ForceSendFields will be sent to the 7472 // server regardless of whether the field is empty or not. This may be 7473 // used to include empty fields in Patch requests. 7474 ForceSendFields []string `json:"-"` 7475 7476 // NullFields is a list of field names (e.g. "Entries") to include in 7477 // API requests with the JSON null value. By default, fields with empty 7478 // values are omitted from API requests. However, any field with an 7479 // empty value appearing in NullFields will be sent to the server as 7480 // null. It is an error if a field in this list has a non-empty value. 7481 // This may be used to include null fields in Patch requests. 7482 NullFields []string `json:"-"` 7483} 7484 7485func (s *OrdersCustomBatchResponse) MarshalJSON() ([]byte, error) { 7486 type NoMethod OrdersCustomBatchResponse 7487 raw := NoMethod(*s) 7488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7489} 7490 7491type OrdersCustomBatchResponseEntry struct { 7492 // BatchId: The ID of the request entry this entry responds to. 7493 BatchId int64 `json:"batchId,omitempty"` 7494 7495 // Errors: A list of errors defined if and only if the request failed. 7496 Errors *Errors `json:"errors,omitempty"` 7497 7498 // ExecutionStatus: The status of the execution. Only defined if 1. the 7499 // request was successful; and 2. the method is not `get`, 7500 // `getByMerchantOrderId`, or one of the test methods. Acceptable values 7501 // are: - "duplicate" - "executed" 7502 ExecutionStatus string `json:"executionStatus,omitempty"` 7503 7504 // Kind: Identifies what kind of resource this is. Value: the fixed 7505 // string "content#ordersCustomBatchResponseEntry" 7506 Kind string `json:"kind,omitempty"` 7507 7508 // Order: The retrieved order. Only defined if the method is `get` and 7509 // if the request was successful. 7510 Order *Order `json:"order,omitempty"` 7511 7512 // ForceSendFields is a list of field names (e.g. "BatchId") to 7513 // unconditionally include in API requests. By default, fields with 7514 // empty values are omitted from API requests. However, any non-pointer, 7515 // non-interface field appearing in ForceSendFields will be sent to the 7516 // server regardless of whether the field is empty or not. This may be 7517 // used to include empty fields in Patch requests. 7518 ForceSendFields []string `json:"-"` 7519 7520 // NullFields is a list of field names (e.g. "BatchId") to include in 7521 // API requests with the JSON null value. By default, fields with empty 7522 // values are omitted from API requests. However, any field with an 7523 // empty value appearing in NullFields will be sent to the server as 7524 // null. It is an error if a field in this list has a non-empty value. 7525 // This may be used to include null fields in Patch requests. 7526 NullFields []string `json:"-"` 7527} 7528 7529func (s *OrdersCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 7530 type NoMethod OrdersCustomBatchResponseEntry 7531 raw := NoMethod(*s) 7532 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7533} 7534 7535type OrdersGetByMerchantOrderIdResponse struct { 7536 // Kind: Identifies what kind of resource this is. Value: the fixed 7537 // string "content#ordersGetByMerchantOrderIdResponse". 7538 Kind string `json:"kind,omitempty"` 7539 7540 // Order: The requested order. 7541 Order *Order `json:"order,omitempty"` 7542 7543 // ServerResponse contains the HTTP response code and headers from the 7544 // server. 7545 googleapi.ServerResponse `json:"-"` 7546 7547 // ForceSendFields is a list of field names (e.g. "Kind") to 7548 // unconditionally include in API requests. By default, fields with 7549 // empty values are omitted from API requests. However, any non-pointer, 7550 // non-interface field appearing in ForceSendFields will be sent to the 7551 // server regardless of whether the field is empty or not. This may be 7552 // used to include empty fields in Patch requests. 7553 ForceSendFields []string `json:"-"` 7554 7555 // NullFields is a list of field names (e.g. "Kind") to include in API 7556 // requests with the JSON null value. By default, fields with empty 7557 // values are omitted from API requests. However, any field with an 7558 // empty value appearing in NullFields will be sent to the server as 7559 // null. It is an error if a field in this list has a non-empty value. 7560 // This may be used to include null fields in Patch requests. 7561 NullFields []string `json:"-"` 7562} 7563 7564func (s *OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 7565 type NoMethod OrdersGetByMerchantOrderIdResponse 7566 raw := NoMethod(*s) 7567 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7568} 7569 7570type OrdersGetTestOrderTemplateResponse struct { 7571 // Kind: Identifies what kind of resource this is. Value: the fixed 7572 // string "content#ordersGetTestOrderTemplateResponse". 7573 Kind string `json:"kind,omitempty"` 7574 7575 // Template: The requested test order template. 7576 Template *TestOrder `json:"template,omitempty"` 7577 7578 // ServerResponse contains the HTTP response code and headers from the 7579 // server. 7580 googleapi.ServerResponse `json:"-"` 7581 7582 // ForceSendFields is a list of field names (e.g. "Kind") to 7583 // unconditionally include in API requests. By default, fields with 7584 // empty values are omitted from API requests. However, any non-pointer, 7585 // non-interface field appearing in ForceSendFields will be sent to the 7586 // server regardless of whether the field is empty or not. This may be 7587 // used to include empty fields in Patch requests. 7588 ForceSendFields []string `json:"-"` 7589 7590 // NullFields is a list of field names (e.g. "Kind") to include in API 7591 // requests with the JSON null value. By default, fields with empty 7592 // values are omitted from API requests. However, any field with an 7593 // empty value appearing in NullFields will be sent to the server as 7594 // null. It is an error if a field in this list has a non-empty value. 7595 // This may be used to include null fields in Patch requests. 7596 NullFields []string `json:"-"` 7597} 7598 7599func (s *OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) { 7600 type NoMethod OrdersGetTestOrderTemplateResponse 7601 raw := NoMethod(*s) 7602 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7603} 7604 7605type OrdersInStoreRefundLineItemRequest struct { 7606 // AmountPretax: The amount that is refunded. Required. 7607 AmountPretax *Price `json:"amountPretax,omitempty"` 7608 7609 // AmountTax: Tax amount that correspond to refund amount in 7610 // amountPretax. Required. 7611 AmountTax *Price `json:"amountTax,omitempty"` 7612 7613 // LineItemId: The ID of the line item to return. Either lineItemId or 7614 // productId is required. 7615 LineItemId string `json:"lineItemId,omitempty"` 7616 7617 // OperationId: The ID of the operation. Unique across all operations 7618 // for a given order. 7619 OperationId string `json:"operationId,omitempty"` 7620 7621 // ProductId: The ID of the product to return. This is the REST ID used 7622 // in the products service. Either lineItemId or productId is required. 7623 ProductId string `json:"productId,omitempty"` 7624 7625 // Quantity: The quantity to return and refund. 7626 Quantity int64 `json:"quantity,omitempty"` 7627 7628 // Reason: The reason for the return. Acceptable values are: - 7629 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7630 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7631 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7632 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7633 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7634 // "wrongProductShipped" 7635 Reason string `json:"reason,omitempty"` 7636 7637 // ReasonText: The explanation of the reason. 7638 ReasonText string `json:"reasonText,omitempty"` 7639 7640 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 7641 // unconditionally include in API requests. By default, fields with 7642 // empty values are omitted from API requests. However, any non-pointer, 7643 // non-interface field appearing in ForceSendFields will be sent to the 7644 // server regardless of whether the field is empty or not. This may be 7645 // used to include empty fields in Patch requests. 7646 ForceSendFields []string `json:"-"` 7647 7648 // NullFields is a list of field names (e.g. "AmountPretax") to include 7649 // in API requests with the JSON null value. By default, fields with 7650 // empty values are omitted from API requests. However, any field with 7651 // an empty value appearing in NullFields will be sent to the server as 7652 // null. It is an error if a field in this list has a non-empty value. 7653 // This may be used to include null fields in Patch requests. 7654 NullFields []string `json:"-"` 7655} 7656 7657func (s *OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) { 7658 type NoMethod OrdersInStoreRefundLineItemRequest 7659 raw := NoMethod(*s) 7660 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7661} 7662 7663type OrdersInStoreRefundLineItemResponse struct { 7664 // ExecutionStatus: The status of the execution. Acceptable values are: 7665 // - "duplicate" - "executed" 7666 ExecutionStatus string `json:"executionStatus,omitempty"` 7667 7668 // Kind: Identifies what kind of resource this is. Value: the fixed 7669 // string "content#ordersInStoreRefundLineItemResponse". 7670 Kind string `json:"kind,omitempty"` 7671 7672 // ServerResponse contains the HTTP response code and headers from the 7673 // server. 7674 googleapi.ServerResponse `json:"-"` 7675 7676 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 7677 // unconditionally include in API requests. By default, fields with 7678 // empty values are omitted from API requests. However, any non-pointer, 7679 // non-interface field appearing in ForceSendFields will be sent to the 7680 // server regardless of whether the field is empty or not. This may be 7681 // used to include empty fields in Patch requests. 7682 ForceSendFields []string `json:"-"` 7683 7684 // NullFields is a list of field names (e.g. "ExecutionStatus") to 7685 // include in API requests with the JSON null value. By default, fields 7686 // with empty values are omitted from API requests. However, any field 7687 // with an empty value appearing in NullFields will be sent to the 7688 // server as null. It is an error if a field in this list has a 7689 // non-empty value. This may be used to include null fields in Patch 7690 // requests. 7691 NullFields []string `json:"-"` 7692} 7693 7694func (s *OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) { 7695 type NoMethod OrdersInStoreRefundLineItemResponse 7696 raw := NoMethod(*s) 7697 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7698} 7699 7700type OrdersListResponse struct { 7701 // Kind: Identifies what kind of resource this is. Value: the fixed 7702 // string "content#ordersListResponse". 7703 Kind string `json:"kind,omitempty"` 7704 7705 // NextPageToken: The token for the retrieval of the next page of 7706 // orders. 7707 NextPageToken string `json:"nextPageToken,omitempty"` 7708 7709 Resources []*Order `json:"resources,omitempty"` 7710 7711 // ServerResponse contains the HTTP response code and headers from the 7712 // server. 7713 googleapi.ServerResponse `json:"-"` 7714 7715 // ForceSendFields is a list of field names (e.g. "Kind") to 7716 // unconditionally include in API requests. By default, fields with 7717 // empty values are omitted from API requests. However, any non-pointer, 7718 // non-interface field appearing in ForceSendFields will be sent to the 7719 // server regardless of whether the field is empty or not. This may be 7720 // used to include empty fields in Patch requests. 7721 ForceSendFields []string `json:"-"` 7722 7723 // NullFields is a list of field names (e.g. "Kind") to include in API 7724 // requests with the JSON null value. By default, fields with empty 7725 // values are omitted from API requests. However, any field with an 7726 // empty value appearing in NullFields will be sent to the server as 7727 // null. It is an error if a field in this list has a non-empty value. 7728 // This may be used to include null fields in Patch requests. 7729 NullFields []string `json:"-"` 7730} 7731 7732func (s *OrdersListResponse) MarshalJSON() ([]byte, error) { 7733 type NoMethod OrdersListResponse 7734 raw := NoMethod(*s) 7735 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7736} 7737 7738type OrdersRefundRequest struct { 7739 // Amount: Deprecated. Please use amountPretax and amountTax instead. 7740 Amount *Price `json:"amount,omitempty"` 7741 7742 // AmountPretax: The amount that is refunded. Either amount or 7743 // amountPretax should be filled. 7744 AmountPretax *Price `json:"amountPretax,omitempty"` 7745 7746 // AmountTax: Tax amount that corresponds to refund amount in 7747 // amountPretax. Optional, but if filled, amountPretax must be set. 7748 // Calculated automatically if not provided. 7749 AmountTax *Price `json:"amountTax,omitempty"` 7750 7751 // OperationId: The ID of the operation. Unique across all operations 7752 // for a given order. 7753 OperationId string `json:"operationId,omitempty"` 7754 7755 // Reason: The reason for the refund. Acceptable values are: - 7756 // "adjustment" - "courtesyAdjustment" - "customerCanceled" - 7757 // "customerDiscretionaryReturn" - "deliveredLateByCarrier" - 7758 // "feeAdjustment" - "lateShipmentCredit" - "noInventory" - 7759 // "other" - "priceError" - "productArrivedDamaged" - 7760 // "productNotAsDescribed" - "shippingCostAdjustment" - 7761 // "taxAdjustment" - "undeliverableShippingAddress" - 7762 // "wrongProductShipped" 7763 Reason string `json:"reason,omitempty"` 7764 7765 // ReasonText: The explanation of the reason. 7766 ReasonText string `json:"reasonText,omitempty"` 7767 7768 // ForceSendFields is a list of field names (e.g. "Amount") to 7769 // unconditionally include in API requests. By default, fields with 7770 // empty values are omitted from API requests. However, any non-pointer, 7771 // non-interface field appearing in ForceSendFields will be sent to the 7772 // server regardless of whether the field is empty or not. This may be 7773 // used to include empty fields in Patch requests. 7774 ForceSendFields []string `json:"-"` 7775 7776 // NullFields is a list of field names (e.g. "Amount") to include in API 7777 // requests with the JSON null value. By default, fields with empty 7778 // values are omitted from API requests. However, any field with an 7779 // empty value appearing in NullFields will be sent to the server as 7780 // null. It is an error if a field in this list has a non-empty value. 7781 // This may be used to include null fields in Patch requests. 7782 NullFields []string `json:"-"` 7783} 7784 7785func (s *OrdersRefundRequest) MarshalJSON() ([]byte, error) { 7786 type NoMethod OrdersRefundRequest 7787 raw := NoMethod(*s) 7788 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7789} 7790 7791type OrdersRefundResponse struct { 7792 // ExecutionStatus: The status of the execution. Acceptable values are: 7793 // - "duplicate" - "executed" 7794 ExecutionStatus string `json:"executionStatus,omitempty"` 7795 7796 // Kind: Identifies what kind of resource this is. Value: the fixed 7797 // string "content#ordersRefundResponse". 7798 Kind string `json:"kind,omitempty"` 7799 7800 // ServerResponse contains the HTTP response code and headers from the 7801 // server. 7802 googleapi.ServerResponse `json:"-"` 7803 7804 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 7805 // unconditionally include in API requests. By default, fields with 7806 // empty values are omitted from API requests. However, any non-pointer, 7807 // non-interface field appearing in ForceSendFields will be sent to the 7808 // server regardless of whether the field is empty or not. This may be 7809 // used to include empty fields in Patch requests. 7810 ForceSendFields []string `json:"-"` 7811 7812 // NullFields is a list of field names (e.g. "ExecutionStatus") to 7813 // include in API requests with the JSON null value. By default, fields 7814 // with empty values are omitted from API requests. However, any field 7815 // with an empty value appearing in NullFields will be sent to the 7816 // server as null. It is an error if a field in this list has a 7817 // non-empty value. This may be used to include null fields in Patch 7818 // requests. 7819 NullFields []string `json:"-"` 7820} 7821 7822func (s *OrdersRefundResponse) MarshalJSON() ([]byte, error) { 7823 type NoMethod OrdersRefundResponse 7824 raw := NoMethod(*s) 7825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7826} 7827 7828type OrdersRejectReturnLineItemRequest struct { 7829 // LineItemId: The ID of the line item to return. Either lineItemId or 7830 // productId is required. 7831 LineItemId string `json:"lineItemId,omitempty"` 7832 7833 // OperationId: The ID of the operation. Unique across all operations 7834 // for a given order. 7835 OperationId string `json:"operationId,omitempty"` 7836 7837 // ProductId: The ID of the product to return. This is the REST ID used 7838 // in the products service. Either lineItemId or productId is required. 7839 ProductId string `json:"productId,omitempty"` 7840 7841 // Quantity: The quantity to return and refund. 7842 Quantity int64 `json:"quantity,omitempty"` 7843 7844 // Reason: The reason for the return. Acceptable values are: - 7845 // "damagedOrUsed" - "missingComponent" - "notEligible" - 7846 // "other" - "outOfReturnWindow" 7847 Reason string `json:"reason,omitempty"` 7848 7849 // ReasonText: The explanation of the reason. 7850 ReasonText string `json:"reasonText,omitempty"` 7851 7852 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7853 // unconditionally include in API requests. By default, fields with 7854 // empty values are omitted from API requests. However, any non-pointer, 7855 // non-interface field appearing in ForceSendFields will be sent to the 7856 // server regardless of whether the field is empty or not. This may be 7857 // used to include empty fields in Patch requests. 7858 ForceSendFields []string `json:"-"` 7859 7860 // NullFields is a list of field names (e.g. "LineItemId") to include in 7861 // API requests with the JSON null value. By default, fields with empty 7862 // values are omitted from API requests. However, any field with an 7863 // empty value appearing in NullFields will be sent to the server as 7864 // null. It is an error if a field in this list has a non-empty value. 7865 // This may be used to include null fields in Patch requests. 7866 NullFields []string `json:"-"` 7867} 7868 7869func (s *OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) { 7870 type NoMethod OrdersRejectReturnLineItemRequest 7871 raw := NoMethod(*s) 7872 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7873} 7874 7875type OrdersRejectReturnLineItemResponse struct { 7876 // ExecutionStatus: The status of the execution. Acceptable values are: 7877 // - "duplicate" - "executed" 7878 ExecutionStatus string `json:"executionStatus,omitempty"` 7879 7880 // Kind: Identifies what kind of resource this is. Value: the fixed 7881 // string "content#ordersRejectReturnLineItemResponse". 7882 Kind string `json:"kind,omitempty"` 7883 7884 // ServerResponse contains the HTTP response code and headers from the 7885 // server. 7886 googleapi.ServerResponse `json:"-"` 7887 7888 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 7889 // unconditionally include in API requests. By default, fields with 7890 // empty values are omitted from API requests. However, any non-pointer, 7891 // non-interface field appearing in ForceSendFields will be sent to the 7892 // server regardless of whether the field is empty or not. This may be 7893 // used to include empty fields in Patch requests. 7894 ForceSendFields []string `json:"-"` 7895 7896 // NullFields is a list of field names (e.g. "ExecutionStatus") to 7897 // include in API requests with the JSON null value. By default, fields 7898 // with empty values are omitted from API requests. However, any field 7899 // with an empty value appearing in NullFields will be sent to the 7900 // server as null. It is an error if a field in this list has a 7901 // non-empty value. This may be used to include null fields in Patch 7902 // requests. 7903 NullFields []string `json:"-"` 7904} 7905 7906func (s *OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) { 7907 type NoMethod OrdersRejectReturnLineItemResponse 7908 raw := NoMethod(*s) 7909 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7910} 7911 7912type OrdersReturnLineItemRequest struct { 7913 // LineItemId: The ID of the line item to return. Either lineItemId or 7914 // productId is required. 7915 LineItemId string `json:"lineItemId,omitempty"` 7916 7917 // OperationId: The ID of the operation. Unique across all operations 7918 // for a given order. 7919 OperationId string `json:"operationId,omitempty"` 7920 7921 // ProductId: The ID of the product to return. This is the REST ID used 7922 // in the products service. Either lineItemId or productId is required. 7923 ProductId string `json:"productId,omitempty"` 7924 7925 // Quantity: The quantity to return. 7926 Quantity int64 `json:"quantity,omitempty"` 7927 7928 // Reason: The reason for the return. Acceptable values are: - 7929 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 7930 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 7931 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 7932 // - "productNotAsDescribed" - "qualityNotAsExpected" - 7933 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 7934 // "wrongProductShipped" 7935 Reason string `json:"reason,omitempty"` 7936 7937 // ReasonText: The explanation of the reason. 7938 ReasonText string `json:"reasonText,omitempty"` 7939 7940 // ForceSendFields is a list of field names (e.g. "LineItemId") to 7941 // unconditionally include in API requests. By default, fields with 7942 // empty values are omitted from API requests. However, any non-pointer, 7943 // non-interface field appearing in ForceSendFields will be sent to the 7944 // server regardless of whether the field is empty or not. This may be 7945 // used to include empty fields in Patch requests. 7946 ForceSendFields []string `json:"-"` 7947 7948 // NullFields is a list of field names (e.g. "LineItemId") to include in 7949 // API requests with the JSON null value. By default, fields with empty 7950 // values are omitted from API requests. However, any field with an 7951 // empty value appearing in NullFields will be sent to the server as 7952 // null. It is an error if a field in this list has a non-empty value. 7953 // This may be used to include null fields in Patch requests. 7954 NullFields []string `json:"-"` 7955} 7956 7957func (s *OrdersReturnLineItemRequest) MarshalJSON() ([]byte, error) { 7958 type NoMethod OrdersReturnLineItemRequest 7959 raw := NoMethod(*s) 7960 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7961} 7962 7963type OrdersReturnLineItemResponse struct { 7964 // ExecutionStatus: The status of the execution. Acceptable values are: 7965 // - "duplicate" - "executed" 7966 ExecutionStatus string `json:"executionStatus,omitempty"` 7967 7968 // Kind: Identifies what kind of resource this is. Value: the fixed 7969 // string "content#ordersReturnLineItemResponse". 7970 Kind string `json:"kind,omitempty"` 7971 7972 // ServerResponse contains the HTTP response code and headers from the 7973 // server. 7974 googleapi.ServerResponse `json:"-"` 7975 7976 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 7977 // unconditionally include in API requests. By default, fields with 7978 // empty values are omitted from API requests. However, any non-pointer, 7979 // non-interface field appearing in ForceSendFields will be sent to the 7980 // server regardless of whether the field is empty or not. This may be 7981 // used to include empty fields in Patch requests. 7982 ForceSendFields []string `json:"-"` 7983 7984 // NullFields is a list of field names (e.g. "ExecutionStatus") to 7985 // include in API requests with the JSON null value. By default, fields 7986 // with empty values are omitted from API requests. However, any field 7987 // with an empty value appearing in NullFields will be sent to the 7988 // server as null. It is an error if a field in this list has a 7989 // non-empty value. This may be used to include null fields in Patch 7990 // requests. 7991 NullFields []string `json:"-"` 7992} 7993 7994func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) { 7995 type NoMethod OrdersReturnLineItemResponse 7996 raw := NoMethod(*s) 7997 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7998} 7999 8000type OrdersReturnRefundLineItemRequest struct { 8001 // AmountPretax: The amount that is refunded. If omitted, refundless 8002 // return is assumed (same as calling returnLineItem method). 8003 AmountPretax *Price `json:"amountPretax,omitempty"` 8004 8005 // AmountTax: Tax amount that corresponds to refund amount in 8006 // amountPretax. Optional, but if filled, then amountPretax must be set. 8007 // Calculated automatically if not provided. 8008 AmountTax *Price `json:"amountTax,omitempty"` 8009 8010 // LineItemId: The ID of the line item to return. Either lineItemId or 8011 // productId is required. 8012 LineItemId string `json:"lineItemId,omitempty"` 8013 8014 // OperationId: The ID of the operation. Unique across all operations 8015 // for a given order. 8016 OperationId string `json:"operationId,omitempty"` 8017 8018 // ProductId: The ID of the product to return. This is the REST ID used 8019 // in the products service. Either lineItemId or productId is required. 8020 ProductId string `json:"productId,omitempty"` 8021 8022 // Quantity: The quantity to return and refund. Quantity is required. 8023 Quantity int64 `json:"quantity,omitempty"` 8024 8025 // Reason: The reason for the return. Acceptable values are: - 8026 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 8027 // - "deliveredTooLate" - "expiredItem" - "invalidCoupon" - 8028 // "malformedShippingAddress" - "other" - "productArrivedDamaged" 8029 // - "productNotAsDescribed" - "qualityNotAsExpected" - 8030 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 8031 // "wrongProductShipped" 8032 Reason string `json:"reason,omitempty"` 8033 8034 // ReasonText: The explanation of the reason. 8035 ReasonText string `json:"reasonText,omitempty"` 8036 8037 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 8038 // unconditionally include in API requests. By default, fields with 8039 // empty values are omitted from API requests. However, any non-pointer, 8040 // non-interface field appearing in ForceSendFields will be sent to the 8041 // server regardless of whether the field is empty or not. This may be 8042 // used to include empty fields in Patch requests. 8043 ForceSendFields []string `json:"-"` 8044 8045 // NullFields is a list of field names (e.g. "AmountPretax") to include 8046 // in API requests with the JSON null value. By default, fields with 8047 // empty values are omitted from API requests. However, any field with 8048 // an empty value appearing in NullFields will be sent to the server as 8049 // null. It is an error if a field in this list has a non-empty value. 8050 // This may be used to include null fields in Patch requests. 8051 NullFields []string `json:"-"` 8052} 8053 8054func (s *OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) { 8055 type NoMethod OrdersReturnRefundLineItemRequest 8056 raw := NoMethod(*s) 8057 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8058} 8059 8060type OrdersReturnRefundLineItemResponse struct { 8061 // ExecutionStatus: The status of the execution. Acceptable values are: 8062 // - "duplicate" - "executed" 8063 ExecutionStatus string `json:"executionStatus,omitempty"` 8064 8065 // Kind: Identifies what kind of resource this is. Value: the fixed 8066 // string "content#ordersReturnRefundLineItemResponse". 8067 Kind string `json:"kind,omitempty"` 8068 8069 // ServerResponse contains the HTTP response code and headers from the 8070 // server. 8071 googleapi.ServerResponse `json:"-"` 8072 8073 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8074 // unconditionally include in API requests. By default, fields with 8075 // empty values are omitted from API requests. However, any non-pointer, 8076 // non-interface field appearing in ForceSendFields will be sent to the 8077 // server regardless of whether the field is empty or not. This may be 8078 // used to include empty fields in Patch requests. 8079 ForceSendFields []string `json:"-"` 8080 8081 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8082 // include in API requests with the JSON null value. By default, fields 8083 // with empty values are omitted from API requests. However, any field 8084 // with an empty value appearing in NullFields will be sent to the 8085 // server as null. It is an error if a field in this list has a 8086 // non-empty value. This may be used to include null fields in Patch 8087 // requests. 8088 NullFields []string `json:"-"` 8089} 8090 8091func (s *OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) { 8092 type NoMethod OrdersReturnRefundLineItemResponse 8093 raw := NoMethod(*s) 8094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8095} 8096 8097type OrdersSetLineItemMetadataRequest struct { 8098 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 8099 8100 // LineItemId: The ID of the line item to set metadata. Either 8101 // lineItemId or productId is required. 8102 LineItemId string `json:"lineItemId,omitempty"` 8103 8104 // OperationId: The ID of the operation. Unique across all operations 8105 // for a given order. 8106 OperationId string `json:"operationId,omitempty"` 8107 8108 // ProductId: The ID of the product to set metadata. This is the REST ID 8109 // used in the products service. Either lineItemId or productId is 8110 // required. 8111 ProductId string `json:"productId,omitempty"` 8112 8113 // ForceSendFields is a list of field names (e.g. "Annotations") to 8114 // unconditionally include in API requests. By default, fields with 8115 // empty values are omitted from API requests. However, any non-pointer, 8116 // non-interface field appearing in ForceSendFields will be sent to the 8117 // server regardless of whether the field is empty or not. This may be 8118 // used to include empty fields in Patch requests. 8119 ForceSendFields []string `json:"-"` 8120 8121 // NullFields is a list of field names (e.g. "Annotations") to include 8122 // in API requests with the JSON null value. By default, fields with 8123 // empty values are omitted from API requests. However, any field with 8124 // an empty value appearing in NullFields will be sent to the server as 8125 // null. It is an error if a field in this list has a non-empty value. 8126 // This may be used to include null fields in Patch requests. 8127 NullFields []string `json:"-"` 8128} 8129 8130func (s *OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) { 8131 type NoMethod OrdersSetLineItemMetadataRequest 8132 raw := NoMethod(*s) 8133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8134} 8135 8136type OrdersSetLineItemMetadataResponse struct { 8137 // ExecutionStatus: The status of the execution. Acceptable values are: 8138 // - "duplicate" - "executed" 8139 ExecutionStatus string `json:"executionStatus,omitempty"` 8140 8141 // Kind: Identifies what kind of resource this is. Value: the fixed 8142 // string "content#ordersSetLineItemMetadataResponse". 8143 Kind string `json:"kind,omitempty"` 8144 8145 // ServerResponse contains the HTTP response code and headers from the 8146 // server. 8147 googleapi.ServerResponse `json:"-"` 8148 8149 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8150 // unconditionally include in API requests. By default, fields with 8151 // empty values are omitted from API requests. However, any non-pointer, 8152 // non-interface field appearing in ForceSendFields will be sent to the 8153 // server regardless of whether the field is empty or not. This may be 8154 // used to include empty fields in Patch requests. 8155 ForceSendFields []string `json:"-"` 8156 8157 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8158 // include in API requests with the JSON null value. By default, fields 8159 // with empty values are omitted from API requests. However, any field 8160 // with an empty value appearing in NullFields will be sent to the 8161 // server as null. It is an error if a field in this list has a 8162 // non-empty value. This may be used to include null fields in Patch 8163 // requests. 8164 NullFields []string `json:"-"` 8165} 8166 8167func (s *OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) { 8168 type NoMethod OrdersSetLineItemMetadataResponse 8169 raw := NoMethod(*s) 8170 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8171} 8172 8173type OrdersShipLineItemsRequest struct { 8174 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 8175 // handling the shipment. See `shipments[].carrier` in the Orders 8176 // resource representation for a list of acceptable values. 8177 Carrier string `json:"carrier,omitempty"` 8178 8179 // LineItems: Line items to ship. 8180 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 8181 8182 // OperationId: The ID of the operation. Unique across all operations 8183 // for a given order. 8184 OperationId string `json:"operationId,omitempty"` 8185 8186 // ShipmentGroupId: ID of the shipment group. Required for orders that 8187 // use the orderinvoices service. 8188 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 8189 8190 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 8191 // the shipment. 8192 ShipmentId string `json:"shipmentId,omitempty"` 8193 8194 // ShipmentInfos: Shipment information. This field is repeated because a 8195 // single line item can be shipped in several packages (and have several 8196 // tracking IDs). 8197 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 8198 8199 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 8200 // ID for the shipment. 8201 TrackingId string `json:"trackingId,omitempty"` 8202 8203 // ForceSendFields is a list of field names (e.g. "Carrier") to 8204 // unconditionally include in API requests. By default, fields with 8205 // empty values are omitted from API requests. However, any non-pointer, 8206 // non-interface field appearing in ForceSendFields will be sent to the 8207 // server regardless of whether the field is empty or not. This may be 8208 // used to include empty fields in Patch requests. 8209 ForceSendFields []string `json:"-"` 8210 8211 // NullFields is a list of field names (e.g. "Carrier") to include in 8212 // API requests with the JSON null value. By default, fields with empty 8213 // values are omitted from API requests. However, any field with an 8214 // empty value appearing in NullFields will be sent to the server as 8215 // null. It is an error if a field in this list has a non-empty value. 8216 // This may be used to include null fields in Patch requests. 8217 NullFields []string `json:"-"` 8218} 8219 8220func (s *OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) { 8221 type NoMethod OrdersShipLineItemsRequest 8222 raw := NoMethod(*s) 8223 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8224} 8225 8226type OrdersShipLineItemsResponse struct { 8227 // ExecutionStatus: The status of the execution. Acceptable values are: 8228 // - "duplicate" - "executed" 8229 ExecutionStatus string `json:"executionStatus,omitempty"` 8230 8231 // Kind: Identifies what kind of resource this is. Value: the fixed 8232 // string "content#ordersShipLineItemsResponse". 8233 Kind string `json:"kind,omitempty"` 8234 8235 // ServerResponse contains the HTTP response code and headers from the 8236 // server. 8237 googleapi.ServerResponse `json:"-"` 8238 8239 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8240 // unconditionally include in API requests. By default, fields with 8241 // empty values are omitted from API requests. However, any non-pointer, 8242 // non-interface field appearing in ForceSendFields will be sent to the 8243 // server regardless of whether the field is empty or not. This may be 8244 // used to include empty fields in Patch requests. 8245 ForceSendFields []string `json:"-"` 8246 8247 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8248 // include in API requests with the JSON null value. By default, fields 8249 // with empty values are omitted from API requests. However, any field 8250 // with an empty value appearing in NullFields will be sent to the 8251 // server as null. It is an error if a field in this list has a 8252 // non-empty value. This may be used to include null fields in Patch 8253 // requests. 8254 NullFields []string `json:"-"` 8255} 8256 8257func (s *OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) { 8258 type NoMethod OrdersShipLineItemsResponse 8259 raw := NoMethod(*s) 8260 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8261} 8262 8263type OrdersUpdateLineItemShippingDetailsRequest struct { 8264 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 8265 // specified only ship by date is updated. Provided date should be 8266 // within 1 year timeframe and can not be a date in the past. 8267 DeliverByDate string `json:"deliverByDate,omitempty"` 8268 8269 // LineItemId: The ID of the line item to set metadata. Either 8270 // lineItemId or productId is required. 8271 LineItemId string `json:"lineItemId,omitempty"` 8272 8273 // OperationId: The ID of the operation. Unique across all operations 8274 // for a given order. 8275 OperationId string `json:"operationId,omitempty"` 8276 8277 // ProductId: The ID of the product to set metadata. This is the REST ID 8278 // used in the products service. Either lineItemId or productId is 8279 // required. 8280 ProductId string `json:"productId,omitempty"` 8281 8282 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 8283 // specified only deliver by date is updated. Provided date should be 8284 // within 1 year timeframe and can not be a date in the past. 8285 ShipByDate string `json:"shipByDate,omitempty"` 8286 8287 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 8288 // unconditionally include in API requests. By default, fields with 8289 // empty values are omitted from API requests. However, any non-pointer, 8290 // non-interface field appearing in ForceSendFields will be sent to the 8291 // server regardless of whether the field is empty or not. This may be 8292 // used to include empty fields in Patch requests. 8293 ForceSendFields []string `json:"-"` 8294 8295 // NullFields is a list of field names (e.g. "DeliverByDate") to include 8296 // in API requests with the JSON null value. By default, fields with 8297 // empty values are omitted from API requests. However, any field with 8298 // an empty value appearing in NullFields will be sent to the server as 8299 // null. It is an error if a field in this list has a non-empty value. 8300 // This may be used to include null fields in Patch requests. 8301 NullFields []string `json:"-"` 8302} 8303 8304func (s *OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) { 8305 type NoMethod OrdersUpdateLineItemShippingDetailsRequest 8306 raw := NoMethod(*s) 8307 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8308} 8309 8310type OrdersUpdateLineItemShippingDetailsResponse struct { 8311 // ExecutionStatus: The status of the execution. Acceptable values are: 8312 // - "duplicate" - "executed" 8313 ExecutionStatus string `json:"executionStatus,omitempty"` 8314 8315 // Kind: Identifies what kind of resource this is. Value: the fixed 8316 // string "content#ordersUpdateLineItemShippingDetailsResponse". 8317 Kind string `json:"kind,omitempty"` 8318 8319 // ServerResponse contains the HTTP response code and headers from the 8320 // server. 8321 googleapi.ServerResponse `json:"-"` 8322 8323 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8324 // unconditionally include in API requests. By default, fields with 8325 // empty values are omitted from API requests. However, any non-pointer, 8326 // non-interface field appearing in ForceSendFields will be sent to the 8327 // server regardless of whether the field is empty or not. This may be 8328 // used to include empty fields in Patch requests. 8329 ForceSendFields []string `json:"-"` 8330 8331 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8332 // include in API requests with the JSON null value. By default, fields 8333 // with empty values are omitted from API requests. However, any field 8334 // with an empty value appearing in NullFields will be sent to the 8335 // server as null. It is an error if a field in this list has a 8336 // non-empty value. This may be used to include null fields in Patch 8337 // requests. 8338 NullFields []string `json:"-"` 8339} 8340 8341func (s *OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) { 8342 type NoMethod OrdersUpdateLineItemShippingDetailsResponse 8343 raw := NoMethod(*s) 8344 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8345} 8346 8347type OrdersUpdateMerchantOrderIdRequest struct { 8348 // MerchantOrderId: The merchant order id to be assigned to the order. 8349 // Must be unique per merchant. 8350 MerchantOrderId string `json:"merchantOrderId,omitempty"` 8351 8352 // OperationId: The ID of the operation. Unique across all operations 8353 // for a given order. 8354 OperationId string `json:"operationId,omitempty"` 8355 8356 // ForceSendFields is a list of field names (e.g. "MerchantOrderId") to 8357 // unconditionally include in API requests. By default, fields with 8358 // empty values are omitted from API requests. However, any non-pointer, 8359 // non-interface field appearing in ForceSendFields will be sent to the 8360 // server regardless of whether the field is empty or not. This may be 8361 // used to include empty fields in Patch requests. 8362 ForceSendFields []string `json:"-"` 8363 8364 // NullFields is a list of field names (e.g. "MerchantOrderId") to 8365 // include in API requests with the JSON null value. By default, fields 8366 // with empty values are omitted from API requests. However, any field 8367 // with an empty value appearing in NullFields will be sent to the 8368 // server as null. It is an error if a field in this list has a 8369 // non-empty value. This may be used to include null fields in Patch 8370 // requests. 8371 NullFields []string `json:"-"` 8372} 8373 8374func (s *OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) { 8375 type NoMethod OrdersUpdateMerchantOrderIdRequest 8376 raw := NoMethod(*s) 8377 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8378} 8379 8380type OrdersUpdateMerchantOrderIdResponse struct { 8381 // ExecutionStatus: The status of the execution. Acceptable values are: 8382 // - "duplicate" - "executed" 8383 ExecutionStatus string `json:"executionStatus,omitempty"` 8384 8385 // Kind: Identifies what kind of resource this is. Value: the fixed 8386 // string "content#ordersUpdateMerchantOrderIdResponse". 8387 Kind string `json:"kind,omitempty"` 8388 8389 // ServerResponse contains the HTTP response code and headers from the 8390 // server. 8391 googleapi.ServerResponse `json:"-"` 8392 8393 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8394 // unconditionally include in API requests. By default, fields with 8395 // empty values are omitted from API requests. However, any non-pointer, 8396 // non-interface field appearing in ForceSendFields will be sent to the 8397 // server regardless of whether the field is empty or not. This may be 8398 // used to include empty fields in Patch requests. 8399 ForceSendFields []string `json:"-"` 8400 8401 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8402 // include in API requests with the JSON null value. By default, fields 8403 // with empty values are omitted from API requests. However, any field 8404 // with an empty value appearing in NullFields will be sent to the 8405 // server as null. It is an error if a field in this list has a 8406 // non-empty value. This may be used to include null fields in Patch 8407 // requests. 8408 NullFields []string `json:"-"` 8409} 8410 8411func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 8412 type NoMethod OrdersUpdateMerchantOrderIdResponse 8413 raw := NoMethod(*s) 8414 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8415} 8416 8417type OrdersUpdateShipmentRequest struct { 8418 // Carrier: The carrier handling the shipment. Not updated if missing. 8419 // See `shipments[].carrier` in the Orders resource representation for a 8420 // list of acceptable values. 8421 Carrier string `json:"carrier,omitempty"` 8422 8423 // DeliveryDate: Date on which the shipment has been delivered, in ISO 8424 // 8601 format. Optional and can be provided only if `status` is 8425 // `delivered`. 8426 DeliveryDate string `json:"deliveryDate,omitempty"` 8427 8428 // OperationId: The ID of the operation. Unique across all operations 8429 // for a given order. 8430 OperationId string `json:"operationId,omitempty"` 8431 8432 // ShipmentId: The ID of the shipment. 8433 ShipmentId string `json:"shipmentId,omitempty"` 8434 8435 // Status: New status for the shipment. Not updated if missing. 8436 // Acceptable values are: - "delivered" - "undeliverable" - 8437 // "readyForPickup" 8438 Status string `json:"status,omitempty"` 8439 8440 // TrackingId: The tracking ID for the shipment. Not updated if missing. 8441 TrackingId string `json:"trackingId,omitempty"` 8442 8443 // ForceSendFields is a list of field names (e.g. "Carrier") to 8444 // unconditionally include in API requests. By default, fields with 8445 // empty values are omitted from API requests. However, any non-pointer, 8446 // non-interface field appearing in ForceSendFields will be sent to the 8447 // server regardless of whether the field is empty or not. This may be 8448 // used to include empty fields in Patch requests. 8449 ForceSendFields []string `json:"-"` 8450 8451 // NullFields is a list of field names (e.g. "Carrier") to include in 8452 // API requests with the JSON null value. By default, fields with empty 8453 // values are omitted from API requests. However, any field with an 8454 // empty value appearing in NullFields will be sent to the server as 8455 // null. It is an error if a field in this list has a non-empty value. 8456 // This may be used to include null fields in Patch requests. 8457 NullFields []string `json:"-"` 8458} 8459 8460func (s *OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) { 8461 type NoMethod OrdersUpdateShipmentRequest 8462 raw := NoMethod(*s) 8463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8464} 8465 8466type OrdersUpdateShipmentResponse struct { 8467 // ExecutionStatus: The status of the execution. Acceptable values are: 8468 // - "duplicate" - "executed" 8469 ExecutionStatus string `json:"executionStatus,omitempty"` 8470 8471 // Kind: Identifies what kind of resource this is. Value: the fixed 8472 // string "content#ordersUpdateShipmentResponse". 8473 Kind string `json:"kind,omitempty"` 8474 8475 // ServerResponse contains the HTTP response code and headers from the 8476 // server. 8477 googleapi.ServerResponse `json:"-"` 8478 8479 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 8480 // unconditionally include in API requests. By default, fields with 8481 // empty values are omitted from API requests. However, any non-pointer, 8482 // non-interface field appearing in ForceSendFields will be sent to the 8483 // server regardless of whether the field is empty or not. This may be 8484 // used to include empty fields in Patch requests. 8485 ForceSendFields []string `json:"-"` 8486 8487 // NullFields is a list of field names (e.g. "ExecutionStatus") to 8488 // include in API requests with the JSON null value. By default, fields 8489 // with empty values are omitted from API requests. However, any field 8490 // with an empty value appearing in NullFields will be sent to the 8491 // server as null. It is an error if a field in this list has a 8492 // non-empty value. This may be used to include null fields in Patch 8493 // requests. 8494 NullFields []string `json:"-"` 8495} 8496 8497func (s *OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) { 8498 type NoMethod OrdersUpdateShipmentResponse 8499 raw := NoMethod(*s) 8500 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8501} 8502 8503type PickupCarrierService struct { 8504 // CarrierName: The name of the pickup carrier (e.g., "UPS"). 8505 // Required. 8506 CarrierName string `json:"carrierName,omitempty"` 8507 8508 // ServiceName: The name of the pickup service (e.g., "Access point"). 8509 // Required. 8510 ServiceName string `json:"serviceName,omitempty"` 8511 8512 // ForceSendFields is a list of field names (e.g. "CarrierName") to 8513 // unconditionally include in API requests. By default, fields with 8514 // empty values are omitted from API requests. However, any non-pointer, 8515 // non-interface field appearing in ForceSendFields will be sent to the 8516 // server regardless of whether the field is empty or not. This may be 8517 // used to include empty fields in Patch requests. 8518 ForceSendFields []string `json:"-"` 8519 8520 // NullFields is a list of field names (e.g. "CarrierName") to include 8521 // in API requests with the JSON null value. By default, fields with 8522 // empty values are omitted from API requests. However, any field with 8523 // an empty value appearing in NullFields will be sent to the server as 8524 // null. It is an error if a field in this list has a non-empty value. 8525 // This may be used to include null fields in Patch requests. 8526 NullFields []string `json:"-"` 8527} 8528 8529func (s *PickupCarrierService) MarshalJSON() ([]byte, error) { 8530 type NoMethod PickupCarrierService 8531 raw := NoMethod(*s) 8532 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8533} 8534 8535type PickupServicesPickupService struct { 8536 // CarrierName: The name of the carrier (e.g., "UPS"). Always present. 8537 CarrierName string `json:"carrierName,omitempty"` 8538 8539 // Country: The CLDR country code of the carrier (e.g., "US"). Always 8540 // present. 8541 Country string `json:"country,omitempty"` 8542 8543 // ServiceName: The name of the pickup service (e.g., "Access point"). 8544 // Always present. 8545 ServiceName string `json:"serviceName,omitempty"` 8546 8547 // ForceSendFields is a list of field names (e.g. "CarrierName") to 8548 // unconditionally include in API requests. By default, fields with 8549 // empty values are omitted from API requests. However, any non-pointer, 8550 // non-interface field appearing in ForceSendFields will be sent to the 8551 // server regardless of whether the field is empty or not. This may be 8552 // used to include empty fields in Patch requests. 8553 ForceSendFields []string `json:"-"` 8554 8555 // NullFields is a list of field names (e.g. "CarrierName") to include 8556 // in API requests with the JSON null value. By default, fields with 8557 // empty values are omitted from API requests. However, any field with 8558 // an empty value appearing in NullFields will be sent to the server as 8559 // null. It is an error if a field in this list has a non-empty value. 8560 // This may be used to include null fields in Patch requests. 8561 NullFields []string `json:"-"` 8562} 8563 8564func (s *PickupServicesPickupService) MarshalJSON() ([]byte, error) { 8565 type NoMethod PickupServicesPickupService 8566 raw := NoMethod(*s) 8567 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8568} 8569 8570type PosCustomBatchRequest struct { 8571 // Entries: The request entries to be processed in the batch. 8572 Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"` 8573 8574 // ForceSendFields is a list of field names (e.g. "Entries") to 8575 // unconditionally include in API requests. By default, fields with 8576 // empty values are omitted from API requests. However, any non-pointer, 8577 // non-interface field appearing in ForceSendFields will be sent to the 8578 // server regardless of whether the field is empty or not. This may be 8579 // used to include empty fields in Patch requests. 8580 ForceSendFields []string `json:"-"` 8581 8582 // NullFields is a list of field names (e.g. "Entries") to include in 8583 // API requests with the JSON null value. By default, fields with empty 8584 // values are omitted from API requests. However, any field with an 8585 // empty value appearing in NullFields will be sent to the server as 8586 // null. It is an error if a field in this list has a non-empty value. 8587 // This may be used to include null fields in Patch requests. 8588 NullFields []string `json:"-"` 8589} 8590 8591func (s *PosCustomBatchRequest) MarshalJSON() ([]byte, error) { 8592 type NoMethod PosCustomBatchRequest 8593 raw := NoMethod(*s) 8594 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8595} 8596 8597type PosCustomBatchRequestEntry struct { 8598 // BatchId: An entry ID, unique within the batch request. 8599 BatchId int64 `json:"batchId,omitempty"` 8600 8601 // Inventory: The inventory to submit. This should be set only if the 8602 // method is `inventory`. 8603 Inventory *PosInventory `json:"inventory,omitempty"` 8604 8605 // MerchantId: The ID of the POS data provider. 8606 MerchantId uint64 `json:"merchantId,omitempty,string"` 8607 8608 // Method: The method of the batch entry. Acceptable values are: - 8609 // "delete" - "get" - "insert" - "inventory" - "sale" 8610 Method string `json:"method,omitempty"` 8611 8612 // Sale: The sale information to submit. This should be set only if the 8613 // method is `sale`. 8614 Sale *PosSale `json:"sale,omitempty"` 8615 8616 // Store: The store information to submit. This should be set only if 8617 // the method is `insert`. 8618 Store *PosStore `json:"store,omitempty"` 8619 8620 // StoreCode: The store code. This should be set only if the method is 8621 // `delete` or `get`. 8622 StoreCode string `json:"storeCode,omitempty"` 8623 8624 // TargetMerchantId: The ID of the account for which to get/submit data. 8625 TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"` 8626 8627 // ForceSendFields is a list of field names (e.g. "BatchId") to 8628 // unconditionally include in API requests. By default, fields with 8629 // empty values are omitted from API requests. However, any non-pointer, 8630 // non-interface field appearing in ForceSendFields will be sent to the 8631 // server regardless of whether the field is empty or not. This may be 8632 // used to include empty fields in Patch requests. 8633 ForceSendFields []string `json:"-"` 8634 8635 // NullFields is a list of field names (e.g. "BatchId") to include in 8636 // API requests with the JSON null value. By default, fields with empty 8637 // values are omitted from API requests. However, any field with an 8638 // empty value appearing in NullFields will be sent to the server as 8639 // null. It is an error if a field in this list has a non-empty value. 8640 // This may be used to include null fields in Patch requests. 8641 NullFields []string `json:"-"` 8642} 8643 8644func (s *PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 8645 type NoMethod PosCustomBatchRequestEntry 8646 raw := NoMethod(*s) 8647 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8648} 8649 8650type PosCustomBatchResponse struct { 8651 // Entries: The result of the execution of the batch requests. 8652 Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"` 8653 8654 // Kind: Identifies what kind of resource this is. Value: the fixed 8655 // string "content#posCustomBatchResponse". 8656 Kind string `json:"kind,omitempty"` 8657 8658 // ServerResponse contains the HTTP response code and headers from the 8659 // server. 8660 googleapi.ServerResponse `json:"-"` 8661 8662 // ForceSendFields is a list of field names (e.g. "Entries") to 8663 // unconditionally include in API requests. By default, fields with 8664 // empty values are omitted from API requests. However, any non-pointer, 8665 // non-interface field appearing in ForceSendFields will be sent to the 8666 // server regardless of whether the field is empty or not. This may be 8667 // used to include empty fields in Patch requests. 8668 ForceSendFields []string `json:"-"` 8669 8670 // NullFields is a list of field names (e.g. "Entries") to include in 8671 // API requests with the JSON null value. By default, fields with empty 8672 // values are omitted from API requests. However, any field with an 8673 // empty value appearing in NullFields will be sent to the server as 8674 // null. It is an error if a field in this list has a non-empty value. 8675 // This may be used to include null fields in Patch requests. 8676 NullFields []string `json:"-"` 8677} 8678 8679func (s *PosCustomBatchResponse) MarshalJSON() ([]byte, error) { 8680 type NoMethod PosCustomBatchResponse 8681 raw := NoMethod(*s) 8682 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8683} 8684 8685type PosCustomBatchResponseEntry struct { 8686 // BatchId: The ID of the request entry to which this entry responds. 8687 BatchId int64 `json:"batchId,omitempty"` 8688 8689 // Errors: A list of errors defined if, and only if, the request failed. 8690 Errors *Errors `json:"errors,omitempty"` 8691 8692 // Inventory: The updated inventory information. 8693 Inventory *PosInventory `json:"inventory,omitempty"` 8694 8695 // Kind: Identifies what kind of resource this is. Value: the fixed 8696 // string "content#posCustomBatchResponseEntry" 8697 Kind string `json:"kind,omitempty"` 8698 8699 // Sale: The updated sale information. 8700 Sale *PosSale `json:"sale,omitempty"` 8701 8702 // Store: The retrieved or updated store information. 8703 Store *PosStore `json:"store,omitempty"` 8704 8705 // ForceSendFields is a list of field names (e.g. "BatchId") to 8706 // unconditionally include in API requests. By default, fields with 8707 // empty values are omitted from API requests. However, any non-pointer, 8708 // non-interface field appearing in ForceSendFields will be sent to the 8709 // server regardless of whether the field is empty or not. This may be 8710 // used to include empty fields in Patch requests. 8711 ForceSendFields []string `json:"-"` 8712 8713 // NullFields is a list of field names (e.g. "BatchId") to include in 8714 // API requests with the JSON null value. By default, fields with empty 8715 // values are omitted from API requests. However, any field with an 8716 // empty value appearing in NullFields will be sent to the server as 8717 // null. It is an error if a field in this list has a non-empty value. 8718 // This may be used to include null fields in Patch requests. 8719 NullFields []string `json:"-"` 8720} 8721 8722func (s *PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 8723 type NoMethod PosCustomBatchResponseEntry 8724 raw := NoMethod(*s) 8725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8726} 8727 8728type PosDataProviders struct { 8729 // Country: Country code. 8730 Country string `json:"country,omitempty"` 8731 8732 // PosDataProviders: A list of POS data providers. 8733 PosDataProviders []*PosDataProvidersPosDataProvider `json:"posDataProviders,omitempty"` 8734 8735 // ForceSendFields is a list of field names (e.g. "Country") to 8736 // unconditionally include in API requests. By default, fields with 8737 // empty values are omitted from API requests. However, any non-pointer, 8738 // non-interface field appearing in ForceSendFields will be sent to the 8739 // server regardless of whether the field is empty or not. This may be 8740 // used to include empty fields in Patch requests. 8741 ForceSendFields []string `json:"-"` 8742 8743 // NullFields is a list of field names (e.g. "Country") to include in 8744 // API requests with the JSON null value. By default, fields with empty 8745 // values are omitted from API requests. However, any field with an 8746 // empty value appearing in NullFields will be sent to the server as 8747 // null. It is an error if a field in this list has a non-empty value. 8748 // This may be used to include null fields in Patch requests. 8749 NullFields []string `json:"-"` 8750} 8751 8752func (s *PosDataProviders) MarshalJSON() ([]byte, error) { 8753 type NoMethod PosDataProviders 8754 raw := NoMethod(*s) 8755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8756} 8757 8758type PosDataProvidersPosDataProvider struct { 8759 // DisplayName: The display name of Pos data Provider. 8760 DisplayName string `json:"displayName,omitempty"` 8761 8762 // FullName: The full name of this POS data Provider. 8763 FullName string `json:"fullName,omitempty"` 8764 8765 // ProviderId: The ID of the account. 8766 ProviderId uint64 `json:"providerId,omitempty,string"` 8767 8768 // ForceSendFields is a list of field names (e.g. "DisplayName") to 8769 // unconditionally include in API requests. By default, fields with 8770 // empty values are omitted from API requests. However, any non-pointer, 8771 // non-interface field appearing in ForceSendFields will be sent to the 8772 // server regardless of whether the field is empty or not. This may be 8773 // used to include empty fields in Patch requests. 8774 ForceSendFields []string `json:"-"` 8775 8776 // NullFields is a list of field names (e.g. "DisplayName") to include 8777 // in API requests with the JSON null value. By default, fields with 8778 // empty values are omitted from API requests. However, any field with 8779 // an empty value appearing in NullFields will be sent to the server as 8780 // null. It is an error if a field in this list has a non-empty value. 8781 // This may be used to include null fields in Patch requests. 8782 NullFields []string `json:"-"` 8783} 8784 8785func (s *PosDataProvidersPosDataProvider) MarshalJSON() ([]byte, error) { 8786 type NoMethod PosDataProvidersPosDataProvider 8787 raw := NoMethod(*s) 8788 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8789} 8790 8791// PosInventory: The absolute quantity of an item available at the given 8792// store. 8793type PosInventory struct { 8794 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 8795 // the item. 8796 ContentLanguage string `json:"contentLanguage,omitempty"` 8797 8798 // Gtin: Global Trade Item Number. 8799 Gtin string `json:"gtin,omitempty"` 8800 8801 // ItemId: Required. A unique identifier for the item. 8802 ItemId string `json:"itemId,omitempty"` 8803 8804 // Kind: Identifies what kind of resource this is. Value: the fixed 8805 // string "content#posInventory" 8806 Kind string `json:"kind,omitempty"` 8807 8808 // Price: Required. The current price of the item. 8809 Price *Price `json:"price,omitempty"` 8810 8811 // Quantity: Required. The available quantity of the item. 8812 Quantity int64 `json:"quantity,omitempty,string"` 8813 8814 // StoreCode: Required. The identifier of the merchant's store. Either a 8815 // `storeCode` inserted via the API or the code of the store in Google 8816 // My Business. 8817 StoreCode string `json:"storeCode,omitempty"` 8818 8819 // TargetCountry: Required. The CLDR territory code for the item. 8820 TargetCountry string `json:"targetCountry,omitempty"` 8821 8822 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 8823 Timestamp string `json:"timestamp,omitempty"` 8824 8825 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 8826 // unconditionally include in API requests. By default, fields with 8827 // empty values are omitted from API requests. However, any non-pointer, 8828 // non-interface field appearing in ForceSendFields will be sent to the 8829 // server regardless of whether the field is empty or not. This may be 8830 // used to include empty fields in Patch requests. 8831 ForceSendFields []string `json:"-"` 8832 8833 // NullFields is a list of field names (e.g. "ContentLanguage") to 8834 // include in API requests with the JSON null value. By default, fields 8835 // with empty values are omitted from API requests. However, any field 8836 // with an empty value appearing in NullFields will be sent to the 8837 // server as null. It is an error if a field in this list has a 8838 // non-empty value. This may be used to include null fields in Patch 8839 // requests. 8840 NullFields []string `json:"-"` 8841} 8842 8843func (s *PosInventory) MarshalJSON() ([]byte, error) { 8844 type NoMethod PosInventory 8845 raw := NoMethod(*s) 8846 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8847} 8848 8849type PosInventoryRequest struct { 8850 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 8851 // the item. 8852 ContentLanguage string `json:"contentLanguage,omitempty"` 8853 8854 // Gtin: Global Trade Item Number. 8855 Gtin string `json:"gtin,omitempty"` 8856 8857 // ItemId: Required. A unique identifier for the item. 8858 ItemId string `json:"itemId,omitempty"` 8859 8860 // Price: Required. The current price of the item. 8861 Price *Price `json:"price,omitempty"` 8862 8863 // Quantity: Required. The available quantity of the item. 8864 Quantity int64 `json:"quantity,omitempty,string"` 8865 8866 // StoreCode: Required. The identifier of the merchant's store. Either a 8867 // `storeCode` inserted via the API or the code of the store in Google 8868 // My Business. 8869 StoreCode string `json:"storeCode,omitempty"` 8870 8871 // TargetCountry: Required. The CLDR territory code for the item. 8872 TargetCountry string `json:"targetCountry,omitempty"` 8873 8874 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 8875 Timestamp string `json:"timestamp,omitempty"` 8876 8877 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 8878 // unconditionally include in API requests. By default, fields with 8879 // empty values are omitted from API requests. However, any non-pointer, 8880 // non-interface field appearing in ForceSendFields will be sent to the 8881 // server regardless of whether the field is empty or not. This may be 8882 // used to include empty fields in Patch requests. 8883 ForceSendFields []string `json:"-"` 8884 8885 // NullFields is a list of field names (e.g. "ContentLanguage") to 8886 // include in API requests with the JSON null value. By default, fields 8887 // with empty values are omitted from API requests. However, any field 8888 // with an empty value appearing in NullFields will be sent to the 8889 // server as null. It is an error if a field in this list has a 8890 // non-empty value. This may be used to include null fields in Patch 8891 // requests. 8892 NullFields []string `json:"-"` 8893} 8894 8895func (s *PosInventoryRequest) MarshalJSON() ([]byte, error) { 8896 type NoMethod PosInventoryRequest 8897 raw := NoMethod(*s) 8898 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8899} 8900 8901type PosInventoryResponse struct { 8902 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 8903 // the item. 8904 ContentLanguage string `json:"contentLanguage,omitempty"` 8905 8906 // Gtin: Global Trade Item Number. 8907 Gtin string `json:"gtin,omitempty"` 8908 8909 // ItemId: Required. A unique identifier for the item. 8910 ItemId string `json:"itemId,omitempty"` 8911 8912 // Kind: Identifies what kind of resource this is. Value: the fixed 8913 // string "content#posInventoryResponse". 8914 Kind string `json:"kind,omitempty"` 8915 8916 // Price: Required. The current price of the item. 8917 Price *Price `json:"price,omitempty"` 8918 8919 // Quantity: Required. The available quantity of the item. 8920 Quantity int64 `json:"quantity,omitempty,string"` 8921 8922 // StoreCode: Required. The identifier of the merchant's store. Either a 8923 // `storeCode` inserted via the API or the code of the store in Google 8924 // My Business. 8925 StoreCode string `json:"storeCode,omitempty"` 8926 8927 // TargetCountry: Required. The CLDR territory code for the item. 8928 TargetCountry string `json:"targetCountry,omitempty"` 8929 8930 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 8931 Timestamp string `json:"timestamp,omitempty"` 8932 8933 // ServerResponse contains the HTTP response code and headers from the 8934 // server. 8935 googleapi.ServerResponse `json:"-"` 8936 8937 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 8938 // unconditionally include in API requests. By default, fields with 8939 // empty values are omitted from API requests. However, any non-pointer, 8940 // non-interface field appearing in ForceSendFields will be sent to the 8941 // server regardless of whether the field is empty or not. This may be 8942 // used to include empty fields in Patch requests. 8943 ForceSendFields []string `json:"-"` 8944 8945 // NullFields is a list of field names (e.g. "ContentLanguage") to 8946 // include in API requests with the JSON null value. By default, fields 8947 // with empty values are omitted from API requests. However, any field 8948 // with an empty value appearing in NullFields will be sent to the 8949 // server as null. It is an error if a field in this list has a 8950 // non-empty value. This may be used to include null fields in Patch 8951 // requests. 8952 NullFields []string `json:"-"` 8953} 8954 8955func (s *PosInventoryResponse) MarshalJSON() ([]byte, error) { 8956 type NoMethod PosInventoryResponse 8957 raw := NoMethod(*s) 8958 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8959} 8960 8961type PosListResponse struct { 8962 // Kind: Identifies what kind of resource this is. Value: the fixed 8963 // string "content#posListResponse". 8964 Kind string `json:"kind,omitempty"` 8965 8966 Resources []*PosStore `json:"resources,omitempty"` 8967 8968 // ServerResponse contains the HTTP response code and headers from the 8969 // server. 8970 googleapi.ServerResponse `json:"-"` 8971 8972 // ForceSendFields is a list of field names (e.g. "Kind") to 8973 // unconditionally include in API requests. By default, fields with 8974 // empty values are omitted from API requests. However, any non-pointer, 8975 // non-interface field appearing in ForceSendFields will be sent to the 8976 // server regardless of whether the field is empty or not. This may be 8977 // used to include empty fields in Patch requests. 8978 ForceSendFields []string `json:"-"` 8979 8980 // NullFields is a list of field names (e.g. "Kind") to include in API 8981 // requests with the JSON null value. By default, fields with empty 8982 // values are omitted from API requests. However, any field with an 8983 // empty value appearing in NullFields will be sent to the server as 8984 // null. It is an error if a field in this list has a non-empty value. 8985 // This may be used to include null fields in Patch requests. 8986 NullFields []string `json:"-"` 8987} 8988 8989func (s *PosListResponse) MarshalJSON() ([]byte, error) { 8990 type NoMethod PosListResponse 8991 raw := NoMethod(*s) 8992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8993} 8994 8995// PosSale: The change of the available quantity of an item at the given 8996// store. 8997type PosSale struct { 8998 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 8999 // the item. 9000 ContentLanguage string `json:"contentLanguage,omitempty"` 9001 9002 // Gtin: Global Trade Item Number. 9003 Gtin string `json:"gtin,omitempty"` 9004 9005 // ItemId: Required. A unique identifier for the item. 9006 ItemId string `json:"itemId,omitempty"` 9007 9008 // Kind: Identifies what kind of resource this is. Value: the fixed 9009 // string "content#posSale" 9010 Kind string `json:"kind,omitempty"` 9011 9012 // Price: Required. The price of the item. 9013 Price *Price `json:"price,omitempty"` 9014 9015 // Quantity: Required. The relative change of the available quantity. 9016 // Negative for items returned. 9017 Quantity int64 `json:"quantity,omitempty,string"` 9018 9019 // SaleId: A unique ID to group items from the same sale event. 9020 SaleId string `json:"saleId,omitempty"` 9021 9022 // StoreCode: Required. The identifier of the merchant's store. Either a 9023 // `storeCode` inserted via the API or the code of the store in Google 9024 // My Business. 9025 StoreCode string `json:"storeCode,omitempty"` 9026 9027 // TargetCountry: Required. The CLDR territory code for the item. 9028 TargetCountry string `json:"targetCountry,omitempty"` 9029 9030 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9031 Timestamp string `json:"timestamp,omitempty"` 9032 9033 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9034 // unconditionally include in API requests. By default, fields with 9035 // empty values are omitted from API requests. However, any non-pointer, 9036 // non-interface field appearing in ForceSendFields will be sent to the 9037 // server regardless of whether the field is empty or not. This may be 9038 // used to include empty fields in Patch requests. 9039 ForceSendFields []string `json:"-"` 9040 9041 // NullFields is a list of field names (e.g. "ContentLanguage") to 9042 // include in API requests with the JSON null value. By default, fields 9043 // with empty values are omitted from API requests. However, any field 9044 // with an empty value appearing in NullFields will be sent to the 9045 // server as null. It is an error if a field in this list has a 9046 // non-empty value. This may be used to include null fields in Patch 9047 // requests. 9048 NullFields []string `json:"-"` 9049} 9050 9051func (s *PosSale) MarshalJSON() ([]byte, error) { 9052 type NoMethod PosSale 9053 raw := NoMethod(*s) 9054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9055} 9056 9057type PosSaleRequest struct { 9058 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9059 // the item. 9060 ContentLanguage string `json:"contentLanguage,omitempty"` 9061 9062 // Gtin: Global Trade Item Number. 9063 Gtin string `json:"gtin,omitempty"` 9064 9065 // ItemId: Required. A unique identifier for the item. 9066 ItemId string `json:"itemId,omitempty"` 9067 9068 // Price: Required. The price of the item. 9069 Price *Price `json:"price,omitempty"` 9070 9071 // Quantity: Required. The relative change of the available quantity. 9072 // Negative for items returned. 9073 Quantity int64 `json:"quantity,omitempty,string"` 9074 9075 // SaleId: A unique ID to group items from the same sale event. 9076 SaleId string `json:"saleId,omitempty"` 9077 9078 // StoreCode: Required. The identifier of the merchant's store. Either a 9079 // `storeCode` inserted via the API or the code of the store in Google 9080 // My Business. 9081 StoreCode string `json:"storeCode,omitempty"` 9082 9083 // TargetCountry: Required. The CLDR territory code for the item. 9084 TargetCountry string `json:"targetCountry,omitempty"` 9085 9086 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9087 Timestamp string `json:"timestamp,omitempty"` 9088 9089 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9090 // unconditionally include in API requests. By default, fields with 9091 // empty values are omitted from API requests. However, any non-pointer, 9092 // non-interface field appearing in ForceSendFields will be sent to the 9093 // server regardless of whether the field is empty or not. This may be 9094 // used to include empty fields in Patch requests. 9095 ForceSendFields []string `json:"-"` 9096 9097 // NullFields is a list of field names (e.g. "ContentLanguage") to 9098 // include in API requests with the JSON null value. By default, fields 9099 // with empty values are omitted from API requests. However, any field 9100 // with an empty value appearing in NullFields will be sent to the 9101 // server as null. It is an error if a field in this list has a 9102 // non-empty value. This may be used to include null fields in Patch 9103 // requests. 9104 NullFields []string `json:"-"` 9105} 9106 9107func (s *PosSaleRequest) MarshalJSON() ([]byte, error) { 9108 type NoMethod PosSaleRequest 9109 raw := NoMethod(*s) 9110 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9111} 9112 9113type PosSaleResponse struct { 9114 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9115 // the item. 9116 ContentLanguage string `json:"contentLanguage,omitempty"` 9117 9118 // Gtin: Global Trade Item Number. 9119 Gtin string `json:"gtin,omitempty"` 9120 9121 // ItemId: Required. A unique identifier for the item. 9122 ItemId string `json:"itemId,omitempty"` 9123 9124 // Kind: Identifies what kind of resource this is. Value: the fixed 9125 // string "content#posSaleResponse". 9126 Kind string `json:"kind,omitempty"` 9127 9128 // Price: Required. The price of the item. 9129 Price *Price `json:"price,omitempty"` 9130 9131 // Quantity: Required. The relative change of the available quantity. 9132 // Negative for items returned. 9133 Quantity int64 `json:"quantity,omitempty,string"` 9134 9135 // SaleId: A unique ID to group items from the same sale event. 9136 SaleId string `json:"saleId,omitempty"` 9137 9138 // StoreCode: Required. The identifier of the merchant's store. Either a 9139 // `storeCode` inserted via the API or the code of the store in Google 9140 // My Business. 9141 StoreCode string `json:"storeCode,omitempty"` 9142 9143 // TargetCountry: Required. The CLDR territory code for the item. 9144 TargetCountry string `json:"targetCountry,omitempty"` 9145 9146 // Timestamp: Required. The inventory timestamp, in ISO 8601 format. 9147 Timestamp string `json:"timestamp,omitempty"` 9148 9149 // ServerResponse contains the HTTP response code and headers from the 9150 // server. 9151 googleapi.ServerResponse `json:"-"` 9152 9153 // ForceSendFields is a list of field names (e.g. "ContentLanguage") to 9154 // unconditionally include in API requests. By default, fields with 9155 // empty values are omitted from API requests. However, any non-pointer, 9156 // non-interface field appearing in ForceSendFields will be sent to the 9157 // server regardless of whether the field is empty or not. This may be 9158 // used to include empty fields in Patch requests. 9159 ForceSendFields []string `json:"-"` 9160 9161 // NullFields is a list of field names (e.g. "ContentLanguage") to 9162 // include in API requests with the JSON null value. By default, fields 9163 // with empty values are omitted from API requests. However, any field 9164 // with an empty value appearing in NullFields will be sent to the 9165 // server as null. It is an error if a field in this list has a 9166 // non-empty value. This may be used to include null fields in Patch 9167 // requests. 9168 NullFields []string `json:"-"` 9169} 9170 9171func (s *PosSaleResponse) MarshalJSON() ([]byte, error) { 9172 type NoMethod PosSaleResponse 9173 raw := NoMethod(*s) 9174 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9175} 9176 9177// PosStore: Store resource. 9178type PosStore struct { 9179 // Kind: Identifies what kind of resource this is. Value: the fixed 9180 // string "content#posStore" 9181 Kind string `json:"kind,omitempty"` 9182 9183 // StoreAddress: Required. The street address of the store. 9184 StoreAddress string `json:"storeAddress,omitempty"` 9185 9186 // StoreCode: Required. A store identifier that is unique for the given 9187 // merchant. 9188 StoreCode string `json:"storeCode,omitempty"` 9189 9190 // ServerResponse contains the HTTP response code and headers from the 9191 // server. 9192 googleapi.ServerResponse `json:"-"` 9193 9194 // ForceSendFields is a list of field names (e.g. "Kind") to 9195 // unconditionally include in API requests. By default, fields with 9196 // empty values are omitted from API requests. However, any non-pointer, 9197 // non-interface field appearing in ForceSendFields will be sent to the 9198 // server regardless of whether the field is empty or not. This may be 9199 // used to include empty fields in Patch requests. 9200 ForceSendFields []string `json:"-"` 9201 9202 // NullFields is a list of field names (e.g. "Kind") to include in API 9203 // requests with the JSON null value. By default, fields with empty 9204 // values are omitted from API requests. However, any field with an 9205 // empty value appearing in NullFields will be sent to the server as 9206 // null. It is an error if a field in this list has a non-empty value. 9207 // This may be used to include null fields in Patch requests. 9208 NullFields []string `json:"-"` 9209} 9210 9211func (s *PosStore) MarshalJSON() ([]byte, error) { 9212 type NoMethod PosStore 9213 raw := NoMethod(*s) 9214 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9215} 9216 9217type PostalCodeGroup struct { 9218 // Country: The CLDR territory code of the country the postal code group 9219 // applies to. Required. 9220 Country string `json:"country,omitempty"` 9221 9222 // Name: The name of the postal code group, referred to in headers. 9223 // Required. 9224 Name string `json:"name,omitempty"` 9225 9226 // PostalCodeRanges: A range of postal codes. Required. 9227 PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"` 9228 9229 // ForceSendFields is a list of field names (e.g. "Country") to 9230 // unconditionally include in API requests. By default, fields with 9231 // empty values are omitted from API requests. However, any non-pointer, 9232 // non-interface field appearing in ForceSendFields will be sent to the 9233 // server regardless of whether the field is empty or not. This may be 9234 // used to include empty fields in Patch requests. 9235 ForceSendFields []string `json:"-"` 9236 9237 // NullFields is a list of field names (e.g. "Country") to include in 9238 // API requests with the JSON null value. By default, fields with empty 9239 // values are omitted from API requests. However, any field with an 9240 // empty value appearing in NullFields will be sent to the server as 9241 // null. It is an error if a field in this list has a non-empty value. 9242 // This may be used to include null fields in Patch requests. 9243 NullFields []string `json:"-"` 9244} 9245 9246func (s *PostalCodeGroup) MarshalJSON() ([]byte, error) { 9247 type NoMethod PostalCodeGroup 9248 raw := NoMethod(*s) 9249 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9250} 9251 9252type PostalCodeRange struct { 9253 // PostalCodeRangeBegin: A postal code or a pattern of the form 9254 // `prefix*` denoting the inclusive lower bound of the range defining 9255 // the area. Examples values: "94108", "9410*", "9*". Required. 9256 PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"` 9257 9258 // PostalCodeRangeEnd: A postal code or a pattern of the form `prefix*` 9259 // denoting the inclusive upper bound of the range defining the area. It 9260 // must have the same length as `postalCodeRangeBegin`: if 9261 // `postalCodeRangeBegin` is a postal code then `postalCodeRangeEnd` 9262 // must be a postal code too; if `postalCodeRangeBegin` is a pattern 9263 // then `postalCodeRangeEnd` must be a pattern with the same prefix 9264 // length. Optional: if not set, then the area is defined as being all 9265 // the postal codes matching `postalCodeRangeBegin`. 9266 PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"` 9267 9268 // ForceSendFields is a list of field names (e.g. 9269 // "PostalCodeRangeBegin") to unconditionally include in API requests. 9270 // By default, fields with empty values are omitted from API requests. 9271 // However, any non-pointer, non-interface field appearing in 9272 // ForceSendFields will be sent to the server regardless of whether the 9273 // field is empty or not. This may be used to include empty fields in 9274 // Patch requests. 9275 ForceSendFields []string `json:"-"` 9276 9277 // NullFields is a list of field names (e.g. "PostalCodeRangeBegin") to 9278 // include in API requests with the JSON null value. By default, fields 9279 // with empty values are omitted from API requests. However, any field 9280 // with an empty value appearing in NullFields will be sent to the 9281 // server as null. It is an error if a field in this list has a 9282 // non-empty value. This may be used to include null fields in Patch 9283 // requests. 9284 NullFields []string `json:"-"` 9285} 9286 9287func (s *PostalCodeRange) MarshalJSON() ([]byte, error) { 9288 type NoMethod PostalCodeRange 9289 raw := NoMethod(*s) 9290 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9291} 9292 9293type Price struct { 9294 // Currency: The currency of the price. 9295 Currency string `json:"currency,omitempty"` 9296 9297 // Value: The price represented as a number. 9298 Value string `json:"value,omitempty"` 9299 9300 // ForceSendFields is a list of field names (e.g. "Currency") to 9301 // unconditionally include in API requests. By default, fields with 9302 // empty values are omitted from API requests. However, any non-pointer, 9303 // non-interface field appearing in ForceSendFields will be sent to the 9304 // server regardless of whether the field is empty or not. This may be 9305 // used to include empty fields in Patch requests. 9306 ForceSendFields []string `json:"-"` 9307 9308 // NullFields is a list of field names (e.g. "Currency") to include in 9309 // API requests with the JSON null value. By default, fields with empty 9310 // values are omitted from API requests. However, any field with an 9311 // empty value appearing in NullFields will be sent to the server as 9312 // null. It is an error if a field in this list has a non-empty value. 9313 // This may be used to include null fields in Patch requests. 9314 NullFields []string `json:"-"` 9315} 9316 9317func (s *Price) MarshalJSON() ([]byte, error) { 9318 type NoMethod Price 9319 raw := NoMethod(*s) 9320 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9321} 9322 9323// Product: Required product attributes are primarily defined by the 9324// products data specification. See the Products Data Specification Help 9325// Center article for information. Some attributes are country-specific, 9326// so make sure you select the appropriate country in the drop-down 9327// selector at the top of the page. Product data. After inserting, 9328// updating, or deleting a product, it may take several minutes before 9329// changes take effect. 9330type Product struct { 9331 // AdditionalImageLinks: Additional URLs of images of the item. 9332 AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"` 9333 9334 // AdditionalProductTypes: Additional categories of the item (formatted 9335 // as in products data specification). 9336 AdditionalProductTypes []string `json:"additionalProductTypes,omitempty"` 9337 9338 // Adult: Should be set to true if the item is targeted towards adults. 9339 Adult bool `json:"adult,omitempty"` 9340 9341 // AdwordsGrouping: Used to group items in an arbitrary way. Only for 9342 // CPA%, discouraged otherwise. 9343 AdwordsGrouping string `json:"adwordsGrouping,omitempty"` 9344 9345 // AdwordsLabels: Similar to adwords_grouping, but only works on CPC. 9346 AdwordsLabels []string `json:"adwordsLabels,omitempty"` 9347 9348 // AdwordsRedirect: Allows advertisers to override the item URL when the 9349 // product is shown within the context of Product Ads. 9350 AdwordsRedirect string `json:"adwordsRedirect,omitempty"` 9351 9352 // AgeGroup: Target age group of the item. Acceptable values are: - 9353 // "adult" - "infant" - "kids" - "newborn" - "toddler" - 9354 // "youngAdult" 9355 AgeGroup string `json:"ageGroup,omitempty"` 9356 9357 // Aspects: Deprecated. Do not use. 9358 Aspects []*ProductAspect `json:"aspects,omitempty"` 9359 9360 // Availability: Availability status of the item. Acceptable values are: 9361 // - "in stock" - "out of stock" - "preorder" 9362 Availability string `json:"availability,omitempty"` 9363 9364 // AvailabilityDate: The day a pre-ordered product becomes available for 9365 // delivery, in ISO 8601 format. 9366 AvailabilityDate string `json:"availabilityDate,omitempty"` 9367 9368 // Brand: Brand of the item. 9369 Brand string `json:"brand,omitempty"` 9370 9371 // CanonicalLink: URL for the canonical version of your item's landing 9372 // page. 9373 CanonicalLink string `json:"canonicalLink,omitempty"` 9374 9375 // Channel: Required. The item's channel (online or local). Acceptable 9376 // values are: - "local" - "online" 9377 Channel string `json:"channel,omitempty"` 9378 9379 // Color: Color of the item. 9380 Color string `json:"color,omitempty"` 9381 9382 // Condition: Condition or state of the item. Acceptable values are: - 9383 // "new" - "refurbished" - "used" 9384 Condition string `json:"condition,omitempty"` 9385 9386 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 9387 // the item. 9388 ContentLanguage string `json:"contentLanguage,omitempty"` 9389 9390 // CostOfGoodsSold: Cost of goods sold. Used for gross profit reporting. 9391 CostOfGoodsSold *Price `json:"costOfGoodsSold,omitempty"` 9392 9393 // CustomAttributes: A list of custom (merchant-provided) attributes. It 9394 // can also be used for submitting any attribute of the feed 9395 // specification in its generic form (e.g., `{ "name": "size type", 9396 // "value": "regular" }`). This is useful for submitting attributes not 9397 // explicitly exposed by the API, such as additional attributes used for 9398 // Buy on Google (formerly known as Shopping Actions). 9399 CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` 9400 9401 // CustomGroups: A list of custom (merchant-provided) custom attribute 9402 // groups. 9403 CustomGroups []*CustomGroup `json:"customGroups,omitempty"` 9404 9405 // CustomLabel0: Custom label 0 for custom grouping of items in a 9406 // Shopping campaign. 9407 CustomLabel0 string `json:"customLabel0,omitempty"` 9408 9409 // CustomLabel1: Custom label 1 for custom grouping of items in a 9410 // Shopping campaign. 9411 CustomLabel1 string `json:"customLabel1,omitempty"` 9412 9413 // CustomLabel2: Custom label 2 for custom grouping of items in a 9414 // Shopping campaign. 9415 CustomLabel2 string `json:"customLabel2,omitempty"` 9416 9417 // CustomLabel3: Custom label 3 for custom grouping of items in a 9418 // Shopping campaign. 9419 CustomLabel3 string `json:"customLabel3,omitempty"` 9420 9421 // CustomLabel4: Custom label 4 for custom grouping of items in a 9422 // Shopping campaign. 9423 CustomLabel4 string `json:"customLabel4,omitempty"` 9424 9425 // Description: Description of the item. 9426 Description string `json:"description,omitempty"` 9427 9428 // Destinations: Specifies the intended destinations for the product. 9429 Destinations []*ProductDestination `json:"destinations,omitempty"` 9430 9431 // DisplayAdsId: An identifier for an item for dynamic remarketing 9432 // campaigns. 9433 DisplayAdsId string `json:"displayAdsId,omitempty"` 9434 9435 // DisplayAdsLink: URL directly to your item's landing page for dynamic 9436 // remarketing campaigns. 9437 DisplayAdsLink string `json:"displayAdsLink,omitempty"` 9438 9439 // DisplayAdsSimilarIds: Advertiser-specified recommendations. 9440 DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"` 9441 9442 // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns. 9443 DisplayAdsTitle string `json:"displayAdsTitle,omitempty"` 9444 9445 // DisplayAdsValue: Offer margin for dynamic remarketing campaigns. 9446 DisplayAdsValue float64 `json:"displayAdsValue,omitempty"` 9447 9448 // EnergyEfficiencyClass: The energy efficiency class as defined in EU 9449 // directive 2010/30/EU. Acceptable values are: - "A" - "A+" - 9450 // "A++" - "A+++" - "B" - "C" - "D" - "E" - "F" - "G" 9451 EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"` 9452 9453 // ExpirationDate: Date on which the item should expire, as specified 9454 // upon insertion, in ISO 8601 format. The actual expiration date in 9455 // Google Shopping is exposed in `productstatuses` as 9456 // `googleExpirationDate` and might be earlier if `expirationDate` is 9457 // too far in the future. 9458 ExpirationDate string `json:"expirationDate,omitempty"` 9459 9460 // Gender: Target gender of the item. Acceptable values are: - 9461 // "female" - "male" - "unisex" 9462 Gender string `json:"gender,omitempty"` 9463 9464 // GoogleProductCategory: Google's category of the item (see Google 9465 // product taxonomy 9466 // (https://support.google.com/merchants/answer/1705911)). When querying 9467 // products, this field will contain the user provided value. There is 9468 // currently no way to get back the auto assigned google product 9469 // categories through the API. 9470 GoogleProductCategory string `json:"googleProductCategory,omitempty"` 9471 9472 // Gtin: Global Trade Item Number (GTIN) of the item. 9473 Gtin string `json:"gtin,omitempty"` 9474 9475 // Id: The REST ID of the product. Content API methods that operate on 9476 // products take this as their `productId` parameter. The REST ID for a 9477 // product is of the form channel:contentLanguage: targetCountry: 9478 // offerId. 9479 Id string `json:"id,omitempty"` 9480 9481 // IdentifierExists: False when the item does not have unique product 9482 // identifiers appropriate to its category, such as GTIN, MPN, and 9483 // brand. Required according to the Unique Product Identifier Rules for 9484 // all target countries except for Canada. 9485 IdentifierExists bool `json:"identifierExists,omitempty"` 9486 9487 // ImageLink: URL of an image of the item. 9488 ImageLink string `json:"imageLink,omitempty"` 9489 9490 // Installment: Number and amount of installments to pay for an item. 9491 Installment *Installment `json:"installment,omitempty"` 9492 9493 // IsBundle: Whether the item is a merchant-defined bundle. A bundle is 9494 // a custom grouping of different products sold by a merchant for a 9495 // single price. 9496 IsBundle bool `json:"isBundle,omitempty"` 9497 9498 // ItemGroupId: Shared identifier for all variants of the same product. 9499 ItemGroupId string `json:"itemGroupId,omitempty"` 9500 9501 // Kind: Identifies what kind of resource this is. Value: the fixed 9502 // string "content#product" 9503 Kind string `json:"kind,omitempty"` 9504 9505 // Link: URL directly linking to your item's page on your website. 9506 Link string `json:"link,omitempty"` 9507 9508 // LoyaltyPoints: Loyalty points that users receive after purchasing the 9509 // item. Japan only. 9510 LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` 9511 9512 // Material: The material of which the item is made. 9513 Material string `json:"material,omitempty"` 9514 9515 // MaxEnergyEfficiencyClass: The energy efficiency class as defined in 9516 // EU directive 2010/30/EU. Acceptable values are: - "A" - "A+" - 9517 // "A++" - "A+++" - "B" - "C" - "D" - "E" - "F" - "G" 9518 MaxEnergyEfficiencyClass string `json:"maxEnergyEfficiencyClass,omitempty"` 9519 9520 // MaxHandlingTime: Maximal product handling time (in business days). 9521 MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` 9522 9523 // MinEnergyEfficiencyClass: The energy efficiency class as defined in 9524 // EU directive 2010/30/EU. Acceptable values are: - "A" - "A+" - 9525 // "A++" - "A+++" - "B" - "C" - "D" - "E" - "F" - "G" 9526 MinEnergyEfficiencyClass string `json:"minEnergyEfficiencyClass,omitempty"` 9527 9528 // MinHandlingTime: Minimal product handling time (in business days). 9529 MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` 9530 9531 // MobileLink: URL for the mobile-optimized version of your item's 9532 // landing page. 9533 MobileLink string `json:"mobileLink,omitempty"` 9534 9535 // Mpn: Manufacturer Part Number (MPN) of the item. 9536 Mpn string `json:"mpn,omitempty"` 9537 9538 // Multipack: The number of identical products in a merchant-defined 9539 // multipack. 9540 Multipack int64 `json:"multipack,omitempty,string"` 9541 9542 // OfferId: Required. A unique identifier for the item. Leading and 9543 // trailing whitespaces are stripped and multiple whitespaces are 9544 // replaced by a single whitespace upon submission. Only valid unicode 9545 // characters are accepted. See the products feed specification for 9546 // details. *Note:* Content API methods that operate on products take 9547 // the REST ID of the product, *not* this identifier. 9548 OfferId string `json:"offerId,omitempty"` 9549 9550 // OnlineOnly: Deprecated. 9551 OnlineOnly bool `json:"onlineOnly,omitempty"` 9552 9553 // Pattern: The item's pattern (e.g. polka dots). 9554 Pattern string `json:"pattern,omitempty"` 9555 9556 // Price: Price of the item. 9557 Price *Price `json:"price,omitempty"` 9558 9559 // ProductType: Your category of the item (formatted as in products data 9560 // specification). 9561 ProductType string `json:"productType,omitempty"` 9562 9563 // PromotionIds: The unique ID of a promotion. 9564 PromotionIds []string `json:"promotionIds,omitempty"` 9565 9566 // SalePrice: Advertised sale price of the item. 9567 SalePrice *Price `json:"salePrice,omitempty"` 9568 9569 // SalePriceEffectiveDate: Date range during which the item is on sale 9570 // (see products data specification ). 9571 SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` 9572 9573 // SellOnGoogleQuantity: The quantity of the product that is available 9574 // for selling on Google. Supported only for online products. 9575 SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` 9576 9577 // Shipping: Shipping rules. 9578 Shipping []*ProductShipping `json:"shipping,omitempty"` 9579 9580 // ShippingHeight: Height of the item for shipping. 9581 ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"` 9582 9583 // ShippingLabel: The shipping label of the product, used to group 9584 // product in account-level shipping rules. 9585 ShippingLabel string `json:"shippingLabel,omitempty"` 9586 9587 // ShippingLength: Length of the item for shipping. 9588 ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"` 9589 9590 // ShippingWeight: Weight of the item for shipping. 9591 ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"` 9592 9593 // ShippingWidth: Width of the item for shipping. 9594 ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"` 9595 9596 // SizeSystem: System in which the size is specified. Recommended for 9597 // apparel items. Acceptable values are: - "AU" - "BR" - "CN" - 9598 // "DE" - "EU" - "FR" - "IT" - "JP" - "MEX" - "UK" - 9599 // "US" 9600 SizeSystem string `json:"sizeSystem,omitempty"` 9601 9602 // SizeType: The cut of the item. Recommended for apparel items. 9603 // Acceptable values are: - "big and tall" - "maternity" - 9604 // "oversize" - "petite" - "plus" - "regular" 9605 SizeType string `json:"sizeType,omitempty"` 9606 9607 // Sizes: Size of the item. Only one value is allowed. For variants with 9608 // different sizes, insert a separate product for each size with the 9609 // same `itemGroupId` value (see size definition). 9610 Sizes []string `json:"sizes,omitempty"` 9611 9612 // Source: The source of the offer, i.e., how the offer was created. 9613 // Acceptable values are: - "api" - "crawl" - "feed" 9614 Source string `json:"source,omitempty"` 9615 9616 // TargetCountry: Required. The CLDR territory code for the item. 9617 TargetCountry string `json:"targetCountry,omitempty"` 9618 9619 // Taxes: Tax information. 9620 Taxes []*ProductTax `json:"taxes,omitempty"` 9621 9622 // Title: Title of the item. 9623 Title string `json:"title,omitempty"` 9624 9625 // UnitPricingBaseMeasure: The preference of the denominator of the unit 9626 // price. 9627 UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"` 9628 9629 // UnitPricingMeasure: The measure and dimension of an item. 9630 UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"` 9631 9632 // ValidatedDestinations: Deprecated. The read-only list of intended 9633 // destinations which passed validation. 9634 ValidatedDestinations []string `json:"validatedDestinations,omitempty"` 9635 9636 // Warnings: Read-only warnings. 9637 Warnings []*Error `json:"warnings,omitempty"` 9638 9639 // ServerResponse contains the HTTP response code and headers from the 9640 // server. 9641 googleapi.ServerResponse `json:"-"` 9642 9643 // ForceSendFields is a list of field names (e.g. 9644 // "AdditionalImageLinks") to unconditionally include in API requests. 9645 // By default, fields with empty values are omitted from API requests. 9646 // However, any non-pointer, non-interface field appearing in 9647 // ForceSendFields will be sent to the server regardless of whether the 9648 // field is empty or not. This may be used to include empty fields in 9649 // Patch requests. 9650 ForceSendFields []string `json:"-"` 9651 9652 // NullFields is a list of field names (e.g. "AdditionalImageLinks") to 9653 // include in API requests with the JSON null value. By default, fields 9654 // with empty values are omitted from API requests. However, any field 9655 // with an empty value appearing in NullFields will be sent to the 9656 // server as null. It is an error if a field in this list has a 9657 // non-empty value. This may be used to include null fields in Patch 9658 // requests. 9659 NullFields []string `json:"-"` 9660} 9661 9662func (s *Product) MarshalJSON() ([]byte, error) { 9663 type NoMethod Product 9664 raw := NoMethod(*s) 9665 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9666} 9667 9668func (s *Product) UnmarshalJSON(data []byte) error { 9669 type NoMethod Product 9670 var s1 struct { 9671 DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"` 9672 *NoMethod 9673 } 9674 s1.NoMethod = (*NoMethod)(s) 9675 if err := json.Unmarshal(data, &s1); err != nil { 9676 return err 9677 } 9678 s.DisplayAdsValue = float64(s1.DisplayAdsValue) 9679 return nil 9680} 9681 9682type ProductAmount struct { 9683 // PriceAmount: The pre-tax or post-tax price depending on the location 9684 // of the order. 9685 PriceAmount *Price `json:"priceAmount,omitempty"` 9686 9687 // RemittedTaxAmount: Remitted tax value. 9688 RemittedTaxAmount *Price `json:"remittedTaxAmount,omitempty"` 9689 9690 // TaxAmount: Tax value. 9691 TaxAmount *Price `json:"taxAmount,omitempty"` 9692 9693 // ForceSendFields is a list of field names (e.g. "PriceAmount") to 9694 // unconditionally include in API requests. By default, fields with 9695 // empty values are omitted from API requests. However, any non-pointer, 9696 // non-interface field appearing in ForceSendFields will be sent to the 9697 // server regardless of whether the field is empty or not. This may be 9698 // used to include empty fields in Patch requests. 9699 ForceSendFields []string `json:"-"` 9700 9701 // NullFields is a list of field names (e.g. "PriceAmount") to include 9702 // in API requests with the JSON null value. By default, fields with 9703 // empty values are omitted from API requests. However, any field with 9704 // an empty value appearing in NullFields will be sent to the server as 9705 // null. It is an error if a field in this list has a non-empty value. 9706 // This may be used to include null fields in Patch requests. 9707 NullFields []string `json:"-"` 9708} 9709 9710func (s *ProductAmount) MarshalJSON() ([]byte, error) { 9711 type NoMethod ProductAmount 9712 raw := NoMethod(*s) 9713 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9714} 9715 9716type ProductAspect struct { 9717 // AspectName: Deprecated. 9718 AspectName string `json:"aspectName,omitempty"` 9719 9720 // DestinationName: Deprecated. 9721 DestinationName string `json:"destinationName,omitempty"` 9722 9723 // Intention: Deprecated. 9724 Intention string `json:"intention,omitempty"` 9725 9726 // ForceSendFields is a list of field names (e.g. "AspectName") to 9727 // unconditionally include in API requests. By default, fields with 9728 // empty values are omitted from API requests. However, any non-pointer, 9729 // non-interface field appearing in ForceSendFields will be sent to the 9730 // server regardless of whether the field is empty or not. This may be 9731 // used to include empty fields in Patch requests. 9732 ForceSendFields []string `json:"-"` 9733 9734 // NullFields is a list of field names (e.g. "AspectName") to include in 9735 // API requests with the JSON null value. By default, fields with empty 9736 // values are omitted from API requests. However, any field with an 9737 // empty value appearing in NullFields will be sent to the server as 9738 // null. It is an error if a field in this list has a non-empty value. 9739 // This may be used to include null fields in Patch requests. 9740 NullFields []string `json:"-"` 9741} 9742 9743func (s *ProductAspect) MarshalJSON() ([]byte, error) { 9744 type NoMethod ProductAspect 9745 raw := NoMethod(*s) 9746 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9747} 9748 9749type ProductDestination struct { 9750 // DestinationName: The name of the destination. 9751 DestinationName string `json:"destinationName,omitempty"` 9752 9753 // Intention: Whether the destination is required, excluded or should be 9754 // validated. Acceptable values are: - "default" - "excluded" - 9755 // "optional" - "required" 9756 Intention string `json:"intention,omitempty"` 9757 9758 // ForceSendFields is a list of field names (e.g. "DestinationName") to 9759 // unconditionally include in API requests. By default, fields with 9760 // empty values are omitted from API requests. However, any non-pointer, 9761 // non-interface field appearing in ForceSendFields will be sent to the 9762 // server regardless of whether the field is empty or not. This may be 9763 // used to include empty fields in Patch requests. 9764 ForceSendFields []string `json:"-"` 9765 9766 // NullFields is a list of field names (e.g. "DestinationName") to 9767 // include in API requests with the JSON null value. By default, fields 9768 // with empty values are omitted from API requests. However, any field 9769 // with an empty value appearing in NullFields will be sent to the 9770 // server as null. It is an error if a field in this list has a 9771 // non-empty value. This may be used to include null fields in Patch 9772 // requests. 9773 NullFields []string `json:"-"` 9774} 9775 9776func (s *ProductDestination) MarshalJSON() ([]byte, error) { 9777 type NoMethod ProductDestination 9778 raw := NoMethod(*s) 9779 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9780} 9781 9782type ProductShipping struct { 9783 // Country: The CLDR territory code of the country to which an item will 9784 // ship. 9785 Country string `json:"country,omitempty"` 9786 9787 // LocationGroupName: The location where the shipping is applicable, 9788 // represented by a location group name. 9789 LocationGroupName string `json:"locationGroupName,omitempty"` 9790 9791 // LocationId: The numeric ID of a location that the shipping rate 9792 // applies to as defined in the AdWords API. 9793 LocationId int64 `json:"locationId,omitempty,string"` 9794 9795 // PostalCode: The postal code range that the shipping rate applies to, 9796 // represented by a postal code, a postal code prefix followed by a * 9797 // wildcard, a range between two postal codes or two postal code 9798 // prefixes of equal length. 9799 PostalCode string `json:"postalCode,omitempty"` 9800 9801 // Price: Fixed shipping price, represented as a number. 9802 Price *Price `json:"price,omitempty"` 9803 9804 // Region: The geographic region to which a shipping rate applies. 9805 Region string `json:"region,omitempty"` 9806 9807 // Service: A free-form description of the service class or delivery 9808 // speed. 9809 Service string `json:"service,omitempty"` 9810 9811 // ForceSendFields is a list of field names (e.g. "Country") to 9812 // unconditionally include in API requests. By default, fields with 9813 // empty values are omitted from API requests. However, any non-pointer, 9814 // non-interface field appearing in ForceSendFields will be sent to the 9815 // server regardless of whether the field is empty or not. This may be 9816 // used to include empty fields in Patch requests. 9817 ForceSendFields []string `json:"-"` 9818 9819 // NullFields is a list of field names (e.g. "Country") to include in 9820 // API requests with the JSON null value. By default, fields with empty 9821 // values are omitted from API requests. However, any field with an 9822 // empty value appearing in NullFields will be sent to the server as 9823 // null. It is an error if a field in this list has a non-empty value. 9824 // This may be used to include null fields in Patch requests. 9825 NullFields []string `json:"-"` 9826} 9827 9828func (s *ProductShipping) MarshalJSON() ([]byte, error) { 9829 type NoMethod ProductShipping 9830 raw := NoMethod(*s) 9831 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9832} 9833 9834type ProductShippingDimension struct { 9835 // Unit: The unit of value. 9836 Unit string `json:"unit,omitempty"` 9837 9838 // Value: The dimension of the product used to calculate the shipping 9839 // cost of the item. 9840 Value float64 `json:"value,omitempty"` 9841 9842 // ForceSendFields is a list of field names (e.g. "Unit") to 9843 // unconditionally include in API requests. By default, fields with 9844 // empty values are omitted from API requests. However, any non-pointer, 9845 // non-interface field appearing in ForceSendFields will be sent to the 9846 // server regardless of whether the field is empty or not. This may be 9847 // used to include empty fields in Patch requests. 9848 ForceSendFields []string `json:"-"` 9849 9850 // NullFields is a list of field names (e.g. "Unit") to include in API 9851 // requests with the JSON null value. By default, fields with empty 9852 // values are omitted from API requests. However, any field with an 9853 // empty value appearing in NullFields will be sent to the server as 9854 // null. It is an error if a field in this list has a non-empty value. 9855 // This may be used to include null fields in Patch requests. 9856 NullFields []string `json:"-"` 9857} 9858 9859func (s *ProductShippingDimension) MarshalJSON() ([]byte, error) { 9860 type NoMethod ProductShippingDimension 9861 raw := NoMethod(*s) 9862 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9863} 9864 9865func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error { 9866 type NoMethod ProductShippingDimension 9867 var s1 struct { 9868 Value gensupport.JSONFloat64 `json:"value"` 9869 *NoMethod 9870 } 9871 s1.NoMethod = (*NoMethod)(s) 9872 if err := json.Unmarshal(data, &s1); err != nil { 9873 return err 9874 } 9875 s.Value = float64(s1.Value) 9876 return nil 9877} 9878 9879type ProductShippingWeight struct { 9880 // Unit: The unit of value. 9881 Unit string `json:"unit,omitempty"` 9882 9883 // Value: The weight of the product used to calculate the shipping cost 9884 // of the item. 9885 Value float64 `json:"value,omitempty"` 9886 9887 // ForceSendFields is a list of field names (e.g. "Unit") to 9888 // unconditionally include in API requests. By default, fields with 9889 // empty values are omitted from API requests. However, any non-pointer, 9890 // non-interface field appearing in ForceSendFields will be sent to the 9891 // server regardless of whether the field is empty or not. This may be 9892 // used to include empty fields in Patch requests. 9893 ForceSendFields []string `json:"-"` 9894 9895 // NullFields is a list of field names (e.g. "Unit") to include in API 9896 // requests with the JSON null value. By default, fields with empty 9897 // values are omitted from API requests. However, any field with an 9898 // empty value appearing in NullFields will be sent to the server as 9899 // null. It is an error if a field in this list has a non-empty value. 9900 // This may be used to include null fields in Patch requests. 9901 NullFields []string `json:"-"` 9902} 9903 9904func (s *ProductShippingWeight) MarshalJSON() ([]byte, error) { 9905 type NoMethod ProductShippingWeight 9906 raw := NoMethod(*s) 9907 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9908} 9909 9910func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error { 9911 type NoMethod ProductShippingWeight 9912 var s1 struct { 9913 Value gensupport.JSONFloat64 `json:"value"` 9914 *NoMethod 9915 } 9916 s1.NoMethod = (*NoMethod)(s) 9917 if err := json.Unmarshal(data, &s1); err != nil { 9918 return err 9919 } 9920 s.Value = float64(s1.Value) 9921 return nil 9922} 9923 9924// ProductStatus: The status of a product, i.e., information about a 9925// product computed asynchronously. 9926type ProductStatus struct { 9927 // CreationDate: Date on which the item has been created, in ISO 8601 9928 // format. 9929 CreationDate string `json:"creationDate,omitempty"` 9930 9931 // DataQualityIssues: DEPRECATED - never populated 9932 DataQualityIssues []*ProductStatusDataQualityIssue `json:"dataQualityIssues,omitempty"` 9933 9934 // DestinationStatuses: The intended destinations for the product. 9935 DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"` 9936 9937 // GoogleExpirationDate: Date on which the item expires in Google 9938 // Shopping, in ISO 8601 format. 9939 GoogleExpirationDate string `json:"googleExpirationDate,omitempty"` 9940 9941 // ItemLevelIssues: A list of all issues associated with the product. 9942 ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` 9943 9944 // Kind: Identifies what kind of resource this is. Value: the fixed 9945 // string "content#productStatus" 9946 Kind string `json:"kind,omitempty"` 9947 9948 // LastUpdateDate: Date on which the item has been last updated, in ISO 9949 // 8601 format. 9950 LastUpdateDate string `json:"lastUpdateDate,omitempty"` 9951 9952 // Link: The link to the product. 9953 Link string `json:"link,omitempty"` 9954 9955 // Product: Product data after applying all the join inputs. 9956 Product *Product `json:"product,omitempty"` 9957 9958 // ProductId: The ID of the product for which status is reported. 9959 ProductId string `json:"productId,omitempty"` 9960 9961 // Title: The title of the product. 9962 Title string `json:"title,omitempty"` 9963 9964 // ServerResponse contains the HTTP response code and headers from the 9965 // server. 9966 googleapi.ServerResponse `json:"-"` 9967 9968 // ForceSendFields is a list of field names (e.g. "CreationDate") to 9969 // unconditionally include in API requests. By default, fields with 9970 // empty values are omitted from API requests. However, any non-pointer, 9971 // non-interface field appearing in ForceSendFields will be sent to the 9972 // server regardless of whether the field is empty or not. This may be 9973 // used to include empty fields in Patch requests. 9974 ForceSendFields []string `json:"-"` 9975 9976 // NullFields is a list of field names (e.g. "CreationDate") to include 9977 // in API requests with the JSON null value. By default, fields with 9978 // empty values are omitted from API requests. However, any field with 9979 // an empty value appearing in NullFields will be sent to the server as 9980 // null. It is an error if a field in this list has a non-empty value. 9981 // This may be used to include null fields in Patch requests. 9982 NullFields []string `json:"-"` 9983} 9984 9985func (s *ProductStatus) MarshalJSON() ([]byte, error) { 9986 type NoMethod ProductStatus 9987 raw := NoMethod(*s) 9988 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9989} 9990 9991type ProductStatusDataQualityIssue struct { 9992 Destination string `json:"destination,omitempty"` 9993 9994 Detail string `json:"detail,omitempty"` 9995 9996 FetchStatus string `json:"fetchStatus,omitempty"` 9997 9998 Id string `json:"id,omitempty"` 9999 10000 Location string `json:"location,omitempty"` 10001 10002 Severity string `json:"severity,omitempty"` 10003 10004 Timestamp string `json:"timestamp,omitempty"` 10005 10006 ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"` 10007 10008 ValueProvided string `json:"valueProvided,omitempty"` 10009 10010 // ForceSendFields is a list of field names (e.g. "Destination") to 10011 // unconditionally include in API requests. By default, fields with 10012 // empty values are omitted from API requests. However, any non-pointer, 10013 // non-interface field appearing in ForceSendFields will be sent to the 10014 // server regardless of whether the field is empty or not. This may be 10015 // used to include empty fields in Patch requests. 10016 ForceSendFields []string `json:"-"` 10017 10018 // NullFields is a list of field names (e.g. "Destination") to include 10019 // in API requests with the JSON null value. By default, fields with 10020 // empty values are omitted from API requests. However, any field with 10021 // an empty value appearing in NullFields will be sent to the server as 10022 // null. It is an error if a field in this list has a non-empty value. 10023 // This may be used to include null fields in Patch requests. 10024 NullFields []string `json:"-"` 10025} 10026 10027func (s *ProductStatusDataQualityIssue) MarshalJSON() ([]byte, error) { 10028 type NoMethod ProductStatusDataQualityIssue 10029 raw := NoMethod(*s) 10030 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10031} 10032 10033type ProductStatusDestinationStatus struct { 10034 // ApprovalPending: Whether the approval status might change due to 10035 // further processing. 10036 ApprovalPending bool `json:"approvalPending,omitempty"` 10037 10038 // ApprovalStatus: The destination's approval status. Acceptable values 10039 // are: - "approved" - "disapproved" 10040 ApprovalStatus string `json:"approvalStatus,omitempty"` 10041 10042 // Destination: The name of the destination 10043 Destination string `json:"destination,omitempty"` 10044 10045 // Intention: Provided for backward compatibility only. Always set to 10046 // "required". Acceptable values are: - "default" - "excluded" - 10047 // "optional" - "required" 10048 Intention string `json:"intention,omitempty"` 10049 10050 // ForceSendFields is a list of field names (e.g. "ApprovalPending") to 10051 // unconditionally include in API requests. By default, fields with 10052 // empty values are omitted from API requests. However, any non-pointer, 10053 // non-interface field appearing in ForceSendFields will be sent to the 10054 // server regardless of whether the field is empty or not. This may be 10055 // used to include empty fields in Patch requests. 10056 ForceSendFields []string `json:"-"` 10057 10058 // NullFields is a list of field names (e.g. "ApprovalPending") to 10059 // include in API requests with the JSON null value. By default, fields 10060 // with empty values are omitted from API requests. However, any field 10061 // with an empty value appearing in NullFields will be sent to the 10062 // server as null. It is an error if a field in this list has a 10063 // non-empty value. This may be used to include null fields in Patch 10064 // requests. 10065 NullFields []string `json:"-"` 10066} 10067 10068func (s *ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) { 10069 type NoMethod ProductStatusDestinationStatus 10070 raw := NoMethod(*s) 10071 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10072} 10073 10074type ProductStatusItemLevelIssue struct { 10075 // AttributeName: The attribute's name, if the issue is caused by a 10076 // single attribute. 10077 AttributeName string `json:"attributeName,omitempty"` 10078 10079 // Code: The error code of the issue. 10080 Code string `json:"code,omitempty"` 10081 10082 // Description: A short issue description in English. 10083 Description string `json:"description,omitempty"` 10084 10085 // Destination: The destination the issue applies to. 10086 Destination string `json:"destination,omitempty"` 10087 10088 // Detail: A detailed issue description in English. 10089 Detail string `json:"detail,omitempty"` 10090 10091 // Documentation: The URL of a web page to help with resolving this 10092 // issue. 10093 Documentation string `json:"documentation,omitempty"` 10094 10095 // Resolution: Whether the issue can be resolved by the merchant. 10096 Resolution string `json:"resolution,omitempty"` 10097 10098 // Servability: How this issue affects serving of the offer. 10099 Servability string `json:"servability,omitempty"` 10100 10101 // ForceSendFields is a list of field names (e.g. "AttributeName") to 10102 // unconditionally include in API requests. By default, fields with 10103 // empty values are omitted from API requests. However, any non-pointer, 10104 // non-interface field appearing in ForceSendFields will be sent to the 10105 // server regardless of whether the field is empty or not. This may be 10106 // used to include empty fields in Patch requests. 10107 ForceSendFields []string `json:"-"` 10108 10109 // NullFields is a list of field names (e.g. "AttributeName") to include 10110 // in API requests with the JSON null value. By default, fields with 10111 // empty values are omitted from API requests. However, any field with 10112 // an empty value appearing in NullFields will be sent to the server as 10113 // null. It is an error if a field in this list has a non-empty value. 10114 // This may be used to include null fields in Patch requests. 10115 NullFields []string `json:"-"` 10116} 10117 10118func (s *ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) { 10119 type NoMethod ProductStatusItemLevelIssue 10120 raw := NoMethod(*s) 10121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10122} 10123 10124type ProductTax struct { 10125 // Country: The country within which the item is taxed, specified as a 10126 // CLDR territory code. 10127 Country string `json:"country,omitempty"` 10128 10129 // LocationId: The numeric ID of a location that the tax rate applies to 10130 // as defined in the AdWords API. 10131 LocationId int64 `json:"locationId,omitempty,string"` 10132 10133 // PostalCode: The postal code range that the tax rate applies to, 10134 // represented by a ZIP code, a ZIP code prefix using * wildcard, a 10135 // range between two ZIP codes or two ZIP code prefixes of equal length. 10136 // Examples: 94114, 94*, 94002-95460, 94*-95*. 10137 PostalCode string `json:"postalCode,omitempty"` 10138 10139 // Rate: The percentage of tax rate that applies to the item price. 10140 Rate float64 `json:"rate,omitempty"` 10141 10142 // Region: The geographic region to which the tax rate applies. 10143 Region string `json:"region,omitempty"` 10144 10145 // TaxShip: Should be set to true if tax is charged on shipping. 10146 TaxShip bool `json:"taxShip,omitempty"` 10147 10148 // ForceSendFields is a list of field names (e.g. "Country") to 10149 // unconditionally include in API requests. By default, fields with 10150 // empty values are omitted from API requests. However, any non-pointer, 10151 // non-interface field appearing in ForceSendFields will be sent to the 10152 // server regardless of whether the field is empty or not. This may be 10153 // used to include empty fields in Patch requests. 10154 ForceSendFields []string `json:"-"` 10155 10156 // NullFields is a list of field names (e.g. "Country") to include in 10157 // API requests with the JSON null value. By default, fields with empty 10158 // values are omitted from API requests. However, any field with an 10159 // empty value appearing in NullFields will be sent to the server as 10160 // null. It is an error if a field in this list has a non-empty value. 10161 // This may be used to include null fields in Patch requests. 10162 NullFields []string `json:"-"` 10163} 10164 10165func (s *ProductTax) MarshalJSON() ([]byte, error) { 10166 type NoMethod ProductTax 10167 raw := NoMethod(*s) 10168 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10169} 10170 10171func (s *ProductTax) UnmarshalJSON(data []byte) error { 10172 type NoMethod ProductTax 10173 var s1 struct { 10174 Rate gensupport.JSONFloat64 `json:"rate"` 10175 *NoMethod 10176 } 10177 s1.NoMethod = (*NoMethod)(s) 10178 if err := json.Unmarshal(data, &s1); err != nil { 10179 return err 10180 } 10181 s.Rate = float64(s1.Rate) 10182 return nil 10183} 10184 10185type ProductUnitPricingBaseMeasure struct { 10186 // Unit: The unit of the denominator. 10187 Unit string `json:"unit,omitempty"` 10188 10189 // Value: The denominator of the unit price. 10190 Value int64 `json:"value,omitempty,string"` 10191 10192 // ForceSendFields is a list of field names (e.g. "Unit") to 10193 // unconditionally include in API requests. By default, fields with 10194 // empty values are omitted from API requests. However, any non-pointer, 10195 // non-interface field appearing in ForceSendFields will be sent to the 10196 // server regardless of whether the field is empty or not. This may be 10197 // used to include empty fields in Patch requests. 10198 ForceSendFields []string `json:"-"` 10199 10200 // NullFields is a list of field names (e.g. "Unit") to include in API 10201 // requests with the JSON null value. By default, fields with empty 10202 // values are omitted from API requests. However, any field with an 10203 // empty value appearing in NullFields will be sent to the server as 10204 // null. It is an error if a field in this list has a non-empty value. 10205 // This may be used to include null fields in Patch requests. 10206 NullFields []string `json:"-"` 10207} 10208 10209func (s *ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) { 10210 type NoMethod ProductUnitPricingBaseMeasure 10211 raw := NoMethod(*s) 10212 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10213} 10214 10215type ProductUnitPricingMeasure struct { 10216 // Unit: The unit of the measure. 10217 Unit string `json:"unit,omitempty"` 10218 10219 // Value: The measure of an item. 10220 Value float64 `json:"value,omitempty"` 10221 10222 // ForceSendFields is a list of field names (e.g. "Unit") to 10223 // unconditionally include in API requests. By default, fields with 10224 // empty values are omitted from API requests. However, any non-pointer, 10225 // non-interface field appearing in ForceSendFields will be sent to the 10226 // server regardless of whether the field is empty or not. This may be 10227 // used to include empty fields in Patch requests. 10228 ForceSendFields []string `json:"-"` 10229 10230 // NullFields is a list of field names (e.g. "Unit") to include in API 10231 // requests with the JSON null value. By default, fields with empty 10232 // values are omitted from API requests. However, any field with an 10233 // empty value appearing in NullFields will be sent to the server as 10234 // null. It is an error if a field in this list has a non-empty value. 10235 // This may be used to include null fields in Patch requests. 10236 NullFields []string `json:"-"` 10237} 10238 10239func (s *ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) { 10240 type NoMethod ProductUnitPricingMeasure 10241 raw := NoMethod(*s) 10242 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10243} 10244 10245func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error { 10246 type NoMethod ProductUnitPricingMeasure 10247 var s1 struct { 10248 Value gensupport.JSONFloat64 `json:"value"` 10249 *NoMethod 10250 } 10251 s1.NoMethod = (*NoMethod)(s) 10252 if err := json.Unmarshal(data, &s1); err != nil { 10253 return err 10254 } 10255 s.Value = float64(s1.Value) 10256 return nil 10257} 10258 10259type ProductsCustomBatchRequest struct { 10260 // Entries: The request entries to be processed in the batch. 10261 Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"` 10262 10263 // ForceSendFields is a list of field names (e.g. "Entries") to 10264 // unconditionally include in API requests. By default, fields with 10265 // empty values are omitted from API requests. However, any non-pointer, 10266 // non-interface field appearing in ForceSendFields will be sent to the 10267 // server regardless of whether the field is empty or not. This may be 10268 // used to include empty fields in Patch requests. 10269 ForceSendFields []string `json:"-"` 10270 10271 // NullFields is a list of field names (e.g. "Entries") to include in 10272 // API requests with the JSON null value. By default, fields with empty 10273 // values are omitted from API requests. However, any field with an 10274 // empty value appearing in NullFields will be sent to the server as 10275 // null. It is an error if a field in this list has a non-empty value. 10276 // This may be used to include null fields in Patch requests. 10277 NullFields []string `json:"-"` 10278} 10279 10280func (s *ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) { 10281 type NoMethod ProductsCustomBatchRequest 10282 raw := NoMethod(*s) 10283 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10284} 10285 10286// ProductsCustomBatchRequestEntry: A batch entry encoding a single 10287// non-batch products request. 10288type ProductsCustomBatchRequestEntry struct { 10289 // BatchId: An entry ID, unique within the batch request. 10290 BatchId int64 `json:"batchId,omitempty"` 10291 10292 // MerchantId: The ID of the managing account. 10293 MerchantId uint64 `json:"merchantId,omitempty,string"` 10294 10295 // Method: The method of the batch entry. Acceptable values are: - 10296 // "delete" - "get" - "insert" 10297 Method string `json:"method,omitempty"` 10298 10299 // Product: The product to insert. Only required if the method is 10300 // `insert`. 10301 Product *Product `json:"product,omitempty"` 10302 10303 // ProductId: The ID of the product to get or delete. Only defined if 10304 // the method is `get` or `delete`. 10305 ProductId string `json:"productId,omitempty"` 10306 10307 // ForceSendFields is a list of field names (e.g. "BatchId") to 10308 // unconditionally include in API requests. By default, fields with 10309 // empty values are omitted from API requests. However, any non-pointer, 10310 // non-interface field appearing in ForceSendFields will be sent to the 10311 // server regardless of whether the field is empty or not. This may be 10312 // used to include empty fields in Patch requests. 10313 ForceSendFields []string `json:"-"` 10314 10315 // NullFields is a list of field names (e.g. "BatchId") to include in 10316 // API requests with the JSON null value. By default, fields with empty 10317 // values are omitted from API requests. However, any field with an 10318 // empty value appearing in NullFields will be sent to the server as 10319 // null. It is an error if a field in this list has a non-empty value. 10320 // This may be used to include null fields in Patch requests. 10321 NullFields []string `json:"-"` 10322} 10323 10324func (s *ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 10325 type NoMethod ProductsCustomBatchRequestEntry 10326 raw := NoMethod(*s) 10327 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10328} 10329 10330type ProductsCustomBatchResponse struct { 10331 // Entries: The result of the execution of the batch requests. 10332 Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"` 10333 10334 // Kind: Identifies what kind of resource this is. Value: the fixed 10335 // string "content#productsCustomBatchResponse". 10336 Kind string `json:"kind,omitempty"` 10337 10338 // ServerResponse contains the HTTP response code and headers from the 10339 // server. 10340 googleapi.ServerResponse `json:"-"` 10341 10342 // ForceSendFields is a list of field names (e.g. "Entries") to 10343 // unconditionally include in API requests. By default, fields with 10344 // empty values are omitted from API requests. However, any non-pointer, 10345 // non-interface field appearing in ForceSendFields will be sent to the 10346 // server regardless of whether the field is empty or not. This may be 10347 // used to include empty fields in Patch requests. 10348 ForceSendFields []string `json:"-"` 10349 10350 // NullFields is a list of field names (e.g. "Entries") to include in 10351 // API requests with the JSON null value. By default, fields with empty 10352 // values are omitted from API requests. However, any field with an 10353 // empty value appearing in NullFields will be sent to the server as 10354 // null. It is an error if a field in this list has a non-empty value. 10355 // This may be used to include null fields in Patch requests. 10356 NullFields []string `json:"-"` 10357} 10358 10359func (s *ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) { 10360 type NoMethod ProductsCustomBatchResponse 10361 raw := NoMethod(*s) 10362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10363} 10364 10365// ProductsCustomBatchResponseEntry: A batch entry encoding a single 10366// non-batch products response. 10367type ProductsCustomBatchResponseEntry struct { 10368 // BatchId: The ID of the request entry this entry responds to. 10369 BatchId int64 `json:"batchId,omitempty"` 10370 10371 // Errors: A list of errors defined if and only if the request failed. 10372 Errors *Errors `json:"errors,omitempty"` 10373 10374 // Kind: Identifies what kind of resource this is. Value: the fixed 10375 // string "content#productsCustomBatchResponseEntry" 10376 Kind string `json:"kind,omitempty"` 10377 10378 // Product: The inserted product. Only defined if the method is `insert` 10379 // and if the request was successful. 10380 Product *Product `json:"product,omitempty"` 10381 10382 // ForceSendFields is a list of field names (e.g. "BatchId") to 10383 // unconditionally include in API requests. By default, fields with 10384 // empty values are omitted from API requests. However, any non-pointer, 10385 // non-interface field appearing in ForceSendFields will be sent to the 10386 // server regardless of whether the field is empty or not. This may be 10387 // used to include empty fields in Patch requests. 10388 ForceSendFields []string `json:"-"` 10389 10390 // NullFields is a list of field names (e.g. "BatchId") to include in 10391 // API requests with the JSON null value. By default, fields with empty 10392 // values are omitted from API requests. However, any field with an 10393 // empty value appearing in NullFields will be sent to the server as 10394 // null. It is an error if a field in this list has a non-empty value. 10395 // This may be used to include null fields in Patch requests. 10396 NullFields []string `json:"-"` 10397} 10398 10399func (s *ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 10400 type NoMethod ProductsCustomBatchResponseEntry 10401 raw := NoMethod(*s) 10402 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10403} 10404 10405type ProductsListResponse struct { 10406 // Kind: Identifies what kind of resource this is. Value: the fixed 10407 // string "content#productsListResponse". 10408 Kind string `json:"kind,omitempty"` 10409 10410 // NextPageToken: The token for the retrieval of the next page of 10411 // products. 10412 NextPageToken string `json:"nextPageToken,omitempty"` 10413 10414 Resources []*Product `json:"resources,omitempty"` 10415 10416 // ServerResponse contains the HTTP response code and headers from the 10417 // server. 10418 googleapi.ServerResponse `json:"-"` 10419 10420 // ForceSendFields is a list of field names (e.g. "Kind") to 10421 // unconditionally include in API requests. By default, fields with 10422 // empty values are omitted from API requests. However, any non-pointer, 10423 // non-interface field appearing in ForceSendFields will be sent to the 10424 // server regardless of whether the field is empty or not. This may be 10425 // used to include empty fields in Patch requests. 10426 ForceSendFields []string `json:"-"` 10427 10428 // NullFields is a list of field names (e.g. "Kind") to include in API 10429 // requests with the JSON null value. By default, fields with empty 10430 // values are omitted from API requests. However, any field with an 10431 // empty value appearing in NullFields will be sent to the server as 10432 // null. It is an error if a field in this list has a non-empty value. 10433 // This may be used to include null fields in Patch requests. 10434 NullFields []string `json:"-"` 10435} 10436 10437func (s *ProductsListResponse) MarshalJSON() ([]byte, error) { 10438 type NoMethod ProductsListResponse 10439 raw := NoMethod(*s) 10440 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10441} 10442 10443type ProductstatusesCustomBatchRequest struct { 10444 // Entries: The request entries to be processed in the batch. 10445 Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"` 10446 10447 // ForceSendFields is a list of field names (e.g. "Entries") to 10448 // unconditionally include in API requests. By default, fields with 10449 // empty values are omitted from API requests. However, any non-pointer, 10450 // non-interface field appearing in ForceSendFields will be sent to the 10451 // server regardless of whether the field is empty or not. This may be 10452 // used to include empty fields in Patch requests. 10453 ForceSendFields []string `json:"-"` 10454 10455 // NullFields is a list of field names (e.g. "Entries") to include in 10456 // API requests with the JSON null value. By default, fields with empty 10457 // values are omitted from API requests. However, any field with an 10458 // empty value appearing in NullFields will be sent to the server as 10459 // null. It is an error if a field in this list has a non-empty value. 10460 // This may be used to include null fields in Patch requests. 10461 NullFields []string `json:"-"` 10462} 10463 10464func (s *ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { 10465 type NoMethod ProductstatusesCustomBatchRequest 10466 raw := NoMethod(*s) 10467 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10468} 10469 10470// ProductstatusesCustomBatchRequestEntry: A batch entry encoding a 10471// single non-batch productstatuses request. 10472type ProductstatusesCustomBatchRequestEntry struct { 10473 // BatchId: An entry ID, unique within the batch request. 10474 BatchId int64 `json:"batchId,omitempty"` 10475 10476 // Destinations: If set, only issues for the specified destinations are 10477 // returned, otherwise only issues for the Shopping destination. 10478 Destinations []string `json:"destinations,omitempty"` 10479 10480 IncludeAttributes bool `json:"includeAttributes,omitempty"` 10481 10482 // MerchantId: The ID of the managing account. 10483 MerchantId uint64 `json:"merchantId,omitempty,string"` 10484 10485 // Method: The method of the batch entry. Acceptable values are: - 10486 // "get" 10487 Method string `json:"method,omitempty"` 10488 10489 // ProductId: The ID of the product whose status to get. 10490 ProductId string `json:"productId,omitempty"` 10491 10492 // ForceSendFields is a list of field names (e.g. "BatchId") to 10493 // unconditionally include in API requests. By default, fields with 10494 // empty values are omitted from API requests. However, any non-pointer, 10495 // non-interface field appearing in ForceSendFields will be sent to the 10496 // server regardless of whether the field is empty or not. This may be 10497 // used to include empty fields in Patch requests. 10498 ForceSendFields []string `json:"-"` 10499 10500 // NullFields is a list of field names (e.g. "BatchId") to include in 10501 // API requests with the JSON null value. By default, fields with empty 10502 // values are omitted from API requests. However, any field with an 10503 // empty value appearing in NullFields will be sent to the server as 10504 // null. It is an error if a field in this list has a non-empty value. 10505 // This may be used to include null fields in Patch requests. 10506 NullFields []string `json:"-"` 10507} 10508 10509func (s *ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 10510 type NoMethod ProductstatusesCustomBatchRequestEntry 10511 raw := NoMethod(*s) 10512 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10513} 10514 10515type ProductstatusesCustomBatchResponse struct { 10516 // Entries: The result of the execution of the batch requests. 10517 Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"` 10518 10519 // Kind: Identifies what kind of resource this is. Value: the fixed 10520 // string "content#productstatusesCustomBatchResponse". 10521 Kind string `json:"kind,omitempty"` 10522 10523 // ServerResponse contains the HTTP response code and headers from the 10524 // server. 10525 googleapi.ServerResponse `json:"-"` 10526 10527 // ForceSendFields is a list of field names (e.g. "Entries") to 10528 // unconditionally include in API requests. By default, fields with 10529 // empty values are omitted from API requests. However, any non-pointer, 10530 // non-interface field appearing in ForceSendFields will be sent to the 10531 // server regardless of whether the field is empty or not. This may be 10532 // used to include empty fields in Patch requests. 10533 ForceSendFields []string `json:"-"` 10534 10535 // NullFields is a list of field names (e.g. "Entries") to include in 10536 // API requests with the JSON null value. By default, fields with empty 10537 // values are omitted from API requests. However, any field with an 10538 // empty value appearing in NullFields will be sent to the server as 10539 // null. It is an error if a field in this list has a non-empty value. 10540 // This may be used to include null fields in Patch requests. 10541 NullFields []string `json:"-"` 10542} 10543 10544func (s *ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { 10545 type NoMethod ProductstatusesCustomBatchResponse 10546 raw := NoMethod(*s) 10547 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10548} 10549 10550// ProductstatusesCustomBatchResponseEntry: A batch entry encoding a 10551// single non-batch productstatuses response. 10552type ProductstatusesCustomBatchResponseEntry struct { 10553 // BatchId: The ID of the request entry this entry responds to. 10554 BatchId int64 `json:"batchId,omitempty"` 10555 10556 // Errors: A list of errors, if the request failed. 10557 Errors *Errors `json:"errors,omitempty"` 10558 10559 // Kind: Identifies what kind of resource this is. Value: the fixed 10560 // string "content#productstatusesCustomBatchResponseEntry" 10561 Kind string `json:"kind,omitempty"` 10562 10563 // ProductStatus: The requested product status. Only defined if the 10564 // request was successful. 10565 ProductStatus *ProductStatus `json:"productStatus,omitempty"` 10566 10567 // ForceSendFields is a list of field names (e.g. "BatchId") to 10568 // unconditionally include in API requests. By default, fields with 10569 // empty values are omitted from API requests. However, any non-pointer, 10570 // non-interface field appearing in ForceSendFields will be sent to the 10571 // server regardless of whether the field is empty or not. This may be 10572 // used to include empty fields in Patch requests. 10573 ForceSendFields []string `json:"-"` 10574 10575 // NullFields is a list of field names (e.g. "BatchId") to include in 10576 // API requests with the JSON null value. By default, fields with empty 10577 // values are omitted from API requests. However, any field with an 10578 // empty value appearing in NullFields will be sent to the server as 10579 // null. It is an error if a field in this list has a non-empty value. 10580 // This may be used to include null fields in Patch requests. 10581 NullFields []string `json:"-"` 10582} 10583 10584func (s *ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 10585 type NoMethod ProductstatusesCustomBatchResponseEntry 10586 raw := NoMethod(*s) 10587 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10588} 10589 10590type ProductstatusesListResponse struct { 10591 // Kind: Identifies what kind of resource this is. Value: the fixed 10592 // string "content#productstatusesListResponse". 10593 Kind string `json:"kind,omitempty"` 10594 10595 // NextPageToken: The token for the retrieval of the next page of 10596 // products statuses. 10597 NextPageToken string `json:"nextPageToken,omitempty"` 10598 10599 Resources []*ProductStatus `json:"resources,omitempty"` 10600 10601 // ServerResponse contains the HTTP response code and headers from the 10602 // server. 10603 googleapi.ServerResponse `json:"-"` 10604 10605 // ForceSendFields is a list of field names (e.g. "Kind") to 10606 // unconditionally include in API requests. By default, fields with 10607 // empty values are omitted from API requests. However, any non-pointer, 10608 // non-interface field appearing in ForceSendFields will be sent to the 10609 // server regardless of whether the field is empty or not. This may be 10610 // used to include empty fields in Patch requests. 10611 ForceSendFields []string `json:"-"` 10612 10613 // NullFields is a list of field names (e.g. "Kind") to include in API 10614 // requests with the JSON null value. By default, fields with empty 10615 // values are omitted from API requests. However, any field with an 10616 // empty value appearing in NullFields will be sent to the server as 10617 // null. It is an error if a field in this list has a non-empty value. 10618 // This may be used to include null fields in Patch requests. 10619 NullFields []string `json:"-"` 10620} 10621 10622func (s *ProductstatusesListResponse) MarshalJSON() ([]byte, error) { 10623 type NoMethod ProductstatusesListResponse 10624 raw := NoMethod(*s) 10625 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10626} 10627 10628type Promotion struct { 10629 // PromotionAmount: [required] Amount of the promotion. The values here 10630 // are the promotion applied to the unit price pretax and to the total 10631 // of the tax amounts. 10632 PromotionAmount *Amount `json:"promotionAmount,omitempty"` 10633 10634 // PromotionId: [required] ID of the promotion. 10635 PromotionId string `json:"promotionId,omitempty"` 10636 10637 // ForceSendFields is a list of field names (e.g. "PromotionAmount") to 10638 // unconditionally include in API requests. By default, fields with 10639 // empty values are omitted from API requests. However, any non-pointer, 10640 // non-interface field appearing in ForceSendFields will be sent to the 10641 // server regardless of whether the field is empty or not. This may be 10642 // used to include empty fields in Patch requests. 10643 ForceSendFields []string `json:"-"` 10644 10645 // NullFields is a list of field names (e.g. "PromotionAmount") to 10646 // include in API requests with the JSON null value. By default, fields 10647 // with empty values are omitted from API requests. However, any field 10648 // with an empty value appearing in NullFields will be sent to the 10649 // server as null. It is an error if a field in this list has a 10650 // non-empty value. This may be used to include null fields in Patch 10651 // requests. 10652 NullFields []string `json:"-"` 10653} 10654 10655func (s *Promotion) MarshalJSON() ([]byte, error) { 10656 type NoMethod Promotion 10657 raw := NoMethod(*s) 10658 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10659} 10660 10661type RateGroup struct { 10662 // ApplicableShippingLabels: A list of shipping labels defining the 10663 // products to which this rate group applies to. This is a disjunction: 10664 // only one of the labels has to match for the rate group to apply. May 10665 // only be empty for the last rate group of a service. Required. 10666 ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"` 10667 10668 // CarrierRates: A list of carrier rates that can be referred to by 10669 // `mainTable` or `singleValue`. 10670 CarrierRates []*CarrierRate `json:"carrierRates,omitempty"` 10671 10672 // MainTable: A table defining the rate group, when `singleValue` is not 10673 // expressive enough. Can only be set if `singleValue` is not set. 10674 MainTable *Table `json:"mainTable,omitempty"` 10675 10676 // Name: Name of the rate group. Optional. If set has to be unique 10677 // within shipping service. 10678 Name string `json:"name,omitempty"` 10679 10680 // SingleValue: The value of the rate group (e.g. flat rate $10). Can 10681 // only be set if `mainTable` and `subtables` are not set. 10682 SingleValue *Value `json:"singleValue,omitempty"` 10683 10684 // Subtables: A list of subtables referred to by `mainTable`. Can only 10685 // be set if `mainTable` is set. 10686 Subtables []*Table `json:"subtables,omitempty"` 10687 10688 // ForceSendFields is a list of field names (e.g. 10689 // "ApplicableShippingLabels") to unconditionally include in API 10690 // requests. By default, fields with empty values are omitted from API 10691 // requests. However, any non-pointer, non-interface field appearing in 10692 // ForceSendFields will be sent to the server regardless of whether the 10693 // field is empty or not. This may be used to include empty fields in 10694 // Patch requests. 10695 ForceSendFields []string `json:"-"` 10696 10697 // NullFields is a list of field names (e.g. "ApplicableShippingLabels") 10698 // to include in API requests with the JSON null value. By default, 10699 // fields with empty values are omitted from API requests. However, any 10700 // field with an empty value appearing in NullFields will be sent to the 10701 // server as null. It is an error if a field in this list has a 10702 // non-empty value. This may be used to include null fields in Patch 10703 // requests. 10704 NullFields []string `json:"-"` 10705} 10706 10707func (s *RateGroup) MarshalJSON() ([]byte, error) { 10708 type NoMethod RateGroup 10709 raw := NoMethod(*s) 10710 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10711} 10712 10713type RefundReason struct { 10714 // Description: Description of the reason. 10715 Description string `json:"description,omitempty"` 10716 10717 // ReasonCode: Code of the refund reason. Acceptable values are: - 10718 // "adjustment" - "autoPostInternal" - 10719 // "autoPostInvalidBillingAddress" - "autoPostNoInventory" - 10720 // "autoPostPriceError" - "autoPostUndeliverableShippingAddress" - 10721 // "couponAbuse" - "courtesyAdjustment" - "customerCanceled" - 10722 // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" 10723 // - "customerSupportRequested" - "deliveredLateByCarrier" - 10724 // "deliveredTooLate" - "expiredItem" - 10725 // "failToPushOrderGoogleError" - "failToPushOrderMerchantError" - 10726 // "failToPushOrderMerchantFulfillmentError" - 10727 // "failToPushOrderToMerchant" - 10728 // "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - 10729 // "invalidCoupon" - "lateShipmentCredit" - 10730 // "malformedShippingAddress" - "merchantDidNotShipOnTime" - 10731 // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - 10732 // "paymentDeclined" - "priceAdjustment" - "priceError" - 10733 // "productArrivedDamaged" - "productNotAsDescribed" - 10734 // "promoReallocation" - "qualityNotAsExpected" - 10735 // "returnRefundAbuse" - "shippingCostAdjustment" - 10736 // "shippingPriceError" - "taxAdjustment" - "taxError" - 10737 // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - 10738 // "wrongProductShipped" 10739 ReasonCode string `json:"reasonCode,omitempty"` 10740 10741 // ForceSendFields is a list of field names (e.g. "Description") to 10742 // unconditionally include in API requests. By default, fields with 10743 // empty values are omitted from API requests. However, any non-pointer, 10744 // non-interface field appearing in ForceSendFields will be sent to the 10745 // server regardless of whether the field is empty or not. This may be 10746 // used to include empty fields in Patch requests. 10747 ForceSendFields []string `json:"-"` 10748 10749 // NullFields is a list of field names (e.g. "Description") to include 10750 // in API requests with the JSON null value. By default, fields with 10751 // empty values are omitted from API requests. However, any field with 10752 // an empty value appearing in NullFields will be sent to the server as 10753 // null. It is an error if a field in this list has a non-empty value. 10754 // This may be used to include null fields in Patch requests. 10755 NullFields []string `json:"-"` 10756} 10757 10758func (s *RefundReason) MarshalJSON() ([]byte, error) { 10759 type NoMethod RefundReason 10760 raw := NoMethod(*s) 10761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10762} 10763 10764type ReturnShipment struct { 10765 // CreationDate: The date of creation of the shipment, in ISO 8601 10766 // format. 10767 CreationDate string `json:"creationDate,omitempty"` 10768 10769 // DeliveryDate: The date of delivery of the shipment, in ISO 8601 10770 // format. 10771 DeliveryDate string `json:"deliveryDate,omitempty"` 10772 10773 // ReturnMethodType: Type of the return method. Acceptable values are: - 10774 // "byMail" - "contactCustomerSupport" - "returnless" 10775 ReturnMethodType string `json:"returnMethodType,omitempty"` 10776 10777 // ShipmentId: Shipment ID generated by Google. 10778 ShipmentId string `json:"shipmentId,omitempty"` 10779 10780 // ShipmentTrackingInfos: Tracking information of the shipment. One 10781 // return shipment might be handled by several shipping carriers 10782 // sequentially. 10783 ShipmentTrackingInfos []*ShipmentTrackingInfo `json:"shipmentTrackingInfos,omitempty"` 10784 10785 // ShippingDate: The date of shipping of the shipment, in ISO 8601 10786 // format. 10787 ShippingDate string `json:"shippingDate,omitempty"` 10788 10789 // State: State of the shipment. Acceptable values are: - "completed" 10790 // - "new" - "shipped" - "undeliverable" - "pending" 10791 State string `json:"state,omitempty"` 10792 10793 // ForceSendFields is a list of field names (e.g. "CreationDate") to 10794 // unconditionally include in API requests. By default, fields with 10795 // empty values are omitted from API requests. However, any non-pointer, 10796 // non-interface field appearing in ForceSendFields will be sent to the 10797 // server regardless of whether the field is empty or not. This may be 10798 // used to include empty fields in Patch requests. 10799 ForceSendFields []string `json:"-"` 10800 10801 // NullFields is a list of field names (e.g. "CreationDate") to include 10802 // in API requests with the JSON null value. By default, fields with 10803 // empty values are omitted from API requests. However, any field with 10804 // an empty value appearing in NullFields will be sent to the server as 10805 // null. It is an error if a field in this list has a non-empty value. 10806 // This may be used to include null fields in Patch requests. 10807 NullFields []string `json:"-"` 10808} 10809 10810func (s *ReturnShipment) MarshalJSON() ([]byte, error) { 10811 type NoMethod ReturnShipment 10812 raw := NoMethod(*s) 10813 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10814} 10815 10816type Row struct { 10817 // Cells: The list of cells that constitute the row. Must have the same 10818 // length as `columnHeaders` for two-dimensional tables, a length of 1 10819 // for one-dimensional tables. Required. 10820 Cells []*Value `json:"cells,omitempty"` 10821 10822 // ForceSendFields is a list of field names (e.g. "Cells") to 10823 // unconditionally include in API requests. By default, fields with 10824 // empty values are omitted from API requests. However, any non-pointer, 10825 // non-interface field appearing in ForceSendFields will be sent to the 10826 // server regardless of whether the field is empty or not. This may be 10827 // used to include empty fields in Patch requests. 10828 ForceSendFields []string `json:"-"` 10829 10830 // NullFields is a list of field names (e.g. "Cells") to include in API 10831 // requests with the JSON null value. By default, fields with empty 10832 // values are omitted from API requests. However, any field with an 10833 // empty value appearing in NullFields will be sent to the server as 10834 // null. It is an error if a field in this list has a non-empty value. 10835 // This may be used to include null fields in Patch requests. 10836 NullFields []string `json:"-"` 10837} 10838 10839func (s *Row) MarshalJSON() ([]byte, error) { 10840 type NoMethod Row 10841 raw := NoMethod(*s) 10842 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10843} 10844 10845type Service struct { 10846 // Active: A boolean exposing the active status of the shipping service. 10847 // Required. 10848 Active bool `json:"active,omitempty"` 10849 10850 // Currency: The CLDR code of the currency to which this service 10851 // applies. Must match that of the prices in rate groups. 10852 Currency string `json:"currency,omitempty"` 10853 10854 // DeliveryCountry: The CLDR territory code of the country to which the 10855 // service applies. Required. 10856 DeliveryCountry string `json:"deliveryCountry,omitempty"` 10857 10858 // DeliveryTime: Time spent in various aspects from order to the 10859 // delivery of the product. Required. 10860 DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` 10861 10862 // Eligibility: Eligibility for this service. Acceptable values are: - 10863 // "All scenarios" - "All scenarios except Shopping Actions" - 10864 // "Shopping Actions" 10865 Eligibility string `json:"eligibility,omitempty"` 10866 10867 // MinimumOrderValue: Minimum order value for this service. If set, 10868 // indicates that customers will have to spend at least this amount. All 10869 // prices within a service must have the same currency. Cannot be set 10870 // together with minimum_order_value_table. 10871 MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` 10872 10873 // MinimumOrderValueTable: Table of per store minimum order values for 10874 // the pickup fulfillment type. Cannot be set together with 10875 // minimum_order_value. 10876 MinimumOrderValueTable *MinimumOrderValueTable `json:"minimumOrderValueTable,omitempty"` 10877 10878 // Name: Free-form name of the service. Must be unique within target 10879 // account. Required. 10880 Name string `json:"name,omitempty"` 10881 10882 // PickupService: The carrier-service pair delivering items to 10883 // collection points. The list of supported pickup services can be 10884 // retrieved via the `getSupportedPickupServices` method. Required if 10885 // and only if the service delivery type is `pickup`. 10886 PickupService *PickupCarrierService `json:"pickupService,omitempty"` 10887 10888 // RateGroups: Shipping rate group definitions. Only the last one is 10889 // allowed to have an empty `applicableShippingLabels`, which means 10890 // "everything else". The other `applicableShippingLabels` must not 10891 // overlap. 10892 RateGroups []*RateGroup `json:"rateGroups,omitempty"` 10893 10894 // ShipmentType: Type of locations this service ships orders to. 10895 // Acceptable values are: - "delivery" - "pickup" 10896 ShipmentType string `json:"shipmentType,omitempty"` 10897 10898 // ForceSendFields is a list of field names (e.g. "Active") to 10899 // unconditionally include in API requests. By default, fields with 10900 // empty values are omitted from API requests. However, any non-pointer, 10901 // non-interface field appearing in ForceSendFields will be sent to the 10902 // server regardless of whether the field is empty or not. This may be 10903 // used to include empty fields in Patch requests. 10904 ForceSendFields []string `json:"-"` 10905 10906 // NullFields is a list of field names (e.g. "Active") to include in API 10907 // requests with the JSON null value. By default, fields with empty 10908 // values are omitted from API requests. However, any field with an 10909 // empty value appearing in NullFields will be sent to the server as 10910 // null. It is an error if a field in this list has a non-empty value. 10911 // This may be used to include null fields in Patch requests. 10912 NullFields []string `json:"-"` 10913} 10914 10915func (s *Service) MarshalJSON() ([]byte, error) { 10916 type NoMethod Service 10917 raw := NoMethod(*s) 10918 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10919} 10920 10921type ShipmentInvoice struct { 10922 // InvoiceSummary: [required] Invoice summary. 10923 InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` 10924 10925 // LineItemInvoices: [required] Invoice details per line item. 10926 LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` 10927 10928 // ShipmentGroupId: [required] ID of the shipment group. It is assigned 10929 // by the merchant in the `shipLineItems` method and is used to group 10930 // multiple line items that have the same kind of shipping charges. 10931 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 10932 10933 // ForceSendFields is a list of field names (e.g. "InvoiceSummary") to 10934 // unconditionally include in API requests. By default, fields with 10935 // empty values are omitted from API requests. However, any non-pointer, 10936 // non-interface field appearing in ForceSendFields will be sent to the 10937 // server regardless of whether the field is empty or not. This may be 10938 // used to include empty fields in Patch requests. 10939 ForceSendFields []string `json:"-"` 10940 10941 // NullFields is a list of field names (e.g. "InvoiceSummary") to 10942 // include in API requests with the JSON null value. By default, fields 10943 // with empty values are omitted from API requests. However, any field 10944 // with an empty value appearing in NullFields will be sent to the 10945 // server as null. It is an error if a field in this list has a 10946 // non-empty value. This may be used to include null fields in Patch 10947 // requests. 10948 NullFields []string `json:"-"` 10949} 10950 10951func (s *ShipmentInvoice) MarshalJSON() ([]byte, error) { 10952 type NoMethod ShipmentInvoice 10953 raw := NoMethod(*s) 10954 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10955} 10956 10957type ShipmentInvoiceLineItemInvoice struct { 10958 // LineItemId: ID of the line item. Either lineItemId or productId must 10959 // be set. 10960 LineItemId string `json:"lineItemId,omitempty"` 10961 10962 // ProductId: ID of the product. This is the REST ID used in the 10963 // products service. Either lineItemId or productId must be set. 10964 ProductId string `json:"productId,omitempty"` 10965 10966 // ShipmentUnitIds: [required] The shipment unit ID is assigned by the 10967 // merchant and defines individual quantities within a line item. The 10968 // same ID can be assigned to units that are the same while units that 10969 // differ must be assigned a different ID (for example: free or 10970 // promotional units). 10971 ShipmentUnitIds []string `json:"shipmentUnitIds,omitempty"` 10972 10973 // UnitInvoice: [required] Invoice details for a single unit. 10974 UnitInvoice *UnitInvoice `json:"unitInvoice,omitempty"` 10975 10976 // ForceSendFields is a list of field names (e.g. "LineItemId") to 10977 // unconditionally include in API requests. By default, fields with 10978 // empty values are omitted from API requests. However, any non-pointer, 10979 // non-interface field appearing in ForceSendFields will be sent to the 10980 // server regardless of whether the field is empty or not. This may be 10981 // used to include empty fields in Patch requests. 10982 ForceSendFields []string `json:"-"` 10983 10984 // NullFields is a list of field names (e.g. "LineItemId") to include in 10985 // API requests with the JSON null value. By default, fields with empty 10986 // values are omitted from API requests. However, any field with an 10987 // empty value appearing in NullFields will be sent to the server as 10988 // null. It is an error if a field in this list has a non-empty value. 10989 // This may be used to include null fields in Patch requests. 10990 NullFields []string `json:"-"` 10991} 10992 10993func (s *ShipmentInvoiceLineItemInvoice) MarshalJSON() ([]byte, error) { 10994 type NoMethod ShipmentInvoiceLineItemInvoice 10995 raw := NoMethod(*s) 10996 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10997} 10998 10999type ShipmentTrackingInfo struct { 11000 // Carrier: The shipping carrier that handles the package. Acceptable 11001 // values are: - "boxtal" - "bpost" - "chronopost" - 11002 // "colisPrive" - "colissimo" - "cxt" - "deliv" - "dhl" - 11003 // "dpd" - "dynamex" - "eCourier" - "easypost" - "efw" - 11004 // "fedex" - "fedexSmartpost" - "geodis" - "gls" - 11005 // "googleCourier" - "gsx" - "jdLogistics" - "laPoste" - 11006 // "lasership" - "manual" - "mpx" - "onTrac" - "other" - 11007 // "tnt" - "uds" - "ups" - "usps" 11008 Carrier string `json:"carrier,omitempty"` 11009 11010 // TrackingNumber: The tracking number for the package. 11011 TrackingNumber string `json:"trackingNumber,omitempty"` 11012 11013 // ForceSendFields is a list of field names (e.g. "Carrier") to 11014 // unconditionally include in API requests. By default, fields with 11015 // empty values are omitted from API requests. However, any non-pointer, 11016 // non-interface field appearing in ForceSendFields will be sent to the 11017 // server regardless of whether the field is empty or not. This may be 11018 // used to include empty fields in Patch requests. 11019 ForceSendFields []string `json:"-"` 11020 11021 // NullFields is a list of field names (e.g. "Carrier") to include in 11022 // API requests with the JSON null value. By default, fields with empty 11023 // values are omitted from API requests. However, any field with an 11024 // empty value appearing in NullFields will be sent to the server as 11025 // null. It is an error if a field in this list has a non-empty value. 11026 // This may be used to include null fields in Patch requests. 11027 NullFields []string `json:"-"` 11028} 11029 11030func (s *ShipmentTrackingInfo) MarshalJSON() ([]byte, error) { 11031 type NoMethod ShipmentTrackingInfo 11032 raw := NoMethod(*s) 11033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11034} 11035 11036// ShippingSettings: The merchant account's shipping settings. All 11037// methods except getsupportedcarriers and getsupportedholidays require 11038// the admin role. 11039type ShippingSettings struct { 11040 // AccountId: The ID of the account to which these account shipping 11041 // settings belong. Ignored upon update, always present in get request 11042 // responses. 11043 AccountId uint64 `json:"accountId,omitempty,string"` 11044 11045 // PostalCodeGroups: A list of postal code groups that can be referred 11046 // to in `services`. Optional. 11047 PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` 11048 11049 // Services: The target account's list of services. Optional. 11050 Services []*Service `json:"services,omitempty"` 11051 11052 // ServerResponse contains the HTTP response code and headers from the 11053 // server. 11054 googleapi.ServerResponse `json:"-"` 11055 11056 // ForceSendFields is a list of field names (e.g. "AccountId") to 11057 // unconditionally include in API requests. By default, fields with 11058 // empty values are omitted from API requests. However, any non-pointer, 11059 // non-interface field appearing in ForceSendFields will be sent to the 11060 // server regardless of whether the field is empty or not. This may be 11061 // used to include empty fields in Patch requests. 11062 ForceSendFields []string `json:"-"` 11063 11064 // NullFields is a list of field names (e.g. "AccountId") to include in 11065 // API requests with the JSON null value. By default, fields with empty 11066 // values are omitted from API requests. However, any field with an 11067 // empty value appearing in NullFields will be sent to the server as 11068 // null. It is an error if a field in this list has a non-empty value. 11069 // This may be used to include null fields in Patch requests. 11070 NullFields []string `json:"-"` 11071} 11072 11073func (s *ShippingSettings) MarshalJSON() ([]byte, error) { 11074 type NoMethod ShippingSettings 11075 raw := NoMethod(*s) 11076 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11077} 11078 11079type ShippingsettingsCustomBatchRequest struct { 11080 // Entries: The request entries to be processed in the batch. 11081 Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` 11082 11083 // ForceSendFields is a list of field names (e.g. "Entries") to 11084 // unconditionally include in API requests. By default, fields with 11085 // empty values are omitted from API requests. However, any non-pointer, 11086 // non-interface field appearing in ForceSendFields will be sent to the 11087 // server regardless of whether the field is empty or not. This may be 11088 // used to include empty fields in Patch requests. 11089 ForceSendFields []string `json:"-"` 11090 11091 // NullFields is a list of field names (e.g. "Entries") to include in 11092 // API requests with the JSON null value. By default, fields with empty 11093 // values are omitted from API requests. However, any field with an 11094 // empty value appearing in NullFields will be sent to the server as 11095 // null. It is an error if a field in this list has a non-empty value. 11096 // This may be used to include null fields in Patch requests. 11097 NullFields []string `json:"-"` 11098} 11099 11100func (s *ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { 11101 type NoMethod ShippingsettingsCustomBatchRequest 11102 raw := NoMethod(*s) 11103 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11104} 11105 11106// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a 11107// single non-batch shippingsettings request. 11108type ShippingsettingsCustomBatchRequestEntry struct { 11109 // AccountId: The ID of the account for which to get/update account 11110 // shipping settings. 11111 AccountId uint64 `json:"accountId,omitempty,string"` 11112 11113 // BatchId: An entry ID, unique within the batch request. 11114 BatchId int64 `json:"batchId,omitempty"` 11115 11116 // MerchantId: The ID of the managing account. 11117 MerchantId uint64 `json:"merchantId,omitempty,string"` 11118 11119 // Method: The method of the batch entry. Acceptable values are: - 11120 // "get" - "update" 11121 Method string `json:"method,omitempty"` 11122 11123 // ShippingSettings: The account shipping settings to update. Only 11124 // defined if the method is `update`. 11125 ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` 11126 11127 // ForceSendFields is a list of field names (e.g. "AccountId") to 11128 // unconditionally include in API requests. By default, fields with 11129 // empty values are omitted from API requests. However, any non-pointer, 11130 // non-interface field appearing in ForceSendFields will be sent to the 11131 // server regardless of whether the field is empty or not. This may be 11132 // used to include empty fields in Patch requests. 11133 ForceSendFields []string `json:"-"` 11134 11135 // NullFields is a list of field names (e.g. "AccountId") to include in 11136 // API requests with the JSON null value. By default, fields with empty 11137 // values are omitted from API requests. However, any field with an 11138 // empty value appearing in NullFields will be sent to the server as 11139 // null. It is an error if a field in this list has a non-empty value. 11140 // This may be used to include null fields in Patch requests. 11141 NullFields []string `json:"-"` 11142} 11143 11144func (s *ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 11145 type NoMethod ShippingsettingsCustomBatchRequestEntry 11146 raw := NoMethod(*s) 11147 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11148} 11149 11150type ShippingsettingsCustomBatchResponse struct { 11151 // Entries: The result of the execution of the batch requests. 11152 Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` 11153 11154 // Kind: Identifies what kind of resource this is. Value: the fixed 11155 // string "content#shippingsettingsCustomBatchResponse". 11156 Kind string `json:"kind,omitempty"` 11157 11158 // ServerResponse contains the HTTP response code and headers from the 11159 // server. 11160 googleapi.ServerResponse `json:"-"` 11161 11162 // ForceSendFields is a list of field names (e.g. "Entries") to 11163 // unconditionally include in API requests. By default, fields with 11164 // empty values are omitted from API requests. However, any non-pointer, 11165 // non-interface field appearing in ForceSendFields will be sent to the 11166 // server regardless of whether the field is empty or not. This may be 11167 // used to include empty fields in Patch requests. 11168 ForceSendFields []string `json:"-"` 11169 11170 // NullFields is a list of field names (e.g. "Entries") to include in 11171 // API requests with the JSON null value. By default, fields with empty 11172 // values are omitted from API requests. However, any field with an 11173 // empty value appearing in NullFields will be sent to the server as 11174 // null. It is an error if a field in this list has a non-empty value. 11175 // This may be used to include null fields in Patch requests. 11176 NullFields []string `json:"-"` 11177} 11178 11179func (s *ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { 11180 type NoMethod ShippingsettingsCustomBatchResponse 11181 raw := NoMethod(*s) 11182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11183} 11184 11185// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a 11186// single non-batch shipping settings response. 11187type ShippingsettingsCustomBatchResponseEntry struct { 11188 // BatchId: The ID of the request entry to which this entry responds. 11189 BatchId int64 `json:"batchId,omitempty"` 11190 11191 // Errors: A list of errors defined if, and only if, the request failed. 11192 Errors *Errors `json:"errors,omitempty"` 11193 11194 // Kind: Identifies what kind of resource this is. Value: the fixed 11195 // string "content#shippingsettingsCustomBatchResponseEntry" 11196 Kind string `json:"kind,omitempty"` 11197 11198 // ShippingSettings: The retrieved or updated account shipping settings. 11199 ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` 11200 11201 // ForceSendFields is a list of field names (e.g. "BatchId") to 11202 // unconditionally include in API requests. By default, fields with 11203 // empty values are omitted from API requests. However, any non-pointer, 11204 // non-interface field appearing in ForceSendFields will be sent to the 11205 // server regardless of whether the field is empty or not. This may be 11206 // used to include empty fields in Patch requests. 11207 ForceSendFields []string `json:"-"` 11208 11209 // NullFields is a list of field names (e.g. "BatchId") to include in 11210 // API requests with the JSON null value. By default, fields with empty 11211 // values are omitted from API requests. However, any field with an 11212 // empty value appearing in NullFields will be sent to the server as 11213 // null. It is an error if a field in this list has a non-empty value. 11214 // This may be used to include null fields in Patch requests. 11215 NullFields []string `json:"-"` 11216} 11217 11218func (s *ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 11219 type NoMethod ShippingsettingsCustomBatchResponseEntry 11220 raw := NoMethod(*s) 11221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11222} 11223 11224type ShippingsettingsGetSupportedCarriersResponse struct { 11225 // Carriers: A list of supported carriers. May be empty. 11226 Carriers []*CarriersCarrier `json:"carriers,omitempty"` 11227 11228 // Kind: Identifies what kind of resource this is. Value: the fixed 11229 // string "content#shippingsettingsGetSupportedCarriersResponse". 11230 Kind string `json:"kind,omitempty"` 11231 11232 // ServerResponse contains the HTTP response code and headers from the 11233 // server. 11234 googleapi.ServerResponse `json:"-"` 11235 11236 // ForceSendFields is a list of field names (e.g. "Carriers") to 11237 // unconditionally include in API requests. By default, fields with 11238 // empty values are omitted from API requests. However, any non-pointer, 11239 // non-interface field appearing in ForceSendFields will be sent to the 11240 // server regardless of whether the field is empty or not. This may be 11241 // used to include empty fields in Patch requests. 11242 ForceSendFields []string `json:"-"` 11243 11244 // NullFields is a list of field names (e.g. "Carriers") to include in 11245 // API requests with the JSON null value. By default, fields with empty 11246 // values are omitted from API requests. However, any field with an 11247 // empty value appearing in NullFields will be sent to the server as 11248 // null. It is an error if a field in this list has a non-empty value. 11249 // This may be used to include null fields in Patch requests. 11250 NullFields []string `json:"-"` 11251} 11252 11253func (s *ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { 11254 type NoMethod ShippingsettingsGetSupportedCarriersResponse 11255 raw := NoMethod(*s) 11256 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11257} 11258 11259type ShippingsettingsGetSupportedHolidaysResponse struct { 11260 // Holidays: A list of holidays applicable for delivery guarantees. May 11261 // be empty. 11262 Holidays []*HolidaysHoliday `json:"holidays,omitempty"` 11263 11264 // Kind: Identifies what kind of resource this is. Value: the fixed 11265 // string "content#shippingsettingsGetSupportedHolidaysResponse". 11266 Kind string `json:"kind,omitempty"` 11267 11268 // ServerResponse contains the HTTP response code and headers from the 11269 // server. 11270 googleapi.ServerResponse `json:"-"` 11271 11272 // ForceSendFields is a list of field names (e.g. "Holidays") to 11273 // unconditionally include in API requests. By default, fields with 11274 // empty values are omitted from API requests. However, any non-pointer, 11275 // non-interface field appearing in ForceSendFields will be sent to the 11276 // server regardless of whether the field is empty or not. This may be 11277 // used to include empty fields in Patch requests. 11278 ForceSendFields []string `json:"-"` 11279 11280 // NullFields is a list of field names (e.g. "Holidays") to include in 11281 // API requests with the JSON null value. By default, fields with empty 11282 // values are omitted from API requests. However, any field with an 11283 // empty value appearing in NullFields will be sent to the server as 11284 // null. It is an error if a field in this list has a non-empty value. 11285 // This may be used to include null fields in Patch requests. 11286 NullFields []string `json:"-"` 11287} 11288 11289func (s *ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { 11290 type NoMethod ShippingsettingsGetSupportedHolidaysResponse 11291 raw := NoMethod(*s) 11292 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11293} 11294 11295type ShippingsettingsGetSupportedPickupServicesResponse struct { 11296 // Kind: Identifies what kind of resource this is. Value: the fixed 11297 // string "content#shippingsettingsGetSupportedPickupServicesResponse". 11298 Kind string `json:"kind,omitempty"` 11299 11300 // PickupServices: A list of supported pickup services. May be empty. 11301 PickupServices []*PickupServicesPickupService `json:"pickupServices,omitempty"` 11302 11303 // ServerResponse contains the HTTP response code and headers from the 11304 // server. 11305 googleapi.ServerResponse `json:"-"` 11306 11307 // ForceSendFields is a list of field names (e.g. "Kind") to 11308 // unconditionally include in API requests. By default, fields with 11309 // empty values are omitted from API requests. However, any non-pointer, 11310 // non-interface field appearing in ForceSendFields will be sent to the 11311 // server regardless of whether the field is empty or not. This may be 11312 // used to include empty fields in Patch requests. 11313 ForceSendFields []string `json:"-"` 11314 11315 // NullFields is a list of field names (e.g. "Kind") to include in API 11316 // requests with the JSON null value. By default, fields with empty 11317 // values are omitted from API requests. However, any field with an 11318 // empty value appearing in NullFields will be sent to the server as 11319 // null. It is an error if a field in this list has a non-empty value. 11320 // This may be used to include null fields in Patch requests. 11321 NullFields []string `json:"-"` 11322} 11323 11324func (s *ShippingsettingsGetSupportedPickupServicesResponse) MarshalJSON() ([]byte, error) { 11325 type NoMethod ShippingsettingsGetSupportedPickupServicesResponse 11326 raw := NoMethod(*s) 11327 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11328} 11329 11330type ShippingsettingsListResponse struct { 11331 // Kind: Identifies what kind of resource this is. Value: the fixed 11332 // string "content#shippingsettingsListResponse". 11333 Kind string `json:"kind,omitempty"` 11334 11335 // NextPageToken: The token for the retrieval of the next page of 11336 // shipping settings. 11337 NextPageToken string `json:"nextPageToken,omitempty"` 11338 11339 Resources []*ShippingSettings `json:"resources,omitempty"` 11340 11341 // ServerResponse contains the HTTP response code and headers from the 11342 // server. 11343 googleapi.ServerResponse `json:"-"` 11344 11345 // ForceSendFields is a list of field names (e.g. "Kind") to 11346 // unconditionally include in API requests. By default, fields with 11347 // empty values are omitted from API requests. However, any non-pointer, 11348 // non-interface field appearing in ForceSendFields will be sent to the 11349 // server regardless of whether the field is empty or not. This may be 11350 // used to include empty fields in Patch requests. 11351 ForceSendFields []string `json:"-"` 11352 11353 // NullFields is a list of field names (e.g. "Kind") to include in API 11354 // requests with the JSON null value. By default, fields with empty 11355 // values are omitted from API requests. However, any field with an 11356 // empty value appearing in NullFields will be sent to the server as 11357 // null. It is an error if a field in this list has a non-empty value. 11358 // This may be used to include null fields in Patch requests. 11359 NullFields []string `json:"-"` 11360} 11361 11362func (s *ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { 11363 type NoMethod ShippingsettingsListResponse 11364 raw := NoMethod(*s) 11365 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11366} 11367 11368type Table struct { 11369 // ColumnHeaders: Headers of the table's columns. Optional: if not set 11370 // then the table has only one dimension. 11371 ColumnHeaders *Headers `json:"columnHeaders,omitempty"` 11372 11373 // Name: Name of the table. Required for subtables, ignored for the main 11374 // table. 11375 Name string `json:"name,omitempty"` 11376 11377 // RowHeaders: Headers of the table's rows. Required. 11378 RowHeaders *Headers `json:"rowHeaders,omitempty"` 11379 11380 // Rows: The list of rows that constitute the table. Must have the same 11381 // length as `rowHeaders`. Required. 11382 Rows []*Row `json:"rows,omitempty"` 11383 11384 // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to 11385 // unconditionally include in API requests. By default, fields with 11386 // empty values are omitted from API requests. However, any non-pointer, 11387 // non-interface field appearing in ForceSendFields will be sent to the 11388 // server regardless of whether the field is empty or not. This may be 11389 // used to include empty fields in Patch requests. 11390 ForceSendFields []string `json:"-"` 11391 11392 // NullFields is a list of field names (e.g. "ColumnHeaders") to include 11393 // in API requests with the JSON null value. By default, fields with 11394 // empty values are omitted from API requests. However, any field with 11395 // an empty value appearing in NullFields will be sent to the server as 11396 // null. It is an error if a field in this list has a non-empty value. 11397 // This may be used to include null fields in Patch requests. 11398 NullFields []string `json:"-"` 11399} 11400 11401func (s *Table) MarshalJSON() ([]byte, error) { 11402 type NoMethod Table 11403 raw := NoMethod(*s) 11404 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11405} 11406 11407type TestOrder struct { 11408 // Customer: Required. The details of the customer who placed the order. 11409 Customer *TestOrderCustomer `json:"customer,omitempty"` 11410 11411 // EnableOrderinvoices: Whether the orderinvoices service should support 11412 // this order. 11413 EnableOrderinvoices bool `json:"enableOrderinvoices,omitempty"` 11414 11415 // Kind: Identifies what kind of resource this is. Value: the fixed 11416 // string "content#testOrder" 11417 Kind string `json:"kind,omitempty"` 11418 11419 // LineItems: Required. Line items that are ordered. At least one line 11420 // item must be provided. 11421 LineItems []*TestOrderLineItem `json:"lineItems,omitempty"` 11422 11423 // NotificationMode: Restricted. Do not use. 11424 NotificationMode string `json:"notificationMode,omitempty"` 11425 11426 // PaymentMethod: The details of the payment method. 11427 PaymentMethod *TestOrderPaymentMethod `json:"paymentMethod,omitempty"` 11428 11429 // PredefinedDeliveryAddress: Required. Identifier of one of the 11430 // predefined delivery addresses for the delivery. Acceptable values 11431 // are: - "dwight" - "jim" - "pam" 11432 PredefinedDeliveryAddress string `json:"predefinedDeliveryAddress,omitempty"` 11433 11434 // PredefinedPickupDetails: Identifier of one of the predefined pickup 11435 // details. Required for orders containing line items with shipping type 11436 // `pickup`. Acceptable values are: - "dwight" - "jim" - "pam" 11437 PredefinedPickupDetails string `json:"predefinedPickupDetails,omitempty"` 11438 11439 // Promotions: Deprecated. Ignored if provided. 11440 Promotions []*OrderLegacyPromotion `json:"promotions,omitempty"` 11441 11442 // ShippingCost: Required. The price of shipping for all items. Shipping 11443 // tax is automatically calculated for orders where marketplace 11444 // facilitator tax laws are applicable. Otherwise, tax settings from 11445 // Merchant Center are applied. Note that shipping is not taxed in 11446 // certain states. 11447 ShippingCost *Price `json:"shippingCost,omitempty"` 11448 11449 // ShippingCostTax: Deprecated. Ignored if provided. 11450 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 11451 11452 // ShippingOption: Required. The requested shipping option. Acceptable 11453 // values are: - "economy" - "expedited" - "oneDay" - "sameDay" 11454 // - "standard" - "twoDay" 11455 ShippingOption string `json:"shippingOption,omitempty"` 11456 11457 // ForceSendFields is a list of field names (e.g. "Customer") to 11458 // unconditionally include in API requests. By default, fields with 11459 // empty values are omitted from API requests. However, any non-pointer, 11460 // non-interface field appearing in ForceSendFields will be sent to the 11461 // server regardless of whether the field is empty or not. This may be 11462 // used to include empty fields in Patch requests. 11463 ForceSendFields []string `json:"-"` 11464 11465 // NullFields is a list of field names (e.g. "Customer") to include in 11466 // API requests with the JSON null value. By default, fields with empty 11467 // values are omitted from API requests. However, any field with an 11468 // empty value appearing in NullFields will be sent to the server as 11469 // null. It is an error if a field in this list has a non-empty value. 11470 // This may be used to include null fields in Patch requests. 11471 NullFields []string `json:"-"` 11472} 11473 11474func (s *TestOrder) MarshalJSON() ([]byte, error) { 11475 type NoMethod TestOrder 11476 raw := NoMethod(*s) 11477 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11478} 11479 11480type TestOrderCustomer struct { 11481 // Email: Required. Email address of the customer. Acceptable values 11482 // are: - "pog.dwight.schrute@gmail.com" - 11483 // "pog.jim.halpert@gmail.com" - "penpog.pam.beesly@gmail.comding" 11484 Email string `json:"email,omitempty"` 11485 11486 // ExplicitMarketingPreference: Deprecated. Please use 11487 // marketingRightsInfo instead. 11488 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 11489 11490 // FullName: Full name of the customer. 11491 FullName string `json:"fullName,omitempty"` 11492 11493 // MarketingRightsInfo: Customer's marketing preferences. 11494 MarketingRightsInfo *TestOrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 11495 11496 // ForceSendFields is a list of field names (e.g. "Email") to 11497 // unconditionally include in API requests. By default, fields with 11498 // empty values are omitted from API requests. However, any non-pointer, 11499 // non-interface field appearing in ForceSendFields will be sent to the 11500 // server regardless of whether the field is empty or not. This may be 11501 // used to include empty fields in Patch requests. 11502 ForceSendFields []string `json:"-"` 11503 11504 // NullFields is a list of field names (e.g. "Email") to include in API 11505 // requests with the JSON null value. By default, fields with empty 11506 // values are omitted from API requests. However, any field with an 11507 // empty value appearing in NullFields will be sent to the server as 11508 // null. It is an error if a field in this list has a non-empty value. 11509 // This may be used to include null fields in Patch requests. 11510 NullFields []string `json:"-"` 11511} 11512 11513func (s *TestOrderCustomer) MarshalJSON() ([]byte, error) { 11514 type NoMethod TestOrderCustomer 11515 raw := NoMethod(*s) 11516 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11517} 11518 11519type TestOrderCustomerMarketingRightsInfo struct { 11520 // ExplicitMarketingPreference: Last know user use selection regards 11521 // marketing preferences. In certain cases selection might not be known, 11522 // so this field would be empty. Acceptable values are: - "denied" - 11523 // "granted" 11524 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 11525 11526 // LastUpdatedTimestamp: Timestamp when last time marketing preference 11527 // was updated. Could be empty, if user wasn't offered a selection yet. 11528 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 11529 11530 // ForceSendFields is a list of field names (e.g. 11531 // "ExplicitMarketingPreference") to unconditionally include in API 11532 // requests. By default, fields with empty values are omitted from API 11533 // requests. However, any non-pointer, non-interface field appearing in 11534 // ForceSendFields will be sent to the server regardless of whether the 11535 // field is empty or not. This may be used to include empty fields in 11536 // Patch requests. 11537 ForceSendFields []string `json:"-"` 11538 11539 // NullFields is a list of field names (e.g. 11540 // "ExplicitMarketingPreference") to include in API requests with the 11541 // JSON null value. By default, fields with empty values are omitted 11542 // from API requests. However, any field with an empty value appearing 11543 // in NullFields will be sent to the server as null. It is an error if a 11544 // field in this list has a non-empty value. This may be used to include 11545 // null fields in Patch requests. 11546 NullFields []string `json:"-"` 11547} 11548 11549func (s *TestOrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 11550 type NoMethod TestOrderCustomerMarketingRightsInfo 11551 raw := NoMethod(*s) 11552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11553} 11554 11555type TestOrderLineItem struct { 11556 // Product: Required. Product data from the time of the order placement. 11557 Product *TestOrderLineItemProduct `json:"product,omitempty"` 11558 11559 // QuantityOrdered: Required. Number of items ordered. 11560 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 11561 11562 // ReturnInfo: Required. Details of the return policy for the line item. 11563 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 11564 11565 // ShippingDetails: Required. Details of the requested shipping for the 11566 // line item. 11567 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 11568 11569 // UnitTax: Deprecated. Ignored if provided. 11570 UnitTax *Price `json:"unitTax,omitempty"` 11571 11572 // ForceSendFields is a list of field names (e.g. "Product") to 11573 // unconditionally include in API requests. By default, fields with 11574 // empty values are omitted from API requests. However, any non-pointer, 11575 // non-interface field appearing in ForceSendFields will be sent to the 11576 // server regardless of whether the field is empty or not. This may be 11577 // used to include empty fields in Patch requests. 11578 ForceSendFields []string `json:"-"` 11579 11580 // NullFields is a list of field names (e.g. "Product") to include in 11581 // API requests with the JSON null value. By default, fields with empty 11582 // values are omitted from API requests. However, any field with an 11583 // empty value appearing in NullFields will be sent to the server as 11584 // null. It is an error if a field in this list has a non-empty value. 11585 // This may be used to include null fields in Patch requests. 11586 NullFields []string `json:"-"` 11587} 11588 11589func (s *TestOrderLineItem) MarshalJSON() ([]byte, error) { 11590 type NoMethod TestOrderLineItem 11591 raw := NoMethod(*s) 11592 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11593} 11594 11595type TestOrderLineItemProduct struct { 11596 // Brand: Required. Brand of the item. 11597 Brand string `json:"brand,omitempty"` 11598 11599 // Channel: Deprecated. Acceptable values are: - "online" 11600 Channel string `json:"channel,omitempty"` 11601 11602 // Condition: Required. Condition or state of the item. Acceptable 11603 // values are: - "new" 11604 Condition string `json:"condition,omitempty"` 11605 11606 // ContentLanguage: Required. The two-letter ISO 639-1 language code for 11607 // the item. Acceptable values are: - "en" - "fr" 11608 ContentLanguage string `json:"contentLanguage,omitempty"` 11609 11610 // Fees: Fees for the item. Optional. 11611 Fees []*OrderLineItemProductFee `json:"fees,omitempty"` 11612 11613 // Gtin: Global Trade Item Number (GTIN) of the item. Optional. 11614 Gtin string `json:"gtin,omitempty"` 11615 11616 // ImageLink: Required. URL of an image of the item. 11617 ImageLink string `json:"imageLink,omitempty"` 11618 11619 // ItemGroupId: Shared identifier for all variants of the same product. 11620 // Optional. 11621 ItemGroupId string `json:"itemGroupId,omitempty"` 11622 11623 // Mpn: Manufacturer Part Number (MPN) of the item. Optional. 11624 Mpn string `json:"mpn,omitempty"` 11625 11626 // OfferId: Required. An identifier of the item. 11627 OfferId string `json:"offerId,omitempty"` 11628 11629 // Price: Required. The price for the product. Tax is automatically 11630 // calculated for orders where marketplace facilitator tax laws are 11631 // applicable. Otherwise, tax settings from Merchant Center are applied. 11632 Price *Price `json:"price,omitempty"` 11633 11634 // TargetCountry: Required. The CLDR territory // code of the target 11635 // country of the product. 11636 TargetCountry string `json:"targetCountry,omitempty"` 11637 11638 // Title: Required. The title of the product. 11639 Title string `json:"title,omitempty"` 11640 11641 // VariantAttributes: Variant attributes for the item. Optional. 11642 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 11643 11644 // ForceSendFields is a list of field names (e.g. "Brand") to 11645 // unconditionally include in API requests. By default, fields with 11646 // empty values are omitted from API requests. However, any non-pointer, 11647 // non-interface field appearing in ForceSendFields will be sent to the 11648 // server regardless of whether the field is empty or not. This may be 11649 // used to include empty fields in Patch requests. 11650 ForceSendFields []string `json:"-"` 11651 11652 // NullFields is a list of field names (e.g. "Brand") to include in API 11653 // requests with the JSON null value. By default, fields with empty 11654 // values are omitted from API requests. However, any field with an 11655 // empty value appearing in NullFields will be sent to the server as 11656 // null. It is an error if a field in this list has a non-empty value. 11657 // This may be used to include null fields in Patch requests. 11658 NullFields []string `json:"-"` 11659} 11660 11661func (s *TestOrderLineItemProduct) MarshalJSON() ([]byte, error) { 11662 type NoMethod TestOrderLineItemProduct 11663 raw := NoMethod(*s) 11664 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11665} 11666 11667type TestOrderPaymentMethod struct { 11668 // ExpirationMonth: The card expiration month (January = 1, February = 2 11669 // etc.). 11670 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 11671 11672 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 11673 ExpirationYear int64 `json:"expirationYear,omitempty"` 11674 11675 // LastFourDigits: The last four digits of the card number. 11676 LastFourDigits string `json:"lastFourDigits,omitempty"` 11677 11678 // PredefinedBillingAddress: The billing address. Acceptable values are: 11679 // - "dwight" - "jim" - "pam" 11680 PredefinedBillingAddress string `json:"predefinedBillingAddress,omitempty"` 11681 11682 // Type: The type of instrument. Note that real orders might have 11683 // different values than the four values accepted by `createTestOrder`. 11684 // Acceptable values are: - "AMEX" - "DISCOVER" - "MASTERCARD" - 11685 // "VISA" 11686 Type string `json:"type,omitempty"` 11687 11688 // ForceSendFields is a list of field names (e.g. "ExpirationMonth") to 11689 // unconditionally include in API requests. By default, fields with 11690 // empty values are omitted from API requests. However, any non-pointer, 11691 // non-interface field appearing in ForceSendFields will be sent to the 11692 // server regardless of whether the field is empty or not. This may be 11693 // used to include empty fields in Patch requests. 11694 ForceSendFields []string `json:"-"` 11695 11696 // NullFields is a list of field names (e.g. "ExpirationMonth") to 11697 // include in API requests with the JSON null value. By default, fields 11698 // with empty values are omitted from API requests. However, any field 11699 // with an empty value appearing in NullFields will be sent to the 11700 // server as null. It is an error if a field in this list has a 11701 // non-empty value. This may be used to include null fields in Patch 11702 // requests. 11703 NullFields []string `json:"-"` 11704} 11705 11706func (s *TestOrderPaymentMethod) MarshalJSON() ([]byte, error) { 11707 type NoMethod TestOrderPaymentMethod 11708 raw := NoMethod(*s) 11709 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11710} 11711 11712type TransitTable struct { 11713 // PostalCodeGroupNames: A list of postal group names. The last value 11714 // can be "all other locations". Example: `["zone 1", "zone 2", "all 11715 // other locations"]`. The referred postal code groups must match the 11716 // delivery country of the service. 11717 PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` 11718 11719 Rows []*TransitTableTransitTimeRow `json:"rows,omitempty"` 11720 11721 // TransitTimeLabels: A list of transit time labels. The last value can 11722 // be "all other labels". Example: `["food", "electronics", "all other 11723 // labels"]`. 11724 TransitTimeLabels []string `json:"transitTimeLabels,omitempty"` 11725 11726 // ForceSendFields is a list of field names (e.g. 11727 // "PostalCodeGroupNames") to unconditionally include in API requests. 11728 // By default, fields with empty values are omitted from API requests. 11729 // However, any non-pointer, non-interface field appearing in 11730 // ForceSendFields will be sent to the server regardless of whether the 11731 // field is empty or not. This may be used to include empty fields in 11732 // Patch requests. 11733 ForceSendFields []string `json:"-"` 11734 11735 // NullFields is a list of field names (e.g. "PostalCodeGroupNames") to 11736 // include in API requests with the JSON null value. By default, fields 11737 // with empty values are omitted from API requests. However, any field 11738 // with an empty value appearing in NullFields will be sent to the 11739 // server as null. It is an error if a field in this list has a 11740 // non-empty value. This may be used to include null fields in Patch 11741 // requests. 11742 NullFields []string `json:"-"` 11743} 11744 11745func (s *TransitTable) MarshalJSON() ([]byte, error) { 11746 type NoMethod TransitTable 11747 raw := NoMethod(*s) 11748 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11749} 11750 11751type TransitTableTransitTimeRow struct { 11752 Values []*TransitTableTransitTimeRowTransitTimeValue `json:"values,omitempty"` 11753 11754 // ForceSendFields is a list of field names (e.g. "Values") to 11755 // unconditionally include in API requests. By default, fields with 11756 // empty values are omitted from API requests. However, any non-pointer, 11757 // non-interface field appearing in ForceSendFields will be sent to the 11758 // server regardless of whether the field is empty or not. This may be 11759 // used to include empty fields in Patch requests. 11760 ForceSendFields []string `json:"-"` 11761 11762 // NullFields is a list of field names (e.g. "Values") to include in API 11763 // requests with the JSON null value. By default, fields with empty 11764 // values are omitted from API requests. However, any field with an 11765 // empty value appearing in NullFields will be sent to the server as 11766 // null. It is an error if a field in this list has a non-empty value. 11767 // This may be used to include null fields in Patch requests. 11768 NullFields []string `json:"-"` 11769} 11770 11771func (s *TransitTableTransitTimeRow) MarshalJSON() ([]byte, error) { 11772 type NoMethod TransitTableTransitTimeRow 11773 raw := NoMethod(*s) 11774 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11775} 11776 11777type TransitTableTransitTimeRowTransitTimeValue struct { 11778 // MaxTransitTimeInDays: Must be greater than or equal to 11779 // `minTransitTimeInDays`. 11780 MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` 11781 11782 // MinTransitTimeInDays: Transit time range (min-max) in business days. 11783 // 0 means same day delivery, 1 means next day delivery. 11784 MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` 11785 11786 // ForceSendFields is a list of field names (e.g. 11787 // "MaxTransitTimeInDays") to unconditionally include in API requests. 11788 // By default, fields with empty values are omitted from API requests. 11789 // However, any non-pointer, non-interface field appearing in 11790 // ForceSendFields will be sent to the server regardless of whether the 11791 // field is empty or not. This may be used to include empty fields in 11792 // Patch requests. 11793 ForceSendFields []string `json:"-"` 11794 11795 // NullFields is a list of field names (e.g. "MaxTransitTimeInDays") to 11796 // include in API requests with the JSON null value. By default, fields 11797 // with empty values are omitted from API requests. However, any field 11798 // with an empty value appearing in NullFields will be sent to the 11799 // server as null. It is an error if a field in this list has a 11800 // non-empty value. This may be used to include null fields in Patch 11801 // requests. 11802 NullFields []string `json:"-"` 11803} 11804 11805func (s *TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, error) { 11806 type NoMethod TransitTableTransitTimeRowTransitTimeValue 11807 raw := NoMethod(*s) 11808 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11809} 11810 11811type UnitInvoice struct { 11812 // AdditionalCharges: Additional charges for a unit, e.g. shipping 11813 // costs. 11814 AdditionalCharges []*UnitInvoiceAdditionalCharge `json:"additionalCharges,omitempty"` 11815 11816 // Promotions: Deprecated. 11817 Promotions []*Promotion `json:"promotions,omitempty"` 11818 11819 // UnitPricePretax: [required] Price of the unit, before applying taxes. 11820 UnitPricePretax *Price `json:"unitPricePretax,omitempty"` 11821 11822 // UnitPriceTaxes: Tax amounts to apply to the unit price. 11823 UnitPriceTaxes []*UnitInvoiceTaxLine `json:"unitPriceTaxes,omitempty"` 11824 11825 // ForceSendFields is a list of field names (e.g. "AdditionalCharges") 11826 // to unconditionally include in API requests. By default, fields with 11827 // empty values are omitted from API requests. However, any non-pointer, 11828 // non-interface field appearing in ForceSendFields will be sent to the 11829 // server regardless of whether the field is empty or not. This may be 11830 // used to include empty fields in Patch requests. 11831 ForceSendFields []string `json:"-"` 11832 11833 // NullFields is a list of field names (e.g. "AdditionalCharges") to 11834 // include in API requests with the JSON null value. By default, fields 11835 // with empty values are omitted from API requests. However, any field 11836 // with an empty value appearing in NullFields will be sent to the 11837 // server as null. It is an error if a field in this list has a 11838 // non-empty value. This may be used to include null fields in Patch 11839 // requests. 11840 NullFields []string `json:"-"` 11841} 11842 11843func (s *UnitInvoice) MarshalJSON() ([]byte, error) { 11844 type NoMethod UnitInvoice 11845 raw := NoMethod(*s) 11846 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11847} 11848 11849type UnitInvoiceAdditionalCharge struct { 11850 // AdditionalChargeAmount: [required] Amount of the additional charge. 11851 AdditionalChargeAmount *Amount `json:"additionalChargeAmount,omitempty"` 11852 11853 // AdditionalChargePromotions: Deprecated. 11854 AdditionalChargePromotions []*Promotion `json:"additionalChargePromotions,omitempty"` 11855 11856 // Type: [required] Type of the additional charge. Acceptable values 11857 // are: - "shipping" 11858 Type string `json:"type,omitempty"` 11859 11860 // ForceSendFields is a list of field names (e.g. 11861 // "AdditionalChargeAmount") to unconditionally include in API requests. 11862 // By default, fields with empty values are omitted from API requests. 11863 // However, any non-pointer, non-interface field appearing in 11864 // ForceSendFields will be sent to the server regardless of whether the 11865 // field is empty or not. This may be used to include empty fields in 11866 // Patch requests. 11867 ForceSendFields []string `json:"-"` 11868 11869 // NullFields is a list of field names (e.g. "AdditionalChargeAmount") 11870 // to include in API requests with the JSON null value. By default, 11871 // fields with empty values are omitted from API requests. However, any 11872 // field with an empty value appearing in NullFields will be sent to the 11873 // server as null. It is an error if a field in this list has a 11874 // non-empty value. This may be used to include null fields in Patch 11875 // requests. 11876 NullFields []string `json:"-"` 11877} 11878 11879func (s *UnitInvoiceAdditionalCharge) MarshalJSON() ([]byte, error) { 11880 type NoMethod UnitInvoiceAdditionalCharge 11881 raw := NoMethod(*s) 11882 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11883} 11884 11885type UnitInvoiceTaxLine struct { 11886 // TaxAmount: [required] Tax amount for the tax type. 11887 TaxAmount *Price `json:"taxAmount,omitempty"` 11888 11889 // TaxName: Optional name of the tax type. This should only be provided 11890 // if `taxType` is `otherFeeTax`. 11891 TaxName string `json:"taxName,omitempty"` 11892 11893 // TaxType: [required] Type of the tax. Acceptable values are: - 11894 // "otherFee" - "otherFeeTax" - "sales" 11895 TaxType string `json:"taxType,omitempty"` 11896 11897 // ForceSendFields is a list of field names (e.g. "TaxAmount") to 11898 // unconditionally include in API requests. By default, fields with 11899 // empty values are omitted from API requests. However, any non-pointer, 11900 // non-interface field appearing in ForceSendFields will be sent to the 11901 // server regardless of whether the field is empty or not. This may be 11902 // used to include empty fields in Patch requests. 11903 ForceSendFields []string `json:"-"` 11904 11905 // NullFields is a list of field names (e.g. "TaxAmount") to include in 11906 // API requests with the JSON null value. By default, fields with empty 11907 // values are omitted from API requests. However, any field with an 11908 // empty value appearing in NullFields will be sent to the server as 11909 // null. It is an error if a field in this list has a non-empty value. 11910 // This may be used to include null fields in Patch requests. 11911 NullFields []string `json:"-"` 11912} 11913 11914func (s *UnitInvoiceTaxLine) MarshalJSON() ([]byte, error) { 11915 type NoMethod UnitInvoiceTaxLine 11916 raw := NoMethod(*s) 11917 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11918} 11919 11920// Value: The single value of a rate group or the value of a rate group 11921// table's cell. Exactly one of `noShipping`, `flatRate`, 11922// `pricePercentage`, `carrierRateName`, `subtableName` must be set. 11923type Value struct { 11924 // CarrierRateName: The name of a carrier rate referring to a carrier 11925 // rate defined in the same rate group. Can only be set if all other 11926 // fields are not set. 11927 CarrierRateName string `json:"carrierRateName,omitempty"` 11928 11929 // FlatRate: A flat rate. Can only be set if all other fields are not 11930 // set. 11931 FlatRate *Price `json:"flatRate,omitempty"` 11932 11933 // NoShipping: If true, then the product can't ship. Must be true when 11934 // set, can only be set if all other fields are not set. 11935 NoShipping bool `json:"noShipping,omitempty"` 11936 11937 // PricePercentage: A percentage of the price represented as a number in 11938 // decimal notation (e.g., "5.4"). Can only be set if all other fields 11939 // are not set. 11940 PricePercentage string `json:"pricePercentage,omitempty"` 11941 11942 // SubtableName: The name of a subtable. Can only be set in table cells 11943 // (i.e., not for single values), and only if all other fields are not 11944 // set. 11945 SubtableName string `json:"subtableName,omitempty"` 11946 11947 // ForceSendFields is a list of field names (e.g. "CarrierRateName") to 11948 // unconditionally include in API requests. By default, fields with 11949 // empty values are omitted from API requests. However, any non-pointer, 11950 // non-interface field appearing in ForceSendFields will be sent to the 11951 // server regardless of whether the field is empty or not. This may be 11952 // used to include empty fields in Patch requests. 11953 ForceSendFields []string `json:"-"` 11954 11955 // NullFields is a list of field names (e.g. "CarrierRateName") to 11956 // include in API requests with the JSON null value. By default, fields 11957 // with empty values are omitted from API requests. However, any field 11958 // with an empty value appearing in NullFields will be sent to the 11959 // server as null. It is an error if a field in this list has a 11960 // non-empty value. This may be used to include null fields in Patch 11961 // requests. 11962 NullFields []string `json:"-"` 11963} 11964 11965func (s *Value) MarshalJSON() ([]byte, error) { 11966 type NoMethod Value 11967 raw := NoMethod(*s) 11968 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11969} 11970 11971type WarehouseBasedDeliveryTime struct { 11972 // Carrier: Required. Carrier, such as "UPS" or "Fedex". The list of 11973 // supported carriers can be retrieved via the `listSupportedCarriers` 11974 // method. 11975 Carrier string `json:"carrier,omitempty"` 11976 11977 // CarrierService: Required. Carrier service, such as "ground" or "2 11978 // days". The list of supported services for a carrier can be retrieved 11979 // via the `listSupportedCarriers` method. The name of the service must 11980 // be in the eddSupportedServices list. 11981 CarrierService string `json:"carrierService,omitempty"` 11982 11983 // OriginAdministrativeArea: Required. Shipping origin's state. 11984 OriginAdministrativeArea string `json:"originAdministrativeArea,omitempty"` 11985 11986 // OriginCity: Required. Shipping origin's city. 11987 OriginCity string `json:"originCity,omitempty"` 11988 11989 // OriginCountry: Required. Shipping origin's country represented as a 11990 // CLDR territory code 11991 // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml). 11992 OriginCountry string `json:"originCountry,omitempty"` 11993 11994 // OriginPostalCode: Required. Shipping origin. 11995 OriginPostalCode string `json:"originPostalCode,omitempty"` 11996 11997 // OriginStreetAddress: Shipping origin's street address 11998 OriginStreetAddress string `json:"originStreetAddress,omitempty"` 11999 12000 // ForceSendFields is a list of field names (e.g. "Carrier") to 12001 // unconditionally include in API requests. By default, fields with 12002 // empty values are omitted from API requests. However, any non-pointer, 12003 // non-interface field appearing in ForceSendFields will be sent to the 12004 // server regardless of whether the field is empty or not. This may be 12005 // used to include empty fields in Patch requests. 12006 ForceSendFields []string `json:"-"` 12007 12008 // NullFields is a list of field names (e.g. "Carrier") to include in 12009 // API requests with the JSON null value. By default, fields with empty 12010 // values are omitted from API requests. However, any field with an 12011 // empty value appearing in NullFields will be sent to the server as 12012 // null. It is an error if a field in this list has a non-empty value. 12013 // This may be used to include null fields in Patch requests. 12014 NullFields []string `json:"-"` 12015} 12016 12017func (s *WarehouseBasedDeliveryTime) MarshalJSON() ([]byte, error) { 12018 type NoMethod WarehouseBasedDeliveryTime 12019 raw := NoMethod(*s) 12020 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12021} 12022 12023type Weight struct { 12024 // Unit: Required. The weight unit. Acceptable values are: - "kg" - 12025 // "lb" 12026 Unit string `json:"unit,omitempty"` 12027 12028 // Value: Required. The weight represented as a number. 12029 Value string `json:"value,omitempty"` 12030 12031 // ForceSendFields is a list of field names (e.g. "Unit") to 12032 // unconditionally include in API requests. By default, fields with 12033 // empty values are omitted from API requests. However, any non-pointer, 12034 // non-interface field appearing in ForceSendFields will be sent to the 12035 // server regardless of whether the field is empty or not. This may be 12036 // used to include empty fields in Patch requests. 12037 ForceSendFields []string `json:"-"` 12038 12039 // NullFields is a list of field names (e.g. "Unit") to include in API 12040 // requests with the JSON null value. By default, fields with empty 12041 // values are omitted from API requests. However, any field with an 12042 // empty value appearing in NullFields will be sent to the server as 12043 // null. It is an error if a field in this list has a non-empty value. 12044 // This may be used to include null fields in Patch requests. 12045 NullFields []string `json:"-"` 12046} 12047 12048func (s *Weight) MarshalJSON() ([]byte, error) { 12049 type NoMethod Weight 12050 raw := NoMethod(*s) 12051 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12052} 12053 12054// method id "content.accounts.authinfo": 12055 12056type AccountsAuthinfoCall struct { 12057 s *APIService 12058 urlParams_ gensupport.URLParams 12059 ifNoneMatch_ string 12060 ctx_ context.Context 12061 header_ http.Header 12062} 12063 12064// Authinfo: Returns information about the authenticated user. 12065func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { 12066 c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12067 return c 12068} 12069 12070// Fields allows partial responses to be retrieved. See 12071// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12072// for more information. 12073func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { 12074 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12075 return c 12076} 12077 12078// IfNoneMatch sets the optional parameter which makes the operation 12079// fail if the object's ETag matches the given value. This is useful for 12080// getting updates only after the object has changed since the last 12081// request. Use googleapi.IsNotModified to check whether the response 12082// error from Do is the result of In-None-Match. 12083func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { 12084 c.ifNoneMatch_ = entityTag 12085 return c 12086} 12087 12088// Context sets the context to be used in this call's Do method. Any 12089// pending HTTP request will be aborted if the provided context is 12090// canceled. 12091func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { 12092 c.ctx_ = ctx 12093 return c 12094} 12095 12096// Header returns an http.Header that can be modified by the caller to 12097// add HTTP headers to the request. 12098func (c *AccountsAuthinfoCall) Header() http.Header { 12099 if c.header_ == nil { 12100 c.header_ = make(http.Header) 12101 } 12102 return c.header_ 12103} 12104 12105func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { 12106 reqHeaders := make(http.Header) 12107 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 12108 for k, v := range c.header_ { 12109 reqHeaders[k] = v 12110 } 12111 reqHeaders.Set("User-Agent", c.s.userAgent()) 12112 if c.ifNoneMatch_ != "" { 12113 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12114 } 12115 var body io.Reader = nil 12116 c.urlParams_.Set("alt", alt) 12117 c.urlParams_.Set("prettyPrint", "false") 12118 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") 12119 urls += "?" + c.urlParams_.Encode() 12120 req, err := http.NewRequest("GET", urls, body) 12121 if err != nil { 12122 return nil, err 12123 } 12124 req.Header = reqHeaders 12125 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12126} 12127 12128// Do executes the "content.accounts.authinfo" call. 12129// Exactly one of *AccountsAuthInfoResponse or error will be non-nil. 12130// Any non-2xx status code is an error. Response headers are in either 12131// *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was 12132// returned at all) in error.(*googleapi.Error).Header. Use 12133// googleapi.IsNotModified to check whether the returned error was 12134// because http.StatusNotModified was returned. 12135func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { 12136 gensupport.SetOptions(c.urlParams_, opts...) 12137 res, err := c.doRequest("json") 12138 if res != nil && res.StatusCode == http.StatusNotModified { 12139 if res.Body != nil { 12140 res.Body.Close() 12141 } 12142 return nil, &googleapi.Error{ 12143 Code: res.StatusCode, 12144 Header: res.Header, 12145 } 12146 } 12147 if err != nil { 12148 return nil, err 12149 } 12150 defer googleapi.CloseBody(res) 12151 if err := googleapi.CheckResponse(res); err != nil { 12152 return nil, err 12153 } 12154 ret := &AccountsAuthInfoResponse{ 12155 ServerResponse: googleapi.ServerResponse{ 12156 Header: res.Header, 12157 HTTPStatusCode: res.StatusCode, 12158 }, 12159 } 12160 target := &ret 12161 if err := gensupport.DecodeResponse(target, res); err != nil { 12162 return nil, err 12163 } 12164 return ret, nil 12165 // { 12166 // "description": "Returns information about the authenticated user.", 12167 // "flatPath": "accounts/authinfo", 12168 // "httpMethod": "GET", 12169 // "id": "content.accounts.authinfo", 12170 // "parameterOrder": [], 12171 // "parameters": {}, 12172 // "path": "accounts/authinfo", 12173 // "response": { 12174 // "$ref": "AccountsAuthInfoResponse" 12175 // }, 12176 // "scopes": [ 12177 // "https://www.googleapis.com/auth/content" 12178 // ] 12179 // } 12180 12181} 12182 12183// method id "content.accounts.claimwebsite": 12184 12185type AccountsClaimwebsiteCall struct { 12186 s *APIService 12187 merchantId uint64 12188 accountId uint64 12189 urlParams_ gensupport.URLParams 12190 ctx_ context.Context 12191 header_ http.Header 12192} 12193 12194// Claimwebsite: Claims the website of a Merchant Center sub-account. 12195// 12196// - accountId: The ID of the account whose website is claimed. 12197// - merchantId: The ID of the managing account. If this parameter is 12198// not the same as accountId, then this account must be a multi-client 12199// account and `accountId` must be the ID of a sub-account of this 12200// account. 12201func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { 12202 c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12203 c.merchantId = merchantId 12204 c.accountId = accountId 12205 return c 12206} 12207 12208// Overwrite sets the optional parameter "overwrite": Only available to 12209// selected merchants. When set to `True`, this flag removes any 12210// existing claim on the requested website by another account and 12211// replaces it with a claim from this account. 12212func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { 12213 c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) 12214 return c 12215} 12216 12217// Fields allows partial responses to be retrieved. See 12218// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12219// for more information. 12220func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { 12221 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12222 return c 12223} 12224 12225// Context sets the context to be used in this call's Do method. Any 12226// pending HTTP request will be aborted if the provided context is 12227// canceled. 12228func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { 12229 c.ctx_ = ctx 12230 return c 12231} 12232 12233// Header returns an http.Header that can be modified by the caller to 12234// add HTTP headers to the request. 12235func (c *AccountsClaimwebsiteCall) Header() http.Header { 12236 if c.header_ == nil { 12237 c.header_ = make(http.Header) 12238 } 12239 return c.header_ 12240} 12241 12242func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) { 12243 reqHeaders := make(http.Header) 12244 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 12245 for k, v := range c.header_ { 12246 reqHeaders[k] = v 12247 } 12248 reqHeaders.Set("User-Agent", c.s.userAgent()) 12249 var body io.Reader = nil 12250 c.urlParams_.Set("alt", alt) 12251 c.urlParams_.Set("prettyPrint", "false") 12252 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") 12253 urls += "?" + c.urlParams_.Encode() 12254 req, err := http.NewRequest("POST", urls, body) 12255 if err != nil { 12256 return nil, err 12257 } 12258 req.Header = reqHeaders 12259 googleapi.Expand(req.URL, map[string]string{ 12260 "merchantId": strconv.FormatUint(c.merchantId, 10), 12261 "accountId": strconv.FormatUint(c.accountId, 10), 12262 }) 12263 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12264} 12265 12266// Do executes the "content.accounts.claimwebsite" call. 12267// Exactly one of *AccountsClaimWebsiteResponse or error will be 12268// non-nil. Any non-2xx status code is an error. Response headers are in 12269// either *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a 12270// response was returned at all) in error.(*googleapi.Error).Header. Use 12271// googleapi.IsNotModified to check whether the returned error was 12272// because http.StatusNotModified was returned. 12273func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { 12274 gensupport.SetOptions(c.urlParams_, opts...) 12275 res, err := c.doRequest("json") 12276 if res != nil && res.StatusCode == http.StatusNotModified { 12277 if res.Body != nil { 12278 res.Body.Close() 12279 } 12280 return nil, &googleapi.Error{ 12281 Code: res.StatusCode, 12282 Header: res.Header, 12283 } 12284 } 12285 if err != nil { 12286 return nil, err 12287 } 12288 defer googleapi.CloseBody(res) 12289 if err := googleapi.CheckResponse(res); err != nil { 12290 return nil, err 12291 } 12292 ret := &AccountsClaimWebsiteResponse{ 12293 ServerResponse: googleapi.ServerResponse{ 12294 Header: res.Header, 12295 HTTPStatusCode: res.StatusCode, 12296 }, 12297 } 12298 target := &ret 12299 if err := gensupport.DecodeResponse(target, res); err != nil { 12300 return nil, err 12301 } 12302 return ret, nil 12303 // { 12304 // "description": "Claims the website of a Merchant Center sub-account.", 12305 // "flatPath": "{merchantId}/accounts/{accountId}/claimwebsite", 12306 // "httpMethod": "POST", 12307 // "id": "content.accounts.claimwebsite", 12308 // "parameterOrder": [ 12309 // "merchantId", 12310 // "accountId" 12311 // ], 12312 // "parameters": { 12313 // "accountId": { 12314 // "description": "The ID of the account whose website is claimed.", 12315 // "format": "uint64", 12316 // "location": "path", 12317 // "required": true, 12318 // "type": "string" 12319 // }, 12320 // "merchantId": { 12321 // "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.", 12322 // "format": "uint64", 12323 // "location": "path", 12324 // "required": true, 12325 // "type": "string" 12326 // }, 12327 // "overwrite": { 12328 // "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.", 12329 // "location": "query", 12330 // "type": "boolean" 12331 // } 12332 // }, 12333 // "path": "{merchantId}/accounts/{accountId}/claimwebsite", 12334 // "response": { 12335 // "$ref": "AccountsClaimWebsiteResponse" 12336 // }, 12337 // "scopes": [ 12338 // "https://www.googleapis.com/auth/content" 12339 // ] 12340 // } 12341 12342} 12343 12344// method id "content.accounts.custombatch": 12345 12346type AccountsCustombatchCall struct { 12347 s *APIService 12348 accountscustombatchrequest *AccountsCustomBatchRequest 12349 urlParams_ gensupport.URLParams 12350 ctx_ context.Context 12351 header_ http.Header 12352} 12353 12354// Custombatch: Retrieves, inserts, updates, and deletes multiple 12355// Merchant Center (sub-)accounts in a single request. 12356func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { 12357 c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12358 c.accountscustombatchrequest = accountscustombatchrequest 12359 return c 12360} 12361 12362// DryRun sets the optional parameter "dryRun": Flag to simulate a 12363// request like in a live environment. If set to true, dry-run mode 12364// checks the validity of the request and returns errors (if any). 12365func (c *AccountsCustombatchCall) DryRun(dryRun bool) *AccountsCustombatchCall { 12366 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12367 return c 12368} 12369 12370// Fields allows partial responses to be retrieved. See 12371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12372// for more information. 12373func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { 12374 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12375 return c 12376} 12377 12378// Context sets the context to be used in this call's Do method. Any 12379// pending HTTP request will be aborted if the provided context is 12380// canceled. 12381func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { 12382 c.ctx_ = ctx 12383 return c 12384} 12385 12386// Header returns an http.Header that can be modified by the caller to 12387// add HTTP headers to the request. 12388func (c *AccountsCustombatchCall) Header() http.Header { 12389 if c.header_ == nil { 12390 c.header_ = make(http.Header) 12391 } 12392 return c.header_ 12393} 12394 12395func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { 12396 reqHeaders := make(http.Header) 12397 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 12398 for k, v := range c.header_ { 12399 reqHeaders[k] = v 12400 } 12401 reqHeaders.Set("User-Agent", c.s.userAgent()) 12402 var body io.Reader = nil 12403 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest) 12404 if err != nil { 12405 return nil, err 12406 } 12407 reqHeaders.Set("Content-Type", "application/json") 12408 c.urlParams_.Set("alt", alt) 12409 c.urlParams_.Set("prettyPrint", "false") 12410 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") 12411 urls += "?" + c.urlParams_.Encode() 12412 req, err := http.NewRequest("POST", urls, body) 12413 if err != nil { 12414 return nil, err 12415 } 12416 req.Header = reqHeaders 12417 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12418} 12419 12420// Do executes the "content.accounts.custombatch" call. 12421// Exactly one of *AccountsCustomBatchResponse or error will be non-nil. 12422// Any non-2xx status code is an error. Response headers are in either 12423// *AccountsCustomBatchResponse.ServerResponse.Header or (if a response 12424// was returned at all) in error.(*googleapi.Error).Header. Use 12425// googleapi.IsNotModified to check whether the returned error was 12426// because http.StatusNotModified was returned. 12427func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { 12428 gensupport.SetOptions(c.urlParams_, opts...) 12429 res, err := c.doRequest("json") 12430 if res != nil && res.StatusCode == http.StatusNotModified { 12431 if res.Body != nil { 12432 res.Body.Close() 12433 } 12434 return nil, &googleapi.Error{ 12435 Code: res.StatusCode, 12436 Header: res.Header, 12437 } 12438 } 12439 if err != nil { 12440 return nil, err 12441 } 12442 defer googleapi.CloseBody(res) 12443 if err := googleapi.CheckResponse(res); err != nil { 12444 return nil, err 12445 } 12446 ret := &AccountsCustomBatchResponse{ 12447 ServerResponse: googleapi.ServerResponse{ 12448 Header: res.Header, 12449 HTTPStatusCode: res.StatusCode, 12450 }, 12451 } 12452 target := &ret 12453 if err := gensupport.DecodeResponse(target, res); err != nil { 12454 return nil, err 12455 } 12456 return ret, nil 12457 // { 12458 // "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.", 12459 // "flatPath": "accounts/batch", 12460 // "httpMethod": "POST", 12461 // "id": "content.accounts.custombatch", 12462 // "parameterOrder": [], 12463 // "parameters": { 12464 // "dryRun": { 12465 // "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).", 12466 // "location": "query", 12467 // "type": "boolean" 12468 // } 12469 // }, 12470 // "path": "accounts/batch", 12471 // "request": { 12472 // "$ref": "AccountsCustomBatchRequest" 12473 // }, 12474 // "response": { 12475 // "$ref": "AccountsCustomBatchResponse" 12476 // }, 12477 // "scopes": [ 12478 // "https://www.googleapis.com/auth/content" 12479 // ] 12480 // } 12481 12482} 12483 12484// method id "content.accounts.delete": 12485 12486type AccountsDeleteCall struct { 12487 s *APIService 12488 merchantId uint64 12489 accountId uint64 12490 urlParams_ gensupport.URLParams 12491 ctx_ context.Context 12492 header_ http.Header 12493} 12494 12495// Delete: Deletes a Merchant Center sub-account. 12496// 12497// - accountId: The ID of the account. 12498// - merchantId: The ID of the managing account. This must be a 12499// multi-client account, and accountId must be the ID of a sub-account 12500// of this account. 12501func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { 12502 c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12503 c.merchantId = merchantId 12504 c.accountId = accountId 12505 return c 12506} 12507 12508// DryRun sets the optional parameter "dryRun": Flag to simulate a 12509// request like in a live environment. If set to true, dry-run mode 12510// checks the validity of the request and returns errors (if any). 12511func (c *AccountsDeleteCall) DryRun(dryRun bool) *AccountsDeleteCall { 12512 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12513 return c 12514} 12515 12516// Force sets the optional parameter "force": Flag to delete 12517// sub-accounts with products. The default value is false. 12518func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { 12519 c.urlParams_.Set("force", fmt.Sprint(force)) 12520 return c 12521} 12522 12523// Fields allows partial responses to be retrieved. See 12524// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12525// for more information. 12526func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { 12527 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12528 return c 12529} 12530 12531// Context sets the context to be used in this call's Do method. Any 12532// pending HTTP request will be aborted if the provided context is 12533// canceled. 12534func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { 12535 c.ctx_ = ctx 12536 return c 12537} 12538 12539// Header returns an http.Header that can be modified by the caller to 12540// add HTTP headers to the request. 12541func (c *AccountsDeleteCall) Header() http.Header { 12542 if c.header_ == nil { 12543 c.header_ = make(http.Header) 12544 } 12545 return c.header_ 12546} 12547 12548func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { 12549 reqHeaders := make(http.Header) 12550 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 12551 for k, v := range c.header_ { 12552 reqHeaders[k] = v 12553 } 12554 reqHeaders.Set("User-Agent", c.s.userAgent()) 12555 var body io.Reader = nil 12556 c.urlParams_.Set("alt", alt) 12557 c.urlParams_.Set("prettyPrint", "false") 12558 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 12559 urls += "?" + c.urlParams_.Encode() 12560 req, err := http.NewRequest("DELETE", urls, body) 12561 if err != nil { 12562 return nil, err 12563 } 12564 req.Header = reqHeaders 12565 googleapi.Expand(req.URL, map[string]string{ 12566 "merchantId": strconv.FormatUint(c.merchantId, 10), 12567 "accountId": strconv.FormatUint(c.accountId, 10), 12568 }) 12569 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12570} 12571 12572// Do executes the "content.accounts.delete" call. 12573func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { 12574 gensupport.SetOptions(c.urlParams_, opts...) 12575 res, err := c.doRequest("json") 12576 if err != nil { 12577 return err 12578 } 12579 defer googleapi.CloseBody(res) 12580 if err := googleapi.CheckResponse(res); err != nil { 12581 return err 12582 } 12583 return nil 12584 // { 12585 // "description": "Deletes a Merchant Center sub-account.", 12586 // "flatPath": "{merchantId}/accounts/{accountId}", 12587 // "httpMethod": "DELETE", 12588 // "id": "content.accounts.delete", 12589 // "parameterOrder": [ 12590 // "merchantId", 12591 // "accountId" 12592 // ], 12593 // "parameters": { 12594 // "accountId": { 12595 // "description": "The ID of the account.", 12596 // "format": "uint64", 12597 // "location": "path", 12598 // "required": true, 12599 // "type": "string" 12600 // }, 12601 // "dryRun": { 12602 // "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).", 12603 // "location": "query", 12604 // "type": "boolean" 12605 // }, 12606 // "force": { 12607 // "default": "false", 12608 // "description": "Flag to delete sub-accounts with products. The default value is false.", 12609 // "location": "query", 12610 // "type": "boolean" 12611 // }, 12612 // "merchantId": { 12613 // "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.", 12614 // "format": "uint64", 12615 // "location": "path", 12616 // "required": true, 12617 // "type": "string" 12618 // } 12619 // }, 12620 // "path": "{merchantId}/accounts/{accountId}", 12621 // "scopes": [ 12622 // "https://www.googleapis.com/auth/content" 12623 // ] 12624 // } 12625 12626} 12627 12628// method id "content.accounts.get": 12629 12630type AccountsGetCall struct { 12631 s *APIService 12632 merchantId uint64 12633 accountId uint64 12634 urlParams_ gensupport.URLParams 12635 ifNoneMatch_ string 12636 ctx_ context.Context 12637 header_ http.Header 12638} 12639 12640// Get: Retrieves a Merchant Center account. 12641// 12642// - accountId: The ID of the account. 12643// - merchantId: The ID of the managing account. If this parameter is 12644// not the same as accountId, then this account must be a multi-client 12645// account and `accountId` must be the ID of a sub-account of this 12646// account. 12647func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { 12648 c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12649 c.merchantId = merchantId 12650 c.accountId = accountId 12651 return c 12652} 12653 12654// Fields allows partial responses to be retrieved. See 12655// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12656// for more information. 12657func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { 12658 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12659 return c 12660} 12661 12662// IfNoneMatch sets the optional parameter which makes the operation 12663// fail if the object's ETag matches the given value. This is useful for 12664// getting updates only after the object has changed since the last 12665// request. Use googleapi.IsNotModified to check whether the response 12666// error from Do is the result of In-None-Match. 12667func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { 12668 c.ifNoneMatch_ = entityTag 12669 return c 12670} 12671 12672// Context sets the context to be used in this call's Do method. Any 12673// pending HTTP request will be aborted if the provided context is 12674// canceled. 12675func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { 12676 c.ctx_ = ctx 12677 return c 12678} 12679 12680// Header returns an http.Header that can be modified by the caller to 12681// add HTTP headers to the request. 12682func (c *AccountsGetCall) Header() http.Header { 12683 if c.header_ == nil { 12684 c.header_ = make(http.Header) 12685 } 12686 return c.header_ 12687} 12688 12689func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { 12690 reqHeaders := make(http.Header) 12691 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 12692 for k, v := range c.header_ { 12693 reqHeaders[k] = v 12694 } 12695 reqHeaders.Set("User-Agent", c.s.userAgent()) 12696 if c.ifNoneMatch_ != "" { 12697 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12698 } 12699 var body io.Reader = nil 12700 c.urlParams_.Set("alt", alt) 12701 c.urlParams_.Set("prettyPrint", "false") 12702 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 12703 urls += "?" + c.urlParams_.Encode() 12704 req, err := http.NewRequest("GET", urls, body) 12705 if err != nil { 12706 return nil, err 12707 } 12708 req.Header = reqHeaders 12709 googleapi.Expand(req.URL, map[string]string{ 12710 "merchantId": strconv.FormatUint(c.merchantId, 10), 12711 "accountId": strconv.FormatUint(c.accountId, 10), 12712 }) 12713 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12714} 12715 12716// Do executes the "content.accounts.get" call. 12717// Exactly one of *Account or error will be non-nil. Any non-2xx status 12718// code is an error. Response headers are in either 12719// *Account.ServerResponse.Header or (if a response was returned at all) 12720// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12721// check whether the returned error was because http.StatusNotModified 12722// was returned. 12723func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { 12724 gensupport.SetOptions(c.urlParams_, opts...) 12725 res, err := c.doRequest("json") 12726 if res != nil && res.StatusCode == http.StatusNotModified { 12727 if res.Body != nil { 12728 res.Body.Close() 12729 } 12730 return nil, &googleapi.Error{ 12731 Code: res.StatusCode, 12732 Header: res.Header, 12733 } 12734 } 12735 if err != nil { 12736 return nil, err 12737 } 12738 defer googleapi.CloseBody(res) 12739 if err := googleapi.CheckResponse(res); err != nil { 12740 return nil, err 12741 } 12742 ret := &Account{ 12743 ServerResponse: googleapi.ServerResponse{ 12744 Header: res.Header, 12745 HTTPStatusCode: res.StatusCode, 12746 }, 12747 } 12748 target := &ret 12749 if err := gensupport.DecodeResponse(target, res); err != nil { 12750 return nil, err 12751 } 12752 return ret, nil 12753 // { 12754 // "description": "Retrieves a Merchant Center account.", 12755 // "flatPath": "{merchantId}/accounts/{accountId}", 12756 // "httpMethod": "GET", 12757 // "id": "content.accounts.get", 12758 // "parameterOrder": [ 12759 // "merchantId", 12760 // "accountId" 12761 // ], 12762 // "parameters": { 12763 // "accountId": { 12764 // "description": "The ID of the account.", 12765 // "format": "uint64", 12766 // "location": "path", 12767 // "required": true, 12768 // "type": "string" 12769 // }, 12770 // "merchantId": { 12771 // "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.", 12772 // "format": "uint64", 12773 // "location": "path", 12774 // "required": true, 12775 // "type": "string" 12776 // } 12777 // }, 12778 // "path": "{merchantId}/accounts/{accountId}", 12779 // "response": { 12780 // "$ref": "Account" 12781 // }, 12782 // "scopes": [ 12783 // "https://www.googleapis.com/auth/content" 12784 // ] 12785 // } 12786 12787} 12788 12789// method id "content.accounts.insert": 12790 12791type AccountsInsertCall struct { 12792 s *APIService 12793 merchantId uint64 12794 account *Account 12795 urlParams_ gensupport.URLParams 12796 ctx_ context.Context 12797 header_ http.Header 12798} 12799 12800// Insert: Creates a Merchant Center sub-account. 12801// 12802// - merchantId: The ID of the managing account. This must be a 12803// multi-client account. 12804func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { 12805 c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12806 c.merchantId = merchantId 12807 c.account = account 12808 return c 12809} 12810 12811// DryRun sets the optional parameter "dryRun": Flag to simulate a 12812// request like in a live environment. If set to true, dry-run mode 12813// checks the validity of the request and returns errors (if any). 12814func (c *AccountsInsertCall) DryRun(dryRun bool) *AccountsInsertCall { 12815 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 12816 return c 12817} 12818 12819// Fields allows partial responses to be retrieved. See 12820// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12821// for more information. 12822func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { 12823 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12824 return c 12825} 12826 12827// Context sets the context to be used in this call's Do method. Any 12828// pending HTTP request will be aborted if the provided context is 12829// canceled. 12830func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { 12831 c.ctx_ = ctx 12832 return c 12833} 12834 12835// Header returns an http.Header that can be modified by the caller to 12836// add HTTP headers to the request. 12837func (c *AccountsInsertCall) Header() http.Header { 12838 if c.header_ == nil { 12839 c.header_ = make(http.Header) 12840 } 12841 return c.header_ 12842} 12843 12844func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { 12845 reqHeaders := make(http.Header) 12846 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 12847 for k, v := range c.header_ { 12848 reqHeaders[k] = v 12849 } 12850 reqHeaders.Set("User-Agent", c.s.userAgent()) 12851 var body io.Reader = nil 12852 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 12853 if err != nil { 12854 return nil, err 12855 } 12856 reqHeaders.Set("Content-Type", "application/json") 12857 c.urlParams_.Set("alt", alt) 12858 c.urlParams_.Set("prettyPrint", "false") 12859 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") 12860 urls += "?" + c.urlParams_.Encode() 12861 req, err := http.NewRequest("POST", urls, body) 12862 if err != nil { 12863 return nil, err 12864 } 12865 req.Header = reqHeaders 12866 googleapi.Expand(req.URL, map[string]string{ 12867 "merchantId": strconv.FormatUint(c.merchantId, 10), 12868 }) 12869 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12870} 12871 12872// Do executes the "content.accounts.insert" call. 12873// Exactly one of *Account or error will be non-nil. Any non-2xx status 12874// code is an error. Response headers are in either 12875// *Account.ServerResponse.Header or (if a response was returned at all) 12876// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12877// check whether the returned error was because http.StatusNotModified 12878// was returned. 12879func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { 12880 gensupport.SetOptions(c.urlParams_, opts...) 12881 res, err := c.doRequest("json") 12882 if res != nil && res.StatusCode == http.StatusNotModified { 12883 if res.Body != nil { 12884 res.Body.Close() 12885 } 12886 return nil, &googleapi.Error{ 12887 Code: res.StatusCode, 12888 Header: res.Header, 12889 } 12890 } 12891 if err != nil { 12892 return nil, err 12893 } 12894 defer googleapi.CloseBody(res) 12895 if err := googleapi.CheckResponse(res); err != nil { 12896 return nil, err 12897 } 12898 ret := &Account{ 12899 ServerResponse: googleapi.ServerResponse{ 12900 Header: res.Header, 12901 HTTPStatusCode: res.StatusCode, 12902 }, 12903 } 12904 target := &ret 12905 if err := gensupport.DecodeResponse(target, res); err != nil { 12906 return nil, err 12907 } 12908 return ret, nil 12909 // { 12910 // "description": "Creates a Merchant Center sub-account.", 12911 // "flatPath": "{merchantId}/accounts", 12912 // "httpMethod": "POST", 12913 // "id": "content.accounts.insert", 12914 // "parameterOrder": [ 12915 // "merchantId" 12916 // ], 12917 // "parameters": { 12918 // "dryRun": { 12919 // "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).", 12920 // "location": "query", 12921 // "type": "boolean" 12922 // }, 12923 // "merchantId": { 12924 // "description": "The ID of the managing account. This must be a multi-client account.", 12925 // "format": "uint64", 12926 // "location": "path", 12927 // "required": true, 12928 // "type": "string" 12929 // } 12930 // }, 12931 // "path": "{merchantId}/accounts", 12932 // "request": { 12933 // "$ref": "Account" 12934 // }, 12935 // "response": { 12936 // "$ref": "Account" 12937 // }, 12938 // "scopes": [ 12939 // "https://www.googleapis.com/auth/content" 12940 // ] 12941 // } 12942 12943} 12944 12945// method id "content.accounts.link": 12946 12947type AccountsLinkCall struct { 12948 s *APIService 12949 merchantId uint64 12950 accountId uint64 12951 accountslinkrequest *AccountsLinkRequest 12952 urlParams_ gensupport.URLParams 12953 ctx_ context.Context 12954 header_ http.Header 12955} 12956 12957// Link: Performs an action on a link between two Merchant Center 12958// accounts, namely accountId and linkedAccountId. 12959// 12960// - accountId: The ID of the account that should be linked. 12961// - merchantId: The ID of the managing account. If this parameter is 12962// not the same as accountId, then this account must be a multi-client 12963// account and `accountId` must be the ID of a sub-account of this 12964// account. 12965func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { 12966 c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12967 c.merchantId = merchantId 12968 c.accountId = accountId 12969 c.accountslinkrequest = accountslinkrequest 12970 return c 12971} 12972 12973// Fields allows partial responses to be retrieved. See 12974// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12975// for more information. 12976func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { 12977 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12978 return c 12979} 12980 12981// Context sets the context to be used in this call's Do method. Any 12982// pending HTTP request will be aborted if the provided context is 12983// canceled. 12984func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { 12985 c.ctx_ = ctx 12986 return c 12987} 12988 12989// Header returns an http.Header that can be modified by the caller to 12990// add HTTP headers to the request. 12991func (c *AccountsLinkCall) Header() http.Header { 12992 if c.header_ == nil { 12993 c.header_ = make(http.Header) 12994 } 12995 return c.header_ 12996} 12997 12998func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { 12999 reqHeaders := make(http.Header) 13000 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 13001 for k, v := range c.header_ { 13002 reqHeaders[k] = v 13003 } 13004 reqHeaders.Set("User-Agent", c.s.userAgent()) 13005 var body io.Reader = nil 13006 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountslinkrequest) 13007 if err != nil { 13008 return nil, err 13009 } 13010 reqHeaders.Set("Content-Type", "application/json") 13011 c.urlParams_.Set("alt", alt) 13012 c.urlParams_.Set("prettyPrint", "false") 13013 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") 13014 urls += "?" + c.urlParams_.Encode() 13015 req, err := http.NewRequest("POST", urls, body) 13016 if err != nil { 13017 return nil, err 13018 } 13019 req.Header = reqHeaders 13020 googleapi.Expand(req.URL, map[string]string{ 13021 "merchantId": strconv.FormatUint(c.merchantId, 10), 13022 "accountId": strconv.FormatUint(c.accountId, 10), 13023 }) 13024 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13025} 13026 13027// Do executes the "content.accounts.link" call. 13028// Exactly one of *AccountsLinkResponse or error will be non-nil. Any 13029// non-2xx status code is an error. Response headers are in either 13030// *AccountsLinkResponse.ServerResponse.Header or (if a response was 13031// returned at all) in error.(*googleapi.Error).Header. Use 13032// googleapi.IsNotModified to check whether the returned error was 13033// because http.StatusNotModified was returned. 13034func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) { 13035 gensupport.SetOptions(c.urlParams_, opts...) 13036 res, err := c.doRequest("json") 13037 if res != nil && res.StatusCode == http.StatusNotModified { 13038 if res.Body != nil { 13039 res.Body.Close() 13040 } 13041 return nil, &googleapi.Error{ 13042 Code: res.StatusCode, 13043 Header: res.Header, 13044 } 13045 } 13046 if err != nil { 13047 return nil, err 13048 } 13049 defer googleapi.CloseBody(res) 13050 if err := googleapi.CheckResponse(res); err != nil { 13051 return nil, err 13052 } 13053 ret := &AccountsLinkResponse{ 13054 ServerResponse: googleapi.ServerResponse{ 13055 Header: res.Header, 13056 HTTPStatusCode: res.StatusCode, 13057 }, 13058 } 13059 target := &ret 13060 if err := gensupport.DecodeResponse(target, res); err != nil { 13061 return nil, err 13062 } 13063 return ret, nil 13064 // { 13065 // "description": "Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId.", 13066 // "flatPath": "{merchantId}/accounts/{accountId}/link", 13067 // "httpMethod": "POST", 13068 // "id": "content.accounts.link", 13069 // "parameterOrder": [ 13070 // "merchantId", 13071 // "accountId" 13072 // ], 13073 // "parameters": { 13074 // "accountId": { 13075 // "description": "The ID of the account that should be linked.", 13076 // "format": "uint64", 13077 // "location": "path", 13078 // "required": true, 13079 // "type": "string" 13080 // }, 13081 // "merchantId": { 13082 // "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.", 13083 // "format": "uint64", 13084 // "location": "path", 13085 // "required": true, 13086 // "type": "string" 13087 // } 13088 // }, 13089 // "path": "{merchantId}/accounts/{accountId}/link", 13090 // "request": { 13091 // "$ref": "AccountsLinkRequest" 13092 // }, 13093 // "response": { 13094 // "$ref": "AccountsLinkResponse" 13095 // }, 13096 // "scopes": [ 13097 // "https://www.googleapis.com/auth/content" 13098 // ] 13099 // } 13100 13101} 13102 13103// method id "content.accounts.list": 13104 13105type AccountsListCall struct { 13106 s *APIService 13107 merchantId uint64 13108 urlParams_ gensupport.URLParams 13109 ifNoneMatch_ string 13110 ctx_ context.Context 13111 header_ http.Header 13112} 13113 13114// List: Lists the sub-accounts in your Merchant Center account. 13115// 13116// - merchantId: The ID of the managing account. This must be a 13117// multi-client account. 13118func (r *AccountsService) List(merchantId uint64) *AccountsListCall { 13119 c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13120 c.merchantId = merchantId 13121 return c 13122} 13123 13124// MaxResults sets the optional parameter "maxResults": The maximum 13125// number of accounts to return in the response, used for paging. 13126func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { 13127 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 13128 return c 13129} 13130 13131// PageToken sets the optional parameter "pageToken": The token returned 13132// by the previous request. 13133func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { 13134 c.urlParams_.Set("pageToken", pageToken) 13135 return c 13136} 13137 13138// Fields allows partial responses to be retrieved. See 13139// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13140// for more information. 13141func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { 13142 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13143 return c 13144} 13145 13146// IfNoneMatch sets the optional parameter which makes the operation 13147// fail if the object's ETag matches the given value. This is useful for 13148// getting updates only after the object has changed since the last 13149// request. Use googleapi.IsNotModified to check whether the response 13150// error from Do is the result of In-None-Match. 13151func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { 13152 c.ifNoneMatch_ = entityTag 13153 return c 13154} 13155 13156// Context sets the context to be used in this call's Do method. Any 13157// pending HTTP request will be aborted if the provided context is 13158// canceled. 13159func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { 13160 c.ctx_ = ctx 13161 return c 13162} 13163 13164// Header returns an http.Header that can be modified by the caller to 13165// add HTTP headers to the request. 13166func (c *AccountsListCall) Header() http.Header { 13167 if c.header_ == nil { 13168 c.header_ = make(http.Header) 13169 } 13170 return c.header_ 13171} 13172 13173func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { 13174 reqHeaders := make(http.Header) 13175 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 13176 for k, v := range c.header_ { 13177 reqHeaders[k] = v 13178 } 13179 reqHeaders.Set("User-Agent", c.s.userAgent()) 13180 if c.ifNoneMatch_ != "" { 13181 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13182 } 13183 var body io.Reader = nil 13184 c.urlParams_.Set("alt", alt) 13185 c.urlParams_.Set("prettyPrint", "false") 13186 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") 13187 urls += "?" + c.urlParams_.Encode() 13188 req, err := http.NewRequest("GET", urls, body) 13189 if err != nil { 13190 return nil, err 13191 } 13192 req.Header = reqHeaders 13193 googleapi.Expand(req.URL, map[string]string{ 13194 "merchantId": strconv.FormatUint(c.merchantId, 10), 13195 }) 13196 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13197} 13198 13199// Do executes the "content.accounts.list" call. 13200// Exactly one of *AccountsListResponse or error will be non-nil. Any 13201// non-2xx status code is an error. Response headers are in either 13202// *AccountsListResponse.ServerResponse.Header or (if a response was 13203// returned at all) in error.(*googleapi.Error).Header. Use 13204// googleapi.IsNotModified to check whether the returned error was 13205// because http.StatusNotModified was returned. 13206func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) { 13207 gensupport.SetOptions(c.urlParams_, opts...) 13208 res, err := c.doRequest("json") 13209 if res != nil && res.StatusCode == http.StatusNotModified { 13210 if res.Body != nil { 13211 res.Body.Close() 13212 } 13213 return nil, &googleapi.Error{ 13214 Code: res.StatusCode, 13215 Header: res.Header, 13216 } 13217 } 13218 if err != nil { 13219 return nil, err 13220 } 13221 defer googleapi.CloseBody(res) 13222 if err := googleapi.CheckResponse(res); err != nil { 13223 return nil, err 13224 } 13225 ret := &AccountsListResponse{ 13226 ServerResponse: googleapi.ServerResponse{ 13227 Header: res.Header, 13228 HTTPStatusCode: res.StatusCode, 13229 }, 13230 } 13231 target := &ret 13232 if err := gensupport.DecodeResponse(target, res); err != nil { 13233 return nil, err 13234 } 13235 return ret, nil 13236 // { 13237 // "description": "Lists the sub-accounts in your Merchant Center account.", 13238 // "flatPath": "{merchantId}/accounts", 13239 // "httpMethod": "GET", 13240 // "id": "content.accounts.list", 13241 // "parameterOrder": [ 13242 // "merchantId" 13243 // ], 13244 // "parameters": { 13245 // "maxResults": { 13246 // "description": "The maximum number of accounts to return in the response, used for paging.", 13247 // "format": "uint32", 13248 // "location": "query", 13249 // "type": "integer" 13250 // }, 13251 // "merchantId": { 13252 // "description": "The ID of the managing account. This must be a multi-client account.", 13253 // "format": "uint64", 13254 // "location": "path", 13255 // "required": true, 13256 // "type": "string" 13257 // }, 13258 // "pageToken": { 13259 // "description": "The token returned by the previous request.", 13260 // "location": "query", 13261 // "type": "string" 13262 // } 13263 // }, 13264 // "path": "{merchantId}/accounts", 13265 // "response": { 13266 // "$ref": "AccountsListResponse" 13267 // }, 13268 // "scopes": [ 13269 // "https://www.googleapis.com/auth/content" 13270 // ] 13271 // } 13272 13273} 13274 13275// Pages invokes f for each page of results. 13276// A non-nil error returned from f will halt the iteration. 13277// The provided context supersedes any context provided to the Context method. 13278func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error { 13279 c.ctx_ = ctx 13280 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13281 for { 13282 x, err := c.Do() 13283 if err != nil { 13284 return err 13285 } 13286 if err := f(x); err != nil { 13287 return err 13288 } 13289 if x.NextPageToken == "" { 13290 return nil 13291 } 13292 c.PageToken(x.NextPageToken) 13293 } 13294} 13295 13296// method id "content.accounts.update": 13297 13298type AccountsUpdateCall struct { 13299 s *APIService 13300 merchantId uint64 13301 accountId uint64 13302 account *Account 13303 urlParams_ gensupport.URLParams 13304 ctx_ context.Context 13305 header_ http.Header 13306} 13307 13308// Update: Updates a Merchant Center account. Any fields that are not 13309// provided are deleted from the resource. 13310// 13311// - accountId: The ID of the account. 13312// - merchantId: The ID of the managing account. If this parameter is 13313// not the same as accountId, then this account must be a multi-client 13314// account and `accountId` must be the ID of a sub-account of this 13315// account. 13316func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { 13317 c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13318 c.merchantId = merchantId 13319 c.accountId = accountId 13320 c.account = account 13321 return c 13322} 13323 13324// DryRun sets the optional parameter "dryRun": Flag to simulate a 13325// request like in a live environment. If set to true, dry-run mode 13326// checks the validity of the request and returns errors (if any). 13327func (c *AccountsUpdateCall) DryRun(dryRun bool) *AccountsUpdateCall { 13328 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 13329 return c 13330} 13331 13332// Fields allows partial responses to be retrieved. See 13333// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13334// for more information. 13335func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { 13336 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13337 return c 13338} 13339 13340// Context sets the context to be used in this call's Do method. Any 13341// pending HTTP request will be aborted if the provided context is 13342// canceled. 13343func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { 13344 c.ctx_ = ctx 13345 return c 13346} 13347 13348// Header returns an http.Header that can be modified by the caller to 13349// add HTTP headers to the request. 13350func (c *AccountsUpdateCall) Header() http.Header { 13351 if c.header_ == nil { 13352 c.header_ = make(http.Header) 13353 } 13354 return c.header_ 13355} 13356 13357func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { 13358 reqHeaders := make(http.Header) 13359 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 13360 for k, v := range c.header_ { 13361 reqHeaders[k] = v 13362 } 13363 reqHeaders.Set("User-Agent", c.s.userAgent()) 13364 var body io.Reader = nil 13365 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 13366 if err != nil { 13367 return nil, err 13368 } 13369 reqHeaders.Set("Content-Type", "application/json") 13370 c.urlParams_.Set("alt", alt) 13371 c.urlParams_.Set("prettyPrint", "false") 13372 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") 13373 urls += "?" + c.urlParams_.Encode() 13374 req, err := http.NewRequest("PUT", urls, body) 13375 if err != nil { 13376 return nil, err 13377 } 13378 req.Header = reqHeaders 13379 googleapi.Expand(req.URL, map[string]string{ 13380 "merchantId": strconv.FormatUint(c.merchantId, 10), 13381 "accountId": strconv.FormatUint(c.accountId, 10), 13382 }) 13383 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13384} 13385 13386// Do executes the "content.accounts.update" call. 13387// Exactly one of *Account or error will be non-nil. Any non-2xx status 13388// code is an error. Response headers are in either 13389// *Account.ServerResponse.Header or (if a response was returned at all) 13390// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13391// check whether the returned error was because http.StatusNotModified 13392// was returned. 13393func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { 13394 gensupport.SetOptions(c.urlParams_, opts...) 13395 res, err := c.doRequest("json") 13396 if res != nil && res.StatusCode == http.StatusNotModified { 13397 if res.Body != nil { 13398 res.Body.Close() 13399 } 13400 return nil, &googleapi.Error{ 13401 Code: res.StatusCode, 13402 Header: res.Header, 13403 } 13404 } 13405 if err != nil { 13406 return nil, err 13407 } 13408 defer googleapi.CloseBody(res) 13409 if err := googleapi.CheckResponse(res); err != nil { 13410 return nil, err 13411 } 13412 ret := &Account{ 13413 ServerResponse: googleapi.ServerResponse{ 13414 Header: res.Header, 13415 HTTPStatusCode: res.StatusCode, 13416 }, 13417 } 13418 target := &ret 13419 if err := gensupport.DecodeResponse(target, res); err != nil { 13420 return nil, err 13421 } 13422 return ret, nil 13423 // { 13424 // "description": "Updates a Merchant Center account. Any fields that are not provided are deleted from the resource.", 13425 // "flatPath": "{merchantId}/accounts/{accountId}", 13426 // "httpMethod": "PUT", 13427 // "id": "content.accounts.update", 13428 // "parameterOrder": [ 13429 // "merchantId", 13430 // "accountId" 13431 // ], 13432 // "parameters": { 13433 // "accountId": { 13434 // "description": "The ID of the account.", 13435 // "format": "uint64", 13436 // "location": "path", 13437 // "required": true, 13438 // "type": "string" 13439 // }, 13440 // "dryRun": { 13441 // "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).", 13442 // "location": "query", 13443 // "type": "boolean" 13444 // }, 13445 // "merchantId": { 13446 // "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.", 13447 // "format": "uint64", 13448 // "location": "path", 13449 // "required": true, 13450 // "type": "string" 13451 // } 13452 // }, 13453 // "path": "{merchantId}/accounts/{accountId}", 13454 // "request": { 13455 // "$ref": "Account" 13456 // }, 13457 // "response": { 13458 // "$ref": "Account" 13459 // }, 13460 // "scopes": [ 13461 // "https://www.googleapis.com/auth/content" 13462 // ] 13463 // } 13464 13465} 13466 13467// method id "content.accountstatuses.custombatch": 13468 13469type AccountstatusesCustombatchCall struct { 13470 s *APIService 13471 accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest 13472 urlParams_ gensupport.URLParams 13473 ctx_ context.Context 13474 header_ http.Header 13475} 13476 13477// Custombatch: Retrieves multiple Merchant Center account statuses in a 13478// single request. 13479func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { 13480 c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13481 c.accountstatusescustombatchrequest = accountstatusescustombatchrequest 13482 return c 13483} 13484 13485// Fields allows partial responses to be retrieved. See 13486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13487// for more information. 13488func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { 13489 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13490 return c 13491} 13492 13493// Context sets the context to be used in this call's Do method. Any 13494// pending HTTP request will be aborted if the provided context is 13495// canceled. 13496func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { 13497 c.ctx_ = ctx 13498 return c 13499} 13500 13501// Header returns an http.Header that can be modified by the caller to 13502// add HTTP headers to the request. 13503func (c *AccountstatusesCustombatchCall) Header() http.Header { 13504 if c.header_ == nil { 13505 c.header_ = make(http.Header) 13506 } 13507 return c.header_ 13508} 13509 13510func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 13511 reqHeaders := make(http.Header) 13512 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 13513 for k, v := range c.header_ { 13514 reqHeaders[k] = v 13515 } 13516 reqHeaders.Set("User-Agent", c.s.userAgent()) 13517 var body io.Reader = nil 13518 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest) 13519 if err != nil { 13520 return nil, err 13521 } 13522 reqHeaders.Set("Content-Type", "application/json") 13523 c.urlParams_.Set("alt", alt) 13524 c.urlParams_.Set("prettyPrint", "false") 13525 urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") 13526 urls += "?" + c.urlParams_.Encode() 13527 req, err := http.NewRequest("POST", urls, body) 13528 if err != nil { 13529 return nil, err 13530 } 13531 req.Header = reqHeaders 13532 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13533} 13534 13535// Do executes the "content.accountstatuses.custombatch" call. 13536// Exactly one of *AccountstatusesCustomBatchResponse or error will be 13537// non-nil. Any non-2xx status code is an error. Response headers are in 13538// either *AccountstatusesCustomBatchResponse.ServerResponse.Header or 13539// (if a response was returned at all) in 13540// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13541// whether the returned error was because http.StatusNotModified was 13542// returned. 13543func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) { 13544 gensupport.SetOptions(c.urlParams_, opts...) 13545 res, err := c.doRequest("json") 13546 if res != nil && res.StatusCode == http.StatusNotModified { 13547 if res.Body != nil { 13548 res.Body.Close() 13549 } 13550 return nil, &googleapi.Error{ 13551 Code: res.StatusCode, 13552 Header: res.Header, 13553 } 13554 } 13555 if err != nil { 13556 return nil, err 13557 } 13558 defer googleapi.CloseBody(res) 13559 if err := googleapi.CheckResponse(res); err != nil { 13560 return nil, err 13561 } 13562 ret := &AccountstatusesCustomBatchResponse{ 13563 ServerResponse: googleapi.ServerResponse{ 13564 Header: res.Header, 13565 HTTPStatusCode: res.StatusCode, 13566 }, 13567 } 13568 target := &ret 13569 if err := gensupport.DecodeResponse(target, res); err != nil { 13570 return nil, err 13571 } 13572 return ret, nil 13573 // { 13574 // "description": "Retrieves multiple Merchant Center account statuses in a single request.", 13575 // "flatPath": "accountstatuses/batch", 13576 // "httpMethod": "POST", 13577 // "id": "content.accountstatuses.custombatch", 13578 // "parameterOrder": [], 13579 // "parameters": {}, 13580 // "path": "accountstatuses/batch", 13581 // "request": { 13582 // "$ref": "AccountstatusesCustomBatchRequest" 13583 // }, 13584 // "response": { 13585 // "$ref": "AccountstatusesCustomBatchResponse" 13586 // }, 13587 // "scopes": [ 13588 // "https://www.googleapis.com/auth/content" 13589 // ] 13590 // } 13591 13592} 13593 13594// method id "content.accountstatuses.get": 13595 13596type AccountstatusesGetCall struct { 13597 s *APIService 13598 merchantId uint64 13599 accountId uint64 13600 urlParams_ gensupport.URLParams 13601 ifNoneMatch_ string 13602 ctx_ context.Context 13603 header_ http.Header 13604} 13605 13606// Get: Retrieves the status of a Merchant Center account. No 13607// itemLevelIssues are returned for multi-client accounts. 13608// 13609// - accountId: The ID of the account. 13610// - merchantId: The ID of the managing account. If this parameter is 13611// not the same as accountId, then this account must be a multi-client 13612// account and `accountId` must be the ID of a sub-account of this 13613// account. 13614func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { 13615 c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13616 c.merchantId = merchantId 13617 c.accountId = accountId 13618 return c 13619} 13620 13621// Destinations sets the optional parameter "destinations": If set, only 13622// issues for the specified destinations are returned, otherwise only 13623// issues for the Shopping destination. 13624func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { 13625 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 13626 return c 13627} 13628 13629// Fields allows partial responses to be retrieved. See 13630// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13631// for more information. 13632func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { 13633 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13634 return c 13635} 13636 13637// IfNoneMatch sets the optional parameter which makes the operation 13638// fail if the object's ETag matches the given value. This is useful for 13639// getting updates only after the object has changed since the last 13640// request. Use googleapi.IsNotModified to check whether the response 13641// error from Do is the result of In-None-Match. 13642func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { 13643 c.ifNoneMatch_ = entityTag 13644 return c 13645} 13646 13647// Context sets the context to be used in this call's Do method. Any 13648// pending HTTP request will be aborted if the provided context is 13649// canceled. 13650func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { 13651 c.ctx_ = ctx 13652 return c 13653} 13654 13655// Header returns an http.Header that can be modified by the caller to 13656// add HTTP headers to the request. 13657func (c *AccountstatusesGetCall) Header() http.Header { 13658 if c.header_ == nil { 13659 c.header_ = make(http.Header) 13660 } 13661 return c.header_ 13662} 13663 13664func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { 13665 reqHeaders := make(http.Header) 13666 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 13667 for k, v := range c.header_ { 13668 reqHeaders[k] = v 13669 } 13670 reqHeaders.Set("User-Agent", c.s.userAgent()) 13671 if c.ifNoneMatch_ != "" { 13672 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13673 } 13674 var body io.Reader = nil 13675 c.urlParams_.Set("alt", alt) 13676 c.urlParams_.Set("prettyPrint", "false") 13677 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") 13678 urls += "?" + c.urlParams_.Encode() 13679 req, err := http.NewRequest("GET", urls, body) 13680 if err != nil { 13681 return nil, err 13682 } 13683 req.Header = reqHeaders 13684 googleapi.Expand(req.URL, map[string]string{ 13685 "merchantId": strconv.FormatUint(c.merchantId, 10), 13686 "accountId": strconv.FormatUint(c.accountId, 10), 13687 }) 13688 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13689} 13690 13691// Do executes the "content.accountstatuses.get" call. 13692// Exactly one of *AccountStatus or error will be non-nil. Any non-2xx 13693// status code is an error. Response headers are in either 13694// *AccountStatus.ServerResponse.Header or (if a response was returned 13695// at all) in error.(*googleapi.Error).Header. Use 13696// googleapi.IsNotModified to check whether the returned error was 13697// because http.StatusNotModified was returned. 13698func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { 13699 gensupport.SetOptions(c.urlParams_, opts...) 13700 res, err := c.doRequest("json") 13701 if res != nil && res.StatusCode == http.StatusNotModified { 13702 if res.Body != nil { 13703 res.Body.Close() 13704 } 13705 return nil, &googleapi.Error{ 13706 Code: res.StatusCode, 13707 Header: res.Header, 13708 } 13709 } 13710 if err != nil { 13711 return nil, err 13712 } 13713 defer googleapi.CloseBody(res) 13714 if err := googleapi.CheckResponse(res); err != nil { 13715 return nil, err 13716 } 13717 ret := &AccountStatus{ 13718 ServerResponse: googleapi.ServerResponse{ 13719 Header: res.Header, 13720 HTTPStatusCode: res.StatusCode, 13721 }, 13722 } 13723 target := &ret 13724 if err := gensupport.DecodeResponse(target, res); err != nil { 13725 return nil, err 13726 } 13727 return ret, nil 13728 // { 13729 // "description": "Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts.", 13730 // "flatPath": "{merchantId}/accountstatuses/{accountId}", 13731 // "httpMethod": "GET", 13732 // "id": "content.accountstatuses.get", 13733 // "parameterOrder": [ 13734 // "merchantId", 13735 // "accountId" 13736 // ], 13737 // "parameters": { 13738 // "accountId": { 13739 // "description": "The ID of the account.", 13740 // "format": "uint64", 13741 // "location": "path", 13742 // "required": true, 13743 // "type": "string" 13744 // }, 13745 // "destinations": { 13746 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 13747 // "location": "query", 13748 // "repeated": true, 13749 // "type": "string" 13750 // }, 13751 // "merchantId": { 13752 // "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.", 13753 // "format": "uint64", 13754 // "location": "path", 13755 // "required": true, 13756 // "type": "string" 13757 // } 13758 // }, 13759 // "path": "{merchantId}/accountstatuses/{accountId}", 13760 // "response": { 13761 // "$ref": "AccountStatus" 13762 // }, 13763 // "scopes": [ 13764 // "https://www.googleapis.com/auth/content" 13765 // ] 13766 // } 13767 13768} 13769 13770// method id "content.accountstatuses.list": 13771 13772type AccountstatusesListCall struct { 13773 s *APIService 13774 merchantId uint64 13775 urlParams_ gensupport.URLParams 13776 ifNoneMatch_ string 13777 ctx_ context.Context 13778 header_ http.Header 13779} 13780 13781// List: Lists the statuses of the sub-accounts in your Merchant Center 13782// account. 13783// 13784// - merchantId: The ID of the managing account. This must be a 13785// multi-client account. 13786func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { 13787 c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13788 c.merchantId = merchantId 13789 return c 13790} 13791 13792// Destinations sets the optional parameter "destinations": If set, only 13793// issues for the specified destinations are returned, otherwise only 13794// issues for the Shopping destination. 13795func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { 13796 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 13797 return c 13798} 13799 13800// MaxResults sets the optional parameter "maxResults": The maximum 13801// number of account statuses to return in the response, used for 13802// paging. 13803func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { 13804 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 13805 return c 13806} 13807 13808// PageToken sets the optional parameter "pageToken": The token returned 13809// by the previous request. 13810func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { 13811 c.urlParams_.Set("pageToken", pageToken) 13812 return c 13813} 13814 13815// Fields allows partial responses to be retrieved. See 13816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13817// for more information. 13818func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { 13819 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13820 return c 13821} 13822 13823// IfNoneMatch sets the optional parameter which makes the operation 13824// fail if the object's ETag matches the given value. This is useful for 13825// getting updates only after the object has changed since the last 13826// request. Use googleapi.IsNotModified to check whether the response 13827// error from Do is the result of In-None-Match. 13828func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { 13829 c.ifNoneMatch_ = entityTag 13830 return c 13831} 13832 13833// Context sets the context to be used in this call's Do method. Any 13834// pending HTTP request will be aborted if the provided context is 13835// canceled. 13836func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { 13837 c.ctx_ = ctx 13838 return c 13839} 13840 13841// Header returns an http.Header that can be modified by the caller to 13842// add HTTP headers to the request. 13843func (c *AccountstatusesListCall) Header() http.Header { 13844 if c.header_ == nil { 13845 c.header_ = make(http.Header) 13846 } 13847 return c.header_ 13848} 13849 13850func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { 13851 reqHeaders := make(http.Header) 13852 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 13853 for k, v := range c.header_ { 13854 reqHeaders[k] = v 13855 } 13856 reqHeaders.Set("User-Agent", c.s.userAgent()) 13857 if c.ifNoneMatch_ != "" { 13858 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13859 } 13860 var body io.Reader = nil 13861 c.urlParams_.Set("alt", alt) 13862 c.urlParams_.Set("prettyPrint", "false") 13863 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") 13864 urls += "?" + c.urlParams_.Encode() 13865 req, err := http.NewRequest("GET", urls, body) 13866 if err != nil { 13867 return nil, err 13868 } 13869 req.Header = reqHeaders 13870 googleapi.Expand(req.URL, map[string]string{ 13871 "merchantId": strconv.FormatUint(c.merchantId, 10), 13872 }) 13873 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13874} 13875 13876// Do executes the "content.accountstatuses.list" call. 13877// Exactly one of *AccountstatusesListResponse or error will be non-nil. 13878// Any non-2xx status code is an error. Response headers are in either 13879// *AccountstatusesListResponse.ServerResponse.Header or (if a response 13880// was returned at all) in error.(*googleapi.Error).Header. Use 13881// googleapi.IsNotModified to check whether the returned error was 13882// because http.StatusNotModified was returned. 13883func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { 13884 gensupport.SetOptions(c.urlParams_, opts...) 13885 res, err := c.doRequest("json") 13886 if res != nil && res.StatusCode == http.StatusNotModified { 13887 if res.Body != nil { 13888 res.Body.Close() 13889 } 13890 return nil, &googleapi.Error{ 13891 Code: res.StatusCode, 13892 Header: res.Header, 13893 } 13894 } 13895 if err != nil { 13896 return nil, err 13897 } 13898 defer googleapi.CloseBody(res) 13899 if err := googleapi.CheckResponse(res); err != nil { 13900 return nil, err 13901 } 13902 ret := &AccountstatusesListResponse{ 13903 ServerResponse: googleapi.ServerResponse{ 13904 Header: res.Header, 13905 HTTPStatusCode: res.StatusCode, 13906 }, 13907 } 13908 target := &ret 13909 if err := gensupport.DecodeResponse(target, res); err != nil { 13910 return nil, err 13911 } 13912 return ret, nil 13913 // { 13914 // "description": "Lists the statuses of the sub-accounts in your Merchant Center account.", 13915 // "flatPath": "{merchantId}/accountstatuses", 13916 // "httpMethod": "GET", 13917 // "id": "content.accountstatuses.list", 13918 // "parameterOrder": [ 13919 // "merchantId" 13920 // ], 13921 // "parameters": { 13922 // "destinations": { 13923 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 13924 // "location": "query", 13925 // "repeated": true, 13926 // "type": "string" 13927 // }, 13928 // "maxResults": { 13929 // "description": "The maximum number of account statuses to return in the response, used for paging.", 13930 // "format": "uint32", 13931 // "location": "query", 13932 // "type": "integer" 13933 // }, 13934 // "merchantId": { 13935 // "description": "The ID of the managing account. This must be a multi-client account.", 13936 // "format": "uint64", 13937 // "location": "path", 13938 // "required": true, 13939 // "type": "string" 13940 // }, 13941 // "pageToken": { 13942 // "description": "The token returned by the previous request.", 13943 // "location": "query", 13944 // "type": "string" 13945 // } 13946 // }, 13947 // "path": "{merchantId}/accountstatuses", 13948 // "response": { 13949 // "$ref": "AccountstatusesListResponse" 13950 // }, 13951 // "scopes": [ 13952 // "https://www.googleapis.com/auth/content" 13953 // ] 13954 // } 13955 13956} 13957 13958// Pages invokes f for each page of results. 13959// A non-nil error returned from f will halt the iteration. 13960// The provided context supersedes any context provided to the Context method. 13961func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error { 13962 c.ctx_ = ctx 13963 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13964 for { 13965 x, err := c.Do() 13966 if err != nil { 13967 return err 13968 } 13969 if err := f(x); err != nil { 13970 return err 13971 } 13972 if x.NextPageToken == "" { 13973 return nil 13974 } 13975 c.PageToken(x.NextPageToken) 13976 } 13977} 13978 13979// method id "content.accounttax.custombatch": 13980 13981type AccounttaxCustombatchCall struct { 13982 s *APIService 13983 accounttaxcustombatchrequest *AccounttaxCustomBatchRequest 13984 urlParams_ gensupport.URLParams 13985 ctx_ context.Context 13986 header_ http.Header 13987} 13988 13989// Custombatch: Retrieves and updates tax settings of multiple accounts 13990// in a single request. 13991func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { 13992 c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13993 c.accounttaxcustombatchrequest = accounttaxcustombatchrequest 13994 return c 13995} 13996 13997// DryRun sets the optional parameter "dryRun": Flag to simulate a 13998// request like in a live environment. If set to true, dry-run mode 13999// checks the validity of the request and returns errors (if any). 14000func (c *AccounttaxCustombatchCall) DryRun(dryRun bool) *AccounttaxCustombatchCall { 14001 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14002 return c 14003} 14004 14005// Fields allows partial responses to be retrieved. See 14006// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14007// for more information. 14008func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { 14009 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14010 return c 14011} 14012 14013// Context sets the context to be used in this call's Do method. Any 14014// pending HTTP request will be aborted if the provided context is 14015// canceled. 14016func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { 14017 c.ctx_ = ctx 14018 return c 14019} 14020 14021// Header returns an http.Header that can be modified by the caller to 14022// add HTTP headers to the request. 14023func (c *AccounttaxCustombatchCall) Header() http.Header { 14024 if c.header_ == nil { 14025 c.header_ = make(http.Header) 14026 } 14027 return c.header_ 14028} 14029 14030func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) { 14031 reqHeaders := make(http.Header) 14032 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 14033 for k, v := range c.header_ { 14034 reqHeaders[k] = v 14035 } 14036 reqHeaders.Set("User-Agent", c.s.userAgent()) 14037 var body io.Reader = nil 14038 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest) 14039 if err != nil { 14040 return nil, err 14041 } 14042 reqHeaders.Set("Content-Type", "application/json") 14043 c.urlParams_.Set("alt", alt) 14044 c.urlParams_.Set("prettyPrint", "false") 14045 urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") 14046 urls += "?" + c.urlParams_.Encode() 14047 req, err := http.NewRequest("POST", urls, body) 14048 if err != nil { 14049 return nil, err 14050 } 14051 req.Header = reqHeaders 14052 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14053} 14054 14055// Do executes the "content.accounttax.custombatch" call. 14056// Exactly one of *AccounttaxCustomBatchResponse or error will be 14057// non-nil. Any non-2xx status code is an error. Response headers are in 14058// either *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a 14059// response was returned at all) in error.(*googleapi.Error).Header. Use 14060// googleapi.IsNotModified to check whether the returned error was 14061// because http.StatusNotModified was returned. 14062func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { 14063 gensupport.SetOptions(c.urlParams_, opts...) 14064 res, err := c.doRequest("json") 14065 if res != nil && res.StatusCode == http.StatusNotModified { 14066 if res.Body != nil { 14067 res.Body.Close() 14068 } 14069 return nil, &googleapi.Error{ 14070 Code: res.StatusCode, 14071 Header: res.Header, 14072 } 14073 } 14074 if err != nil { 14075 return nil, err 14076 } 14077 defer googleapi.CloseBody(res) 14078 if err := googleapi.CheckResponse(res); err != nil { 14079 return nil, err 14080 } 14081 ret := &AccounttaxCustomBatchResponse{ 14082 ServerResponse: googleapi.ServerResponse{ 14083 Header: res.Header, 14084 HTTPStatusCode: res.StatusCode, 14085 }, 14086 } 14087 target := &ret 14088 if err := gensupport.DecodeResponse(target, res); err != nil { 14089 return nil, err 14090 } 14091 return ret, nil 14092 // { 14093 // "description": "Retrieves and updates tax settings of multiple accounts in a single request.", 14094 // "flatPath": "accounttax/batch", 14095 // "httpMethod": "POST", 14096 // "id": "content.accounttax.custombatch", 14097 // "parameterOrder": [], 14098 // "parameters": { 14099 // "dryRun": { 14100 // "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).", 14101 // "location": "query", 14102 // "type": "boolean" 14103 // } 14104 // }, 14105 // "path": "accounttax/batch", 14106 // "request": { 14107 // "$ref": "AccounttaxCustomBatchRequest" 14108 // }, 14109 // "response": { 14110 // "$ref": "AccounttaxCustomBatchResponse" 14111 // }, 14112 // "scopes": [ 14113 // "https://www.googleapis.com/auth/content" 14114 // ] 14115 // } 14116 14117} 14118 14119// method id "content.accounttax.get": 14120 14121type AccounttaxGetCall struct { 14122 s *APIService 14123 merchantId uint64 14124 accountId uint64 14125 urlParams_ gensupport.URLParams 14126 ifNoneMatch_ string 14127 ctx_ context.Context 14128 header_ http.Header 14129} 14130 14131// Get: Retrieves the tax settings of the account. 14132// 14133// - accountId: The ID of the account for which to get/update account 14134// tax settings. 14135// - merchantId: The ID of the managing account. If this parameter is 14136// not the same as accountId, then this account must be a multi-client 14137// account and `accountId` must be the ID of a sub-account of this 14138// account. 14139func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { 14140 c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14141 c.merchantId = merchantId 14142 c.accountId = accountId 14143 return c 14144} 14145 14146// Fields allows partial responses to be retrieved. See 14147// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14148// for more information. 14149func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { 14150 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14151 return c 14152} 14153 14154// IfNoneMatch sets the optional parameter which makes the operation 14155// fail if the object's ETag matches the given value. This is useful for 14156// getting updates only after the object has changed since the last 14157// request. Use googleapi.IsNotModified to check whether the response 14158// error from Do is the result of In-None-Match. 14159func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { 14160 c.ifNoneMatch_ = entityTag 14161 return c 14162} 14163 14164// Context sets the context to be used in this call's Do method. Any 14165// pending HTTP request will be aborted if the provided context is 14166// canceled. 14167func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { 14168 c.ctx_ = ctx 14169 return c 14170} 14171 14172// Header returns an http.Header that can be modified by the caller to 14173// add HTTP headers to the request. 14174func (c *AccounttaxGetCall) Header() http.Header { 14175 if c.header_ == nil { 14176 c.header_ = make(http.Header) 14177 } 14178 return c.header_ 14179} 14180 14181func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { 14182 reqHeaders := make(http.Header) 14183 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 14184 for k, v := range c.header_ { 14185 reqHeaders[k] = v 14186 } 14187 reqHeaders.Set("User-Agent", c.s.userAgent()) 14188 if c.ifNoneMatch_ != "" { 14189 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14190 } 14191 var body io.Reader = nil 14192 c.urlParams_.Set("alt", alt) 14193 c.urlParams_.Set("prettyPrint", "false") 14194 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") 14195 urls += "?" + c.urlParams_.Encode() 14196 req, err := http.NewRequest("GET", urls, body) 14197 if err != nil { 14198 return nil, err 14199 } 14200 req.Header = reqHeaders 14201 googleapi.Expand(req.URL, map[string]string{ 14202 "merchantId": strconv.FormatUint(c.merchantId, 10), 14203 "accountId": strconv.FormatUint(c.accountId, 10), 14204 }) 14205 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14206} 14207 14208// Do executes the "content.accounttax.get" call. 14209// Exactly one of *AccountTax or error will be non-nil. Any non-2xx 14210// status code is an error. Response headers are in either 14211// *AccountTax.ServerResponse.Header or (if a response was returned at 14212// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14213// to check whether the returned error was because 14214// http.StatusNotModified was returned. 14215func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { 14216 gensupport.SetOptions(c.urlParams_, opts...) 14217 res, err := c.doRequest("json") 14218 if res != nil && res.StatusCode == http.StatusNotModified { 14219 if res.Body != nil { 14220 res.Body.Close() 14221 } 14222 return nil, &googleapi.Error{ 14223 Code: res.StatusCode, 14224 Header: res.Header, 14225 } 14226 } 14227 if err != nil { 14228 return nil, err 14229 } 14230 defer googleapi.CloseBody(res) 14231 if err := googleapi.CheckResponse(res); err != nil { 14232 return nil, err 14233 } 14234 ret := &AccountTax{ 14235 ServerResponse: googleapi.ServerResponse{ 14236 Header: res.Header, 14237 HTTPStatusCode: res.StatusCode, 14238 }, 14239 } 14240 target := &ret 14241 if err := gensupport.DecodeResponse(target, res); err != nil { 14242 return nil, err 14243 } 14244 return ret, nil 14245 // { 14246 // "description": "Retrieves the tax settings of the account.", 14247 // "flatPath": "{merchantId}/accounttax/{accountId}", 14248 // "httpMethod": "GET", 14249 // "id": "content.accounttax.get", 14250 // "parameterOrder": [ 14251 // "merchantId", 14252 // "accountId" 14253 // ], 14254 // "parameters": { 14255 // "accountId": { 14256 // "description": "The ID of the account for which to get/update account tax settings.", 14257 // "format": "uint64", 14258 // "location": "path", 14259 // "required": true, 14260 // "type": "string" 14261 // }, 14262 // "merchantId": { 14263 // "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.", 14264 // "format": "uint64", 14265 // "location": "path", 14266 // "required": true, 14267 // "type": "string" 14268 // } 14269 // }, 14270 // "path": "{merchantId}/accounttax/{accountId}", 14271 // "response": { 14272 // "$ref": "AccountTax" 14273 // }, 14274 // "scopes": [ 14275 // "https://www.googleapis.com/auth/content" 14276 // ] 14277 // } 14278 14279} 14280 14281// method id "content.accounttax.list": 14282 14283type AccounttaxListCall struct { 14284 s *APIService 14285 merchantId uint64 14286 urlParams_ gensupport.URLParams 14287 ifNoneMatch_ string 14288 ctx_ context.Context 14289 header_ http.Header 14290} 14291 14292// List: Lists the tax settings of the sub-accounts in your Merchant 14293// Center account. 14294// 14295// - merchantId: The ID of the managing account. This must be a 14296// multi-client account. 14297func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { 14298 c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14299 c.merchantId = merchantId 14300 return c 14301} 14302 14303// MaxResults sets the optional parameter "maxResults": The maximum 14304// number of tax settings to return in the response, used for paging. 14305func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { 14306 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 14307 return c 14308} 14309 14310// PageToken sets the optional parameter "pageToken": The token returned 14311// by the previous request. 14312func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { 14313 c.urlParams_.Set("pageToken", pageToken) 14314 return c 14315} 14316 14317// Fields allows partial responses to be retrieved. See 14318// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14319// for more information. 14320func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { 14321 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14322 return c 14323} 14324 14325// IfNoneMatch sets the optional parameter which makes the operation 14326// fail if the object's ETag matches the given value. This is useful for 14327// getting updates only after the object has changed since the last 14328// request. Use googleapi.IsNotModified to check whether the response 14329// error from Do is the result of In-None-Match. 14330func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { 14331 c.ifNoneMatch_ = entityTag 14332 return c 14333} 14334 14335// Context sets the context to be used in this call's Do method. Any 14336// pending HTTP request will be aborted if the provided context is 14337// canceled. 14338func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { 14339 c.ctx_ = ctx 14340 return c 14341} 14342 14343// Header returns an http.Header that can be modified by the caller to 14344// add HTTP headers to the request. 14345func (c *AccounttaxListCall) Header() http.Header { 14346 if c.header_ == nil { 14347 c.header_ = make(http.Header) 14348 } 14349 return c.header_ 14350} 14351 14352func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { 14353 reqHeaders := make(http.Header) 14354 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 14355 for k, v := range c.header_ { 14356 reqHeaders[k] = v 14357 } 14358 reqHeaders.Set("User-Agent", c.s.userAgent()) 14359 if c.ifNoneMatch_ != "" { 14360 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14361 } 14362 var body io.Reader = nil 14363 c.urlParams_.Set("alt", alt) 14364 c.urlParams_.Set("prettyPrint", "false") 14365 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") 14366 urls += "?" + c.urlParams_.Encode() 14367 req, err := http.NewRequest("GET", urls, body) 14368 if err != nil { 14369 return nil, err 14370 } 14371 req.Header = reqHeaders 14372 googleapi.Expand(req.URL, map[string]string{ 14373 "merchantId": strconv.FormatUint(c.merchantId, 10), 14374 }) 14375 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14376} 14377 14378// Do executes the "content.accounttax.list" call. 14379// Exactly one of *AccounttaxListResponse or error will be non-nil. Any 14380// non-2xx status code is an error. Response headers are in either 14381// *AccounttaxListResponse.ServerResponse.Header or (if a response was 14382// returned at all) in error.(*googleapi.Error).Header. Use 14383// googleapi.IsNotModified to check whether the returned error was 14384// because http.StatusNotModified was returned. 14385func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { 14386 gensupport.SetOptions(c.urlParams_, opts...) 14387 res, err := c.doRequest("json") 14388 if res != nil && res.StatusCode == http.StatusNotModified { 14389 if res.Body != nil { 14390 res.Body.Close() 14391 } 14392 return nil, &googleapi.Error{ 14393 Code: res.StatusCode, 14394 Header: res.Header, 14395 } 14396 } 14397 if err != nil { 14398 return nil, err 14399 } 14400 defer googleapi.CloseBody(res) 14401 if err := googleapi.CheckResponse(res); err != nil { 14402 return nil, err 14403 } 14404 ret := &AccounttaxListResponse{ 14405 ServerResponse: googleapi.ServerResponse{ 14406 Header: res.Header, 14407 HTTPStatusCode: res.StatusCode, 14408 }, 14409 } 14410 target := &ret 14411 if err := gensupport.DecodeResponse(target, res); err != nil { 14412 return nil, err 14413 } 14414 return ret, nil 14415 // { 14416 // "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.", 14417 // "flatPath": "{merchantId}/accounttax", 14418 // "httpMethod": "GET", 14419 // "id": "content.accounttax.list", 14420 // "parameterOrder": [ 14421 // "merchantId" 14422 // ], 14423 // "parameters": { 14424 // "maxResults": { 14425 // "description": "The maximum number of tax settings to return in the response, used for paging.", 14426 // "format": "uint32", 14427 // "location": "query", 14428 // "type": "integer" 14429 // }, 14430 // "merchantId": { 14431 // "description": "The ID of the managing account. This must be a multi-client account.", 14432 // "format": "uint64", 14433 // "location": "path", 14434 // "required": true, 14435 // "type": "string" 14436 // }, 14437 // "pageToken": { 14438 // "description": "The token returned by the previous request.", 14439 // "location": "query", 14440 // "type": "string" 14441 // } 14442 // }, 14443 // "path": "{merchantId}/accounttax", 14444 // "response": { 14445 // "$ref": "AccounttaxListResponse" 14446 // }, 14447 // "scopes": [ 14448 // "https://www.googleapis.com/auth/content" 14449 // ] 14450 // } 14451 14452} 14453 14454// Pages invokes f for each page of results. 14455// A non-nil error returned from f will halt the iteration. 14456// The provided context supersedes any context provided to the Context method. 14457func (c *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error { 14458 c.ctx_ = ctx 14459 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14460 for { 14461 x, err := c.Do() 14462 if err != nil { 14463 return err 14464 } 14465 if err := f(x); err != nil { 14466 return err 14467 } 14468 if x.NextPageToken == "" { 14469 return nil 14470 } 14471 c.PageToken(x.NextPageToken) 14472 } 14473} 14474 14475// method id "content.accounttax.update": 14476 14477type AccounttaxUpdateCall struct { 14478 s *APIService 14479 merchantId uint64 14480 accountId uint64 14481 accounttax *AccountTax 14482 urlParams_ gensupport.URLParams 14483 ctx_ context.Context 14484 header_ http.Header 14485} 14486 14487// Update: Updates the tax settings of the account. Any fields that are 14488// not provided are deleted from the resource. 14489// 14490// - accountId: The ID of the account for which to get/update account 14491// tax settings. 14492// - merchantId: The ID of the managing account. If this parameter is 14493// not the same as accountId, then this account must be a multi-client 14494// account and `accountId` must be the ID of a sub-account of this 14495// account. 14496func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { 14497 c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14498 c.merchantId = merchantId 14499 c.accountId = accountId 14500 c.accounttax = accounttax 14501 return c 14502} 14503 14504// DryRun sets the optional parameter "dryRun": Flag to simulate a 14505// request like in a live environment. If set to true, dry-run mode 14506// checks the validity of the request and returns errors (if any). 14507func (c *AccounttaxUpdateCall) DryRun(dryRun bool) *AccounttaxUpdateCall { 14508 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14509 return c 14510} 14511 14512// Fields allows partial responses to be retrieved. See 14513// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14514// for more information. 14515func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { 14516 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14517 return c 14518} 14519 14520// Context sets the context to be used in this call's Do method. Any 14521// pending HTTP request will be aborted if the provided context is 14522// canceled. 14523func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { 14524 c.ctx_ = ctx 14525 return c 14526} 14527 14528// Header returns an http.Header that can be modified by the caller to 14529// add HTTP headers to the request. 14530func (c *AccounttaxUpdateCall) Header() http.Header { 14531 if c.header_ == nil { 14532 c.header_ = make(http.Header) 14533 } 14534 return c.header_ 14535} 14536 14537func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { 14538 reqHeaders := make(http.Header) 14539 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 14540 for k, v := range c.header_ { 14541 reqHeaders[k] = v 14542 } 14543 reqHeaders.Set("User-Agent", c.s.userAgent()) 14544 var body io.Reader = nil 14545 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax) 14546 if err != nil { 14547 return nil, err 14548 } 14549 reqHeaders.Set("Content-Type", "application/json") 14550 c.urlParams_.Set("alt", alt) 14551 c.urlParams_.Set("prettyPrint", "false") 14552 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") 14553 urls += "?" + c.urlParams_.Encode() 14554 req, err := http.NewRequest("PUT", urls, body) 14555 if err != nil { 14556 return nil, err 14557 } 14558 req.Header = reqHeaders 14559 googleapi.Expand(req.URL, map[string]string{ 14560 "merchantId": strconv.FormatUint(c.merchantId, 10), 14561 "accountId": strconv.FormatUint(c.accountId, 10), 14562 }) 14563 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14564} 14565 14566// Do executes the "content.accounttax.update" call. 14567// Exactly one of *AccountTax or error will be non-nil. Any non-2xx 14568// status code is an error. Response headers are in either 14569// *AccountTax.ServerResponse.Header or (if a response was returned at 14570// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14571// to check whether the returned error was because 14572// http.StatusNotModified was returned. 14573func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { 14574 gensupport.SetOptions(c.urlParams_, opts...) 14575 res, err := c.doRequest("json") 14576 if res != nil && res.StatusCode == http.StatusNotModified { 14577 if res.Body != nil { 14578 res.Body.Close() 14579 } 14580 return nil, &googleapi.Error{ 14581 Code: res.StatusCode, 14582 Header: res.Header, 14583 } 14584 } 14585 if err != nil { 14586 return nil, err 14587 } 14588 defer googleapi.CloseBody(res) 14589 if err := googleapi.CheckResponse(res); err != nil { 14590 return nil, err 14591 } 14592 ret := &AccountTax{ 14593 ServerResponse: googleapi.ServerResponse{ 14594 Header: res.Header, 14595 HTTPStatusCode: res.StatusCode, 14596 }, 14597 } 14598 target := &ret 14599 if err := gensupport.DecodeResponse(target, res); err != nil { 14600 return nil, err 14601 } 14602 return ret, nil 14603 // { 14604 // "description": "Updates the tax settings of the account. Any fields that are not provided are deleted from the resource.", 14605 // "flatPath": "{merchantId}/accounttax/{accountId}", 14606 // "httpMethod": "PUT", 14607 // "id": "content.accounttax.update", 14608 // "parameterOrder": [ 14609 // "merchantId", 14610 // "accountId" 14611 // ], 14612 // "parameters": { 14613 // "accountId": { 14614 // "description": "The ID of the account for which to get/update account tax settings.", 14615 // "format": "uint64", 14616 // "location": "path", 14617 // "required": true, 14618 // "type": "string" 14619 // }, 14620 // "dryRun": { 14621 // "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).", 14622 // "location": "query", 14623 // "type": "boolean" 14624 // }, 14625 // "merchantId": { 14626 // "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.", 14627 // "format": "uint64", 14628 // "location": "path", 14629 // "required": true, 14630 // "type": "string" 14631 // } 14632 // }, 14633 // "path": "{merchantId}/accounttax/{accountId}", 14634 // "request": { 14635 // "$ref": "AccountTax" 14636 // }, 14637 // "response": { 14638 // "$ref": "AccountTax" 14639 // }, 14640 // "scopes": [ 14641 // "https://www.googleapis.com/auth/content" 14642 // ] 14643 // } 14644 14645} 14646 14647// method id "content.datafeeds.custombatch": 14648 14649type DatafeedsCustombatchCall struct { 14650 s *APIService 14651 datafeedscustombatchrequest *DatafeedsCustomBatchRequest 14652 urlParams_ gensupport.URLParams 14653 ctx_ context.Context 14654 header_ http.Header 14655} 14656 14657// Custombatch: Deletes, fetches, gets, inserts and updates multiple 14658// datafeeds in a single request. 14659func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { 14660 c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14661 c.datafeedscustombatchrequest = datafeedscustombatchrequest 14662 return c 14663} 14664 14665// DryRun sets the optional parameter "dryRun": Flag to simulate a 14666// request like in a live environment. If set to true, dry-run mode 14667// checks the validity of the request and returns errors (if any). 14668func (c *DatafeedsCustombatchCall) DryRun(dryRun bool) *DatafeedsCustombatchCall { 14669 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14670 return c 14671} 14672 14673// Fields allows partial responses to be retrieved. See 14674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14675// for more information. 14676func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { 14677 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14678 return c 14679} 14680 14681// Context sets the context to be used in this call's Do method. Any 14682// pending HTTP request will be aborted if the provided context is 14683// canceled. 14684func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { 14685 c.ctx_ = ctx 14686 return c 14687} 14688 14689// Header returns an http.Header that can be modified by the caller to 14690// add HTTP headers to the request. 14691func (c *DatafeedsCustombatchCall) Header() http.Header { 14692 if c.header_ == nil { 14693 c.header_ = make(http.Header) 14694 } 14695 return c.header_ 14696} 14697 14698func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { 14699 reqHeaders := make(http.Header) 14700 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 14701 for k, v := range c.header_ { 14702 reqHeaders[k] = v 14703 } 14704 reqHeaders.Set("User-Agent", c.s.userAgent()) 14705 var body io.Reader = nil 14706 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest) 14707 if err != nil { 14708 return nil, err 14709 } 14710 reqHeaders.Set("Content-Type", "application/json") 14711 c.urlParams_.Set("alt", alt) 14712 c.urlParams_.Set("prettyPrint", "false") 14713 urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") 14714 urls += "?" + c.urlParams_.Encode() 14715 req, err := http.NewRequest("POST", urls, body) 14716 if err != nil { 14717 return nil, err 14718 } 14719 req.Header = reqHeaders 14720 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14721} 14722 14723// Do executes the "content.datafeeds.custombatch" call. 14724// Exactly one of *DatafeedsCustomBatchResponse or error will be 14725// non-nil. Any non-2xx status code is an error. Response headers are in 14726// either *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a 14727// response was returned at all) in error.(*googleapi.Error).Header. Use 14728// googleapi.IsNotModified to check whether the returned error was 14729// because http.StatusNotModified was returned. 14730func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { 14731 gensupport.SetOptions(c.urlParams_, opts...) 14732 res, err := c.doRequest("json") 14733 if res != nil && res.StatusCode == http.StatusNotModified { 14734 if res.Body != nil { 14735 res.Body.Close() 14736 } 14737 return nil, &googleapi.Error{ 14738 Code: res.StatusCode, 14739 Header: res.Header, 14740 } 14741 } 14742 if err != nil { 14743 return nil, err 14744 } 14745 defer googleapi.CloseBody(res) 14746 if err := googleapi.CheckResponse(res); err != nil { 14747 return nil, err 14748 } 14749 ret := &DatafeedsCustomBatchResponse{ 14750 ServerResponse: googleapi.ServerResponse{ 14751 Header: res.Header, 14752 HTTPStatusCode: res.StatusCode, 14753 }, 14754 } 14755 target := &ret 14756 if err := gensupport.DecodeResponse(target, res); err != nil { 14757 return nil, err 14758 } 14759 return ret, nil 14760 // { 14761 // "description": "Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.", 14762 // "flatPath": "datafeeds/batch", 14763 // "httpMethod": "POST", 14764 // "id": "content.datafeeds.custombatch", 14765 // "parameterOrder": [], 14766 // "parameters": { 14767 // "dryRun": { 14768 // "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).", 14769 // "location": "query", 14770 // "type": "boolean" 14771 // } 14772 // }, 14773 // "path": "datafeeds/batch", 14774 // "request": { 14775 // "$ref": "DatafeedsCustomBatchRequest" 14776 // }, 14777 // "response": { 14778 // "$ref": "DatafeedsCustomBatchResponse" 14779 // }, 14780 // "scopes": [ 14781 // "https://www.googleapis.com/auth/content" 14782 // ] 14783 // } 14784 14785} 14786 14787// method id "content.datafeeds.delete": 14788 14789type DatafeedsDeleteCall struct { 14790 s *APIService 14791 merchantId uint64 14792 datafeedId uint64 14793 urlParams_ gensupport.URLParams 14794 ctx_ context.Context 14795 header_ http.Header 14796} 14797 14798// Delete: Deletes a datafeed configuration from your Merchant Center 14799// account. 14800// 14801// - datafeedId: The ID of the datafeed. 14802// - merchantId: The ID of the account that manages the datafeed. This 14803// account cannot be a multi-client account. 14804func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { 14805 c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14806 c.merchantId = merchantId 14807 c.datafeedId = datafeedId 14808 return c 14809} 14810 14811// DryRun sets the optional parameter "dryRun": Flag to simulate a 14812// request like in a live environment. If set to true, dry-run mode 14813// checks the validity of the request and returns errors (if any). 14814func (c *DatafeedsDeleteCall) DryRun(dryRun bool) *DatafeedsDeleteCall { 14815 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14816 return c 14817} 14818 14819// Fields allows partial responses to be retrieved. See 14820// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14821// for more information. 14822func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { 14823 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14824 return c 14825} 14826 14827// Context sets the context to be used in this call's Do method. Any 14828// pending HTTP request will be aborted if the provided context is 14829// canceled. 14830func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { 14831 c.ctx_ = ctx 14832 return c 14833} 14834 14835// Header returns an http.Header that can be modified by the caller to 14836// add HTTP headers to the request. 14837func (c *DatafeedsDeleteCall) Header() http.Header { 14838 if c.header_ == nil { 14839 c.header_ = make(http.Header) 14840 } 14841 return c.header_ 14842} 14843 14844func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { 14845 reqHeaders := make(http.Header) 14846 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 14847 for k, v := range c.header_ { 14848 reqHeaders[k] = v 14849 } 14850 reqHeaders.Set("User-Agent", c.s.userAgent()) 14851 var body io.Reader = nil 14852 c.urlParams_.Set("alt", alt) 14853 c.urlParams_.Set("prettyPrint", "false") 14854 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 14855 urls += "?" + c.urlParams_.Encode() 14856 req, err := http.NewRequest("DELETE", urls, body) 14857 if err != nil { 14858 return nil, err 14859 } 14860 req.Header = reqHeaders 14861 googleapi.Expand(req.URL, map[string]string{ 14862 "merchantId": strconv.FormatUint(c.merchantId, 10), 14863 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 14864 }) 14865 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14866} 14867 14868// Do executes the "content.datafeeds.delete" call. 14869func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { 14870 gensupport.SetOptions(c.urlParams_, opts...) 14871 res, err := c.doRequest("json") 14872 if err != nil { 14873 return err 14874 } 14875 defer googleapi.CloseBody(res) 14876 if err := googleapi.CheckResponse(res); err != nil { 14877 return err 14878 } 14879 return nil 14880 // { 14881 // "description": "Deletes a datafeed configuration from your Merchant Center account.", 14882 // "flatPath": "{merchantId}/datafeeds/{datafeedId}", 14883 // "httpMethod": "DELETE", 14884 // "id": "content.datafeeds.delete", 14885 // "parameterOrder": [ 14886 // "merchantId", 14887 // "datafeedId" 14888 // ], 14889 // "parameters": { 14890 // "datafeedId": { 14891 // "description": "The ID of the datafeed.", 14892 // "format": "uint64", 14893 // "location": "path", 14894 // "required": true, 14895 // "type": "string" 14896 // }, 14897 // "dryRun": { 14898 // "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).", 14899 // "location": "query", 14900 // "type": "boolean" 14901 // }, 14902 // "merchantId": { 14903 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 14904 // "format": "uint64", 14905 // "location": "path", 14906 // "required": true, 14907 // "type": "string" 14908 // } 14909 // }, 14910 // "path": "{merchantId}/datafeeds/{datafeedId}", 14911 // "scopes": [ 14912 // "https://www.googleapis.com/auth/content" 14913 // ] 14914 // } 14915 14916} 14917 14918// method id "content.datafeeds.fetchnow": 14919 14920type DatafeedsFetchnowCall struct { 14921 s *APIService 14922 merchantId uint64 14923 datafeedId uint64 14924 urlParams_ gensupport.URLParams 14925 ctx_ context.Context 14926 header_ http.Header 14927} 14928 14929// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center 14930// account. If you need to call this method more than once per day, we 14931// recommend you use the Products service to update your product data. 14932// 14933// - datafeedId: The ID of the datafeed to be fetched. 14934// - merchantId: The ID of the account that manages the datafeed. This 14935// account cannot be a multi-client account. 14936func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { 14937 c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14938 c.merchantId = merchantId 14939 c.datafeedId = datafeedId 14940 return c 14941} 14942 14943// DryRun sets the optional parameter "dryRun": Flag to simulate a 14944// request like in a live environment. If set to true, dry-run mode 14945// checks the validity of the request and returns errors (if any). 14946func (c *DatafeedsFetchnowCall) DryRun(dryRun bool) *DatafeedsFetchnowCall { 14947 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 14948 return c 14949} 14950 14951// Fields allows partial responses to be retrieved. See 14952// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14953// for more information. 14954func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { 14955 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14956 return c 14957} 14958 14959// Context sets the context to be used in this call's Do method. Any 14960// pending HTTP request will be aborted if the provided context is 14961// canceled. 14962func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { 14963 c.ctx_ = ctx 14964 return c 14965} 14966 14967// Header returns an http.Header that can be modified by the caller to 14968// add HTTP headers to the request. 14969func (c *DatafeedsFetchnowCall) Header() http.Header { 14970 if c.header_ == nil { 14971 c.header_ = make(http.Header) 14972 } 14973 return c.header_ 14974} 14975 14976func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { 14977 reqHeaders := make(http.Header) 14978 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 14979 for k, v := range c.header_ { 14980 reqHeaders[k] = v 14981 } 14982 reqHeaders.Set("User-Agent", c.s.userAgent()) 14983 var body io.Reader = nil 14984 c.urlParams_.Set("alt", alt) 14985 c.urlParams_.Set("prettyPrint", "false") 14986 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") 14987 urls += "?" + c.urlParams_.Encode() 14988 req, err := http.NewRequest("POST", urls, body) 14989 if err != nil { 14990 return nil, err 14991 } 14992 req.Header = reqHeaders 14993 googleapi.Expand(req.URL, map[string]string{ 14994 "merchantId": strconv.FormatUint(c.merchantId, 10), 14995 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 14996 }) 14997 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14998} 14999 15000// Do executes the "content.datafeeds.fetchnow" call. 15001// Exactly one of *DatafeedsFetchNowResponse or error will be non-nil. 15002// Any non-2xx status code is an error. Response headers are in either 15003// *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response 15004// was returned at all) in error.(*googleapi.Error).Header. Use 15005// googleapi.IsNotModified to check whether the returned error was 15006// because http.StatusNotModified was returned. 15007func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { 15008 gensupport.SetOptions(c.urlParams_, opts...) 15009 res, err := c.doRequest("json") 15010 if res != nil && res.StatusCode == http.StatusNotModified { 15011 if res.Body != nil { 15012 res.Body.Close() 15013 } 15014 return nil, &googleapi.Error{ 15015 Code: res.StatusCode, 15016 Header: res.Header, 15017 } 15018 } 15019 if err != nil { 15020 return nil, err 15021 } 15022 defer googleapi.CloseBody(res) 15023 if err := googleapi.CheckResponse(res); err != nil { 15024 return nil, err 15025 } 15026 ret := &DatafeedsFetchNowResponse{ 15027 ServerResponse: googleapi.ServerResponse{ 15028 Header: res.Header, 15029 HTTPStatusCode: res.StatusCode, 15030 }, 15031 } 15032 target := &ret 15033 if err := gensupport.DecodeResponse(target, res); err != nil { 15034 return nil, err 15035 } 15036 return ret, nil 15037 // { 15038 // "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.", 15039 // "flatPath": "{merchantId}/datafeeds/{datafeedId}/fetchNow", 15040 // "httpMethod": "POST", 15041 // "id": "content.datafeeds.fetchnow", 15042 // "parameterOrder": [ 15043 // "merchantId", 15044 // "datafeedId" 15045 // ], 15046 // "parameters": { 15047 // "datafeedId": { 15048 // "description": "The ID of the datafeed to be fetched.", 15049 // "format": "uint64", 15050 // "location": "path", 15051 // "required": true, 15052 // "type": "string" 15053 // }, 15054 // "dryRun": { 15055 // "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).", 15056 // "location": "query", 15057 // "type": "boolean" 15058 // }, 15059 // "merchantId": { 15060 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15061 // "format": "uint64", 15062 // "location": "path", 15063 // "required": true, 15064 // "type": "string" 15065 // } 15066 // }, 15067 // "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow", 15068 // "response": { 15069 // "$ref": "DatafeedsFetchNowResponse" 15070 // }, 15071 // "scopes": [ 15072 // "https://www.googleapis.com/auth/content" 15073 // ] 15074 // } 15075 15076} 15077 15078// method id "content.datafeeds.get": 15079 15080type DatafeedsGetCall struct { 15081 s *APIService 15082 merchantId uint64 15083 datafeedId uint64 15084 urlParams_ gensupport.URLParams 15085 ifNoneMatch_ string 15086 ctx_ context.Context 15087 header_ http.Header 15088} 15089 15090// Get: Retrieves a datafeed configuration from your Merchant Center 15091// account. 15092// 15093// - datafeedId: The ID of the datafeed. 15094// - merchantId: The ID of the account that manages the datafeed. This 15095// account cannot be a multi-client account. 15096func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { 15097 c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15098 c.merchantId = merchantId 15099 c.datafeedId = datafeedId 15100 return c 15101} 15102 15103// Fields allows partial responses to be retrieved. See 15104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15105// for more information. 15106func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { 15107 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15108 return c 15109} 15110 15111// IfNoneMatch sets the optional parameter which makes the operation 15112// fail if the object's ETag matches the given value. This is useful for 15113// getting updates only after the object has changed since the last 15114// request. Use googleapi.IsNotModified to check whether the response 15115// error from Do is the result of In-None-Match. 15116func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { 15117 c.ifNoneMatch_ = entityTag 15118 return c 15119} 15120 15121// Context sets the context to be used in this call's Do method. Any 15122// pending HTTP request will be aborted if the provided context is 15123// canceled. 15124func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { 15125 c.ctx_ = ctx 15126 return c 15127} 15128 15129// Header returns an http.Header that can be modified by the caller to 15130// add HTTP headers to the request. 15131func (c *DatafeedsGetCall) Header() http.Header { 15132 if c.header_ == nil { 15133 c.header_ = make(http.Header) 15134 } 15135 return c.header_ 15136} 15137 15138func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { 15139 reqHeaders := make(http.Header) 15140 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 15141 for k, v := range c.header_ { 15142 reqHeaders[k] = v 15143 } 15144 reqHeaders.Set("User-Agent", c.s.userAgent()) 15145 if c.ifNoneMatch_ != "" { 15146 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15147 } 15148 var body io.Reader = nil 15149 c.urlParams_.Set("alt", alt) 15150 c.urlParams_.Set("prettyPrint", "false") 15151 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 15152 urls += "?" + c.urlParams_.Encode() 15153 req, err := http.NewRequest("GET", urls, body) 15154 if err != nil { 15155 return nil, err 15156 } 15157 req.Header = reqHeaders 15158 googleapi.Expand(req.URL, map[string]string{ 15159 "merchantId": strconv.FormatUint(c.merchantId, 10), 15160 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15161 }) 15162 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15163} 15164 15165// Do executes the "content.datafeeds.get" call. 15166// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 15167// code is an error. Response headers are in either 15168// *Datafeed.ServerResponse.Header or (if a response was returned at 15169// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15170// to check whether the returned error was because 15171// http.StatusNotModified was returned. 15172func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 15173 gensupport.SetOptions(c.urlParams_, opts...) 15174 res, err := c.doRequest("json") 15175 if res != nil && res.StatusCode == http.StatusNotModified { 15176 if res.Body != nil { 15177 res.Body.Close() 15178 } 15179 return nil, &googleapi.Error{ 15180 Code: res.StatusCode, 15181 Header: res.Header, 15182 } 15183 } 15184 if err != nil { 15185 return nil, err 15186 } 15187 defer googleapi.CloseBody(res) 15188 if err := googleapi.CheckResponse(res); err != nil { 15189 return nil, err 15190 } 15191 ret := &Datafeed{ 15192 ServerResponse: googleapi.ServerResponse{ 15193 Header: res.Header, 15194 HTTPStatusCode: res.StatusCode, 15195 }, 15196 } 15197 target := &ret 15198 if err := gensupport.DecodeResponse(target, res); err != nil { 15199 return nil, err 15200 } 15201 return ret, nil 15202 // { 15203 // "description": "Retrieves a datafeed configuration from your Merchant Center account.", 15204 // "flatPath": "{merchantId}/datafeeds/{datafeedId}", 15205 // "httpMethod": "GET", 15206 // "id": "content.datafeeds.get", 15207 // "parameterOrder": [ 15208 // "merchantId", 15209 // "datafeedId" 15210 // ], 15211 // "parameters": { 15212 // "datafeedId": { 15213 // "description": "The ID of the datafeed.", 15214 // "format": "uint64", 15215 // "location": "path", 15216 // "required": true, 15217 // "type": "string" 15218 // }, 15219 // "merchantId": { 15220 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15221 // "format": "uint64", 15222 // "location": "path", 15223 // "required": true, 15224 // "type": "string" 15225 // } 15226 // }, 15227 // "path": "{merchantId}/datafeeds/{datafeedId}", 15228 // "response": { 15229 // "$ref": "Datafeed" 15230 // }, 15231 // "scopes": [ 15232 // "https://www.googleapis.com/auth/content" 15233 // ] 15234 // } 15235 15236} 15237 15238// method id "content.datafeeds.insert": 15239 15240type DatafeedsInsertCall struct { 15241 s *APIService 15242 merchantId uint64 15243 datafeed *Datafeed 15244 urlParams_ gensupport.URLParams 15245 ctx_ context.Context 15246 header_ http.Header 15247} 15248 15249// Insert: Registers a datafeed configuration with your Merchant Center 15250// account. 15251// 15252// - merchantId: The ID of the account that manages the datafeed. This 15253// account cannot be a multi-client account. 15254func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { 15255 c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15256 c.merchantId = merchantId 15257 c.datafeed = datafeed 15258 return c 15259} 15260 15261// DryRun sets the optional parameter "dryRun": Flag to simulate a 15262// request like in a live environment. If set to true, dry-run mode 15263// checks the validity of the request and returns errors (if any). 15264func (c *DatafeedsInsertCall) DryRun(dryRun bool) *DatafeedsInsertCall { 15265 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15266 return c 15267} 15268 15269// Fields allows partial responses to be retrieved. See 15270// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15271// for more information. 15272func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { 15273 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15274 return c 15275} 15276 15277// Context sets the context to be used in this call's Do method. Any 15278// pending HTTP request will be aborted if the provided context is 15279// canceled. 15280func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { 15281 c.ctx_ = ctx 15282 return c 15283} 15284 15285// Header returns an http.Header that can be modified by the caller to 15286// add HTTP headers to the request. 15287func (c *DatafeedsInsertCall) Header() http.Header { 15288 if c.header_ == nil { 15289 c.header_ = make(http.Header) 15290 } 15291 return c.header_ 15292} 15293 15294func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { 15295 reqHeaders := make(http.Header) 15296 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 15297 for k, v := range c.header_ { 15298 reqHeaders[k] = v 15299 } 15300 reqHeaders.Set("User-Agent", c.s.userAgent()) 15301 var body io.Reader = nil 15302 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) 15303 if err != nil { 15304 return nil, err 15305 } 15306 reqHeaders.Set("Content-Type", "application/json") 15307 c.urlParams_.Set("alt", alt) 15308 c.urlParams_.Set("prettyPrint", "false") 15309 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") 15310 urls += "?" + c.urlParams_.Encode() 15311 req, err := http.NewRequest("POST", urls, body) 15312 if err != nil { 15313 return nil, err 15314 } 15315 req.Header = reqHeaders 15316 googleapi.Expand(req.URL, map[string]string{ 15317 "merchantId": strconv.FormatUint(c.merchantId, 10), 15318 }) 15319 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15320} 15321 15322// Do executes the "content.datafeeds.insert" call. 15323// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 15324// code is an error. Response headers are in either 15325// *Datafeed.ServerResponse.Header or (if a response was returned at 15326// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15327// to check whether the returned error was because 15328// http.StatusNotModified was returned. 15329func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 15330 gensupport.SetOptions(c.urlParams_, opts...) 15331 res, err := c.doRequest("json") 15332 if res != nil && res.StatusCode == http.StatusNotModified { 15333 if res.Body != nil { 15334 res.Body.Close() 15335 } 15336 return nil, &googleapi.Error{ 15337 Code: res.StatusCode, 15338 Header: res.Header, 15339 } 15340 } 15341 if err != nil { 15342 return nil, err 15343 } 15344 defer googleapi.CloseBody(res) 15345 if err := googleapi.CheckResponse(res); err != nil { 15346 return nil, err 15347 } 15348 ret := &Datafeed{ 15349 ServerResponse: googleapi.ServerResponse{ 15350 Header: res.Header, 15351 HTTPStatusCode: res.StatusCode, 15352 }, 15353 } 15354 target := &ret 15355 if err := gensupport.DecodeResponse(target, res); err != nil { 15356 return nil, err 15357 } 15358 return ret, nil 15359 // { 15360 // "description": "Registers a datafeed configuration with your Merchant Center account.", 15361 // "flatPath": "{merchantId}/datafeeds", 15362 // "httpMethod": "POST", 15363 // "id": "content.datafeeds.insert", 15364 // "parameterOrder": [ 15365 // "merchantId" 15366 // ], 15367 // "parameters": { 15368 // "dryRun": { 15369 // "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).", 15370 // "location": "query", 15371 // "type": "boolean" 15372 // }, 15373 // "merchantId": { 15374 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15375 // "format": "uint64", 15376 // "location": "path", 15377 // "required": true, 15378 // "type": "string" 15379 // } 15380 // }, 15381 // "path": "{merchantId}/datafeeds", 15382 // "request": { 15383 // "$ref": "Datafeed" 15384 // }, 15385 // "response": { 15386 // "$ref": "Datafeed" 15387 // }, 15388 // "scopes": [ 15389 // "https://www.googleapis.com/auth/content" 15390 // ] 15391 // } 15392 15393} 15394 15395// method id "content.datafeeds.list": 15396 15397type DatafeedsListCall struct { 15398 s *APIService 15399 merchantId uint64 15400 urlParams_ gensupport.URLParams 15401 ifNoneMatch_ string 15402 ctx_ context.Context 15403 header_ http.Header 15404} 15405 15406// List: Lists the configurations for datafeeds in your Merchant Center 15407// account. 15408// 15409// - merchantId: The ID of the account that manages the datafeeds. This 15410// account cannot be a multi-client account. 15411func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { 15412 c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15413 c.merchantId = merchantId 15414 return c 15415} 15416 15417// MaxResults sets the optional parameter "maxResults": The maximum 15418// number of products to return in the response, used for paging. 15419func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { 15420 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 15421 return c 15422} 15423 15424// PageToken sets the optional parameter "pageToken": The token returned 15425// by the previous request. 15426func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { 15427 c.urlParams_.Set("pageToken", pageToken) 15428 return c 15429} 15430 15431// Fields allows partial responses to be retrieved. See 15432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15433// for more information. 15434func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { 15435 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15436 return c 15437} 15438 15439// IfNoneMatch sets the optional parameter which makes the operation 15440// fail if the object's ETag matches the given value. This is useful for 15441// getting updates only after the object has changed since the last 15442// request. Use googleapi.IsNotModified to check whether the response 15443// error from Do is the result of In-None-Match. 15444func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { 15445 c.ifNoneMatch_ = entityTag 15446 return c 15447} 15448 15449// Context sets the context to be used in this call's Do method. Any 15450// pending HTTP request will be aborted if the provided context is 15451// canceled. 15452func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { 15453 c.ctx_ = ctx 15454 return c 15455} 15456 15457// Header returns an http.Header that can be modified by the caller to 15458// add HTTP headers to the request. 15459func (c *DatafeedsListCall) Header() http.Header { 15460 if c.header_ == nil { 15461 c.header_ = make(http.Header) 15462 } 15463 return c.header_ 15464} 15465 15466func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { 15467 reqHeaders := make(http.Header) 15468 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 15469 for k, v := range c.header_ { 15470 reqHeaders[k] = v 15471 } 15472 reqHeaders.Set("User-Agent", c.s.userAgent()) 15473 if c.ifNoneMatch_ != "" { 15474 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15475 } 15476 var body io.Reader = nil 15477 c.urlParams_.Set("alt", alt) 15478 c.urlParams_.Set("prettyPrint", "false") 15479 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") 15480 urls += "?" + c.urlParams_.Encode() 15481 req, err := http.NewRequest("GET", urls, body) 15482 if err != nil { 15483 return nil, err 15484 } 15485 req.Header = reqHeaders 15486 googleapi.Expand(req.URL, map[string]string{ 15487 "merchantId": strconv.FormatUint(c.merchantId, 10), 15488 }) 15489 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15490} 15491 15492// Do executes the "content.datafeeds.list" call. 15493// Exactly one of *DatafeedsListResponse or error will be non-nil. Any 15494// non-2xx status code is an error. Response headers are in either 15495// *DatafeedsListResponse.ServerResponse.Header or (if a response was 15496// returned at all) in error.(*googleapi.Error).Header. Use 15497// googleapi.IsNotModified to check whether the returned error was 15498// because http.StatusNotModified was returned. 15499func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { 15500 gensupport.SetOptions(c.urlParams_, opts...) 15501 res, err := c.doRequest("json") 15502 if res != nil && res.StatusCode == http.StatusNotModified { 15503 if res.Body != nil { 15504 res.Body.Close() 15505 } 15506 return nil, &googleapi.Error{ 15507 Code: res.StatusCode, 15508 Header: res.Header, 15509 } 15510 } 15511 if err != nil { 15512 return nil, err 15513 } 15514 defer googleapi.CloseBody(res) 15515 if err := googleapi.CheckResponse(res); err != nil { 15516 return nil, err 15517 } 15518 ret := &DatafeedsListResponse{ 15519 ServerResponse: googleapi.ServerResponse{ 15520 Header: res.Header, 15521 HTTPStatusCode: res.StatusCode, 15522 }, 15523 } 15524 target := &ret 15525 if err := gensupport.DecodeResponse(target, res); err != nil { 15526 return nil, err 15527 } 15528 return ret, nil 15529 // { 15530 // "description": "Lists the configurations for datafeeds in your Merchant Center account.", 15531 // "flatPath": "{merchantId}/datafeeds", 15532 // "httpMethod": "GET", 15533 // "id": "content.datafeeds.list", 15534 // "parameterOrder": [ 15535 // "merchantId" 15536 // ], 15537 // "parameters": { 15538 // "maxResults": { 15539 // "description": "The maximum number of products to return in the response, used for paging.", 15540 // "format": "uint32", 15541 // "location": "query", 15542 // "type": "integer" 15543 // }, 15544 // "merchantId": { 15545 // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", 15546 // "format": "uint64", 15547 // "location": "path", 15548 // "required": true, 15549 // "type": "string" 15550 // }, 15551 // "pageToken": { 15552 // "description": "The token returned by the previous request.", 15553 // "location": "query", 15554 // "type": "string" 15555 // } 15556 // }, 15557 // "path": "{merchantId}/datafeeds", 15558 // "response": { 15559 // "$ref": "DatafeedsListResponse" 15560 // }, 15561 // "scopes": [ 15562 // "https://www.googleapis.com/auth/content" 15563 // ] 15564 // } 15565 15566} 15567 15568// Pages invokes f for each page of results. 15569// A non-nil error returned from f will halt the iteration. 15570// The provided context supersedes any context provided to the Context method. 15571func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { 15572 c.ctx_ = ctx 15573 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15574 for { 15575 x, err := c.Do() 15576 if err != nil { 15577 return err 15578 } 15579 if err := f(x); err != nil { 15580 return err 15581 } 15582 if x.NextPageToken == "" { 15583 return nil 15584 } 15585 c.PageToken(x.NextPageToken) 15586 } 15587} 15588 15589// method id "content.datafeeds.update": 15590 15591type DatafeedsUpdateCall struct { 15592 s *APIService 15593 merchantId uint64 15594 datafeedId uint64 15595 datafeed *Datafeed 15596 urlParams_ gensupport.URLParams 15597 ctx_ context.Context 15598 header_ http.Header 15599} 15600 15601// Update: Updates a datafeed configuration of your Merchant Center 15602// account. Any fields that are not provided are deleted from the 15603// resource. 15604// 15605// - datafeedId: The ID of the datafeed. 15606// - merchantId: The ID of the account that manages the datafeed. This 15607// account cannot be a multi-client account. 15608func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { 15609 c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15610 c.merchantId = merchantId 15611 c.datafeedId = datafeedId 15612 c.datafeed = datafeed 15613 return c 15614} 15615 15616// DryRun sets the optional parameter "dryRun": Flag to simulate a 15617// request like in a live environment. If set to true, dry-run mode 15618// checks the validity of the request and returns errors (if any). 15619func (c *DatafeedsUpdateCall) DryRun(dryRun bool) *DatafeedsUpdateCall { 15620 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 15621 return c 15622} 15623 15624// Fields allows partial responses to be retrieved. See 15625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15626// for more information. 15627func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { 15628 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15629 return c 15630} 15631 15632// Context sets the context to be used in this call's Do method. Any 15633// pending HTTP request will be aborted if the provided context is 15634// canceled. 15635func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { 15636 c.ctx_ = ctx 15637 return c 15638} 15639 15640// Header returns an http.Header that can be modified by the caller to 15641// add HTTP headers to the request. 15642func (c *DatafeedsUpdateCall) Header() http.Header { 15643 if c.header_ == nil { 15644 c.header_ = make(http.Header) 15645 } 15646 return c.header_ 15647} 15648 15649func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { 15650 reqHeaders := make(http.Header) 15651 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 15652 for k, v := range c.header_ { 15653 reqHeaders[k] = v 15654 } 15655 reqHeaders.Set("User-Agent", c.s.userAgent()) 15656 var body io.Reader = nil 15657 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) 15658 if err != nil { 15659 return nil, err 15660 } 15661 reqHeaders.Set("Content-Type", "application/json") 15662 c.urlParams_.Set("alt", alt) 15663 c.urlParams_.Set("prettyPrint", "false") 15664 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") 15665 urls += "?" + c.urlParams_.Encode() 15666 req, err := http.NewRequest("PUT", urls, body) 15667 if err != nil { 15668 return nil, err 15669 } 15670 req.Header = reqHeaders 15671 googleapi.Expand(req.URL, map[string]string{ 15672 "merchantId": strconv.FormatUint(c.merchantId, 10), 15673 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15674 }) 15675 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15676} 15677 15678// Do executes the "content.datafeeds.update" call. 15679// Exactly one of *Datafeed or error will be non-nil. Any non-2xx status 15680// code is an error. Response headers are in either 15681// *Datafeed.ServerResponse.Header or (if a response was returned at 15682// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15683// to check whether the returned error was because 15684// http.StatusNotModified was returned. 15685func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { 15686 gensupport.SetOptions(c.urlParams_, opts...) 15687 res, err := c.doRequest("json") 15688 if res != nil && res.StatusCode == http.StatusNotModified { 15689 if res.Body != nil { 15690 res.Body.Close() 15691 } 15692 return nil, &googleapi.Error{ 15693 Code: res.StatusCode, 15694 Header: res.Header, 15695 } 15696 } 15697 if err != nil { 15698 return nil, err 15699 } 15700 defer googleapi.CloseBody(res) 15701 if err := googleapi.CheckResponse(res); err != nil { 15702 return nil, err 15703 } 15704 ret := &Datafeed{ 15705 ServerResponse: googleapi.ServerResponse{ 15706 Header: res.Header, 15707 HTTPStatusCode: res.StatusCode, 15708 }, 15709 } 15710 target := &ret 15711 if err := gensupport.DecodeResponse(target, res); err != nil { 15712 return nil, err 15713 } 15714 return ret, nil 15715 // { 15716 // "description": "Updates a datafeed configuration of your Merchant Center account. Any fields that are not provided are deleted from the resource.", 15717 // "flatPath": "{merchantId}/datafeeds/{datafeedId}", 15718 // "httpMethod": "PUT", 15719 // "id": "content.datafeeds.update", 15720 // "parameterOrder": [ 15721 // "merchantId", 15722 // "datafeedId" 15723 // ], 15724 // "parameters": { 15725 // "datafeedId": { 15726 // "description": "The ID of the datafeed.", 15727 // "format": "uint64", 15728 // "location": "path", 15729 // "required": true, 15730 // "type": "string" 15731 // }, 15732 // "dryRun": { 15733 // "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).", 15734 // "location": "query", 15735 // "type": "boolean" 15736 // }, 15737 // "merchantId": { 15738 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 15739 // "format": "uint64", 15740 // "location": "path", 15741 // "required": true, 15742 // "type": "string" 15743 // } 15744 // }, 15745 // "path": "{merchantId}/datafeeds/{datafeedId}", 15746 // "request": { 15747 // "$ref": "Datafeed" 15748 // }, 15749 // "response": { 15750 // "$ref": "Datafeed" 15751 // }, 15752 // "scopes": [ 15753 // "https://www.googleapis.com/auth/content" 15754 // ] 15755 // } 15756 15757} 15758 15759// method id "content.datafeedstatuses.custombatch": 15760 15761type DatafeedstatusesCustombatchCall struct { 15762 s *APIService 15763 datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest 15764 urlParams_ gensupport.URLParams 15765 ctx_ context.Context 15766 header_ http.Header 15767} 15768 15769// Custombatch: Gets multiple Merchant Center datafeed statuses in a 15770// single request. 15771func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { 15772 c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15773 c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest 15774 return c 15775} 15776 15777// Fields allows partial responses to be retrieved. See 15778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15779// for more information. 15780func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { 15781 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15782 return c 15783} 15784 15785// Context sets the context to be used in this call's Do method. Any 15786// pending HTTP request will be aborted if the provided context is 15787// canceled. 15788func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { 15789 c.ctx_ = ctx 15790 return c 15791} 15792 15793// Header returns an http.Header that can be modified by the caller to 15794// add HTTP headers to the request. 15795func (c *DatafeedstatusesCustombatchCall) Header() http.Header { 15796 if c.header_ == nil { 15797 c.header_ = make(http.Header) 15798 } 15799 return c.header_ 15800} 15801 15802func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 15803 reqHeaders := make(http.Header) 15804 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 15805 for k, v := range c.header_ { 15806 reqHeaders[k] = v 15807 } 15808 reqHeaders.Set("User-Agent", c.s.userAgent()) 15809 var body io.Reader = nil 15810 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest) 15811 if err != nil { 15812 return nil, err 15813 } 15814 reqHeaders.Set("Content-Type", "application/json") 15815 c.urlParams_.Set("alt", alt) 15816 c.urlParams_.Set("prettyPrint", "false") 15817 urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") 15818 urls += "?" + c.urlParams_.Encode() 15819 req, err := http.NewRequest("POST", urls, body) 15820 if err != nil { 15821 return nil, err 15822 } 15823 req.Header = reqHeaders 15824 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15825} 15826 15827// Do executes the "content.datafeedstatuses.custombatch" call. 15828// Exactly one of *DatafeedstatusesCustomBatchResponse or error will be 15829// non-nil. Any non-2xx status code is an error. Response headers are in 15830// either *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or 15831// (if a response was returned at all) in 15832// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15833// whether the returned error was because http.StatusNotModified was 15834// returned. 15835func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { 15836 gensupport.SetOptions(c.urlParams_, opts...) 15837 res, err := c.doRequest("json") 15838 if res != nil && res.StatusCode == http.StatusNotModified { 15839 if res.Body != nil { 15840 res.Body.Close() 15841 } 15842 return nil, &googleapi.Error{ 15843 Code: res.StatusCode, 15844 Header: res.Header, 15845 } 15846 } 15847 if err != nil { 15848 return nil, err 15849 } 15850 defer googleapi.CloseBody(res) 15851 if err := googleapi.CheckResponse(res); err != nil { 15852 return nil, err 15853 } 15854 ret := &DatafeedstatusesCustomBatchResponse{ 15855 ServerResponse: googleapi.ServerResponse{ 15856 Header: res.Header, 15857 HTTPStatusCode: res.StatusCode, 15858 }, 15859 } 15860 target := &ret 15861 if err := gensupport.DecodeResponse(target, res); err != nil { 15862 return nil, err 15863 } 15864 return ret, nil 15865 // { 15866 // "description": "Gets multiple Merchant Center datafeed statuses in a single request.", 15867 // "flatPath": "datafeedstatuses/batch", 15868 // "httpMethod": "POST", 15869 // "id": "content.datafeedstatuses.custombatch", 15870 // "parameterOrder": [], 15871 // "parameters": {}, 15872 // "path": "datafeedstatuses/batch", 15873 // "request": { 15874 // "$ref": "DatafeedstatusesCustomBatchRequest" 15875 // }, 15876 // "response": { 15877 // "$ref": "DatafeedstatusesCustomBatchResponse" 15878 // }, 15879 // "scopes": [ 15880 // "https://www.googleapis.com/auth/content" 15881 // ] 15882 // } 15883 15884} 15885 15886// method id "content.datafeedstatuses.get": 15887 15888type DatafeedstatusesGetCall struct { 15889 s *APIService 15890 merchantId uint64 15891 datafeedId uint64 15892 urlParams_ gensupport.URLParams 15893 ifNoneMatch_ string 15894 ctx_ context.Context 15895 header_ http.Header 15896} 15897 15898// Get: Retrieves the status of a datafeed from your Merchant Center 15899// account. 15900// 15901// - datafeedId: The ID of the datafeed. 15902// - merchantId: The ID of the account that manages the datafeed. This 15903// account cannot be a multi-client account. 15904func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { 15905 c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15906 c.merchantId = merchantId 15907 c.datafeedId = datafeedId 15908 return c 15909} 15910 15911// Country sets the optional parameter "country": The country for which 15912// to get the datafeed status. If this parameter is provided then 15913// language must also be provided. Note that this parameter is required 15914// for feeds targeting multiple countries and languages, since a feed 15915// may have a different status for each target. 15916func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { 15917 c.urlParams_.Set("country", country) 15918 return c 15919} 15920 15921// Language sets the optional parameter "language": The language for 15922// which to get the datafeed status. If this parameter is provided then 15923// country must also be provided. Note that this parameter is required 15924// for feeds targeting multiple countries and languages, since a feed 15925// may have a different status for each target. 15926func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { 15927 c.urlParams_.Set("language", language) 15928 return c 15929} 15930 15931// Fields allows partial responses to be retrieved. See 15932// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15933// for more information. 15934func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { 15935 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15936 return c 15937} 15938 15939// IfNoneMatch sets the optional parameter which makes the operation 15940// fail if the object's ETag matches the given value. This is useful for 15941// getting updates only after the object has changed since the last 15942// request. Use googleapi.IsNotModified to check whether the response 15943// error from Do is the result of In-None-Match. 15944func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { 15945 c.ifNoneMatch_ = entityTag 15946 return c 15947} 15948 15949// Context sets the context to be used in this call's Do method. Any 15950// pending HTTP request will be aborted if the provided context is 15951// canceled. 15952func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { 15953 c.ctx_ = ctx 15954 return c 15955} 15956 15957// Header returns an http.Header that can be modified by the caller to 15958// add HTTP headers to the request. 15959func (c *DatafeedstatusesGetCall) Header() http.Header { 15960 if c.header_ == nil { 15961 c.header_ = make(http.Header) 15962 } 15963 return c.header_ 15964} 15965 15966func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { 15967 reqHeaders := make(http.Header) 15968 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 15969 for k, v := range c.header_ { 15970 reqHeaders[k] = v 15971 } 15972 reqHeaders.Set("User-Agent", c.s.userAgent()) 15973 if c.ifNoneMatch_ != "" { 15974 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15975 } 15976 var body io.Reader = nil 15977 c.urlParams_.Set("alt", alt) 15978 c.urlParams_.Set("prettyPrint", "false") 15979 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") 15980 urls += "?" + c.urlParams_.Encode() 15981 req, err := http.NewRequest("GET", urls, body) 15982 if err != nil { 15983 return nil, err 15984 } 15985 req.Header = reqHeaders 15986 googleapi.Expand(req.URL, map[string]string{ 15987 "merchantId": strconv.FormatUint(c.merchantId, 10), 15988 "datafeedId": strconv.FormatUint(c.datafeedId, 10), 15989 }) 15990 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15991} 15992 15993// Do executes the "content.datafeedstatuses.get" call. 15994// Exactly one of *DatafeedStatus or error will be non-nil. Any non-2xx 15995// status code is an error. Response headers are in either 15996// *DatafeedStatus.ServerResponse.Header or (if a response was returned 15997// at all) in error.(*googleapi.Error).Header. Use 15998// googleapi.IsNotModified to check whether the returned error was 15999// because http.StatusNotModified was returned. 16000func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { 16001 gensupport.SetOptions(c.urlParams_, opts...) 16002 res, err := c.doRequest("json") 16003 if res != nil && res.StatusCode == http.StatusNotModified { 16004 if res.Body != nil { 16005 res.Body.Close() 16006 } 16007 return nil, &googleapi.Error{ 16008 Code: res.StatusCode, 16009 Header: res.Header, 16010 } 16011 } 16012 if err != nil { 16013 return nil, err 16014 } 16015 defer googleapi.CloseBody(res) 16016 if err := googleapi.CheckResponse(res); err != nil { 16017 return nil, err 16018 } 16019 ret := &DatafeedStatus{ 16020 ServerResponse: googleapi.ServerResponse{ 16021 Header: res.Header, 16022 HTTPStatusCode: res.StatusCode, 16023 }, 16024 } 16025 target := &ret 16026 if err := gensupport.DecodeResponse(target, res); err != nil { 16027 return nil, err 16028 } 16029 return ret, nil 16030 // { 16031 // "description": "Retrieves the status of a datafeed from your Merchant Center account.", 16032 // "flatPath": "{merchantId}/datafeedstatuses/{datafeedId}", 16033 // "httpMethod": "GET", 16034 // "id": "content.datafeedstatuses.get", 16035 // "parameterOrder": [ 16036 // "merchantId", 16037 // "datafeedId" 16038 // ], 16039 // "parameters": { 16040 // "country": { 16041 // "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.", 16042 // "location": "query", 16043 // "type": "string" 16044 // }, 16045 // "datafeedId": { 16046 // "description": "The ID of the datafeed.", 16047 // "format": "uint64", 16048 // "location": "path", 16049 // "required": true, 16050 // "type": "string" 16051 // }, 16052 // "language": { 16053 // "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.", 16054 // "location": "query", 16055 // "type": "string" 16056 // }, 16057 // "merchantId": { 16058 // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.", 16059 // "format": "uint64", 16060 // "location": "path", 16061 // "required": true, 16062 // "type": "string" 16063 // } 16064 // }, 16065 // "path": "{merchantId}/datafeedstatuses/{datafeedId}", 16066 // "response": { 16067 // "$ref": "DatafeedStatus" 16068 // }, 16069 // "scopes": [ 16070 // "https://www.googleapis.com/auth/content" 16071 // ] 16072 // } 16073 16074} 16075 16076// method id "content.datafeedstatuses.list": 16077 16078type DatafeedstatusesListCall struct { 16079 s *APIService 16080 merchantId uint64 16081 urlParams_ gensupport.URLParams 16082 ifNoneMatch_ string 16083 ctx_ context.Context 16084 header_ http.Header 16085} 16086 16087// List: Lists the statuses of the datafeeds in your Merchant Center 16088// account. 16089// 16090// - merchantId: The ID of the account that manages the datafeeds. This 16091// account cannot be a multi-client account. 16092func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { 16093 c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16094 c.merchantId = merchantId 16095 return c 16096} 16097 16098// MaxResults sets the optional parameter "maxResults": The maximum 16099// number of products to return in the response, used for paging. 16100func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { 16101 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 16102 return c 16103} 16104 16105// PageToken sets the optional parameter "pageToken": The token returned 16106// by the previous request. 16107func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { 16108 c.urlParams_.Set("pageToken", pageToken) 16109 return c 16110} 16111 16112// Fields allows partial responses to be retrieved. See 16113// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16114// for more information. 16115func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { 16116 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16117 return c 16118} 16119 16120// IfNoneMatch sets the optional parameter which makes the operation 16121// fail if the object's ETag matches the given value. This is useful for 16122// getting updates only after the object has changed since the last 16123// request. Use googleapi.IsNotModified to check whether the response 16124// error from Do is the result of In-None-Match. 16125func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { 16126 c.ifNoneMatch_ = entityTag 16127 return c 16128} 16129 16130// Context sets the context to be used in this call's Do method. Any 16131// pending HTTP request will be aborted if the provided context is 16132// canceled. 16133func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { 16134 c.ctx_ = ctx 16135 return c 16136} 16137 16138// Header returns an http.Header that can be modified by the caller to 16139// add HTTP headers to the request. 16140func (c *DatafeedstatusesListCall) Header() http.Header { 16141 if c.header_ == nil { 16142 c.header_ = make(http.Header) 16143 } 16144 return c.header_ 16145} 16146 16147func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { 16148 reqHeaders := make(http.Header) 16149 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 16150 for k, v := range c.header_ { 16151 reqHeaders[k] = v 16152 } 16153 reqHeaders.Set("User-Agent", c.s.userAgent()) 16154 if c.ifNoneMatch_ != "" { 16155 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16156 } 16157 var body io.Reader = nil 16158 c.urlParams_.Set("alt", alt) 16159 c.urlParams_.Set("prettyPrint", "false") 16160 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") 16161 urls += "?" + c.urlParams_.Encode() 16162 req, err := http.NewRequest("GET", urls, body) 16163 if err != nil { 16164 return nil, err 16165 } 16166 req.Header = reqHeaders 16167 googleapi.Expand(req.URL, map[string]string{ 16168 "merchantId": strconv.FormatUint(c.merchantId, 10), 16169 }) 16170 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16171} 16172 16173// Do executes the "content.datafeedstatuses.list" call. 16174// Exactly one of *DatafeedstatusesListResponse or error will be 16175// non-nil. Any non-2xx status code is an error. Response headers are in 16176// either *DatafeedstatusesListResponse.ServerResponse.Header or (if a 16177// response was returned at all) in error.(*googleapi.Error).Header. Use 16178// googleapi.IsNotModified to check whether the returned error was 16179// because http.StatusNotModified was returned. 16180func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { 16181 gensupport.SetOptions(c.urlParams_, opts...) 16182 res, err := c.doRequest("json") 16183 if res != nil && res.StatusCode == http.StatusNotModified { 16184 if res.Body != nil { 16185 res.Body.Close() 16186 } 16187 return nil, &googleapi.Error{ 16188 Code: res.StatusCode, 16189 Header: res.Header, 16190 } 16191 } 16192 if err != nil { 16193 return nil, err 16194 } 16195 defer googleapi.CloseBody(res) 16196 if err := googleapi.CheckResponse(res); err != nil { 16197 return nil, err 16198 } 16199 ret := &DatafeedstatusesListResponse{ 16200 ServerResponse: googleapi.ServerResponse{ 16201 Header: res.Header, 16202 HTTPStatusCode: res.StatusCode, 16203 }, 16204 } 16205 target := &ret 16206 if err := gensupport.DecodeResponse(target, res); err != nil { 16207 return nil, err 16208 } 16209 return ret, nil 16210 // { 16211 // "description": "Lists the statuses of the datafeeds in your Merchant Center account.", 16212 // "flatPath": "{merchantId}/datafeedstatuses", 16213 // "httpMethod": "GET", 16214 // "id": "content.datafeedstatuses.list", 16215 // "parameterOrder": [ 16216 // "merchantId" 16217 // ], 16218 // "parameters": { 16219 // "maxResults": { 16220 // "description": "The maximum number of products to return in the response, used for paging.", 16221 // "format": "uint32", 16222 // "location": "query", 16223 // "type": "integer" 16224 // }, 16225 // "merchantId": { 16226 // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.", 16227 // "format": "uint64", 16228 // "location": "path", 16229 // "required": true, 16230 // "type": "string" 16231 // }, 16232 // "pageToken": { 16233 // "description": "The token returned by the previous request.", 16234 // "location": "query", 16235 // "type": "string" 16236 // } 16237 // }, 16238 // "path": "{merchantId}/datafeedstatuses", 16239 // "response": { 16240 // "$ref": "DatafeedstatusesListResponse" 16241 // }, 16242 // "scopes": [ 16243 // "https://www.googleapis.com/auth/content" 16244 // ] 16245 // } 16246 16247} 16248 16249// Pages invokes f for each page of results. 16250// A non-nil error returned from f will halt the iteration. 16251// The provided context supersedes any context provided to the Context method. 16252func (c *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error { 16253 c.ctx_ = ctx 16254 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16255 for { 16256 x, err := c.Do() 16257 if err != nil { 16258 return err 16259 } 16260 if err := f(x); err != nil { 16261 return err 16262 } 16263 if x.NextPageToken == "" { 16264 return nil 16265 } 16266 c.PageToken(x.NextPageToken) 16267 } 16268} 16269 16270// method id "content.inventory.custombatch": 16271 16272type InventoryCustombatchCall struct { 16273 s *APIService 16274 inventorycustombatchrequest *InventoryCustomBatchRequest 16275 urlParams_ gensupport.URLParams 16276 ctx_ context.Context 16277 header_ http.Header 16278} 16279 16280// Custombatch: Updates price and availability for multiple products or 16281// stores in a single request. This operation does not update the 16282// expiration date of the products. 16283func (r *InventoryService) Custombatch(inventorycustombatchrequest *InventoryCustomBatchRequest) *InventoryCustombatchCall { 16284 c := &InventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16285 c.inventorycustombatchrequest = inventorycustombatchrequest 16286 return c 16287} 16288 16289// DryRun sets the optional parameter "dryRun": Flag to simulate a 16290// request like in a live environment. If set to true, dry-run mode 16291// checks the validity of the request and returns errors (if any). 16292func (c *InventoryCustombatchCall) DryRun(dryRun bool) *InventoryCustombatchCall { 16293 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 16294 return c 16295} 16296 16297// Fields allows partial responses to be retrieved. See 16298// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16299// for more information. 16300func (c *InventoryCustombatchCall) Fields(s ...googleapi.Field) *InventoryCustombatchCall { 16301 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16302 return c 16303} 16304 16305// Context sets the context to be used in this call's Do method. Any 16306// pending HTTP request will be aborted if the provided context is 16307// canceled. 16308func (c *InventoryCustombatchCall) Context(ctx context.Context) *InventoryCustombatchCall { 16309 c.ctx_ = ctx 16310 return c 16311} 16312 16313// Header returns an http.Header that can be modified by the caller to 16314// add HTTP headers to the request. 16315func (c *InventoryCustombatchCall) Header() http.Header { 16316 if c.header_ == nil { 16317 c.header_ = make(http.Header) 16318 } 16319 return c.header_ 16320} 16321 16322func (c *InventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { 16323 reqHeaders := make(http.Header) 16324 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 16325 for k, v := range c.header_ { 16326 reqHeaders[k] = v 16327 } 16328 reqHeaders.Set("User-Agent", c.s.userAgent()) 16329 var body io.Reader = nil 16330 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorycustombatchrequest) 16331 if err != nil { 16332 return nil, err 16333 } 16334 reqHeaders.Set("Content-Type", "application/json") 16335 c.urlParams_.Set("alt", alt) 16336 c.urlParams_.Set("prettyPrint", "false") 16337 urls := googleapi.ResolveRelative(c.s.BasePath, "inventory/batch") 16338 urls += "?" + c.urlParams_.Encode() 16339 req, err := http.NewRequest("POST", urls, body) 16340 if err != nil { 16341 return nil, err 16342 } 16343 req.Header = reqHeaders 16344 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16345} 16346 16347// Do executes the "content.inventory.custombatch" call. 16348// Exactly one of *InventoryCustomBatchResponse or error will be 16349// non-nil. Any non-2xx status code is an error. Response headers are in 16350// either *InventoryCustomBatchResponse.ServerResponse.Header or (if a 16351// response was returned at all) in error.(*googleapi.Error).Header. Use 16352// googleapi.IsNotModified to check whether the returned error was 16353// because http.StatusNotModified was returned. 16354func (c *InventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*InventoryCustomBatchResponse, error) { 16355 gensupport.SetOptions(c.urlParams_, opts...) 16356 res, err := c.doRequest("json") 16357 if res != nil && res.StatusCode == http.StatusNotModified { 16358 if res.Body != nil { 16359 res.Body.Close() 16360 } 16361 return nil, &googleapi.Error{ 16362 Code: res.StatusCode, 16363 Header: res.Header, 16364 } 16365 } 16366 if err != nil { 16367 return nil, err 16368 } 16369 defer googleapi.CloseBody(res) 16370 if err := googleapi.CheckResponse(res); err != nil { 16371 return nil, err 16372 } 16373 ret := &InventoryCustomBatchResponse{ 16374 ServerResponse: googleapi.ServerResponse{ 16375 Header: res.Header, 16376 HTTPStatusCode: res.StatusCode, 16377 }, 16378 } 16379 target := &ret 16380 if err := gensupport.DecodeResponse(target, res); err != nil { 16381 return nil, err 16382 } 16383 return ret, nil 16384 // { 16385 // "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.", 16386 // "flatPath": "inventory/batch", 16387 // "httpMethod": "POST", 16388 // "id": "content.inventory.custombatch", 16389 // "parameterOrder": [], 16390 // "parameters": { 16391 // "dryRun": { 16392 // "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).", 16393 // "location": "query", 16394 // "type": "boolean" 16395 // } 16396 // }, 16397 // "path": "inventory/batch", 16398 // "request": { 16399 // "$ref": "InventoryCustomBatchRequest" 16400 // }, 16401 // "response": { 16402 // "$ref": "InventoryCustomBatchResponse" 16403 // }, 16404 // "scopes": [ 16405 // "https://www.googleapis.com/auth/content" 16406 // ] 16407 // } 16408 16409} 16410 16411// method id "content.inventory.set": 16412 16413type InventorySetCall struct { 16414 s *APIService 16415 merchantId uint64 16416 storeCode string 16417 productId string 16418 inventorysetrequest *InventorySetRequest 16419 urlParams_ gensupport.URLParams 16420 ctx_ context.Context 16421 header_ http.Header 16422} 16423 16424// Set: Updates price and availability of a product in your Merchant 16425// Center account. 16426// 16427// - merchantId: The ID of the account that contains the product. This 16428// account cannot be a multi-client account. 16429// - productId: The REST ID of the product for which to update price and 16430// availability. 16431// - storeCode: The code of the store for which to update price and 16432// availability. Use `online` to update price and availability of an 16433// online product. 16434func (r *InventoryService) Set(merchantId uint64, storeCode string, productId string, inventorysetrequest *InventorySetRequest) *InventorySetCall { 16435 c := &InventorySetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16436 c.merchantId = merchantId 16437 c.storeCode = storeCode 16438 c.productId = productId 16439 c.inventorysetrequest = inventorysetrequest 16440 return c 16441} 16442 16443// DryRun sets the optional parameter "dryRun": Flag to simulate a 16444// request like in a live environment. If set to true, dry-run mode 16445// checks the validity of the request and returns errors (if any). 16446func (c *InventorySetCall) DryRun(dryRun bool) *InventorySetCall { 16447 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 16448 return c 16449} 16450 16451// Fields allows partial responses to be retrieved. See 16452// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16453// for more information. 16454func (c *InventorySetCall) Fields(s ...googleapi.Field) *InventorySetCall { 16455 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16456 return c 16457} 16458 16459// Context sets the context to be used in this call's Do method. Any 16460// pending HTTP request will be aborted if the provided context is 16461// canceled. 16462func (c *InventorySetCall) Context(ctx context.Context) *InventorySetCall { 16463 c.ctx_ = ctx 16464 return c 16465} 16466 16467// Header returns an http.Header that can be modified by the caller to 16468// add HTTP headers to the request. 16469func (c *InventorySetCall) Header() http.Header { 16470 if c.header_ == nil { 16471 c.header_ = make(http.Header) 16472 } 16473 return c.header_ 16474} 16475 16476func (c *InventorySetCall) doRequest(alt string) (*http.Response, error) { 16477 reqHeaders := make(http.Header) 16478 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 16479 for k, v := range c.header_ { 16480 reqHeaders[k] = v 16481 } 16482 reqHeaders.Set("User-Agent", c.s.userAgent()) 16483 var body io.Reader = nil 16484 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysetrequest) 16485 if err != nil { 16486 return nil, err 16487 } 16488 reqHeaders.Set("Content-Type", "application/json") 16489 c.urlParams_.Set("alt", alt) 16490 c.urlParams_.Set("prettyPrint", "false") 16491 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/inventory/{storeCode}/products/{productId}") 16492 urls += "?" + c.urlParams_.Encode() 16493 req, err := http.NewRequest("POST", urls, body) 16494 if err != nil { 16495 return nil, err 16496 } 16497 req.Header = reqHeaders 16498 googleapi.Expand(req.URL, map[string]string{ 16499 "merchantId": strconv.FormatUint(c.merchantId, 10), 16500 "storeCode": c.storeCode, 16501 "productId": c.productId, 16502 }) 16503 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16504} 16505 16506// Do executes the "content.inventory.set" call. 16507// Exactly one of *InventorySetResponse or error will be non-nil. Any 16508// non-2xx status code is an error. Response headers are in either 16509// *InventorySetResponse.ServerResponse.Header or (if a response was 16510// returned at all) in error.(*googleapi.Error).Header. Use 16511// googleapi.IsNotModified to check whether the returned error was 16512// because http.StatusNotModified was returned. 16513func (c *InventorySetCall) Do(opts ...googleapi.CallOption) (*InventorySetResponse, error) { 16514 gensupport.SetOptions(c.urlParams_, opts...) 16515 res, err := c.doRequest("json") 16516 if res != nil && res.StatusCode == http.StatusNotModified { 16517 if res.Body != nil { 16518 res.Body.Close() 16519 } 16520 return nil, &googleapi.Error{ 16521 Code: res.StatusCode, 16522 Header: res.Header, 16523 } 16524 } 16525 if err != nil { 16526 return nil, err 16527 } 16528 defer googleapi.CloseBody(res) 16529 if err := googleapi.CheckResponse(res); err != nil { 16530 return nil, err 16531 } 16532 ret := &InventorySetResponse{ 16533 ServerResponse: googleapi.ServerResponse{ 16534 Header: res.Header, 16535 HTTPStatusCode: res.StatusCode, 16536 }, 16537 } 16538 target := &ret 16539 if err := gensupport.DecodeResponse(target, res); err != nil { 16540 return nil, err 16541 } 16542 return ret, nil 16543 // { 16544 // "description": "Updates price and availability of a product in your Merchant Center account.", 16545 // "flatPath": "{merchantId}/inventory/{storeCode}/products/{productId}", 16546 // "httpMethod": "POST", 16547 // "id": "content.inventory.set", 16548 // "parameterOrder": [ 16549 // "merchantId", 16550 // "storeCode", 16551 // "productId" 16552 // ], 16553 // "parameters": { 16554 // "dryRun": { 16555 // "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).", 16556 // "location": "query", 16557 // "type": "boolean" 16558 // }, 16559 // "merchantId": { 16560 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 16561 // "format": "uint64", 16562 // "location": "path", 16563 // "required": true, 16564 // "type": "string" 16565 // }, 16566 // "productId": { 16567 // "description": "The REST ID of the product for which to update price and availability.", 16568 // "location": "path", 16569 // "required": true, 16570 // "type": "string" 16571 // }, 16572 // "storeCode": { 16573 // "description": "The code of the store for which to update price and availability. Use `online` to update price and availability of an online product.", 16574 // "location": "path", 16575 // "required": true, 16576 // "type": "string" 16577 // } 16578 // }, 16579 // "path": "{merchantId}/inventory/{storeCode}/products/{productId}", 16580 // "request": { 16581 // "$ref": "InventorySetRequest" 16582 // }, 16583 // "response": { 16584 // "$ref": "InventorySetResponse" 16585 // }, 16586 // "scopes": [ 16587 // "https://www.googleapis.com/auth/content" 16588 // ] 16589 // } 16590 16591} 16592 16593// method id "content.liasettings.custombatch": 16594 16595type LiasettingsCustombatchCall struct { 16596 s *APIService 16597 liasettingscustombatchrequest *LiasettingsCustomBatchRequest 16598 urlParams_ gensupport.URLParams 16599 ctx_ context.Context 16600 header_ http.Header 16601} 16602 16603// Custombatch: Retrieves and/or updates the LIA settings of multiple 16604// accounts in a single request. 16605func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { 16606 c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16607 c.liasettingscustombatchrequest = liasettingscustombatchrequest 16608 return c 16609} 16610 16611// DryRun sets the optional parameter "dryRun": Flag to simulate a 16612// request like in a live environment. If set to true, dry-run mode 16613// checks the validity of the request and returns errors (if any). 16614func (c *LiasettingsCustombatchCall) DryRun(dryRun bool) *LiasettingsCustombatchCall { 16615 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 16616 return c 16617} 16618 16619// Fields allows partial responses to be retrieved. See 16620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16621// for more information. 16622func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { 16623 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16624 return c 16625} 16626 16627// Context sets the context to be used in this call's Do method. Any 16628// pending HTTP request will be aborted if the provided context is 16629// canceled. 16630func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { 16631 c.ctx_ = ctx 16632 return c 16633} 16634 16635// Header returns an http.Header that can be modified by the caller to 16636// add HTTP headers to the request. 16637func (c *LiasettingsCustombatchCall) Header() http.Header { 16638 if c.header_ == nil { 16639 c.header_ = make(http.Header) 16640 } 16641 return c.header_ 16642} 16643 16644func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { 16645 reqHeaders := make(http.Header) 16646 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 16647 for k, v := range c.header_ { 16648 reqHeaders[k] = v 16649 } 16650 reqHeaders.Set("User-Agent", c.s.userAgent()) 16651 var body io.Reader = nil 16652 body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettingscustombatchrequest) 16653 if err != nil { 16654 return nil, err 16655 } 16656 reqHeaders.Set("Content-Type", "application/json") 16657 c.urlParams_.Set("alt", alt) 16658 c.urlParams_.Set("prettyPrint", "false") 16659 urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") 16660 urls += "?" + c.urlParams_.Encode() 16661 req, err := http.NewRequest("POST", urls, body) 16662 if err != nil { 16663 return nil, err 16664 } 16665 req.Header = reqHeaders 16666 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16667} 16668 16669// Do executes the "content.liasettings.custombatch" call. 16670// Exactly one of *LiasettingsCustomBatchResponse or error will be 16671// non-nil. Any non-2xx status code is an error. Response headers are in 16672// either *LiasettingsCustomBatchResponse.ServerResponse.Header or (if a 16673// response was returned at all) in error.(*googleapi.Error).Header. Use 16674// googleapi.IsNotModified to check whether the returned error was 16675// because http.StatusNotModified was returned. 16676func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { 16677 gensupport.SetOptions(c.urlParams_, opts...) 16678 res, err := c.doRequest("json") 16679 if res != nil && res.StatusCode == http.StatusNotModified { 16680 if res.Body != nil { 16681 res.Body.Close() 16682 } 16683 return nil, &googleapi.Error{ 16684 Code: res.StatusCode, 16685 Header: res.Header, 16686 } 16687 } 16688 if err != nil { 16689 return nil, err 16690 } 16691 defer googleapi.CloseBody(res) 16692 if err := googleapi.CheckResponse(res); err != nil { 16693 return nil, err 16694 } 16695 ret := &LiasettingsCustomBatchResponse{ 16696 ServerResponse: googleapi.ServerResponse{ 16697 Header: res.Header, 16698 HTTPStatusCode: res.StatusCode, 16699 }, 16700 } 16701 target := &ret 16702 if err := gensupport.DecodeResponse(target, res); err != nil { 16703 return nil, err 16704 } 16705 return ret, nil 16706 // { 16707 // "description": "Retrieves and/or updates the LIA settings of multiple accounts in a single request.", 16708 // "flatPath": "liasettings/batch", 16709 // "httpMethod": "POST", 16710 // "id": "content.liasettings.custombatch", 16711 // "parameterOrder": [], 16712 // "parameters": { 16713 // "dryRun": { 16714 // "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).", 16715 // "location": "query", 16716 // "type": "boolean" 16717 // } 16718 // }, 16719 // "path": "liasettings/batch", 16720 // "request": { 16721 // "$ref": "LiasettingsCustomBatchRequest" 16722 // }, 16723 // "response": { 16724 // "$ref": "LiasettingsCustomBatchResponse" 16725 // }, 16726 // "scopes": [ 16727 // "https://www.googleapis.com/auth/content" 16728 // ] 16729 // } 16730 16731} 16732 16733// method id "content.liasettings.get": 16734 16735type LiasettingsGetCall struct { 16736 s *APIService 16737 merchantId uint64 16738 accountId uint64 16739 urlParams_ gensupport.URLParams 16740 ifNoneMatch_ string 16741 ctx_ context.Context 16742 header_ http.Header 16743} 16744 16745// Get: Retrieves the LIA settings of the account. 16746// 16747// - accountId: The ID of the account for which to get or update LIA 16748// settings. 16749// - merchantId: The ID of the managing account. If this parameter is 16750// not the same as accountId, then this account must be a multi-client 16751// account and `accountId` must be the ID of a sub-account of this 16752// account. 16753func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { 16754 c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16755 c.merchantId = merchantId 16756 c.accountId = accountId 16757 return c 16758} 16759 16760// Fields allows partial responses to be retrieved. See 16761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16762// for more information. 16763func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { 16764 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16765 return c 16766} 16767 16768// IfNoneMatch sets the optional parameter which makes the operation 16769// fail if the object's ETag matches the given value. This is useful for 16770// getting updates only after the object has changed since the last 16771// request. Use googleapi.IsNotModified to check whether the response 16772// error from Do is the result of In-None-Match. 16773func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { 16774 c.ifNoneMatch_ = entityTag 16775 return c 16776} 16777 16778// Context sets the context to be used in this call's Do method. Any 16779// pending HTTP request will be aborted if the provided context is 16780// canceled. 16781func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { 16782 c.ctx_ = ctx 16783 return c 16784} 16785 16786// Header returns an http.Header that can be modified by the caller to 16787// add HTTP headers to the request. 16788func (c *LiasettingsGetCall) Header() http.Header { 16789 if c.header_ == nil { 16790 c.header_ = make(http.Header) 16791 } 16792 return c.header_ 16793} 16794 16795func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { 16796 reqHeaders := make(http.Header) 16797 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 16798 for k, v := range c.header_ { 16799 reqHeaders[k] = v 16800 } 16801 reqHeaders.Set("User-Agent", c.s.userAgent()) 16802 if c.ifNoneMatch_ != "" { 16803 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16804 } 16805 var body io.Reader = nil 16806 c.urlParams_.Set("alt", alt) 16807 c.urlParams_.Set("prettyPrint", "false") 16808 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") 16809 urls += "?" + c.urlParams_.Encode() 16810 req, err := http.NewRequest("GET", urls, body) 16811 if err != nil { 16812 return nil, err 16813 } 16814 req.Header = reqHeaders 16815 googleapi.Expand(req.URL, map[string]string{ 16816 "merchantId": strconv.FormatUint(c.merchantId, 10), 16817 "accountId": strconv.FormatUint(c.accountId, 10), 16818 }) 16819 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16820} 16821 16822// Do executes the "content.liasettings.get" call. 16823// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx 16824// status code is an error. Response headers are in either 16825// *LiaSettings.ServerResponse.Header or (if a response was returned at 16826// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 16827// to check whether the returned error was because 16828// http.StatusNotModified was returned. 16829func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { 16830 gensupport.SetOptions(c.urlParams_, opts...) 16831 res, err := c.doRequest("json") 16832 if res != nil && res.StatusCode == http.StatusNotModified { 16833 if res.Body != nil { 16834 res.Body.Close() 16835 } 16836 return nil, &googleapi.Error{ 16837 Code: res.StatusCode, 16838 Header: res.Header, 16839 } 16840 } 16841 if err != nil { 16842 return nil, err 16843 } 16844 defer googleapi.CloseBody(res) 16845 if err := googleapi.CheckResponse(res); err != nil { 16846 return nil, err 16847 } 16848 ret := &LiaSettings{ 16849 ServerResponse: googleapi.ServerResponse{ 16850 Header: res.Header, 16851 HTTPStatusCode: res.StatusCode, 16852 }, 16853 } 16854 target := &ret 16855 if err := gensupport.DecodeResponse(target, res); err != nil { 16856 return nil, err 16857 } 16858 return ret, nil 16859 // { 16860 // "description": "Retrieves the LIA settings of the account.", 16861 // "flatPath": "{merchantId}/liasettings/{accountId}", 16862 // "httpMethod": "GET", 16863 // "id": "content.liasettings.get", 16864 // "parameterOrder": [ 16865 // "merchantId", 16866 // "accountId" 16867 // ], 16868 // "parameters": { 16869 // "accountId": { 16870 // "description": "The ID of the account for which to get or update LIA settings.", 16871 // "format": "uint64", 16872 // "location": "path", 16873 // "required": true, 16874 // "type": "string" 16875 // }, 16876 // "merchantId": { 16877 // "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.", 16878 // "format": "uint64", 16879 // "location": "path", 16880 // "required": true, 16881 // "type": "string" 16882 // } 16883 // }, 16884 // "path": "{merchantId}/liasettings/{accountId}", 16885 // "response": { 16886 // "$ref": "LiaSettings" 16887 // }, 16888 // "scopes": [ 16889 // "https://www.googleapis.com/auth/content" 16890 // ] 16891 // } 16892 16893} 16894 16895// method id "content.liasettings.getaccessiblegmbaccounts": 16896 16897type LiasettingsGetaccessiblegmbaccountsCall struct { 16898 s *APIService 16899 merchantId uint64 16900 accountId uint64 16901 urlParams_ gensupport.URLParams 16902 ifNoneMatch_ string 16903 ctx_ context.Context 16904 header_ http.Header 16905} 16906 16907// Getaccessiblegmbaccounts: Retrieves the list of accessible Google My 16908// Business accounts. 16909// 16910// - accountId: The ID of the account for which to retrieve accessible 16911// Google My Business accounts. 16912// - merchantId: The ID of the managing account. If this parameter is 16913// not the same as accountId, then this account must be a multi-client 16914// account and `accountId` must be the ID of a sub-account of this 16915// account. 16916func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { 16917 c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16918 c.merchantId = merchantId 16919 c.accountId = accountId 16920 return c 16921} 16922 16923// Fields allows partial responses to be retrieved. See 16924// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16925// for more information. 16926func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { 16927 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16928 return c 16929} 16930 16931// IfNoneMatch sets the optional parameter which makes the operation 16932// fail if the object's ETag matches the given value. This is useful for 16933// getting updates only after the object has changed since the last 16934// request. Use googleapi.IsNotModified to check whether the response 16935// error from Do is the result of In-None-Match. 16936func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { 16937 c.ifNoneMatch_ = entityTag 16938 return c 16939} 16940 16941// Context sets the context to be used in this call's Do method. Any 16942// pending HTTP request will be aborted if the provided context is 16943// canceled. 16944func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { 16945 c.ctx_ = ctx 16946 return c 16947} 16948 16949// Header returns an http.Header that can be modified by the caller to 16950// add HTTP headers to the request. 16951func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { 16952 if c.header_ == nil { 16953 c.header_ = make(http.Header) 16954 } 16955 return c.header_ 16956} 16957 16958func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) { 16959 reqHeaders := make(http.Header) 16960 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 16961 for k, v := range c.header_ { 16962 reqHeaders[k] = v 16963 } 16964 reqHeaders.Set("User-Agent", c.s.userAgent()) 16965 if c.ifNoneMatch_ != "" { 16966 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16967 } 16968 var body io.Reader = nil 16969 c.urlParams_.Set("alt", alt) 16970 c.urlParams_.Set("prettyPrint", "false") 16971 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") 16972 urls += "?" + c.urlParams_.Encode() 16973 req, err := http.NewRequest("GET", urls, body) 16974 if err != nil { 16975 return nil, err 16976 } 16977 req.Header = reqHeaders 16978 googleapi.Expand(req.URL, map[string]string{ 16979 "merchantId": strconv.FormatUint(c.merchantId, 10), 16980 "accountId": strconv.FormatUint(c.accountId, 10), 16981 }) 16982 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16983} 16984 16985// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. 16986// Exactly one of *LiasettingsGetAccessibleGmbAccountsResponse or error 16987// will be non-nil. Any non-2xx status code is an error. Response 16988// headers are in either 16989// *LiasettingsGetAccessibleGmbAccountsResponse.ServerResponse.Header or 16990// (if a response was returned at all) in 16991// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16992// whether the returned error was because http.StatusNotModified was 16993// returned. 16994func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { 16995 gensupport.SetOptions(c.urlParams_, opts...) 16996 res, err := c.doRequest("json") 16997 if res != nil && res.StatusCode == http.StatusNotModified { 16998 if res.Body != nil { 16999 res.Body.Close() 17000 } 17001 return nil, &googleapi.Error{ 17002 Code: res.StatusCode, 17003 Header: res.Header, 17004 } 17005 } 17006 if err != nil { 17007 return nil, err 17008 } 17009 defer googleapi.CloseBody(res) 17010 if err := googleapi.CheckResponse(res); err != nil { 17011 return nil, err 17012 } 17013 ret := &LiasettingsGetAccessibleGmbAccountsResponse{ 17014 ServerResponse: googleapi.ServerResponse{ 17015 Header: res.Header, 17016 HTTPStatusCode: res.StatusCode, 17017 }, 17018 } 17019 target := &ret 17020 if err := gensupport.DecodeResponse(target, res); err != nil { 17021 return nil, err 17022 } 17023 return ret, nil 17024 // { 17025 // "description": "Retrieves the list of accessible Google My Business accounts.", 17026 // "flatPath": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", 17027 // "httpMethod": "GET", 17028 // "id": "content.liasettings.getaccessiblegmbaccounts", 17029 // "parameterOrder": [ 17030 // "merchantId", 17031 // "accountId" 17032 // ], 17033 // "parameters": { 17034 // "accountId": { 17035 // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.", 17036 // "format": "uint64", 17037 // "location": "path", 17038 // "required": true, 17039 // "type": "string" 17040 // }, 17041 // "merchantId": { 17042 // "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.", 17043 // "format": "uint64", 17044 // "location": "path", 17045 // "required": true, 17046 // "type": "string" 17047 // } 17048 // }, 17049 // "path": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", 17050 // "response": { 17051 // "$ref": "LiasettingsGetAccessibleGmbAccountsResponse" 17052 // }, 17053 // "scopes": [ 17054 // "https://www.googleapis.com/auth/content" 17055 // ] 17056 // } 17057 17058} 17059 17060// method id "content.liasettings.list": 17061 17062type LiasettingsListCall struct { 17063 s *APIService 17064 merchantId uint64 17065 urlParams_ gensupport.URLParams 17066 ifNoneMatch_ string 17067 ctx_ context.Context 17068 header_ http.Header 17069} 17070 17071// List: Lists the LIA settings of the sub-accounts in your Merchant 17072// Center account. 17073// 17074// - merchantId: The ID of the managing account. This must be a 17075// multi-client account. 17076func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { 17077 c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17078 c.merchantId = merchantId 17079 return c 17080} 17081 17082// MaxResults sets the optional parameter "maxResults": The maximum 17083// number of LIA settings to return in the response, used for paging. 17084func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { 17085 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 17086 return c 17087} 17088 17089// PageToken sets the optional parameter "pageToken": The token returned 17090// by the previous request. 17091func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { 17092 c.urlParams_.Set("pageToken", pageToken) 17093 return c 17094} 17095 17096// Fields allows partial responses to be retrieved. See 17097// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17098// for more information. 17099func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { 17100 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17101 return c 17102} 17103 17104// IfNoneMatch sets the optional parameter which makes the operation 17105// fail if the object's ETag matches the given value. This is useful for 17106// getting updates only after the object has changed since the last 17107// request. Use googleapi.IsNotModified to check whether the response 17108// error from Do is the result of In-None-Match. 17109func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { 17110 c.ifNoneMatch_ = entityTag 17111 return c 17112} 17113 17114// Context sets the context to be used in this call's Do method. Any 17115// pending HTTP request will be aborted if the provided context is 17116// canceled. 17117func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { 17118 c.ctx_ = ctx 17119 return c 17120} 17121 17122// Header returns an http.Header that can be modified by the caller to 17123// add HTTP headers to the request. 17124func (c *LiasettingsListCall) Header() http.Header { 17125 if c.header_ == nil { 17126 c.header_ = make(http.Header) 17127 } 17128 return c.header_ 17129} 17130 17131func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { 17132 reqHeaders := make(http.Header) 17133 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 17134 for k, v := range c.header_ { 17135 reqHeaders[k] = v 17136 } 17137 reqHeaders.Set("User-Agent", c.s.userAgent()) 17138 if c.ifNoneMatch_ != "" { 17139 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17140 } 17141 var body io.Reader = nil 17142 c.urlParams_.Set("alt", alt) 17143 c.urlParams_.Set("prettyPrint", "false") 17144 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") 17145 urls += "?" + c.urlParams_.Encode() 17146 req, err := http.NewRequest("GET", urls, body) 17147 if err != nil { 17148 return nil, err 17149 } 17150 req.Header = reqHeaders 17151 googleapi.Expand(req.URL, map[string]string{ 17152 "merchantId": strconv.FormatUint(c.merchantId, 10), 17153 }) 17154 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17155} 17156 17157// Do executes the "content.liasettings.list" call. 17158// Exactly one of *LiasettingsListResponse or error will be non-nil. Any 17159// non-2xx status code is an error. Response headers are in either 17160// *LiasettingsListResponse.ServerResponse.Header or (if a response was 17161// returned at all) in error.(*googleapi.Error).Header. Use 17162// googleapi.IsNotModified to check whether the returned error was 17163// because http.StatusNotModified was returned. 17164func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { 17165 gensupport.SetOptions(c.urlParams_, opts...) 17166 res, err := c.doRequest("json") 17167 if res != nil && res.StatusCode == http.StatusNotModified { 17168 if res.Body != nil { 17169 res.Body.Close() 17170 } 17171 return nil, &googleapi.Error{ 17172 Code: res.StatusCode, 17173 Header: res.Header, 17174 } 17175 } 17176 if err != nil { 17177 return nil, err 17178 } 17179 defer googleapi.CloseBody(res) 17180 if err := googleapi.CheckResponse(res); err != nil { 17181 return nil, err 17182 } 17183 ret := &LiasettingsListResponse{ 17184 ServerResponse: googleapi.ServerResponse{ 17185 Header: res.Header, 17186 HTTPStatusCode: res.StatusCode, 17187 }, 17188 } 17189 target := &ret 17190 if err := gensupport.DecodeResponse(target, res); err != nil { 17191 return nil, err 17192 } 17193 return ret, nil 17194 // { 17195 // "description": "Lists the LIA settings of the sub-accounts in your Merchant Center account.", 17196 // "flatPath": "{merchantId}/liasettings", 17197 // "httpMethod": "GET", 17198 // "id": "content.liasettings.list", 17199 // "parameterOrder": [ 17200 // "merchantId" 17201 // ], 17202 // "parameters": { 17203 // "maxResults": { 17204 // "description": "The maximum number of LIA settings to return in the response, used for paging.", 17205 // "format": "uint32", 17206 // "location": "query", 17207 // "type": "integer" 17208 // }, 17209 // "merchantId": { 17210 // "description": "The ID of the managing account. This must be a multi-client account.", 17211 // "format": "uint64", 17212 // "location": "path", 17213 // "required": true, 17214 // "type": "string" 17215 // }, 17216 // "pageToken": { 17217 // "description": "The token returned by the previous request.", 17218 // "location": "query", 17219 // "type": "string" 17220 // } 17221 // }, 17222 // "path": "{merchantId}/liasettings", 17223 // "response": { 17224 // "$ref": "LiasettingsListResponse" 17225 // }, 17226 // "scopes": [ 17227 // "https://www.googleapis.com/auth/content" 17228 // ] 17229 // } 17230 17231} 17232 17233// Pages invokes f for each page of results. 17234// A non-nil error returned from f will halt the iteration. 17235// The provided context supersedes any context provided to the Context method. 17236func (c *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error { 17237 c.ctx_ = ctx 17238 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17239 for { 17240 x, err := c.Do() 17241 if err != nil { 17242 return err 17243 } 17244 if err := f(x); err != nil { 17245 return err 17246 } 17247 if x.NextPageToken == "" { 17248 return nil 17249 } 17250 c.PageToken(x.NextPageToken) 17251 } 17252} 17253 17254// method id "content.liasettings.listposdataproviders": 17255 17256type LiasettingsListposdataprovidersCall struct { 17257 s *APIService 17258 urlParams_ gensupport.URLParams 17259 ifNoneMatch_ string 17260 ctx_ context.Context 17261 header_ http.Header 17262} 17263 17264// Listposdataproviders: Retrieves the list of POS data providers that 17265// have active settings for the all eiligible countries. 17266func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall { 17267 c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17268 return c 17269} 17270 17271// Fields allows partial responses to be retrieved. See 17272// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17273// for more information. 17274func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall { 17275 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17276 return c 17277} 17278 17279// IfNoneMatch sets the optional parameter which makes the operation 17280// fail if the object's ETag matches the given value. This is useful for 17281// getting updates only after the object has changed since the last 17282// request. Use googleapi.IsNotModified to check whether the response 17283// error from Do is the result of In-None-Match. 17284func (c *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall { 17285 c.ifNoneMatch_ = entityTag 17286 return c 17287} 17288 17289// Context sets the context to be used in this call's Do method. Any 17290// pending HTTP request will be aborted if the provided context is 17291// canceled. 17292func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall { 17293 c.ctx_ = ctx 17294 return c 17295} 17296 17297// Header returns an http.Header that can be modified by the caller to 17298// add HTTP headers to the request. 17299func (c *LiasettingsListposdataprovidersCall) Header() http.Header { 17300 if c.header_ == nil { 17301 c.header_ = make(http.Header) 17302 } 17303 return c.header_ 17304} 17305 17306func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) { 17307 reqHeaders := make(http.Header) 17308 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 17309 for k, v := range c.header_ { 17310 reqHeaders[k] = v 17311 } 17312 reqHeaders.Set("User-Agent", c.s.userAgent()) 17313 if c.ifNoneMatch_ != "" { 17314 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17315 } 17316 var body io.Reader = nil 17317 c.urlParams_.Set("alt", alt) 17318 c.urlParams_.Set("prettyPrint", "false") 17319 urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders") 17320 urls += "?" + c.urlParams_.Encode() 17321 req, err := http.NewRequest("GET", urls, body) 17322 if err != nil { 17323 return nil, err 17324 } 17325 req.Header = reqHeaders 17326 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17327} 17328 17329// Do executes the "content.liasettings.listposdataproviders" call. 17330// Exactly one of *LiasettingsListPosDataProvidersResponse or error will 17331// be non-nil. Any non-2xx status code is an error. Response headers are 17332// in either 17333// *LiasettingsListPosDataProvidersResponse.ServerResponse.Header or (if 17334// a response was returned at all) in error.(*googleapi.Error).Header. 17335// Use googleapi.IsNotModified to check whether the returned error was 17336// because http.StatusNotModified was returned. 17337func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) { 17338 gensupport.SetOptions(c.urlParams_, opts...) 17339 res, err := c.doRequest("json") 17340 if res != nil && res.StatusCode == http.StatusNotModified { 17341 if res.Body != nil { 17342 res.Body.Close() 17343 } 17344 return nil, &googleapi.Error{ 17345 Code: res.StatusCode, 17346 Header: res.Header, 17347 } 17348 } 17349 if err != nil { 17350 return nil, err 17351 } 17352 defer googleapi.CloseBody(res) 17353 if err := googleapi.CheckResponse(res); err != nil { 17354 return nil, err 17355 } 17356 ret := &LiasettingsListPosDataProvidersResponse{ 17357 ServerResponse: googleapi.ServerResponse{ 17358 Header: res.Header, 17359 HTTPStatusCode: res.StatusCode, 17360 }, 17361 } 17362 target := &ret 17363 if err := gensupport.DecodeResponse(target, res); err != nil { 17364 return nil, err 17365 } 17366 return ret, nil 17367 // { 17368 // "description": "Retrieves the list of POS data providers that have active settings for the all eiligible countries.", 17369 // "flatPath": "liasettings/posdataproviders", 17370 // "httpMethod": "GET", 17371 // "id": "content.liasettings.listposdataproviders", 17372 // "parameterOrder": [], 17373 // "parameters": {}, 17374 // "path": "liasettings/posdataproviders", 17375 // "response": { 17376 // "$ref": "LiasettingsListPosDataProvidersResponse" 17377 // }, 17378 // "scopes": [ 17379 // "https://www.googleapis.com/auth/content" 17380 // ] 17381 // } 17382 17383} 17384 17385// method id "content.liasettings.requestgmbaccess": 17386 17387type LiasettingsRequestgmbaccessCall struct { 17388 s *APIService 17389 merchantId uint64 17390 accountId uint64 17391 urlParams_ gensupport.URLParams 17392 ctx_ context.Context 17393 header_ http.Header 17394} 17395 17396// Requestgmbaccess: Requests access to a specified Google My Business 17397// account. 17398// 17399// - accountId: The ID of the account for which GMB access is requested. 17400// - gmbEmail: The email of the Google My Business account. 17401// - merchantId: The ID of the managing account. If this parameter is 17402// not the same as accountId, then this account must be a multi-client 17403// account and `accountId` must be the ID of a sub-account of this 17404// account. 17405func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall { 17406 c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17407 c.merchantId = merchantId 17408 c.accountId = accountId 17409 c.urlParams_.Set("gmbEmail", gmbEmail) 17410 return c 17411} 17412 17413// Fields allows partial responses to be retrieved. See 17414// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17415// for more information. 17416func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { 17417 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17418 return c 17419} 17420 17421// Context sets the context to be used in this call's Do method. Any 17422// pending HTTP request will be aborted if the provided context is 17423// canceled. 17424func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { 17425 c.ctx_ = ctx 17426 return c 17427} 17428 17429// Header returns an http.Header that can be modified by the caller to 17430// add HTTP headers to the request. 17431func (c *LiasettingsRequestgmbaccessCall) Header() http.Header { 17432 if c.header_ == nil { 17433 c.header_ = make(http.Header) 17434 } 17435 return c.header_ 17436} 17437 17438func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { 17439 reqHeaders := make(http.Header) 17440 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 17441 for k, v := range c.header_ { 17442 reqHeaders[k] = v 17443 } 17444 reqHeaders.Set("User-Agent", c.s.userAgent()) 17445 var body io.Reader = nil 17446 c.urlParams_.Set("alt", alt) 17447 c.urlParams_.Set("prettyPrint", "false") 17448 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") 17449 urls += "?" + c.urlParams_.Encode() 17450 req, err := http.NewRequest("POST", urls, body) 17451 if err != nil { 17452 return nil, err 17453 } 17454 req.Header = reqHeaders 17455 googleapi.Expand(req.URL, map[string]string{ 17456 "merchantId": strconv.FormatUint(c.merchantId, 10), 17457 "accountId": strconv.FormatUint(c.accountId, 10), 17458 }) 17459 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17460} 17461 17462// Do executes the "content.liasettings.requestgmbaccess" call. 17463// Exactly one of *LiasettingsRequestGmbAccessResponse or error will be 17464// non-nil. Any non-2xx status code is an error. Response headers are in 17465// either *LiasettingsRequestGmbAccessResponse.ServerResponse.Header or 17466// (if a response was returned at all) in 17467// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17468// whether the returned error was because http.StatusNotModified was 17469// returned. 17470func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) { 17471 gensupport.SetOptions(c.urlParams_, opts...) 17472 res, err := c.doRequest("json") 17473 if res != nil && res.StatusCode == http.StatusNotModified { 17474 if res.Body != nil { 17475 res.Body.Close() 17476 } 17477 return nil, &googleapi.Error{ 17478 Code: res.StatusCode, 17479 Header: res.Header, 17480 } 17481 } 17482 if err != nil { 17483 return nil, err 17484 } 17485 defer googleapi.CloseBody(res) 17486 if err := googleapi.CheckResponse(res); err != nil { 17487 return nil, err 17488 } 17489 ret := &LiasettingsRequestGmbAccessResponse{ 17490 ServerResponse: googleapi.ServerResponse{ 17491 Header: res.Header, 17492 HTTPStatusCode: res.StatusCode, 17493 }, 17494 } 17495 target := &ret 17496 if err := gensupport.DecodeResponse(target, res); err != nil { 17497 return nil, err 17498 } 17499 return ret, nil 17500 // { 17501 // "description": "Requests access to a specified Google My Business account.", 17502 // "flatPath": "{merchantId}/liasettings/{accountId}/requestgmbaccess", 17503 // "httpMethod": "POST", 17504 // "id": "content.liasettings.requestgmbaccess", 17505 // "parameterOrder": [ 17506 // "merchantId", 17507 // "accountId", 17508 // "gmbEmail" 17509 // ], 17510 // "parameters": { 17511 // "accountId": { 17512 // "description": "The ID of the account for which GMB access is requested.", 17513 // "format": "uint64", 17514 // "location": "path", 17515 // "required": true, 17516 // "type": "string" 17517 // }, 17518 // "gmbEmail": { 17519 // "description": "The email of the Google My Business account.", 17520 // "location": "query", 17521 // "required": true, 17522 // "type": "string" 17523 // }, 17524 // "merchantId": { 17525 // "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.", 17526 // "format": "uint64", 17527 // "location": "path", 17528 // "required": true, 17529 // "type": "string" 17530 // } 17531 // }, 17532 // "path": "{merchantId}/liasettings/{accountId}/requestgmbaccess", 17533 // "response": { 17534 // "$ref": "LiasettingsRequestGmbAccessResponse" 17535 // }, 17536 // "scopes": [ 17537 // "https://www.googleapis.com/auth/content" 17538 // ] 17539 // } 17540 17541} 17542 17543// method id "content.liasettings.requestinventoryverification": 17544 17545type LiasettingsRequestinventoryverificationCall struct { 17546 s *APIService 17547 merchantId uint64 17548 accountId uint64 17549 country string 17550 urlParams_ gensupport.URLParams 17551 ctx_ context.Context 17552 header_ http.Header 17553} 17554 17555// Requestinventoryverification: Requests inventory validation for the 17556// specified country. 17557// 17558// - accountId: The ID of the account that manages the order. This 17559// cannot be a multi-client account. 17560// - country: The country for which inventory validation is requested. 17561// - merchantId: The ID of the managing account. If this parameter is 17562// not the same as accountId, then this account must be a multi-client 17563// account and `accountId` must be the ID of a sub-account of this 17564// account. 17565func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { 17566 c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17567 c.merchantId = merchantId 17568 c.accountId = accountId 17569 c.country = country 17570 return c 17571} 17572 17573// Fields allows partial responses to be retrieved. See 17574// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17575// for more information. 17576func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { 17577 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17578 return c 17579} 17580 17581// Context sets the context to be used in this call's Do method. Any 17582// pending HTTP request will be aborted if the provided context is 17583// canceled. 17584func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { 17585 c.ctx_ = ctx 17586 return c 17587} 17588 17589// Header returns an http.Header that can be modified by the caller to 17590// add HTTP headers to the request. 17591func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header { 17592 if c.header_ == nil { 17593 c.header_ = make(http.Header) 17594 } 17595 return c.header_ 17596} 17597 17598func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) { 17599 reqHeaders := make(http.Header) 17600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 17601 for k, v := range c.header_ { 17602 reqHeaders[k] = v 17603 } 17604 reqHeaders.Set("User-Agent", c.s.userAgent()) 17605 var body io.Reader = nil 17606 c.urlParams_.Set("alt", alt) 17607 c.urlParams_.Set("prettyPrint", "false") 17608 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") 17609 urls += "?" + c.urlParams_.Encode() 17610 req, err := http.NewRequest("POST", urls, body) 17611 if err != nil { 17612 return nil, err 17613 } 17614 req.Header = reqHeaders 17615 googleapi.Expand(req.URL, map[string]string{ 17616 "merchantId": strconv.FormatUint(c.merchantId, 10), 17617 "accountId": strconv.FormatUint(c.accountId, 10), 17618 "country": c.country, 17619 }) 17620 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17621} 17622 17623// Do executes the "content.liasettings.requestinventoryverification" call. 17624// Exactly one of *LiasettingsRequestInventoryVerificationResponse or 17625// error will be non-nil. Any non-2xx status code is an error. Response 17626// headers are in either 17627// *LiasettingsRequestInventoryVerificationResponse.ServerResponse.Header 17628// or (if a response was returned at all) in 17629// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17630// whether the returned error was because http.StatusNotModified was 17631// returned. 17632func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { 17633 gensupport.SetOptions(c.urlParams_, opts...) 17634 res, err := c.doRequest("json") 17635 if res != nil && res.StatusCode == http.StatusNotModified { 17636 if res.Body != nil { 17637 res.Body.Close() 17638 } 17639 return nil, &googleapi.Error{ 17640 Code: res.StatusCode, 17641 Header: res.Header, 17642 } 17643 } 17644 if err != nil { 17645 return nil, err 17646 } 17647 defer googleapi.CloseBody(res) 17648 if err := googleapi.CheckResponse(res); err != nil { 17649 return nil, err 17650 } 17651 ret := &LiasettingsRequestInventoryVerificationResponse{ 17652 ServerResponse: googleapi.ServerResponse{ 17653 Header: res.Header, 17654 HTTPStatusCode: res.StatusCode, 17655 }, 17656 } 17657 target := &ret 17658 if err := gensupport.DecodeResponse(target, res); err != nil { 17659 return nil, err 17660 } 17661 return ret, nil 17662 // { 17663 // "description": "Requests inventory validation for the specified country.", 17664 // "flatPath": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", 17665 // "httpMethod": "POST", 17666 // "id": "content.liasettings.requestinventoryverification", 17667 // "parameterOrder": [ 17668 // "merchantId", 17669 // "accountId", 17670 // "country" 17671 // ], 17672 // "parameters": { 17673 // "accountId": { 17674 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17675 // "format": "uint64", 17676 // "location": "path", 17677 // "required": true, 17678 // "type": "string" 17679 // }, 17680 // "country": { 17681 // "description": "The country for which inventory validation is requested.", 17682 // "location": "path", 17683 // "required": true, 17684 // "type": "string" 17685 // }, 17686 // "merchantId": { 17687 // "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.", 17688 // "format": "uint64", 17689 // "location": "path", 17690 // "required": true, 17691 // "type": "string" 17692 // } 17693 // }, 17694 // "path": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", 17695 // "response": { 17696 // "$ref": "LiasettingsRequestInventoryVerificationResponse" 17697 // }, 17698 // "scopes": [ 17699 // "https://www.googleapis.com/auth/content" 17700 // ] 17701 // } 17702 17703} 17704 17705// method id "content.liasettings.setinventoryverificationcontact": 17706 17707type LiasettingsSetinventoryverificationcontactCall struct { 17708 s *APIService 17709 merchantId uint64 17710 accountId uint64 17711 urlParams_ gensupport.URLParams 17712 ctx_ context.Context 17713 header_ http.Header 17714} 17715 17716// Setinventoryverificationcontact: Sets the inventory verification 17717// contract for the specified country. 17718// 17719// - accountId: The ID of the account that manages the order. This 17720// cannot be a multi-client account. 17721// - contactEmail: The email of the inventory verification contact. 17722// - contactName: The name of the inventory verification contact. 17723// - country: The country for which inventory verification is requested. 17724// - language: The language for which inventory verification is 17725// requested. 17726// - merchantId: The ID of the managing account. If this parameter is 17727// not the same as accountId, then this account must be a multi-client 17728// account and `accountId` must be the ID of a sub-account of this 17729// account. 17730func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, country string, language string, contactName string, contactEmail string) *LiasettingsSetinventoryverificationcontactCall { 17731 c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17732 c.merchantId = merchantId 17733 c.accountId = accountId 17734 c.urlParams_.Set("country", country) 17735 c.urlParams_.Set("language", language) 17736 c.urlParams_.Set("contactName", contactName) 17737 c.urlParams_.Set("contactEmail", contactEmail) 17738 return c 17739} 17740 17741// Fields allows partial responses to be retrieved. See 17742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17743// for more information. 17744func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { 17745 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17746 return c 17747} 17748 17749// Context sets the context to be used in this call's Do method. Any 17750// pending HTTP request will be aborted if the provided context is 17751// canceled. 17752func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { 17753 c.ctx_ = ctx 17754 return c 17755} 17756 17757// Header returns an http.Header that can be modified by the caller to 17758// add HTTP headers to the request. 17759func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { 17760 if c.header_ == nil { 17761 c.header_ = make(http.Header) 17762 } 17763 return c.header_ 17764} 17765 17766func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { 17767 reqHeaders := make(http.Header) 17768 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 17769 for k, v := range c.header_ { 17770 reqHeaders[k] = v 17771 } 17772 reqHeaders.Set("User-Agent", c.s.userAgent()) 17773 var body io.Reader = nil 17774 c.urlParams_.Set("alt", alt) 17775 c.urlParams_.Set("prettyPrint", "false") 17776 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") 17777 urls += "?" + c.urlParams_.Encode() 17778 req, err := http.NewRequest("POST", urls, body) 17779 if err != nil { 17780 return nil, err 17781 } 17782 req.Header = reqHeaders 17783 googleapi.Expand(req.URL, map[string]string{ 17784 "merchantId": strconv.FormatUint(c.merchantId, 10), 17785 "accountId": strconv.FormatUint(c.accountId, 10), 17786 }) 17787 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17788} 17789 17790// Do executes the "content.liasettings.setinventoryverificationcontact" call. 17791// Exactly one of *LiasettingsSetInventoryVerificationContactResponse or 17792// error will be non-nil. Any non-2xx status code is an error. Response 17793// headers are in either 17794// *LiasettingsSetInventoryVerificationContactResponse.ServerResponse.Hea 17795// der or (if a response was returned at all) in 17796// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 17797// whether the returned error was because http.StatusNotModified was 17798// returned. 17799func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { 17800 gensupport.SetOptions(c.urlParams_, opts...) 17801 res, err := c.doRequest("json") 17802 if res != nil && res.StatusCode == http.StatusNotModified { 17803 if res.Body != nil { 17804 res.Body.Close() 17805 } 17806 return nil, &googleapi.Error{ 17807 Code: res.StatusCode, 17808 Header: res.Header, 17809 } 17810 } 17811 if err != nil { 17812 return nil, err 17813 } 17814 defer googleapi.CloseBody(res) 17815 if err := googleapi.CheckResponse(res); err != nil { 17816 return nil, err 17817 } 17818 ret := &LiasettingsSetInventoryVerificationContactResponse{ 17819 ServerResponse: googleapi.ServerResponse{ 17820 Header: res.Header, 17821 HTTPStatusCode: res.StatusCode, 17822 }, 17823 } 17824 target := &ret 17825 if err := gensupport.DecodeResponse(target, res); err != nil { 17826 return nil, err 17827 } 17828 return ret, nil 17829 // { 17830 // "description": "Sets the inventory verification contract for the specified country.", 17831 // "flatPath": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", 17832 // "httpMethod": "POST", 17833 // "id": "content.liasettings.setinventoryverificationcontact", 17834 // "parameterOrder": [ 17835 // "merchantId", 17836 // "accountId", 17837 // "country", 17838 // "language", 17839 // "contactName", 17840 // "contactEmail" 17841 // ], 17842 // "parameters": { 17843 // "accountId": { 17844 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 17845 // "format": "uint64", 17846 // "location": "path", 17847 // "required": true, 17848 // "type": "string" 17849 // }, 17850 // "contactEmail": { 17851 // "description": "The email of the inventory verification contact.", 17852 // "location": "query", 17853 // "required": true, 17854 // "type": "string" 17855 // }, 17856 // "contactName": { 17857 // "description": "The name of the inventory verification contact.", 17858 // "location": "query", 17859 // "required": true, 17860 // "type": "string" 17861 // }, 17862 // "country": { 17863 // "description": "The country for which inventory verification is requested.", 17864 // "location": "query", 17865 // "required": true, 17866 // "type": "string" 17867 // }, 17868 // "language": { 17869 // "description": "The language for which inventory verification is requested.", 17870 // "location": "query", 17871 // "required": true, 17872 // "type": "string" 17873 // }, 17874 // "merchantId": { 17875 // "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.", 17876 // "format": "uint64", 17877 // "location": "path", 17878 // "required": true, 17879 // "type": "string" 17880 // } 17881 // }, 17882 // "path": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", 17883 // "response": { 17884 // "$ref": "LiasettingsSetInventoryVerificationContactResponse" 17885 // }, 17886 // "scopes": [ 17887 // "https://www.googleapis.com/auth/content" 17888 // ] 17889 // } 17890 17891} 17892 17893// method id "content.liasettings.setposdataprovider": 17894 17895type LiasettingsSetposdataproviderCall struct { 17896 s *APIService 17897 merchantId uint64 17898 accountId uint64 17899 urlParams_ gensupport.URLParams 17900 ctx_ context.Context 17901 header_ http.Header 17902} 17903 17904// Setposdataprovider: Sets the POS data provider for the specified 17905// country. 17906// 17907// - accountId: The ID of the account for which to retrieve accessible 17908// Google My Business accounts. 17909// - country: The country for which the POS data provider is selected. 17910// - merchantId: The ID of the managing account. If this parameter is 17911// not the same as accountId, then this account must be a multi-client 17912// account and `accountId` must be the ID of a sub-account of this 17913// account. 17914func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall { 17915 c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17916 c.merchantId = merchantId 17917 c.accountId = accountId 17918 c.urlParams_.Set("country", country) 17919 return c 17920} 17921 17922// PosDataProviderId sets the optional parameter "posDataProviderId": 17923// The ID of POS data provider. 17924func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall { 17925 c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId)) 17926 return c 17927} 17928 17929// PosExternalAccountId sets the optional parameter 17930// "posExternalAccountId": The account ID by which this merchant is 17931// known to the POS data provider. 17932func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall { 17933 c.urlParams_.Set("posExternalAccountId", posExternalAccountId) 17934 return c 17935} 17936 17937// Fields allows partial responses to be retrieved. See 17938// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17939// for more information. 17940func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall { 17941 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17942 return c 17943} 17944 17945// Context sets the context to be used in this call's Do method. Any 17946// pending HTTP request will be aborted if the provided context is 17947// canceled. 17948func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall { 17949 c.ctx_ = ctx 17950 return c 17951} 17952 17953// Header returns an http.Header that can be modified by the caller to 17954// add HTTP headers to the request. 17955func (c *LiasettingsSetposdataproviderCall) Header() http.Header { 17956 if c.header_ == nil { 17957 c.header_ = make(http.Header) 17958 } 17959 return c.header_ 17960} 17961 17962func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) { 17963 reqHeaders := make(http.Header) 17964 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 17965 for k, v := range c.header_ { 17966 reqHeaders[k] = v 17967 } 17968 reqHeaders.Set("User-Agent", c.s.userAgent()) 17969 var body io.Reader = nil 17970 c.urlParams_.Set("alt", alt) 17971 c.urlParams_.Set("prettyPrint", "false") 17972 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider") 17973 urls += "?" + c.urlParams_.Encode() 17974 req, err := http.NewRequest("POST", urls, body) 17975 if err != nil { 17976 return nil, err 17977 } 17978 req.Header = reqHeaders 17979 googleapi.Expand(req.URL, map[string]string{ 17980 "merchantId": strconv.FormatUint(c.merchantId, 10), 17981 "accountId": strconv.FormatUint(c.accountId, 10), 17982 }) 17983 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17984} 17985 17986// Do executes the "content.liasettings.setposdataprovider" call. 17987// Exactly one of *LiasettingsSetPosDataProviderResponse or error will 17988// be non-nil. Any non-2xx status code is an error. Response headers are 17989// in either 17990// *LiasettingsSetPosDataProviderResponse.ServerResponse.Header or (if a 17991// response was returned at all) in error.(*googleapi.Error).Header. Use 17992// googleapi.IsNotModified to check whether the returned error was 17993// because http.StatusNotModified was returned. 17994func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) { 17995 gensupport.SetOptions(c.urlParams_, opts...) 17996 res, err := c.doRequest("json") 17997 if res != nil && res.StatusCode == http.StatusNotModified { 17998 if res.Body != nil { 17999 res.Body.Close() 18000 } 18001 return nil, &googleapi.Error{ 18002 Code: res.StatusCode, 18003 Header: res.Header, 18004 } 18005 } 18006 if err != nil { 18007 return nil, err 18008 } 18009 defer googleapi.CloseBody(res) 18010 if err := googleapi.CheckResponse(res); err != nil { 18011 return nil, err 18012 } 18013 ret := &LiasettingsSetPosDataProviderResponse{ 18014 ServerResponse: googleapi.ServerResponse{ 18015 Header: res.Header, 18016 HTTPStatusCode: res.StatusCode, 18017 }, 18018 } 18019 target := &ret 18020 if err := gensupport.DecodeResponse(target, res); err != nil { 18021 return nil, err 18022 } 18023 return ret, nil 18024 // { 18025 // "description": "Sets the POS data provider for the specified country.", 18026 // "flatPath": "{merchantId}/liasettings/{accountId}/setposdataprovider", 18027 // "httpMethod": "POST", 18028 // "id": "content.liasettings.setposdataprovider", 18029 // "parameterOrder": [ 18030 // "merchantId", 18031 // "accountId", 18032 // "country" 18033 // ], 18034 // "parameters": { 18035 // "accountId": { 18036 // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.", 18037 // "format": "uint64", 18038 // "location": "path", 18039 // "required": true, 18040 // "type": "string" 18041 // }, 18042 // "country": { 18043 // "description": "The country for which the POS data provider is selected.", 18044 // "location": "query", 18045 // "required": true, 18046 // "type": "string" 18047 // }, 18048 // "merchantId": { 18049 // "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.", 18050 // "format": "uint64", 18051 // "location": "path", 18052 // "required": true, 18053 // "type": "string" 18054 // }, 18055 // "posDataProviderId": { 18056 // "description": "The ID of POS data provider.", 18057 // "format": "uint64", 18058 // "location": "query", 18059 // "type": "string" 18060 // }, 18061 // "posExternalAccountId": { 18062 // "description": "The account ID by which this merchant is known to the POS data provider.", 18063 // "location": "query", 18064 // "type": "string" 18065 // } 18066 // }, 18067 // "path": "{merchantId}/liasettings/{accountId}/setposdataprovider", 18068 // "response": { 18069 // "$ref": "LiasettingsSetPosDataProviderResponse" 18070 // }, 18071 // "scopes": [ 18072 // "https://www.googleapis.com/auth/content" 18073 // ] 18074 // } 18075 18076} 18077 18078// method id "content.liasettings.update": 18079 18080type LiasettingsUpdateCall struct { 18081 s *APIService 18082 merchantId uint64 18083 accountId uint64 18084 liasettings *LiaSettings 18085 urlParams_ gensupport.URLParams 18086 ctx_ context.Context 18087 header_ http.Header 18088} 18089 18090// Update: Updates the LIA settings of the account. Any fields that are 18091// not provided are deleted from the resource. 18092// 18093// - accountId: The ID of the account for which to get or update LIA 18094// settings. 18095// - merchantId: The ID of the managing account. If this parameter is 18096// not the same as accountId, then this account must be a multi-client 18097// account and `accountId` must be the ID of a sub-account of this 18098// account. 18099func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { 18100 c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18101 c.merchantId = merchantId 18102 c.accountId = accountId 18103 c.liasettings = liasettings 18104 return c 18105} 18106 18107// DryRun sets the optional parameter "dryRun": Flag to simulate a 18108// request like in a live environment. If set to true, dry-run mode 18109// checks the validity of the request and returns errors (if any). 18110func (c *LiasettingsUpdateCall) DryRun(dryRun bool) *LiasettingsUpdateCall { 18111 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 18112 return c 18113} 18114 18115// Fields allows partial responses to be retrieved. See 18116// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18117// for more information. 18118func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { 18119 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18120 return c 18121} 18122 18123// Context sets the context to be used in this call's Do method. Any 18124// pending HTTP request will be aborted if the provided context is 18125// canceled. 18126func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { 18127 c.ctx_ = ctx 18128 return c 18129} 18130 18131// Header returns an http.Header that can be modified by the caller to 18132// add HTTP headers to the request. 18133func (c *LiasettingsUpdateCall) Header() http.Header { 18134 if c.header_ == nil { 18135 c.header_ = make(http.Header) 18136 } 18137 return c.header_ 18138} 18139 18140func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { 18141 reqHeaders := make(http.Header) 18142 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 18143 for k, v := range c.header_ { 18144 reqHeaders[k] = v 18145 } 18146 reqHeaders.Set("User-Agent", c.s.userAgent()) 18147 var body io.Reader = nil 18148 body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings) 18149 if err != nil { 18150 return nil, err 18151 } 18152 reqHeaders.Set("Content-Type", "application/json") 18153 c.urlParams_.Set("alt", alt) 18154 c.urlParams_.Set("prettyPrint", "false") 18155 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") 18156 urls += "?" + c.urlParams_.Encode() 18157 req, err := http.NewRequest("PUT", urls, body) 18158 if err != nil { 18159 return nil, err 18160 } 18161 req.Header = reqHeaders 18162 googleapi.Expand(req.URL, map[string]string{ 18163 "merchantId": strconv.FormatUint(c.merchantId, 10), 18164 "accountId": strconv.FormatUint(c.accountId, 10), 18165 }) 18166 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18167} 18168 18169// Do executes the "content.liasettings.update" call. 18170// Exactly one of *LiaSettings or error will be non-nil. Any non-2xx 18171// status code is an error. Response headers are in either 18172// *LiaSettings.ServerResponse.Header or (if a response was returned at 18173// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18174// to check whether the returned error was because 18175// http.StatusNotModified was returned. 18176func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { 18177 gensupport.SetOptions(c.urlParams_, opts...) 18178 res, err := c.doRequest("json") 18179 if res != nil && res.StatusCode == http.StatusNotModified { 18180 if res.Body != nil { 18181 res.Body.Close() 18182 } 18183 return nil, &googleapi.Error{ 18184 Code: res.StatusCode, 18185 Header: res.Header, 18186 } 18187 } 18188 if err != nil { 18189 return nil, err 18190 } 18191 defer googleapi.CloseBody(res) 18192 if err := googleapi.CheckResponse(res); err != nil { 18193 return nil, err 18194 } 18195 ret := &LiaSettings{ 18196 ServerResponse: googleapi.ServerResponse{ 18197 Header: res.Header, 18198 HTTPStatusCode: res.StatusCode, 18199 }, 18200 } 18201 target := &ret 18202 if err := gensupport.DecodeResponse(target, res); err != nil { 18203 return nil, err 18204 } 18205 return ret, nil 18206 // { 18207 // "description": "Updates the LIA settings of the account. Any fields that are not provided are deleted from the resource.", 18208 // "flatPath": "{merchantId}/liasettings/{accountId}", 18209 // "httpMethod": "PUT", 18210 // "id": "content.liasettings.update", 18211 // "parameterOrder": [ 18212 // "merchantId", 18213 // "accountId" 18214 // ], 18215 // "parameters": { 18216 // "accountId": { 18217 // "description": "The ID of the account for which to get or update LIA settings.", 18218 // "format": "uint64", 18219 // "location": "path", 18220 // "required": true, 18221 // "type": "string" 18222 // }, 18223 // "dryRun": { 18224 // "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).", 18225 // "location": "query", 18226 // "type": "boolean" 18227 // }, 18228 // "merchantId": { 18229 // "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.", 18230 // "format": "uint64", 18231 // "location": "path", 18232 // "required": true, 18233 // "type": "string" 18234 // } 18235 // }, 18236 // "path": "{merchantId}/liasettings/{accountId}", 18237 // "request": { 18238 // "$ref": "LiaSettings" 18239 // }, 18240 // "response": { 18241 // "$ref": "LiaSettings" 18242 // }, 18243 // "scopes": [ 18244 // "https://www.googleapis.com/auth/content" 18245 // ] 18246 // } 18247 18248} 18249 18250// method id "content.orderinvoices.createchargeinvoice": 18251 18252type OrderinvoicesCreatechargeinvoiceCall struct { 18253 s *APIService 18254 merchantId uint64 18255 orderId string 18256 orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest 18257 urlParams_ gensupport.URLParams 18258 ctx_ context.Context 18259 header_ http.Header 18260} 18261 18262// Createchargeinvoice: Creates a charge invoice for a shipment group, 18263// and triggers a charge capture for orderinvoice enabled orders. 18264// 18265// - merchantId: The ID of the account that manages the order. This 18266// cannot be a multi-client account. 18267// - orderId: The ID of the order. 18268func (r *OrderinvoicesService) Createchargeinvoice(merchantId uint64, orderId string, orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest) *OrderinvoicesCreatechargeinvoiceCall { 18269 c := &OrderinvoicesCreatechargeinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18270 c.merchantId = merchantId 18271 c.orderId = orderId 18272 c.orderinvoicescreatechargeinvoicerequest = orderinvoicescreatechargeinvoicerequest 18273 return c 18274} 18275 18276// Fields allows partial responses to be retrieved. See 18277// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18278// for more information. 18279func (c *OrderinvoicesCreatechargeinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreatechargeinvoiceCall { 18280 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18281 return c 18282} 18283 18284// Context sets the context to be used in this call's Do method. Any 18285// pending HTTP request will be aborted if the provided context is 18286// canceled. 18287func (c *OrderinvoicesCreatechargeinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreatechargeinvoiceCall { 18288 c.ctx_ = ctx 18289 return c 18290} 18291 18292// Header returns an http.Header that can be modified by the caller to 18293// add HTTP headers to the request. 18294func (c *OrderinvoicesCreatechargeinvoiceCall) Header() http.Header { 18295 if c.header_ == nil { 18296 c.header_ = make(http.Header) 18297 } 18298 return c.header_ 18299} 18300 18301func (c *OrderinvoicesCreatechargeinvoiceCall) doRequest(alt string) (*http.Response, error) { 18302 reqHeaders := make(http.Header) 18303 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 18304 for k, v := range c.header_ { 18305 reqHeaders[k] = v 18306 } 18307 reqHeaders.Set("User-Agent", c.s.userAgent()) 18308 var body io.Reader = nil 18309 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreatechargeinvoicerequest) 18310 if err != nil { 18311 return nil, err 18312 } 18313 reqHeaders.Set("Content-Type", "application/json") 18314 c.urlParams_.Set("alt", alt) 18315 c.urlParams_.Set("prettyPrint", "false") 18316 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createChargeInvoice") 18317 urls += "?" + c.urlParams_.Encode() 18318 req, err := http.NewRequest("POST", urls, body) 18319 if err != nil { 18320 return nil, err 18321 } 18322 req.Header = reqHeaders 18323 googleapi.Expand(req.URL, map[string]string{ 18324 "merchantId": strconv.FormatUint(c.merchantId, 10), 18325 "orderId": c.orderId, 18326 }) 18327 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18328} 18329 18330// Do executes the "content.orderinvoices.createchargeinvoice" call. 18331// Exactly one of *OrderinvoicesCreateChargeInvoiceResponse or error 18332// will be non-nil. Any non-2xx status code is an error. Response 18333// headers are in either 18334// *OrderinvoicesCreateChargeInvoiceResponse.ServerResponse.Header or 18335// (if a response was returned at all) in 18336// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18337// whether the returned error was because http.StatusNotModified was 18338// returned. 18339func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateChargeInvoiceResponse, error) { 18340 gensupport.SetOptions(c.urlParams_, opts...) 18341 res, err := c.doRequest("json") 18342 if res != nil && res.StatusCode == http.StatusNotModified { 18343 if res.Body != nil { 18344 res.Body.Close() 18345 } 18346 return nil, &googleapi.Error{ 18347 Code: res.StatusCode, 18348 Header: res.Header, 18349 } 18350 } 18351 if err != nil { 18352 return nil, err 18353 } 18354 defer googleapi.CloseBody(res) 18355 if err := googleapi.CheckResponse(res); err != nil { 18356 return nil, err 18357 } 18358 ret := &OrderinvoicesCreateChargeInvoiceResponse{ 18359 ServerResponse: googleapi.ServerResponse{ 18360 Header: res.Header, 18361 HTTPStatusCode: res.StatusCode, 18362 }, 18363 } 18364 target := &ret 18365 if err := gensupport.DecodeResponse(target, res); err != nil { 18366 return nil, err 18367 } 18368 return ret, nil 18369 // { 18370 // "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.", 18371 // "flatPath": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", 18372 // "httpMethod": "POST", 18373 // "id": "content.orderinvoices.createchargeinvoice", 18374 // "parameterOrder": [ 18375 // "merchantId", 18376 // "orderId" 18377 // ], 18378 // "parameters": { 18379 // "merchantId": { 18380 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18381 // "format": "uint64", 18382 // "location": "path", 18383 // "required": true, 18384 // "type": "string" 18385 // }, 18386 // "orderId": { 18387 // "description": "The ID of the order.", 18388 // "location": "path", 18389 // "required": true, 18390 // "type": "string" 18391 // } 18392 // }, 18393 // "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", 18394 // "request": { 18395 // "$ref": "OrderinvoicesCreateChargeInvoiceRequest" 18396 // }, 18397 // "response": { 18398 // "$ref": "OrderinvoicesCreateChargeInvoiceResponse" 18399 // }, 18400 // "scopes": [ 18401 // "https://www.googleapis.com/auth/content" 18402 // ] 18403 // } 18404 18405} 18406 18407// method id "content.orderinvoices.createrefundinvoice": 18408 18409type OrderinvoicesCreaterefundinvoiceCall struct { 18410 s *APIService 18411 merchantId uint64 18412 orderId string 18413 orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest 18414 urlParams_ gensupport.URLParams 18415 ctx_ context.Context 18416 header_ http.Header 18417} 18418 18419// Createrefundinvoice: Creates a refund invoice for one or more 18420// shipment groups, and triggers a refund for orderinvoice enabled 18421// orders. This can only be used for line items that have previously 18422// been charged using `createChargeInvoice`. All amounts (except for the 18423// summary) are incremental with respect to the previous invoice. 18424// 18425// - merchantId: The ID of the account that manages the order. This 18426// cannot be a multi-client account. 18427// - orderId: The ID of the order. 18428func (r *OrderinvoicesService) Createrefundinvoice(merchantId uint64, orderId string, orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest) *OrderinvoicesCreaterefundinvoiceCall { 18429 c := &OrderinvoicesCreaterefundinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18430 c.merchantId = merchantId 18431 c.orderId = orderId 18432 c.orderinvoicescreaterefundinvoicerequest = orderinvoicescreaterefundinvoicerequest 18433 return c 18434} 18435 18436// Fields allows partial responses to be retrieved. See 18437// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18438// for more information. 18439func (c *OrderinvoicesCreaterefundinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreaterefundinvoiceCall { 18440 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18441 return c 18442} 18443 18444// Context sets the context to be used in this call's Do method. Any 18445// pending HTTP request will be aborted if the provided context is 18446// canceled. 18447func (c *OrderinvoicesCreaterefundinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreaterefundinvoiceCall { 18448 c.ctx_ = ctx 18449 return c 18450} 18451 18452// Header returns an http.Header that can be modified by the caller to 18453// add HTTP headers to the request. 18454func (c *OrderinvoicesCreaterefundinvoiceCall) Header() http.Header { 18455 if c.header_ == nil { 18456 c.header_ = make(http.Header) 18457 } 18458 return c.header_ 18459} 18460 18461func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Response, error) { 18462 reqHeaders := make(http.Header) 18463 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 18464 for k, v := range c.header_ { 18465 reqHeaders[k] = v 18466 } 18467 reqHeaders.Set("User-Agent", c.s.userAgent()) 18468 var body io.Reader = nil 18469 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreaterefundinvoicerequest) 18470 if err != nil { 18471 return nil, err 18472 } 18473 reqHeaders.Set("Content-Type", "application/json") 18474 c.urlParams_.Set("alt", alt) 18475 c.urlParams_.Set("prettyPrint", "false") 18476 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createRefundInvoice") 18477 urls += "?" + c.urlParams_.Encode() 18478 req, err := http.NewRequest("POST", urls, body) 18479 if err != nil { 18480 return nil, err 18481 } 18482 req.Header = reqHeaders 18483 googleapi.Expand(req.URL, map[string]string{ 18484 "merchantId": strconv.FormatUint(c.merchantId, 10), 18485 "orderId": c.orderId, 18486 }) 18487 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18488} 18489 18490// Do executes the "content.orderinvoices.createrefundinvoice" call. 18491// Exactly one of *OrderinvoicesCreateRefundInvoiceResponse or error 18492// will be non-nil. Any non-2xx status code is an error. Response 18493// headers are in either 18494// *OrderinvoicesCreateRefundInvoiceResponse.ServerResponse.Header or 18495// (if a response was returned at all) in 18496// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18497// whether the returned error was because http.StatusNotModified was 18498// returned. 18499func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateRefundInvoiceResponse, error) { 18500 gensupport.SetOptions(c.urlParams_, opts...) 18501 res, err := c.doRequest("json") 18502 if res != nil && res.StatusCode == http.StatusNotModified { 18503 if res.Body != nil { 18504 res.Body.Close() 18505 } 18506 return nil, &googleapi.Error{ 18507 Code: res.StatusCode, 18508 Header: res.Header, 18509 } 18510 } 18511 if err != nil { 18512 return nil, err 18513 } 18514 defer googleapi.CloseBody(res) 18515 if err := googleapi.CheckResponse(res); err != nil { 18516 return nil, err 18517 } 18518 ret := &OrderinvoicesCreateRefundInvoiceResponse{ 18519 ServerResponse: googleapi.ServerResponse{ 18520 Header: res.Header, 18521 HTTPStatusCode: res.StatusCode, 18522 }, 18523 } 18524 target := &ret 18525 if err := gensupport.DecodeResponse(target, res); err != nil { 18526 return nil, err 18527 } 18528 return ret, nil 18529 // { 18530 // "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.", 18531 // "flatPath": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", 18532 // "httpMethod": "POST", 18533 // "id": "content.orderinvoices.createrefundinvoice", 18534 // "parameterOrder": [ 18535 // "merchantId", 18536 // "orderId" 18537 // ], 18538 // "parameters": { 18539 // "merchantId": { 18540 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18541 // "format": "uint64", 18542 // "location": "path", 18543 // "required": true, 18544 // "type": "string" 18545 // }, 18546 // "orderId": { 18547 // "description": "The ID of the order.", 18548 // "location": "path", 18549 // "required": true, 18550 // "type": "string" 18551 // } 18552 // }, 18553 // "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", 18554 // "request": { 18555 // "$ref": "OrderinvoicesCreateRefundInvoiceRequest" 18556 // }, 18557 // "response": { 18558 // "$ref": "OrderinvoicesCreateRefundInvoiceResponse" 18559 // }, 18560 // "scopes": [ 18561 // "https://www.googleapis.com/auth/content" 18562 // ] 18563 // } 18564 18565} 18566 18567// method id "content.orderreports.listdisbursements": 18568 18569type OrderreportsListdisbursementsCall struct { 18570 s *APIService 18571 merchantId uint64 18572 urlParams_ gensupport.URLParams 18573 ifNoneMatch_ string 18574 ctx_ context.Context 18575 header_ http.Header 18576} 18577 18578// Listdisbursements: Retrieves a report for disbursements from your 18579// Merchant Center account. 18580// 18581// - merchantId: The ID of the account that manages the order. This 18582// cannot be a multi-client account. 18583func (r *OrderreportsService) Listdisbursements(merchantId uint64) *OrderreportsListdisbursementsCall { 18584 c := &OrderreportsListdisbursementsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18585 c.merchantId = merchantId 18586 return c 18587} 18588 18589// DisbursementEndDate sets the optional parameter 18590// "disbursementEndDate": The last date which disbursements occurred. In 18591// ISO 8601 format. Default: current date. 18592func (c *OrderreportsListdisbursementsCall) DisbursementEndDate(disbursementEndDate string) *OrderreportsListdisbursementsCall { 18593 c.urlParams_.Set("disbursementEndDate", disbursementEndDate) 18594 return c 18595} 18596 18597// DisbursementStartDate sets the optional parameter 18598// "disbursementStartDate": The first date which disbursements occurred. 18599// In ISO 8601 format. 18600func (c *OrderreportsListdisbursementsCall) DisbursementStartDate(disbursementStartDate string) *OrderreportsListdisbursementsCall { 18601 c.urlParams_.Set("disbursementStartDate", disbursementStartDate) 18602 return c 18603} 18604 18605// MaxResults sets the optional parameter "maxResults": The maximum 18606// number of disbursements to return in the response, used for paging. 18607func (c *OrderreportsListdisbursementsCall) MaxResults(maxResults int64) *OrderreportsListdisbursementsCall { 18608 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 18609 return c 18610} 18611 18612// PageToken sets the optional parameter "pageToken": The token returned 18613// by the previous request. 18614func (c *OrderreportsListdisbursementsCall) PageToken(pageToken string) *OrderreportsListdisbursementsCall { 18615 c.urlParams_.Set("pageToken", pageToken) 18616 return c 18617} 18618 18619// Fields allows partial responses to be retrieved. See 18620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18621// for more information. 18622func (c *OrderreportsListdisbursementsCall) Fields(s ...googleapi.Field) *OrderreportsListdisbursementsCall { 18623 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18624 return c 18625} 18626 18627// IfNoneMatch sets the optional parameter which makes the operation 18628// fail if the object's ETag matches the given value. This is useful for 18629// getting updates only after the object has changed since the last 18630// request. Use googleapi.IsNotModified to check whether the response 18631// error from Do is the result of In-None-Match. 18632func (c *OrderreportsListdisbursementsCall) IfNoneMatch(entityTag string) *OrderreportsListdisbursementsCall { 18633 c.ifNoneMatch_ = entityTag 18634 return c 18635} 18636 18637// Context sets the context to be used in this call's Do method. Any 18638// pending HTTP request will be aborted if the provided context is 18639// canceled. 18640func (c *OrderreportsListdisbursementsCall) Context(ctx context.Context) *OrderreportsListdisbursementsCall { 18641 c.ctx_ = ctx 18642 return c 18643} 18644 18645// Header returns an http.Header that can be modified by the caller to 18646// add HTTP headers to the request. 18647func (c *OrderreportsListdisbursementsCall) Header() http.Header { 18648 if c.header_ == nil { 18649 c.header_ = make(http.Header) 18650 } 18651 return c.header_ 18652} 18653 18654func (c *OrderreportsListdisbursementsCall) doRequest(alt string) (*http.Response, error) { 18655 reqHeaders := make(http.Header) 18656 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 18657 for k, v := range c.header_ { 18658 reqHeaders[k] = v 18659 } 18660 reqHeaders.Set("User-Agent", c.s.userAgent()) 18661 if c.ifNoneMatch_ != "" { 18662 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18663 } 18664 var body io.Reader = nil 18665 c.urlParams_.Set("alt", alt) 18666 c.urlParams_.Set("prettyPrint", "false") 18667 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements") 18668 urls += "?" + c.urlParams_.Encode() 18669 req, err := http.NewRequest("GET", urls, body) 18670 if err != nil { 18671 return nil, err 18672 } 18673 req.Header = reqHeaders 18674 googleapi.Expand(req.URL, map[string]string{ 18675 "merchantId": strconv.FormatUint(c.merchantId, 10), 18676 }) 18677 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18678} 18679 18680// Do executes the "content.orderreports.listdisbursements" call. 18681// Exactly one of *OrderreportsListDisbursementsResponse or error will 18682// be non-nil. Any non-2xx status code is an error. Response headers are 18683// in either 18684// *OrderreportsListDisbursementsResponse.ServerResponse.Header or (if a 18685// response was returned at all) in error.(*googleapi.Error).Header. Use 18686// googleapi.IsNotModified to check whether the returned error was 18687// because http.StatusNotModified was returned. 18688func (c *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListDisbursementsResponse, error) { 18689 gensupport.SetOptions(c.urlParams_, opts...) 18690 res, err := c.doRequest("json") 18691 if res != nil && res.StatusCode == http.StatusNotModified { 18692 if res.Body != nil { 18693 res.Body.Close() 18694 } 18695 return nil, &googleapi.Error{ 18696 Code: res.StatusCode, 18697 Header: res.Header, 18698 } 18699 } 18700 if err != nil { 18701 return nil, err 18702 } 18703 defer googleapi.CloseBody(res) 18704 if err := googleapi.CheckResponse(res); err != nil { 18705 return nil, err 18706 } 18707 ret := &OrderreportsListDisbursementsResponse{ 18708 ServerResponse: googleapi.ServerResponse{ 18709 Header: res.Header, 18710 HTTPStatusCode: res.StatusCode, 18711 }, 18712 } 18713 target := &ret 18714 if err := gensupport.DecodeResponse(target, res); err != nil { 18715 return nil, err 18716 } 18717 return ret, nil 18718 // { 18719 // "description": "Retrieves a report for disbursements from your Merchant Center account.", 18720 // "flatPath": "{merchantId}/orderreports/disbursements", 18721 // "httpMethod": "GET", 18722 // "id": "content.orderreports.listdisbursements", 18723 // "parameterOrder": [ 18724 // "merchantId" 18725 // ], 18726 // "parameters": { 18727 // "disbursementEndDate": { 18728 // "description": "The last date which disbursements occurred. In ISO 8601 format. Default: current date.", 18729 // "location": "query", 18730 // "type": "string" 18731 // }, 18732 // "disbursementStartDate": { 18733 // "description": "The first date which disbursements occurred. In ISO 8601 format.", 18734 // "location": "query", 18735 // "type": "string" 18736 // }, 18737 // "maxResults": { 18738 // "description": "The maximum number of disbursements to return in the response, used for paging.", 18739 // "format": "uint32", 18740 // "location": "query", 18741 // "type": "integer" 18742 // }, 18743 // "merchantId": { 18744 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18745 // "format": "uint64", 18746 // "location": "path", 18747 // "required": true, 18748 // "type": "string" 18749 // }, 18750 // "pageToken": { 18751 // "description": "The token returned by the previous request.", 18752 // "location": "query", 18753 // "type": "string" 18754 // } 18755 // }, 18756 // "path": "{merchantId}/orderreports/disbursements", 18757 // "response": { 18758 // "$ref": "OrderreportsListDisbursementsResponse" 18759 // }, 18760 // "scopes": [ 18761 // "https://www.googleapis.com/auth/content" 18762 // ] 18763 // } 18764 18765} 18766 18767// Pages invokes f for each page of results. 18768// A non-nil error returned from f will halt the iteration. 18769// The provided context supersedes any context provided to the Context method. 18770func (c *OrderreportsListdisbursementsCall) Pages(ctx context.Context, f func(*OrderreportsListDisbursementsResponse) error) error { 18771 c.ctx_ = ctx 18772 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18773 for { 18774 x, err := c.Do() 18775 if err != nil { 18776 return err 18777 } 18778 if err := f(x); err != nil { 18779 return err 18780 } 18781 if x.NextPageToken == "" { 18782 return nil 18783 } 18784 c.PageToken(x.NextPageToken) 18785 } 18786} 18787 18788// method id "content.orderreports.listtransactions": 18789 18790type OrderreportsListtransactionsCall struct { 18791 s *APIService 18792 merchantId uint64 18793 disbursementId string 18794 urlParams_ gensupport.URLParams 18795 ifNoneMatch_ string 18796 ctx_ context.Context 18797 header_ http.Header 18798} 18799 18800// Listtransactions: Retrieves a list of transactions for a disbursement 18801// from your Merchant Center account. 18802// 18803// - disbursementId: The Google-provided ID of the disbursement (found 18804// in Wallet). 18805// - merchantId: The ID of the account that manages the order. This 18806// cannot be a multi-client account. 18807func (r *OrderreportsService) Listtransactions(merchantId uint64, disbursementId string) *OrderreportsListtransactionsCall { 18808 c := &OrderreportsListtransactionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18809 c.merchantId = merchantId 18810 c.disbursementId = disbursementId 18811 return c 18812} 18813 18814// MaxResults sets the optional parameter "maxResults": The maximum 18815// number of disbursements to return in the response, used for paging. 18816func (c *OrderreportsListtransactionsCall) MaxResults(maxResults int64) *OrderreportsListtransactionsCall { 18817 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 18818 return c 18819} 18820 18821// PageToken sets the optional parameter "pageToken": The token returned 18822// by the previous request. 18823func (c *OrderreportsListtransactionsCall) PageToken(pageToken string) *OrderreportsListtransactionsCall { 18824 c.urlParams_.Set("pageToken", pageToken) 18825 return c 18826} 18827 18828// TransactionEndDate sets the optional parameter "transactionEndDate": 18829// The last date in which transaction occurred. In ISO 8601 format. 18830// Default: current date. 18831func (c *OrderreportsListtransactionsCall) TransactionEndDate(transactionEndDate string) *OrderreportsListtransactionsCall { 18832 c.urlParams_.Set("transactionEndDate", transactionEndDate) 18833 return c 18834} 18835 18836// TransactionStartDate sets the optional parameter 18837// "transactionStartDate": The first date in which transaction occurred. 18838// In ISO 8601 format. 18839func (c *OrderreportsListtransactionsCall) TransactionStartDate(transactionStartDate string) *OrderreportsListtransactionsCall { 18840 c.urlParams_.Set("transactionStartDate", transactionStartDate) 18841 return c 18842} 18843 18844// Fields allows partial responses to be retrieved. See 18845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18846// for more information. 18847func (c *OrderreportsListtransactionsCall) Fields(s ...googleapi.Field) *OrderreportsListtransactionsCall { 18848 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18849 return c 18850} 18851 18852// IfNoneMatch sets the optional parameter which makes the operation 18853// fail if the object's ETag matches the given value. This is useful for 18854// getting updates only after the object has changed since the last 18855// request. Use googleapi.IsNotModified to check whether the response 18856// error from Do is the result of In-None-Match. 18857func (c *OrderreportsListtransactionsCall) IfNoneMatch(entityTag string) *OrderreportsListtransactionsCall { 18858 c.ifNoneMatch_ = entityTag 18859 return c 18860} 18861 18862// Context sets the context to be used in this call's Do method. Any 18863// pending HTTP request will be aborted if the provided context is 18864// canceled. 18865func (c *OrderreportsListtransactionsCall) Context(ctx context.Context) *OrderreportsListtransactionsCall { 18866 c.ctx_ = ctx 18867 return c 18868} 18869 18870// Header returns an http.Header that can be modified by the caller to 18871// add HTTP headers to the request. 18872func (c *OrderreportsListtransactionsCall) Header() http.Header { 18873 if c.header_ == nil { 18874 c.header_ = make(http.Header) 18875 } 18876 return c.header_ 18877} 18878 18879func (c *OrderreportsListtransactionsCall) doRequest(alt string) (*http.Response, error) { 18880 reqHeaders := make(http.Header) 18881 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 18882 for k, v := range c.header_ { 18883 reqHeaders[k] = v 18884 } 18885 reqHeaders.Set("User-Agent", c.s.userAgent()) 18886 if c.ifNoneMatch_ != "" { 18887 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18888 } 18889 var body io.Reader = nil 18890 c.urlParams_.Set("alt", alt) 18891 c.urlParams_.Set("prettyPrint", "false") 18892 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements/{disbursementId}/transactions") 18893 urls += "?" + c.urlParams_.Encode() 18894 req, err := http.NewRequest("GET", urls, body) 18895 if err != nil { 18896 return nil, err 18897 } 18898 req.Header = reqHeaders 18899 googleapi.Expand(req.URL, map[string]string{ 18900 "merchantId": strconv.FormatUint(c.merchantId, 10), 18901 "disbursementId": c.disbursementId, 18902 }) 18903 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18904} 18905 18906// Do executes the "content.orderreports.listtransactions" call. 18907// Exactly one of *OrderreportsListTransactionsResponse or error will be 18908// non-nil. Any non-2xx status code is an error. Response headers are in 18909// either *OrderreportsListTransactionsResponse.ServerResponse.Header or 18910// (if a response was returned at all) in 18911// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18912// whether the returned error was because http.StatusNotModified was 18913// returned. 18914func (c *OrderreportsListtransactionsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListTransactionsResponse, error) { 18915 gensupport.SetOptions(c.urlParams_, opts...) 18916 res, err := c.doRequest("json") 18917 if res != nil && res.StatusCode == http.StatusNotModified { 18918 if res.Body != nil { 18919 res.Body.Close() 18920 } 18921 return nil, &googleapi.Error{ 18922 Code: res.StatusCode, 18923 Header: res.Header, 18924 } 18925 } 18926 if err != nil { 18927 return nil, err 18928 } 18929 defer googleapi.CloseBody(res) 18930 if err := googleapi.CheckResponse(res); err != nil { 18931 return nil, err 18932 } 18933 ret := &OrderreportsListTransactionsResponse{ 18934 ServerResponse: googleapi.ServerResponse{ 18935 Header: res.Header, 18936 HTTPStatusCode: res.StatusCode, 18937 }, 18938 } 18939 target := &ret 18940 if err := gensupport.DecodeResponse(target, res); err != nil { 18941 return nil, err 18942 } 18943 return ret, nil 18944 // { 18945 // "description": "Retrieves a list of transactions for a disbursement from your Merchant Center account.", 18946 // "flatPath": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", 18947 // "httpMethod": "GET", 18948 // "id": "content.orderreports.listtransactions", 18949 // "parameterOrder": [ 18950 // "merchantId", 18951 // "disbursementId" 18952 // ], 18953 // "parameters": { 18954 // "disbursementId": { 18955 // "description": "The Google-provided ID of the disbursement (found in Wallet).", 18956 // "location": "path", 18957 // "required": true, 18958 // "type": "string" 18959 // }, 18960 // "maxResults": { 18961 // "description": "The maximum number of disbursements to return in the response, used for paging.", 18962 // "format": "uint32", 18963 // "location": "query", 18964 // "type": "integer" 18965 // }, 18966 // "merchantId": { 18967 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 18968 // "format": "uint64", 18969 // "location": "path", 18970 // "required": true, 18971 // "type": "string" 18972 // }, 18973 // "pageToken": { 18974 // "description": "The token returned by the previous request.", 18975 // "location": "query", 18976 // "type": "string" 18977 // }, 18978 // "transactionEndDate": { 18979 // "description": "The last date in which transaction occurred. In ISO 8601 format. Default: current date.", 18980 // "location": "query", 18981 // "type": "string" 18982 // }, 18983 // "transactionStartDate": { 18984 // "description": "The first date in which transaction occurred. In ISO 8601 format.", 18985 // "location": "query", 18986 // "type": "string" 18987 // } 18988 // }, 18989 // "path": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", 18990 // "response": { 18991 // "$ref": "OrderreportsListTransactionsResponse" 18992 // }, 18993 // "scopes": [ 18994 // "https://www.googleapis.com/auth/content" 18995 // ] 18996 // } 18997 18998} 18999 19000// Pages invokes f for each page of results. 19001// A non-nil error returned from f will halt the iteration. 19002// The provided context supersedes any context provided to the Context method. 19003func (c *OrderreportsListtransactionsCall) Pages(ctx context.Context, f func(*OrderreportsListTransactionsResponse) error) error { 19004 c.ctx_ = ctx 19005 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19006 for { 19007 x, err := c.Do() 19008 if err != nil { 19009 return err 19010 } 19011 if err := f(x); err != nil { 19012 return err 19013 } 19014 if x.NextPageToken == "" { 19015 return nil 19016 } 19017 c.PageToken(x.NextPageToken) 19018 } 19019} 19020 19021// method id "content.orderreturns.get": 19022 19023type OrderreturnsGetCall struct { 19024 s *APIService 19025 merchantId uint64 19026 returnId string 19027 urlParams_ gensupport.URLParams 19028 ifNoneMatch_ string 19029 ctx_ context.Context 19030 header_ http.Header 19031} 19032 19033// Get: Retrieves an order return from your Merchant Center account. 19034// 19035// - merchantId: The ID of the account that manages the order. This 19036// cannot be a multi-client account. 19037// - returnId: Merchant order return ID generated by Google. 19038func (r *OrderreturnsService) Get(merchantId uint64, returnId string) *OrderreturnsGetCall { 19039 c := &OrderreturnsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19040 c.merchantId = merchantId 19041 c.returnId = returnId 19042 return c 19043} 19044 19045// Fields allows partial responses to be retrieved. See 19046// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19047// for more information. 19048func (c *OrderreturnsGetCall) Fields(s ...googleapi.Field) *OrderreturnsGetCall { 19049 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19050 return c 19051} 19052 19053// IfNoneMatch sets the optional parameter which makes the operation 19054// fail if the object's ETag matches the given value. This is useful for 19055// getting updates only after the object has changed since the last 19056// request. Use googleapi.IsNotModified to check whether the response 19057// error from Do is the result of In-None-Match. 19058func (c *OrderreturnsGetCall) IfNoneMatch(entityTag string) *OrderreturnsGetCall { 19059 c.ifNoneMatch_ = entityTag 19060 return c 19061} 19062 19063// Context sets the context to be used in this call's Do method. Any 19064// pending HTTP request will be aborted if the provided context is 19065// canceled. 19066func (c *OrderreturnsGetCall) Context(ctx context.Context) *OrderreturnsGetCall { 19067 c.ctx_ = ctx 19068 return c 19069} 19070 19071// Header returns an http.Header that can be modified by the caller to 19072// add HTTP headers to the request. 19073func (c *OrderreturnsGetCall) Header() http.Header { 19074 if c.header_ == nil { 19075 c.header_ = make(http.Header) 19076 } 19077 return c.header_ 19078} 19079 19080func (c *OrderreturnsGetCall) doRequest(alt string) (*http.Response, error) { 19081 reqHeaders := make(http.Header) 19082 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 19083 for k, v := range c.header_ { 19084 reqHeaders[k] = v 19085 } 19086 reqHeaders.Set("User-Agent", c.s.userAgent()) 19087 if c.ifNoneMatch_ != "" { 19088 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19089 } 19090 var body io.Reader = nil 19091 c.urlParams_.Set("alt", alt) 19092 c.urlParams_.Set("prettyPrint", "false") 19093 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}") 19094 urls += "?" + c.urlParams_.Encode() 19095 req, err := http.NewRequest("GET", urls, body) 19096 if err != nil { 19097 return nil, err 19098 } 19099 req.Header = reqHeaders 19100 googleapi.Expand(req.URL, map[string]string{ 19101 "merchantId": strconv.FormatUint(c.merchantId, 10), 19102 "returnId": c.returnId, 19103 }) 19104 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19105} 19106 19107// Do executes the "content.orderreturns.get" call. 19108// Exactly one of *MerchantOrderReturn or error will be non-nil. Any 19109// non-2xx status code is an error. Response headers are in either 19110// *MerchantOrderReturn.ServerResponse.Header or (if a response was 19111// returned at all) in error.(*googleapi.Error).Header. Use 19112// googleapi.IsNotModified to check whether the returned error was 19113// because http.StatusNotModified was returned. 19114func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderReturn, error) { 19115 gensupport.SetOptions(c.urlParams_, opts...) 19116 res, err := c.doRequest("json") 19117 if res != nil && res.StatusCode == http.StatusNotModified { 19118 if res.Body != nil { 19119 res.Body.Close() 19120 } 19121 return nil, &googleapi.Error{ 19122 Code: res.StatusCode, 19123 Header: res.Header, 19124 } 19125 } 19126 if err != nil { 19127 return nil, err 19128 } 19129 defer googleapi.CloseBody(res) 19130 if err := googleapi.CheckResponse(res); err != nil { 19131 return nil, err 19132 } 19133 ret := &MerchantOrderReturn{ 19134 ServerResponse: googleapi.ServerResponse{ 19135 Header: res.Header, 19136 HTTPStatusCode: res.StatusCode, 19137 }, 19138 } 19139 target := &ret 19140 if err := gensupport.DecodeResponse(target, res); err != nil { 19141 return nil, err 19142 } 19143 return ret, nil 19144 // { 19145 // "description": "Retrieves an order return from your Merchant Center account.", 19146 // "flatPath": "{merchantId}/orderreturns/{returnId}", 19147 // "httpMethod": "GET", 19148 // "id": "content.orderreturns.get", 19149 // "parameterOrder": [ 19150 // "merchantId", 19151 // "returnId" 19152 // ], 19153 // "parameters": { 19154 // "merchantId": { 19155 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19156 // "format": "uint64", 19157 // "location": "path", 19158 // "required": true, 19159 // "type": "string" 19160 // }, 19161 // "returnId": { 19162 // "description": "Merchant order return ID generated by Google.", 19163 // "location": "path", 19164 // "required": true, 19165 // "type": "string" 19166 // } 19167 // }, 19168 // "path": "{merchantId}/orderreturns/{returnId}", 19169 // "response": { 19170 // "$ref": "MerchantOrderReturn" 19171 // }, 19172 // "scopes": [ 19173 // "https://www.googleapis.com/auth/content" 19174 // ] 19175 // } 19176 19177} 19178 19179// method id "content.orderreturns.list": 19180 19181type OrderreturnsListCall struct { 19182 s *APIService 19183 merchantId uint64 19184 urlParams_ gensupport.URLParams 19185 ifNoneMatch_ string 19186 ctx_ context.Context 19187 header_ http.Header 19188} 19189 19190// List: Lists order returns in your Merchant Center account. 19191// 19192// - merchantId: The ID of the account that manages the order. This 19193// cannot be a multi-client account. 19194func (r *OrderreturnsService) List(merchantId uint64) *OrderreturnsListCall { 19195 c := &OrderreturnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19196 c.merchantId = merchantId 19197 return c 19198} 19199 19200// CreatedEndDate sets the optional parameter "createdEndDate": Obtains 19201// order returns created before this date (inclusively), in ISO 8601 19202// format. 19203func (c *OrderreturnsListCall) CreatedEndDate(createdEndDate string) *OrderreturnsListCall { 19204 c.urlParams_.Set("createdEndDate", createdEndDate) 19205 return c 19206} 19207 19208// CreatedStartDate sets the optional parameter "createdStartDate": 19209// Obtains order returns created after this date (inclusively), in ISO 19210// 8601 format. 19211func (c *OrderreturnsListCall) CreatedStartDate(createdStartDate string) *OrderreturnsListCall { 19212 c.urlParams_.Set("createdStartDate", createdStartDate) 19213 return c 19214} 19215 19216// MaxResults sets the optional parameter "maxResults": The maximum 19217// number of order returns to return in the response, used for paging. 19218// The default value is 25 returns per page, and the maximum allowed 19219// value is 250 returns per page. 19220func (c *OrderreturnsListCall) MaxResults(maxResults int64) *OrderreturnsListCall { 19221 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 19222 return c 19223} 19224 19225// OrderBy sets the optional parameter "orderBy": Return the results in 19226// the specified order. 19227// 19228// Possible values: 19229// "RETURN_CREATION_TIME_DESC" 19230// "RETURN_CREATION_TIME_ASC" 19231func (c *OrderreturnsListCall) OrderBy(orderBy string) *OrderreturnsListCall { 19232 c.urlParams_.Set("orderBy", orderBy) 19233 return c 19234} 19235 19236// PageToken sets the optional parameter "pageToken": The token returned 19237// by the previous request. 19238func (c *OrderreturnsListCall) PageToken(pageToken string) *OrderreturnsListCall { 19239 c.urlParams_.Set("pageToken", pageToken) 19240 return c 19241} 19242 19243// Fields allows partial responses to be retrieved. See 19244// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19245// for more information. 19246func (c *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCall { 19247 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19248 return c 19249} 19250 19251// IfNoneMatch sets the optional parameter which makes the operation 19252// fail if the object's ETag matches the given value. This is useful for 19253// getting updates only after the object has changed since the last 19254// request. Use googleapi.IsNotModified to check whether the response 19255// error from Do is the result of In-None-Match. 19256func (c *OrderreturnsListCall) IfNoneMatch(entityTag string) *OrderreturnsListCall { 19257 c.ifNoneMatch_ = entityTag 19258 return c 19259} 19260 19261// Context sets the context to be used in this call's Do method. Any 19262// pending HTTP request will be aborted if the provided context is 19263// canceled. 19264func (c *OrderreturnsListCall) Context(ctx context.Context) *OrderreturnsListCall { 19265 c.ctx_ = ctx 19266 return c 19267} 19268 19269// Header returns an http.Header that can be modified by the caller to 19270// add HTTP headers to the request. 19271func (c *OrderreturnsListCall) Header() http.Header { 19272 if c.header_ == nil { 19273 c.header_ = make(http.Header) 19274 } 19275 return c.header_ 19276} 19277 19278func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { 19279 reqHeaders := make(http.Header) 19280 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 19281 for k, v := range c.header_ { 19282 reqHeaders[k] = v 19283 } 19284 reqHeaders.Set("User-Agent", c.s.userAgent()) 19285 if c.ifNoneMatch_ != "" { 19286 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19287 } 19288 var body io.Reader = nil 19289 c.urlParams_.Set("alt", alt) 19290 c.urlParams_.Set("prettyPrint", "false") 19291 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns") 19292 urls += "?" + c.urlParams_.Encode() 19293 req, err := http.NewRequest("GET", urls, body) 19294 if err != nil { 19295 return nil, err 19296 } 19297 req.Header = reqHeaders 19298 googleapi.Expand(req.URL, map[string]string{ 19299 "merchantId": strconv.FormatUint(c.merchantId, 10), 19300 }) 19301 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19302} 19303 19304// Do executes the "content.orderreturns.list" call. 19305// Exactly one of *OrderreturnsListResponse or error will be non-nil. 19306// Any non-2xx status code is an error. Response headers are in either 19307// *OrderreturnsListResponse.ServerResponse.Header or (if a response was 19308// returned at all) in error.(*googleapi.Error).Header. Use 19309// googleapi.IsNotModified to check whether the returned error was 19310// because http.StatusNotModified was returned. 19311func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsListResponse, error) { 19312 gensupport.SetOptions(c.urlParams_, opts...) 19313 res, err := c.doRequest("json") 19314 if res != nil && res.StatusCode == http.StatusNotModified { 19315 if res.Body != nil { 19316 res.Body.Close() 19317 } 19318 return nil, &googleapi.Error{ 19319 Code: res.StatusCode, 19320 Header: res.Header, 19321 } 19322 } 19323 if err != nil { 19324 return nil, err 19325 } 19326 defer googleapi.CloseBody(res) 19327 if err := googleapi.CheckResponse(res); err != nil { 19328 return nil, err 19329 } 19330 ret := &OrderreturnsListResponse{ 19331 ServerResponse: googleapi.ServerResponse{ 19332 Header: res.Header, 19333 HTTPStatusCode: res.StatusCode, 19334 }, 19335 } 19336 target := &ret 19337 if err := gensupport.DecodeResponse(target, res); err != nil { 19338 return nil, err 19339 } 19340 return ret, nil 19341 // { 19342 // "description": "Lists order returns in your Merchant Center account.", 19343 // "flatPath": "{merchantId}/orderreturns", 19344 // "httpMethod": "GET", 19345 // "id": "content.orderreturns.list", 19346 // "parameterOrder": [ 19347 // "merchantId" 19348 // ], 19349 // "parameters": { 19350 // "createdEndDate": { 19351 // "description": "Obtains order returns created before this date (inclusively), in ISO 8601 format.", 19352 // "location": "query", 19353 // "type": "string" 19354 // }, 19355 // "createdStartDate": { 19356 // "description": "Obtains order returns created after this date (inclusively), in ISO 8601 format.", 19357 // "location": "query", 19358 // "type": "string" 19359 // }, 19360 // "maxResults": { 19361 // "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.", 19362 // "format": "uint32", 19363 // "location": "query", 19364 // "type": "integer" 19365 // }, 19366 // "merchantId": { 19367 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19368 // "format": "uint64", 19369 // "location": "path", 19370 // "required": true, 19371 // "type": "string" 19372 // }, 19373 // "orderBy": { 19374 // "description": "Return the results in the specified order.", 19375 // "enum": [ 19376 // "RETURN_CREATION_TIME_DESC", 19377 // "RETURN_CREATION_TIME_ASC" 19378 // ], 19379 // "enumDescriptions": [ 19380 // "", 19381 // "" 19382 // ], 19383 // "location": "query", 19384 // "type": "string" 19385 // }, 19386 // "pageToken": { 19387 // "description": "The token returned by the previous request.", 19388 // "location": "query", 19389 // "type": "string" 19390 // } 19391 // }, 19392 // "path": "{merchantId}/orderreturns", 19393 // "response": { 19394 // "$ref": "OrderreturnsListResponse" 19395 // }, 19396 // "scopes": [ 19397 // "https://www.googleapis.com/auth/content" 19398 // ] 19399 // } 19400 19401} 19402 19403// Pages invokes f for each page of results. 19404// A non-nil error returned from f will halt the iteration. 19405// The provided context supersedes any context provided to the Context method. 19406func (c *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsListResponse) error) error { 19407 c.ctx_ = ctx 19408 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19409 for { 19410 x, err := c.Do() 19411 if err != nil { 19412 return err 19413 } 19414 if err := f(x); err != nil { 19415 return err 19416 } 19417 if x.NextPageToken == "" { 19418 return nil 19419 } 19420 c.PageToken(x.NextPageToken) 19421 } 19422} 19423 19424// method id "content.orders.acknowledge": 19425 19426type OrdersAcknowledgeCall struct { 19427 s *APIService 19428 merchantId uint64 19429 orderId string 19430 ordersacknowledgerequest *OrdersAcknowledgeRequest 19431 urlParams_ gensupport.URLParams 19432 ctx_ context.Context 19433 header_ http.Header 19434} 19435 19436// Acknowledge: Marks an order as acknowledged. 19437// 19438// - merchantId: The ID of the account that manages the order. This 19439// cannot be a multi-client account. 19440// - orderId: The ID of the order. 19441func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall { 19442 c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19443 c.merchantId = merchantId 19444 c.orderId = orderId 19445 c.ordersacknowledgerequest = ordersacknowledgerequest 19446 return c 19447} 19448 19449// Fields allows partial responses to be retrieved. See 19450// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19451// for more information. 19452func (c *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall { 19453 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19454 return c 19455} 19456 19457// Context sets the context to be used in this call's Do method. Any 19458// pending HTTP request will be aborted if the provided context is 19459// canceled. 19460func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall { 19461 c.ctx_ = ctx 19462 return c 19463} 19464 19465// Header returns an http.Header that can be modified by the caller to 19466// add HTTP headers to the request. 19467func (c *OrdersAcknowledgeCall) Header() http.Header { 19468 if c.header_ == nil { 19469 c.header_ = make(http.Header) 19470 } 19471 return c.header_ 19472} 19473 19474func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) { 19475 reqHeaders := make(http.Header) 19476 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 19477 for k, v := range c.header_ { 19478 reqHeaders[k] = v 19479 } 19480 reqHeaders.Set("User-Agent", c.s.userAgent()) 19481 var body io.Reader = nil 19482 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest) 19483 if err != nil { 19484 return nil, err 19485 } 19486 reqHeaders.Set("Content-Type", "application/json") 19487 c.urlParams_.Set("alt", alt) 19488 c.urlParams_.Set("prettyPrint", "false") 19489 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge") 19490 urls += "?" + c.urlParams_.Encode() 19491 req, err := http.NewRequest("POST", urls, body) 19492 if err != nil { 19493 return nil, err 19494 } 19495 req.Header = reqHeaders 19496 googleapi.Expand(req.URL, map[string]string{ 19497 "merchantId": strconv.FormatUint(c.merchantId, 10), 19498 "orderId": c.orderId, 19499 }) 19500 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19501} 19502 19503// Do executes the "content.orders.acknowledge" call. 19504// Exactly one of *OrdersAcknowledgeResponse or error will be non-nil. 19505// Any non-2xx status code is an error. Response headers are in either 19506// *OrdersAcknowledgeResponse.ServerResponse.Header or (if a response 19507// was returned at all) in error.(*googleapi.Error).Header. Use 19508// googleapi.IsNotModified to check whether the returned error was 19509// because http.StatusNotModified was returned. 19510func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) { 19511 gensupport.SetOptions(c.urlParams_, opts...) 19512 res, err := c.doRequest("json") 19513 if res != nil && res.StatusCode == http.StatusNotModified { 19514 if res.Body != nil { 19515 res.Body.Close() 19516 } 19517 return nil, &googleapi.Error{ 19518 Code: res.StatusCode, 19519 Header: res.Header, 19520 } 19521 } 19522 if err != nil { 19523 return nil, err 19524 } 19525 defer googleapi.CloseBody(res) 19526 if err := googleapi.CheckResponse(res); err != nil { 19527 return nil, err 19528 } 19529 ret := &OrdersAcknowledgeResponse{ 19530 ServerResponse: googleapi.ServerResponse{ 19531 Header: res.Header, 19532 HTTPStatusCode: res.StatusCode, 19533 }, 19534 } 19535 target := &ret 19536 if err := gensupport.DecodeResponse(target, res); err != nil { 19537 return nil, err 19538 } 19539 return ret, nil 19540 // { 19541 // "description": "Marks an order as acknowledged.", 19542 // "flatPath": "{merchantId}/orders/{orderId}/acknowledge", 19543 // "httpMethod": "POST", 19544 // "id": "content.orders.acknowledge", 19545 // "parameterOrder": [ 19546 // "merchantId", 19547 // "orderId" 19548 // ], 19549 // "parameters": { 19550 // "merchantId": { 19551 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19552 // "format": "uint64", 19553 // "location": "path", 19554 // "required": true, 19555 // "type": "string" 19556 // }, 19557 // "orderId": { 19558 // "description": "The ID of the order.", 19559 // "location": "path", 19560 // "required": true, 19561 // "type": "string" 19562 // } 19563 // }, 19564 // "path": "{merchantId}/orders/{orderId}/acknowledge", 19565 // "request": { 19566 // "$ref": "OrdersAcknowledgeRequest" 19567 // }, 19568 // "response": { 19569 // "$ref": "OrdersAcknowledgeResponse" 19570 // }, 19571 // "scopes": [ 19572 // "https://www.googleapis.com/auth/content" 19573 // ] 19574 // } 19575 19576} 19577 19578// method id "content.orders.advancetestorder": 19579 19580type OrdersAdvancetestorderCall struct { 19581 s *APIService 19582 merchantId uint64 19583 orderId string 19584 urlParams_ gensupport.URLParams 19585 ctx_ context.Context 19586 header_ http.Header 19587} 19588 19589// Advancetestorder: Sandbox only. Moves a test order from state 19590// "inProgress" to state "pendingShipment". 19591// 19592// - merchantId: The ID of the account that manages the order. This 19593// cannot be a multi-client account. 19594// - orderId: The ID of the test order to modify. 19595func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall { 19596 c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19597 c.merchantId = merchantId 19598 c.orderId = orderId 19599 return c 19600} 19601 19602// Fields allows partial responses to be retrieved. See 19603// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19604// for more information. 19605func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall { 19606 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19607 return c 19608} 19609 19610// Context sets the context to be used in this call's Do method. Any 19611// pending HTTP request will be aborted if the provided context is 19612// canceled. 19613func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall { 19614 c.ctx_ = ctx 19615 return c 19616} 19617 19618// Header returns an http.Header that can be modified by the caller to 19619// add HTTP headers to the request. 19620func (c *OrdersAdvancetestorderCall) Header() http.Header { 19621 if c.header_ == nil { 19622 c.header_ = make(http.Header) 19623 } 19624 return c.header_ 19625} 19626 19627func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) { 19628 reqHeaders := make(http.Header) 19629 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 19630 for k, v := range c.header_ { 19631 reqHeaders[k] = v 19632 } 19633 reqHeaders.Set("User-Agent", c.s.userAgent()) 19634 var body io.Reader = nil 19635 c.urlParams_.Set("alt", alt) 19636 c.urlParams_.Set("prettyPrint", "false") 19637 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance") 19638 urls += "?" + c.urlParams_.Encode() 19639 req, err := http.NewRequest("POST", urls, body) 19640 if err != nil { 19641 return nil, err 19642 } 19643 req.Header = reqHeaders 19644 googleapi.Expand(req.URL, map[string]string{ 19645 "merchantId": strconv.FormatUint(c.merchantId, 10), 19646 "orderId": c.orderId, 19647 }) 19648 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19649} 19650 19651// Do executes the "content.orders.advancetestorder" call. 19652// Exactly one of *OrdersAdvanceTestOrderResponse or error will be 19653// non-nil. Any non-2xx status code is an error. Response headers are in 19654// either *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a 19655// response was returned at all) in error.(*googleapi.Error).Header. Use 19656// googleapi.IsNotModified to check whether the returned error was 19657// because http.StatusNotModified was returned. 19658func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) { 19659 gensupport.SetOptions(c.urlParams_, opts...) 19660 res, err := c.doRequest("json") 19661 if res != nil && res.StatusCode == http.StatusNotModified { 19662 if res.Body != nil { 19663 res.Body.Close() 19664 } 19665 return nil, &googleapi.Error{ 19666 Code: res.StatusCode, 19667 Header: res.Header, 19668 } 19669 } 19670 if err != nil { 19671 return nil, err 19672 } 19673 defer googleapi.CloseBody(res) 19674 if err := googleapi.CheckResponse(res); err != nil { 19675 return nil, err 19676 } 19677 ret := &OrdersAdvanceTestOrderResponse{ 19678 ServerResponse: googleapi.ServerResponse{ 19679 Header: res.Header, 19680 HTTPStatusCode: res.StatusCode, 19681 }, 19682 } 19683 target := &ret 19684 if err := gensupport.DecodeResponse(target, res); err != nil { 19685 return nil, err 19686 } 19687 return ret, nil 19688 // { 19689 // "description": "Sandbox only. Moves a test order from state \"`inProgress`\" to state \"`pendingShipment`\".", 19690 // "flatPath": "{merchantId}/testorders/{orderId}/advance", 19691 // "httpMethod": "POST", 19692 // "id": "content.orders.advancetestorder", 19693 // "parameterOrder": [ 19694 // "merchantId", 19695 // "orderId" 19696 // ], 19697 // "parameters": { 19698 // "merchantId": { 19699 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19700 // "format": "uint64", 19701 // "location": "path", 19702 // "required": true, 19703 // "type": "string" 19704 // }, 19705 // "orderId": { 19706 // "description": "The ID of the test order to modify.", 19707 // "location": "path", 19708 // "required": true, 19709 // "type": "string" 19710 // } 19711 // }, 19712 // "path": "{merchantId}/testorders/{orderId}/advance", 19713 // "response": { 19714 // "$ref": "OrdersAdvanceTestOrderResponse" 19715 // }, 19716 // "scopes": [ 19717 // "https://www.googleapis.com/auth/content" 19718 // ] 19719 // } 19720 19721} 19722 19723// method id "content.orders.cancel": 19724 19725type OrdersCancelCall struct { 19726 s *APIService 19727 merchantId uint64 19728 orderId string 19729 orderscancelrequest *OrdersCancelRequest 19730 urlParams_ gensupport.URLParams 19731 ctx_ context.Context 19732 header_ http.Header 19733} 19734 19735// Cancel: Cancels all line items in an order, making a full refund. 19736// 19737// - merchantId: The ID of the account that manages the order. This 19738// cannot be a multi-client account. 19739// - orderId: The ID of the order to cancel. 19740func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall { 19741 c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19742 c.merchantId = merchantId 19743 c.orderId = orderId 19744 c.orderscancelrequest = orderscancelrequest 19745 return c 19746} 19747 19748// Fields allows partial responses to be retrieved. See 19749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19750// for more information. 19751func (c *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall { 19752 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19753 return c 19754} 19755 19756// Context sets the context to be used in this call's Do method. Any 19757// pending HTTP request will be aborted if the provided context is 19758// canceled. 19759func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall { 19760 c.ctx_ = ctx 19761 return c 19762} 19763 19764// Header returns an http.Header that can be modified by the caller to 19765// add HTTP headers to the request. 19766func (c *OrdersCancelCall) Header() http.Header { 19767 if c.header_ == nil { 19768 c.header_ = make(http.Header) 19769 } 19770 return c.header_ 19771} 19772 19773func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) { 19774 reqHeaders := make(http.Header) 19775 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 19776 for k, v := range c.header_ { 19777 reqHeaders[k] = v 19778 } 19779 reqHeaders.Set("User-Agent", c.s.userAgent()) 19780 var body io.Reader = nil 19781 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest) 19782 if err != nil { 19783 return nil, err 19784 } 19785 reqHeaders.Set("Content-Type", "application/json") 19786 c.urlParams_.Set("alt", alt) 19787 c.urlParams_.Set("prettyPrint", "false") 19788 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel") 19789 urls += "?" + c.urlParams_.Encode() 19790 req, err := http.NewRequest("POST", urls, body) 19791 if err != nil { 19792 return nil, err 19793 } 19794 req.Header = reqHeaders 19795 googleapi.Expand(req.URL, map[string]string{ 19796 "merchantId": strconv.FormatUint(c.merchantId, 10), 19797 "orderId": c.orderId, 19798 }) 19799 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19800} 19801 19802// Do executes the "content.orders.cancel" call. 19803// Exactly one of *OrdersCancelResponse or error will be non-nil. Any 19804// non-2xx status code is an error. Response headers are in either 19805// *OrdersCancelResponse.ServerResponse.Header or (if a response was 19806// returned at all) in error.(*googleapi.Error).Header. Use 19807// googleapi.IsNotModified to check whether the returned error was 19808// because http.StatusNotModified was returned. 19809func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) { 19810 gensupport.SetOptions(c.urlParams_, opts...) 19811 res, err := c.doRequest("json") 19812 if res != nil && res.StatusCode == http.StatusNotModified { 19813 if res.Body != nil { 19814 res.Body.Close() 19815 } 19816 return nil, &googleapi.Error{ 19817 Code: res.StatusCode, 19818 Header: res.Header, 19819 } 19820 } 19821 if err != nil { 19822 return nil, err 19823 } 19824 defer googleapi.CloseBody(res) 19825 if err := googleapi.CheckResponse(res); err != nil { 19826 return nil, err 19827 } 19828 ret := &OrdersCancelResponse{ 19829 ServerResponse: googleapi.ServerResponse{ 19830 Header: res.Header, 19831 HTTPStatusCode: res.StatusCode, 19832 }, 19833 } 19834 target := &ret 19835 if err := gensupport.DecodeResponse(target, res); err != nil { 19836 return nil, err 19837 } 19838 return ret, nil 19839 // { 19840 // "description": "Cancels all line items in an order, making a full refund.", 19841 // "flatPath": "{merchantId}/orders/{orderId}/cancel", 19842 // "httpMethod": "POST", 19843 // "id": "content.orders.cancel", 19844 // "parameterOrder": [ 19845 // "merchantId", 19846 // "orderId" 19847 // ], 19848 // "parameters": { 19849 // "merchantId": { 19850 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 19851 // "format": "uint64", 19852 // "location": "path", 19853 // "required": true, 19854 // "type": "string" 19855 // }, 19856 // "orderId": { 19857 // "description": "The ID of the order to cancel.", 19858 // "location": "path", 19859 // "required": true, 19860 // "type": "string" 19861 // } 19862 // }, 19863 // "path": "{merchantId}/orders/{orderId}/cancel", 19864 // "request": { 19865 // "$ref": "OrdersCancelRequest" 19866 // }, 19867 // "response": { 19868 // "$ref": "OrdersCancelResponse" 19869 // }, 19870 // "scopes": [ 19871 // "https://www.googleapis.com/auth/content" 19872 // ] 19873 // } 19874 19875} 19876 19877// method id "content.orders.cancellineitem": 19878 19879type OrdersCancellineitemCall struct { 19880 s *APIService 19881 merchantId uint64 19882 orderId string 19883 orderscancellineitemrequest *OrdersCancelLineItemRequest 19884 urlParams_ gensupport.URLParams 19885 ctx_ context.Context 19886 header_ http.Header 19887} 19888 19889// Cancellineitem: Cancels a line item, making a full refund. 19890// 19891// - merchantId: The ID of the account that manages the order. This 19892// cannot be a multi-client account. 19893// - orderId: The ID of the order. 19894func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall { 19895 c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19896 c.merchantId = merchantId 19897 c.orderId = orderId 19898 c.orderscancellineitemrequest = orderscancellineitemrequest 19899 return c 19900} 19901 19902// Fields allows partial responses to be retrieved. See 19903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19904// for more information. 19905func (c *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall { 19906 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19907 return c 19908} 19909 19910// Context sets the context to be used in this call's Do method. Any 19911// pending HTTP request will be aborted if the provided context is 19912// canceled. 19913func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall { 19914 c.ctx_ = ctx 19915 return c 19916} 19917 19918// Header returns an http.Header that can be modified by the caller to 19919// add HTTP headers to the request. 19920func (c *OrdersCancellineitemCall) Header() http.Header { 19921 if c.header_ == nil { 19922 c.header_ = make(http.Header) 19923 } 19924 return c.header_ 19925} 19926 19927func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) { 19928 reqHeaders := make(http.Header) 19929 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 19930 for k, v := range c.header_ { 19931 reqHeaders[k] = v 19932 } 19933 reqHeaders.Set("User-Agent", c.s.userAgent()) 19934 var body io.Reader = nil 19935 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest) 19936 if err != nil { 19937 return nil, err 19938 } 19939 reqHeaders.Set("Content-Type", "application/json") 19940 c.urlParams_.Set("alt", alt) 19941 c.urlParams_.Set("prettyPrint", "false") 19942 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem") 19943 urls += "?" + c.urlParams_.Encode() 19944 req, err := http.NewRequest("POST", urls, body) 19945 if err != nil { 19946 return nil, err 19947 } 19948 req.Header = reqHeaders 19949 googleapi.Expand(req.URL, map[string]string{ 19950 "merchantId": strconv.FormatUint(c.merchantId, 10), 19951 "orderId": c.orderId, 19952 }) 19953 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19954} 19955 19956// Do executes the "content.orders.cancellineitem" call. 19957// Exactly one of *OrdersCancelLineItemResponse or error will be 19958// non-nil. Any non-2xx status code is an error. Response headers are in 19959// either *OrdersCancelLineItemResponse.ServerResponse.Header or (if a 19960// response was returned at all) in error.(*googleapi.Error).Header. Use 19961// googleapi.IsNotModified to check whether the returned error was 19962// because http.StatusNotModified was returned. 19963func (c *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) { 19964 gensupport.SetOptions(c.urlParams_, opts...) 19965 res, err := c.doRequest("json") 19966 if res != nil && res.StatusCode == http.StatusNotModified { 19967 if res.Body != nil { 19968 res.Body.Close() 19969 } 19970 return nil, &googleapi.Error{ 19971 Code: res.StatusCode, 19972 Header: res.Header, 19973 } 19974 } 19975 if err != nil { 19976 return nil, err 19977 } 19978 defer googleapi.CloseBody(res) 19979 if err := googleapi.CheckResponse(res); err != nil { 19980 return nil, err 19981 } 19982 ret := &OrdersCancelLineItemResponse{ 19983 ServerResponse: googleapi.ServerResponse{ 19984 Header: res.Header, 19985 HTTPStatusCode: res.StatusCode, 19986 }, 19987 } 19988 target := &ret 19989 if err := gensupport.DecodeResponse(target, res); err != nil { 19990 return nil, err 19991 } 19992 return ret, nil 19993 // { 19994 // "description": "Cancels a line item, making a full refund.", 19995 // "flatPath": "{merchantId}/orders/{orderId}/cancelLineItem", 19996 // "httpMethod": "POST", 19997 // "id": "content.orders.cancellineitem", 19998 // "parameterOrder": [ 19999 // "merchantId", 20000 // "orderId" 20001 // ], 20002 // "parameters": { 20003 // "merchantId": { 20004 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20005 // "format": "uint64", 20006 // "location": "path", 20007 // "required": true, 20008 // "type": "string" 20009 // }, 20010 // "orderId": { 20011 // "description": "The ID of the order.", 20012 // "location": "path", 20013 // "required": true, 20014 // "type": "string" 20015 // } 20016 // }, 20017 // "path": "{merchantId}/orders/{orderId}/cancelLineItem", 20018 // "request": { 20019 // "$ref": "OrdersCancelLineItemRequest" 20020 // }, 20021 // "response": { 20022 // "$ref": "OrdersCancelLineItemResponse" 20023 // }, 20024 // "scopes": [ 20025 // "https://www.googleapis.com/auth/content" 20026 // ] 20027 // } 20028 20029} 20030 20031// method id "content.orders.canceltestorderbycustomer": 20032 20033type OrdersCanceltestorderbycustomerCall struct { 20034 s *APIService 20035 merchantId uint64 20036 orderId string 20037 orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest 20038 urlParams_ gensupport.URLParams 20039 ctx_ context.Context 20040 header_ http.Header 20041} 20042 20043// Canceltestorderbycustomer: Sandbox only. Cancels a test order for 20044// customer-initiated cancellation. 20045// 20046// - merchantId: The ID of the account that manages the order. This 20047// cannot be a multi-client account. 20048// - orderId: The ID of the test order to cancel. 20049func (r *OrdersService) Canceltestorderbycustomer(merchantId uint64, orderId string, orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest) *OrdersCanceltestorderbycustomerCall { 20050 c := &OrdersCanceltestorderbycustomerCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20051 c.merchantId = merchantId 20052 c.orderId = orderId 20053 c.orderscanceltestorderbycustomerrequest = orderscanceltestorderbycustomerrequest 20054 return c 20055} 20056 20057// Fields allows partial responses to be retrieved. See 20058// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20059// for more information. 20060func (c *OrdersCanceltestorderbycustomerCall) Fields(s ...googleapi.Field) *OrdersCanceltestorderbycustomerCall { 20061 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20062 return c 20063} 20064 20065// Context sets the context to be used in this call's Do method. Any 20066// pending HTTP request will be aborted if the provided context is 20067// canceled. 20068func (c *OrdersCanceltestorderbycustomerCall) Context(ctx context.Context) *OrdersCanceltestorderbycustomerCall { 20069 c.ctx_ = ctx 20070 return c 20071} 20072 20073// Header returns an http.Header that can be modified by the caller to 20074// add HTTP headers to the request. 20075func (c *OrdersCanceltestorderbycustomerCall) Header() http.Header { 20076 if c.header_ == nil { 20077 c.header_ = make(http.Header) 20078 } 20079 return c.header_ 20080} 20081 20082func (c *OrdersCanceltestorderbycustomerCall) doRequest(alt string) (*http.Response, error) { 20083 reqHeaders := make(http.Header) 20084 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 20085 for k, v := range c.header_ { 20086 reqHeaders[k] = v 20087 } 20088 reqHeaders.Set("User-Agent", c.s.userAgent()) 20089 var body io.Reader = nil 20090 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscanceltestorderbycustomerrequest) 20091 if err != nil { 20092 return nil, err 20093 } 20094 reqHeaders.Set("Content-Type", "application/json") 20095 c.urlParams_.Set("alt", alt) 20096 c.urlParams_.Set("prettyPrint", "false") 20097 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/cancelByCustomer") 20098 urls += "?" + c.urlParams_.Encode() 20099 req, err := http.NewRequest("POST", urls, body) 20100 if err != nil { 20101 return nil, err 20102 } 20103 req.Header = reqHeaders 20104 googleapi.Expand(req.URL, map[string]string{ 20105 "merchantId": strconv.FormatUint(c.merchantId, 10), 20106 "orderId": c.orderId, 20107 }) 20108 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20109} 20110 20111// Do executes the "content.orders.canceltestorderbycustomer" call. 20112// Exactly one of *OrdersCancelTestOrderByCustomerResponse or error will 20113// be non-nil. Any non-2xx status code is an error. Response headers are 20114// in either 20115// *OrdersCancelTestOrderByCustomerResponse.ServerResponse.Header or (if 20116// a response was returned at all) in error.(*googleapi.Error).Header. 20117// Use googleapi.IsNotModified to check whether the returned error was 20118// because http.StatusNotModified was returned. 20119func (c *OrdersCanceltestorderbycustomerCall) Do(opts ...googleapi.CallOption) (*OrdersCancelTestOrderByCustomerResponse, error) { 20120 gensupport.SetOptions(c.urlParams_, opts...) 20121 res, err := c.doRequest("json") 20122 if res != nil && res.StatusCode == http.StatusNotModified { 20123 if res.Body != nil { 20124 res.Body.Close() 20125 } 20126 return nil, &googleapi.Error{ 20127 Code: res.StatusCode, 20128 Header: res.Header, 20129 } 20130 } 20131 if err != nil { 20132 return nil, err 20133 } 20134 defer googleapi.CloseBody(res) 20135 if err := googleapi.CheckResponse(res); err != nil { 20136 return nil, err 20137 } 20138 ret := &OrdersCancelTestOrderByCustomerResponse{ 20139 ServerResponse: googleapi.ServerResponse{ 20140 Header: res.Header, 20141 HTTPStatusCode: res.StatusCode, 20142 }, 20143 } 20144 target := &ret 20145 if err := gensupport.DecodeResponse(target, res); err != nil { 20146 return nil, err 20147 } 20148 return ret, nil 20149 // { 20150 // "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.", 20151 // "flatPath": "{merchantId}/testorders/{orderId}/cancelByCustomer", 20152 // "httpMethod": "POST", 20153 // "id": "content.orders.canceltestorderbycustomer", 20154 // "parameterOrder": [ 20155 // "merchantId", 20156 // "orderId" 20157 // ], 20158 // "parameters": { 20159 // "merchantId": { 20160 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20161 // "format": "uint64", 20162 // "location": "path", 20163 // "required": true, 20164 // "type": "string" 20165 // }, 20166 // "orderId": { 20167 // "description": "The ID of the test order to cancel.", 20168 // "location": "path", 20169 // "required": true, 20170 // "type": "string" 20171 // } 20172 // }, 20173 // "path": "{merchantId}/testorders/{orderId}/cancelByCustomer", 20174 // "request": { 20175 // "$ref": "OrdersCancelTestOrderByCustomerRequest" 20176 // }, 20177 // "response": { 20178 // "$ref": "OrdersCancelTestOrderByCustomerResponse" 20179 // }, 20180 // "scopes": [ 20181 // "https://www.googleapis.com/auth/content" 20182 // ] 20183 // } 20184 20185} 20186 20187// method id "content.orders.createtestorder": 20188 20189type OrdersCreatetestorderCall struct { 20190 s *APIService 20191 merchantId uint64 20192 orderscreatetestorderrequest *OrdersCreateTestOrderRequest 20193 urlParams_ gensupport.URLParams 20194 ctx_ context.Context 20195 header_ http.Header 20196} 20197 20198// Createtestorder: Sandbox only. Creates a test order. 20199// 20200// - merchantId: The ID of the account that should manage the order. 20201// This cannot be a multi-client account. 20202func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall { 20203 c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20204 c.merchantId = merchantId 20205 c.orderscreatetestorderrequest = orderscreatetestorderrequest 20206 return c 20207} 20208 20209// Fields allows partial responses to be retrieved. See 20210// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20211// for more information. 20212func (c *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall { 20213 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20214 return c 20215} 20216 20217// Context sets the context to be used in this call's Do method. Any 20218// pending HTTP request will be aborted if the provided context is 20219// canceled. 20220func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall { 20221 c.ctx_ = ctx 20222 return c 20223} 20224 20225// Header returns an http.Header that can be modified by the caller to 20226// add HTTP headers to the request. 20227func (c *OrdersCreatetestorderCall) Header() http.Header { 20228 if c.header_ == nil { 20229 c.header_ = make(http.Header) 20230 } 20231 return c.header_ 20232} 20233 20234func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) { 20235 reqHeaders := make(http.Header) 20236 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 20237 for k, v := range c.header_ { 20238 reqHeaders[k] = v 20239 } 20240 reqHeaders.Set("User-Agent", c.s.userAgent()) 20241 var body io.Reader = nil 20242 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest) 20243 if err != nil { 20244 return nil, err 20245 } 20246 reqHeaders.Set("Content-Type", "application/json") 20247 c.urlParams_.Set("alt", alt) 20248 c.urlParams_.Set("prettyPrint", "false") 20249 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders") 20250 urls += "?" + c.urlParams_.Encode() 20251 req, err := http.NewRequest("POST", urls, body) 20252 if err != nil { 20253 return nil, err 20254 } 20255 req.Header = reqHeaders 20256 googleapi.Expand(req.URL, map[string]string{ 20257 "merchantId": strconv.FormatUint(c.merchantId, 10), 20258 }) 20259 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20260} 20261 20262// Do executes the "content.orders.createtestorder" call. 20263// Exactly one of *OrdersCreateTestOrderResponse or error will be 20264// non-nil. Any non-2xx status code is an error. Response headers are in 20265// either *OrdersCreateTestOrderResponse.ServerResponse.Header or (if a 20266// response was returned at all) in error.(*googleapi.Error).Header. Use 20267// googleapi.IsNotModified to check whether the returned error was 20268// because http.StatusNotModified was returned. 20269func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) { 20270 gensupport.SetOptions(c.urlParams_, opts...) 20271 res, err := c.doRequest("json") 20272 if res != nil && res.StatusCode == http.StatusNotModified { 20273 if res.Body != nil { 20274 res.Body.Close() 20275 } 20276 return nil, &googleapi.Error{ 20277 Code: res.StatusCode, 20278 Header: res.Header, 20279 } 20280 } 20281 if err != nil { 20282 return nil, err 20283 } 20284 defer googleapi.CloseBody(res) 20285 if err := googleapi.CheckResponse(res); err != nil { 20286 return nil, err 20287 } 20288 ret := &OrdersCreateTestOrderResponse{ 20289 ServerResponse: googleapi.ServerResponse{ 20290 Header: res.Header, 20291 HTTPStatusCode: res.StatusCode, 20292 }, 20293 } 20294 target := &ret 20295 if err := gensupport.DecodeResponse(target, res); err != nil { 20296 return nil, err 20297 } 20298 return ret, nil 20299 // { 20300 // "description": "Sandbox only. Creates a test order.", 20301 // "flatPath": "{merchantId}/testorders", 20302 // "httpMethod": "POST", 20303 // "id": "content.orders.createtestorder", 20304 // "parameterOrder": [ 20305 // "merchantId" 20306 // ], 20307 // "parameters": { 20308 // "merchantId": { 20309 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 20310 // "format": "uint64", 20311 // "location": "path", 20312 // "required": true, 20313 // "type": "string" 20314 // } 20315 // }, 20316 // "path": "{merchantId}/testorders", 20317 // "request": { 20318 // "$ref": "OrdersCreateTestOrderRequest" 20319 // }, 20320 // "response": { 20321 // "$ref": "OrdersCreateTestOrderResponse" 20322 // }, 20323 // "scopes": [ 20324 // "https://www.googleapis.com/auth/content" 20325 // ] 20326 // } 20327 20328} 20329 20330// method id "content.orders.createtestreturn": 20331 20332type OrdersCreatetestreturnCall struct { 20333 s *APIService 20334 merchantId uint64 20335 orderId string 20336 orderscreatetestreturnrequest *OrdersCreateTestReturnRequest 20337 urlParams_ gensupport.URLParams 20338 ctx_ context.Context 20339 header_ http.Header 20340} 20341 20342// Createtestreturn: Sandbox only. Creates a test return. 20343// 20344// - merchantId: The ID of the account that manages the order. This 20345// cannot be a multi-client account. 20346// - orderId: The ID of the order. 20347func (r *OrdersService) Createtestreturn(merchantId uint64, orderId string, orderscreatetestreturnrequest *OrdersCreateTestReturnRequest) *OrdersCreatetestreturnCall { 20348 c := &OrdersCreatetestreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20349 c.merchantId = merchantId 20350 c.orderId = orderId 20351 c.orderscreatetestreturnrequest = orderscreatetestreturnrequest 20352 return c 20353} 20354 20355// Fields allows partial responses to be retrieved. See 20356// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20357// for more information. 20358func (c *OrdersCreatetestreturnCall) Fields(s ...googleapi.Field) *OrdersCreatetestreturnCall { 20359 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20360 return c 20361} 20362 20363// Context sets the context to be used in this call's Do method. Any 20364// pending HTTP request will be aborted if the provided context is 20365// canceled. 20366func (c *OrdersCreatetestreturnCall) Context(ctx context.Context) *OrdersCreatetestreturnCall { 20367 c.ctx_ = ctx 20368 return c 20369} 20370 20371// Header returns an http.Header that can be modified by the caller to 20372// add HTTP headers to the request. 20373func (c *OrdersCreatetestreturnCall) Header() http.Header { 20374 if c.header_ == nil { 20375 c.header_ = make(http.Header) 20376 } 20377 return c.header_ 20378} 20379 20380func (c *OrdersCreatetestreturnCall) doRequest(alt string) (*http.Response, error) { 20381 reqHeaders := make(http.Header) 20382 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 20383 for k, v := range c.header_ { 20384 reqHeaders[k] = v 20385 } 20386 reqHeaders.Set("User-Agent", c.s.userAgent()) 20387 var body io.Reader = nil 20388 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestreturnrequest) 20389 if err != nil { 20390 return nil, err 20391 } 20392 reqHeaders.Set("Content-Type", "application/json") 20393 c.urlParams_.Set("alt", alt) 20394 c.urlParams_.Set("prettyPrint", "false") 20395 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/testreturn") 20396 urls += "?" + c.urlParams_.Encode() 20397 req, err := http.NewRequest("POST", urls, body) 20398 if err != nil { 20399 return nil, err 20400 } 20401 req.Header = reqHeaders 20402 googleapi.Expand(req.URL, map[string]string{ 20403 "merchantId": strconv.FormatUint(c.merchantId, 10), 20404 "orderId": c.orderId, 20405 }) 20406 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20407} 20408 20409// Do executes the "content.orders.createtestreturn" call. 20410// Exactly one of *OrdersCreateTestReturnResponse or error will be 20411// non-nil. Any non-2xx status code is an error. Response headers are in 20412// either *OrdersCreateTestReturnResponse.ServerResponse.Header or (if a 20413// response was returned at all) in error.(*googleapi.Error).Header. Use 20414// googleapi.IsNotModified to check whether the returned error was 20415// because http.StatusNotModified was returned. 20416func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestReturnResponse, error) { 20417 gensupport.SetOptions(c.urlParams_, opts...) 20418 res, err := c.doRequest("json") 20419 if res != nil && res.StatusCode == http.StatusNotModified { 20420 if res.Body != nil { 20421 res.Body.Close() 20422 } 20423 return nil, &googleapi.Error{ 20424 Code: res.StatusCode, 20425 Header: res.Header, 20426 } 20427 } 20428 if err != nil { 20429 return nil, err 20430 } 20431 defer googleapi.CloseBody(res) 20432 if err := googleapi.CheckResponse(res); err != nil { 20433 return nil, err 20434 } 20435 ret := &OrdersCreateTestReturnResponse{ 20436 ServerResponse: googleapi.ServerResponse{ 20437 Header: res.Header, 20438 HTTPStatusCode: res.StatusCode, 20439 }, 20440 } 20441 target := &ret 20442 if err := gensupport.DecodeResponse(target, res); err != nil { 20443 return nil, err 20444 } 20445 return ret, nil 20446 // { 20447 // "description": "Sandbox only. Creates a test return.", 20448 // "flatPath": "{merchantId}/orders/{orderId}/testreturn", 20449 // "httpMethod": "POST", 20450 // "id": "content.orders.createtestreturn", 20451 // "parameterOrder": [ 20452 // "merchantId", 20453 // "orderId" 20454 // ], 20455 // "parameters": { 20456 // "merchantId": { 20457 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20458 // "format": "uint64", 20459 // "location": "path", 20460 // "required": true, 20461 // "type": "string" 20462 // }, 20463 // "orderId": { 20464 // "description": "The ID of the order.", 20465 // "location": "path", 20466 // "required": true, 20467 // "type": "string" 20468 // } 20469 // }, 20470 // "path": "{merchantId}/orders/{orderId}/testreturn", 20471 // "request": { 20472 // "$ref": "OrdersCreateTestReturnRequest" 20473 // }, 20474 // "response": { 20475 // "$ref": "OrdersCreateTestReturnResponse" 20476 // }, 20477 // "scopes": [ 20478 // "https://www.googleapis.com/auth/content" 20479 // ] 20480 // } 20481 20482} 20483 20484// method id "content.orders.custombatch": 20485 20486type OrdersCustombatchCall struct { 20487 s *APIService 20488 orderscustombatchrequest *OrdersCustomBatchRequest 20489 urlParams_ gensupport.URLParams 20490 ctx_ context.Context 20491 header_ http.Header 20492} 20493 20494// Custombatch: Retrieves or modifies multiple orders in a single 20495// request. 20496func (r *OrdersService) Custombatch(orderscustombatchrequest *OrdersCustomBatchRequest) *OrdersCustombatchCall { 20497 c := &OrdersCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20498 c.orderscustombatchrequest = orderscustombatchrequest 20499 return c 20500} 20501 20502// Fields allows partial responses to be retrieved. See 20503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20504// for more information. 20505func (c *OrdersCustombatchCall) Fields(s ...googleapi.Field) *OrdersCustombatchCall { 20506 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20507 return c 20508} 20509 20510// Context sets the context to be used in this call's Do method. Any 20511// pending HTTP request will be aborted if the provided context is 20512// canceled. 20513func (c *OrdersCustombatchCall) Context(ctx context.Context) *OrdersCustombatchCall { 20514 c.ctx_ = ctx 20515 return c 20516} 20517 20518// Header returns an http.Header that can be modified by the caller to 20519// add HTTP headers to the request. 20520func (c *OrdersCustombatchCall) Header() http.Header { 20521 if c.header_ == nil { 20522 c.header_ = make(http.Header) 20523 } 20524 return c.header_ 20525} 20526 20527func (c *OrdersCustombatchCall) doRequest(alt string) (*http.Response, error) { 20528 reqHeaders := make(http.Header) 20529 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 20530 for k, v := range c.header_ { 20531 reqHeaders[k] = v 20532 } 20533 reqHeaders.Set("User-Agent", c.s.userAgent()) 20534 var body io.Reader = nil 20535 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscustombatchrequest) 20536 if err != nil { 20537 return nil, err 20538 } 20539 reqHeaders.Set("Content-Type", "application/json") 20540 c.urlParams_.Set("alt", alt) 20541 c.urlParams_.Set("prettyPrint", "false") 20542 urls := googleapi.ResolveRelative(c.s.BasePath, "orders/batch") 20543 urls += "?" + c.urlParams_.Encode() 20544 req, err := http.NewRequest("POST", urls, body) 20545 if err != nil { 20546 return nil, err 20547 } 20548 req.Header = reqHeaders 20549 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20550} 20551 20552// Do executes the "content.orders.custombatch" call. 20553// Exactly one of *OrdersCustomBatchResponse or error will be non-nil. 20554// Any non-2xx status code is an error. Response headers are in either 20555// *OrdersCustomBatchResponse.ServerResponse.Header or (if a response 20556// was returned at all) in error.(*googleapi.Error).Header. Use 20557// googleapi.IsNotModified to check whether the returned error was 20558// because http.StatusNotModified was returned. 20559func (c *OrdersCustombatchCall) Do(opts ...googleapi.CallOption) (*OrdersCustomBatchResponse, error) { 20560 gensupport.SetOptions(c.urlParams_, opts...) 20561 res, err := c.doRequest("json") 20562 if res != nil && res.StatusCode == http.StatusNotModified { 20563 if res.Body != nil { 20564 res.Body.Close() 20565 } 20566 return nil, &googleapi.Error{ 20567 Code: res.StatusCode, 20568 Header: res.Header, 20569 } 20570 } 20571 if err != nil { 20572 return nil, err 20573 } 20574 defer googleapi.CloseBody(res) 20575 if err := googleapi.CheckResponse(res); err != nil { 20576 return nil, err 20577 } 20578 ret := &OrdersCustomBatchResponse{ 20579 ServerResponse: googleapi.ServerResponse{ 20580 Header: res.Header, 20581 HTTPStatusCode: res.StatusCode, 20582 }, 20583 } 20584 target := &ret 20585 if err := gensupport.DecodeResponse(target, res); err != nil { 20586 return nil, err 20587 } 20588 return ret, nil 20589 // { 20590 // "description": "Retrieves or modifies multiple orders in a single request.", 20591 // "flatPath": "orders/batch", 20592 // "httpMethod": "POST", 20593 // "id": "content.orders.custombatch", 20594 // "parameterOrder": [], 20595 // "parameters": {}, 20596 // "path": "orders/batch", 20597 // "request": { 20598 // "$ref": "OrdersCustomBatchRequest" 20599 // }, 20600 // "response": { 20601 // "$ref": "OrdersCustomBatchResponse" 20602 // }, 20603 // "scopes": [ 20604 // "https://www.googleapis.com/auth/content" 20605 // ] 20606 // } 20607 20608} 20609 20610// method id "content.orders.get": 20611 20612type OrdersGetCall struct { 20613 s *APIService 20614 merchantId uint64 20615 orderId string 20616 urlParams_ gensupport.URLParams 20617 ifNoneMatch_ string 20618 ctx_ context.Context 20619 header_ http.Header 20620} 20621 20622// Get: Retrieves an order from your Merchant Center account. 20623// 20624// - merchantId: The ID of the account that manages the order. This 20625// cannot be a multi-client account. 20626// - orderId: The ID of the order. 20627func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall { 20628 c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20629 c.merchantId = merchantId 20630 c.orderId = orderId 20631 return c 20632} 20633 20634// Fields allows partial responses to be retrieved. See 20635// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20636// for more information. 20637func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall { 20638 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20639 return c 20640} 20641 20642// IfNoneMatch sets the optional parameter which makes the operation 20643// fail if the object's ETag matches the given value. This is useful for 20644// getting updates only after the object has changed since the last 20645// request. Use googleapi.IsNotModified to check whether the response 20646// error from Do is the result of In-None-Match. 20647func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall { 20648 c.ifNoneMatch_ = entityTag 20649 return c 20650} 20651 20652// Context sets the context to be used in this call's Do method. Any 20653// pending HTTP request will be aborted if the provided context is 20654// canceled. 20655func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall { 20656 c.ctx_ = ctx 20657 return c 20658} 20659 20660// Header returns an http.Header that can be modified by the caller to 20661// add HTTP headers to the request. 20662func (c *OrdersGetCall) Header() http.Header { 20663 if c.header_ == nil { 20664 c.header_ = make(http.Header) 20665 } 20666 return c.header_ 20667} 20668 20669func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { 20670 reqHeaders := make(http.Header) 20671 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 20672 for k, v := range c.header_ { 20673 reqHeaders[k] = v 20674 } 20675 reqHeaders.Set("User-Agent", c.s.userAgent()) 20676 if c.ifNoneMatch_ != "" { 20677 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20678 } 20679 var body io.Reader = nil 20680 c.urlParams_.Set("alt", alt) 20681 c.urlParams_.Set("prettyPrint", "false") 20682 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}") 20683 urls += "?" + c.urlParams_.Encode() 20684 req, err := http.NewRequest("GET", urls, body) 20685 if err != nil { 20686 return nil, err 20687 } 20688 req.Header = reqHeaders 20689 googleapi.Expand(req.URL, map[string]string{ 20690 "merchantId": strconv.FormatUint(c.merchantId, 10), 20691 "orderId": c.orderId, 20692 }) 20693 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20694} 20695 20696// Do executes the "content.orders.get" call. 20697// Exactly one of *Order or error will be non-nil. Any non-2xx status 20698// code is an error. Response headers are in either 20699// *Order.ServerResponse.Header or (if a response was returned at all) 20700// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 20701// check whether the returned error was because http.StatusNotModified 20702// was returned. 20703func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { 20704 gensupport.SetOptions(c.urlParams_, opts...) 20705 res, err := c.doRequest("json") 20706 if res != nil && res.StatusCode == http.StatusNotModified { 20707 if res.Body != nil { 20708 res.Body.Close() 20709 } 20710 return nil, &googleapi.Error{ 20711 Code: res.StatusCode, 20712 Header: res.Header, 20713 } 20714 } 20715 if err != nil { 20716 return nil, err 20717 } 20718 defer googleapi.CloseBody(res) 20719 if err := googleapi.CheckResponse(res); err != nil { 20720 return nil, err 20721 } 20722 ret := &Order{ 20723 ServerResponse: googleapi.ServerResponse{ 20724 Header: res.Header, 20725 HTTPStatusCode: res.StatusCode, 20726 }, 20727 } 20728 target := &ret 20729 if err := gensupport.DecodeResponse(target, res); err != nil { 20730 return nil, err 20731 } 20732 return ret, nil 20733 // { 20734 // "description": "Retrieves an order from your Merchant Center account.", 20735 // "flatPath": "{merchantId}/orders/{orderId}", 20736 // "httpMethod": "GET", 20737 // "id": "content.orders.get", 20738 // "parameterOrder": [ 20739 // "merchantId", 20740 // "orderId" 20741 // ], 20742 // "parameters": { 20743 // "merchantId": { 20744 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20745 // "format": "uint64", 20746 // "location": "path", 20747 // "required": true, 20748 // "type": "string" 20749 // }, 20750 // "orderId": { 20751 // "description": "The ID of the order.", 20752 // "location": "path", 20753 // "required": true, 20754 // "type": "string" 20755 // } 20756 // }, 20757 // "path": "{merchantId}/orders/{orderId}", 20758 // "response": { 20759 // "$ref": "Order" 20760 // }, 20761 // "scopes": [ 20762 // "https://www.googleapis.com/auth/content" 20763 // ] 20764 // } 20765 20766} 20767 20768// method id "content.orders.getbymerchantorderid": 20769 20770type OrdersGetbymerchantorderidCall struct { 20771 s *APIService 20772 merchantId uint64 20773 merchantOrderId string 20774 urlParams_ gensupport.URLParams 20775 ifNoneMatch_ string 20776 ctx_ context.Context 20777 header_ http.Header 20778} 20779 20780// Getbymerchantorderid: Retrieves an order using merchant order ID. 20781// 20782// - merchantId: The ID of the account that manages the order. This 20783// cannot be a multi-client account. 20784// - merchantOrderId: The merchant order ID to be looked for. 20785func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall { 20786 c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20787 c.merchantId = merchantId 20788 c.merchantOrderId = merchantOrderId 20789 return c 20790} 20791 20792// Fields allows partial responses to be retrieved. See 20793// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20794// for more information. 20795func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall { 20796 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20797 return c 20798} 20799 20800// IfNoneMatch sets the optional parameter which makes the operation 20801// fail if the object's ETag matches the given value. This is useful for 20802// getting updates only after the object has changed since the last 20803// request. Use googleapi.IsNotModified to check whether the response 20804// error from Do is the result of In-None-Match. 20805func (c *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall { 20806 c.ifNoneMatch_ = entityTag 20807 return c 20808} 20809 20810// Context sets the context to be used in this call's Do method. Any 20811// pending HTTP request will be aborted if the provided context is 20812// canceled. 20813func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall { 20814 c.ctx_ = ctx 20815 return c 20816} 20817 20818// Header returns an http.Header that can be modified by the caller to 20819// add HTTP headers to the request. 20820func (c *OrdersGetbymerchantorderidCall) Header() http.Header { 20821 if c.header_ == nil { 20822 c.header_ = make(http.Header) 20823 } 20824 return c.header_ 20825} 20826 20827func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) { 20828 reqHeaders := make(http.Header) 20829 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 20830 for k, v := range c.header_ { 20831 reqHeaders[k] = v 20832 } 20833 reqHeaders.Set("User-Agent", c.s.userAgent()) 20834 if c.ifNoneMatch_ != "" { 20835 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20836 } 20837 var body io.Reader = nil 20838 c.urlParams_.Set("alt", alt) 20839 c.urlParams_.Set("prettyPrint", "false") 20840 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}") 20841 urls += "?" + c.urlParams_.Encode() 20842 req, err := http.NewRequest("GET", urls, body) 20843 if err != nil { 20844 return nil, err 20845 } 20846 req.Header = reqHeaders 20847 googleapi.Expand(req.URL, map[string]string{ 20848 "merchantId": strconv.FormatUint(c.merchantId, 10), 20849 "merchantOrderId": c.merchantOrderId, 20850 }) 20851 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20852} 20853 20854// Do executes the "content.orders.getbymerchantorderid" call. 20855// Exactly one of *OrdersGetByMerchantOrderIdResponse or error will be 20856// non-nil. Any non-2xx status code is an error. Response headers are in 20857// either *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or 20858// (if a response was returned at all) in 20859// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20860// whether the returned error was because http.StatusNotModified was 20861// returned. 20862func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) { 20863 gensupport.SetOptions(c.urlParams_, opts...) 20864 res, err := c.doRequest("json") 20865 if res != nil && res.StatusCode == http.StatusNotModified { 20866 if res.Body != nil { 20867 res.Body.Close() 20868 } 20869 return nil, &googleapi.Error{ 20870 Code: res.StatusCode, 20871 Header: res.Header, 20872 } 20873 } 20874 if err != nil { 20875 return nil, err 20876 } 20877 defer googleapi.CloseBody(res) 20878 if err := googleapi.CheckResponse(res); err != nil { 20879 return nil, err 20880 } 20881 ret := &OrdersGetByMerchantOrderIdResponse{ 20882 ServerResponse: googleapi.ServerResponse{ 20883 Header: res.Header, 20884 HTTPStatusCode: res.StatusCode, 20885 }, 20886 } 20887 target := &ret 20888 if err := gensupport.DecodeResponse(target, res); err != nil { 20889 return nil, err 20890 } 20891 return ret, nil 20892 // { 20893 // "description": "Retrieves an order using merchant order ID.", 20894 // "flatPath": "{merchantId}/ordersbymerchantid/{merchantOrderId}", 20895 // "httpMethod": "GET", 20896 // "id": "content.orders.getbymerchantorderid", 20897 // "parameterOrder": [ 20898 // "merchantId", 20899 // "merchantOrderId" 20900 // ], 20901 // "parameters": { 20902 // "merchantId": { 20903 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 20904 // "format": "uint64", 20905 // "location": "path", 20906 // "required": true, 20907 // "type": "string" 20908 // }, 20909 // "merchantOrderId": { 20910 // "description": "The merchant order ID to be looked for.", 20911 // "location": "path", 20912 // "required": true, 20913 // "type": "string" 20914 // } 20915 // }, 20916 // "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}", 20917 // "response": { 20918 // "$ref": "OrdersGetByMerchantOrderIdResponse" 20919 // }, 20920 // "scopes": [ 20921 // "https://www.googleapis.com/auth/content" 20922 // ] 20923 // } 20924 20925} 20926 20927// method id "content.orders.gettestordertemplate": 20928 20929type OrdersGettestordertemplateCall struct { 20930 s *APIService 20931 merchantId uint64 20932 templateName string 20933 urlParams_ gensupport.URLParams 20934 ifNoneMatch_ string 20935 ctx_ context.Context 20936 header_ http.Header 20937} 20938 20939// Gettestordertemplate: Sandbox only. Retrieves an order template that 20940// can be used to quickly create a new order in sandbox. 20941// 20942// - merchantId: The ID of the account that should manage the order. 20943// This cannot be a multi-client account. 20944// - templateName: The name of the template to retrieve. 20945func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall { 20946 c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20947 c.merchantId = merchantId 20948 c.templateName = templateName 20949 return c 20950} 20951 20952// Country sets the optional parameter "country": The country of the 20953// template to retrieve. Defaults to `US`. 20954func (c *OrdersGettestordertemplateCall) Country(country string) *OrdersGettestordertemplateCall { 20955 c.urlParams_.Set("country", country) 20956 return c 20957} 20958 20959// Fields allows partial responses to be retrieved. See 20960// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20961// for more information. 20962func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall { 20963 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20964 return c 20965} 20966 20967// IfNoneMatch sets the optional parameter which makes the operation 20968// fail if the object's ETag matches the given value. This is useful for 20969// getting updates only after the object has changed since the last 20970// request. Use googleapi.IsNotModified to check whether the response 20971// error from Do is the result of In-None-Match. 20972func (c *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall { 20973 c.ifNoneMatch_ = entityTag 20974 return c 20975} 20976 20977// Context sets the context to be used in this call's Do method. Any 20978// pending HTTP request will be aborted if the provided context is 20979// canceled. 20980func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall { 20981 c.ctx_ = ctx 20982 return c 20983} 20984 20985// Header returns an http.Header that can be modified by the caller to 20986// add HTTP headers to the request. 20987func (c *OrdersGettestordertemplateCall) Header() http.Header { 20988 if c.header_ == nil { 20989 c.header_ = make(http.Header) 20990 } 20991 return c.header_ 20992} 20993 20994func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) { 20995 reqHeaders := make(http.Header) 20996 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 20997 for k, v := range c.header_ { 20998 reqHeaders[k] = v 20999 } 21000 reqHeaders.Set("User-Agent", c.s.userAgent()) 21001 if c.ifNoneMatch_ != "" { 21002 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21003 } 21004 var body io.Reader = nil 21005 c.urlParams_.Set("alt", alt) 21006 c.urlParams_.Set("prettyPrint", "false") 21007 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}") 21008 urls += "?" + c.urlParams_.Encode() 21009 req, err := http.NewRequest("GET", urls, body) 21010 if err != nil { 21011 return nil, err 21012 } 21013 req.Header = reqHeaders 21014 googleapi.Expand(req.URL, map[string]string{ 21015 "merchantId": strconv.FormatUint(c.merchantId, 10), 21016 "templateName": c.templateName, 21017 }) 21018 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21019} 21020 21021// Do executes the "content.orders.gettestordertemplate" call. 21022// Exactly one of *OrdersGetTestOrderTemplateResponse or error will be 21023// non-nil. Any non-2xx status code is an error. Response headers are in 21024// either *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or 21025// (if a response was returned at all) in 21026// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21027// whether the returned error was because http.StatusNotModified was 21028// returned. 21029func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) { 21030 gensupport.SetOptions(c.urlParams_, opts...) 21031 res, err := c.doRequest("json") 21032 if res != nil && res.StatusCode == http.StatusNotModified { 21033 if res.Body != nil { 21034 res.Body.Close() 21035 } 21036 return nil, &googleapi.Error{ 21037 Code: res.StatusCode, 21038 Header: res.Header, 21039 } 21040 } 21041 if err != nil { 21042 return nil, err 21043 } 21044 defer googleapi.CloseBody(res) 21045 if err := googleapi.CheckResponse(res); err != nil { 21046 return nil, err 21047 } 21048 ret := &OrdersGetTestOrderTemplateResponse{ 21049 ServerResponse: googleapi.ServerResponse{ 21050 Header: res.Header, 21051 HTTPStatusCode: res.StatusCode, 21052 }, 21053 } 21054 target := &ret 21055 if err := gensupport.DecodeResponse(target, res); err != nil { 21056 return nil, err 21057 } 21058 return ret, nil 21059 // { 21060 // "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.", 21061 // "flatPath": "{merchantId}/testordertemplates/{templateName}", 21062 // "httpMethod": "GET", 21063 // "id": "content.orders.gettestordertemplate", 21064 // "parameterOrder": [ 21065 // "merchantId", 21066 // "templateName" 21067 // ], 21068 // "parameters": { 21069 // "country": { 21070 // "description": "The country of the template to retrieve. Defaults to `US`.", 21071 // "location": "query", 21072 // "type": "string" 21073 // }, 21074 // "merchantId": { 21075 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 21076 // "format": "uint64", 21077 // "location": "path", 21078 // "required": true, 21079 // "type": "string" 21080 // }, 21081 // "templateName": { 21082 // "description": "The name of the template to retrieve.", 21083 // "enum": [ 21084 // "TEMPLATE1", 21085 // "TEMPLATE2", 21086 // "TEMPLATE1A", 21087 // "TEMPLATE1B", 21088 // "TEMPLATE3" 21089 // ], 21090 // "enumDescriptions": [ 21091 // "", 21092 // "", 21093 // "", 21094 // "", 21095 // "" 21096 // ], 21097 // "location": "path", 21098 // "required": true, 21099 // "type": "string" 21100 // } 21101 // }, 21102 // "path": "{merchantId}/testordertemplates/{templateName}", 21103 // "response": { 21104 // "$ref": "OrdersGetTestOrderTemplateResponse" 21105 // }, 21106 // "scopes": [ 21107 // "https://www.googleapis.com/auth/content" 21108 // ] 21109 // } 21110 21111} 21112 21113// method id "content.orders.instorerefundlineitem": 21114 21115type OrdersInstorerefundlineitemCall struct { 21116 s *APIService 21117 merchantId uint64 21118 orderId string 21119 ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest 21120 urlParams_ gensupport.URLParams 21121 ctx_ context.Context 21122 header_ http.Header 21123} 21124 21125// Instorerefundlineitem: Deprecated. Notifies that item return and 21126// refund was handled directly by merchant outside of Google payments 21127// processing (e.g. cash refund done in store). Note: We recommend 21128// calling the returnrefundlineitem method to refund in-store returns. 21129// We will issue the refund directly to the customer. This helps to 21130// prevent possible differences arising between merchant and Google 21131// transaction records. We also recommend having the point of sale 21132// system communicate with Google to ensure that customers do not 21133// receive a double refund by first refunding via Google then via an 21134// in-store return. 21135// 21136// - merchantId: The ID of the account that manages the order. This 21137// cannot be a multi-client account. 21138// - orderId: The ID of the order. 21139func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall { 21140 c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21141 c.merchantId = merchantId 21142 c.orderId = orderId 21143 c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest 21144 return c 21145} 21146 21147// Fields allows partial responses to be retrieved. See 21148// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21149// for more information. 21150func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall { 21151 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21152 return c 21153} 21154 21155// Context sets the context to be used in this call's Do method. Any 21156// pending HTTP request will be aborted if the provided context is 21157// canceled. 21158func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall { 21159 c.ctx_ = ctx 21160 return c 21161} 21162 21163// Header returns an http.Header that can be modified by the caller to 21164// add HTTP headers to the request. 21165func (c *OrdersInstorerefundlineitemCall) Header() http.Header { 21166 if c.header_ == nil { 21167 c.header_ = make(http.Header) 21168 } 21169 return c.header_ 21170} 21171 21172func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) { 21173 reqHeaders := make(http.Header) 21174 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 21175 for k, v := range c.header_ { 21176 reqHeaders[k] = v 21177 } 21178 reqHeaders.Set("User-Agent", c.s.userAgent()) 21179 var body io.Reader = nil 21180 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest) 21181 if err != nil { 21182 return nil, err 21183 } 21184 reqHeaders.Set("Content-Type", "application/json") 21185 c.urlParams_.Set("alt", alt) 21186 c.urlParams_.Set("prettyPrint", "false") 21187 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem") 21188 urls += "?" + c.urlParams_.Encode() 21189 req, err := http.NewRequest("POST", urls, body) 21190 if err != nil { 21191 return nil, err 21192 } 21193 req.Header = reqHeaders 21194 googleapi.Expand(req.URL, map[string]string{ 21195 "merchantId": strconv.FormatUint(c.merchantId, 10), 21196 "orderId": c.orderId, 21197 }) 21198 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21199} 21200 21201// Do executes the "content.orders.instorerefundlineitem" call. 21202// Exactly one of *OrdersInStoreRefundLineItemResponse or error will be 21203// non-nil. Any non-2xx status code is an error. Response headers are in 21204// either *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or 21205// (if a response was returned at all) in 21206// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21207// whether the returned error was because http.StatusNotModified was 21208// returned. 21209func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) { 21210 gensupport.SetOptions(c.urlParams_, opts...) 21211 res, err := c.doRequest("json") 21212 if res != nil && res.StatusCode == http.StatusNotModified { 21213 if res.Body != nil { 21214 res.Body.Close() 21215 } 21216 return nil, &googleapi.Error{ 21217 Code: res.StatusCode, 21218 Header: res.Header, 21219 } 21220 } 21221 if err != nil { 21222 return nil, err 21223 } 21224 defer googleapi.CloseBody(res) 21225 if err := googleapi.CheckResponse(res); err != nil { 21226 return nil, err 21227 } 21228 ret := &OrdersInStoreRefundLineItemResponse{ 21229 ServerResponse: googleapi.ServerResponse{ 21230 Header: res.Header, 21231 HTTPStatusCode: res.StatusCode, 21232 }, 21233 } 21234 target := &ret 21235 if err := gensupport.DecodeResponse(target, res); err != nil { 21236 return nil, err 21237 } 21238 return ret, nil 21239 // { 21240 // "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.", 21241 // "flatPath": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", 21242 // "httpMethod": "POST", 21243 // "id": "content.orders.instorerefundlineitem", 21244 // "parameterOrder": [ 21245 // "merchantId", 21246 // "orderId" 21247 // ], 21248 // "parameters": { 21249 // "merchantId": { 21250 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21251 // "format": "uint64", 21252 // "location": "path", 21253 // "required": true, 21254 // "type": "string" 21255 // }, 21256 // "orderId": { 21257 // "description": "The ID of the order.", 21258 // "location": "path", 21259 // "required": true, 21260 // "type": "string" 21261 // } 21262 // }, 21263 // "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", 21264 // "request": { 21265 // "$ref": "OrdersInStoreRefundLineItemRequest" 21266 // }, 21267 // "response": { 21268 // "$ref": "OrdersInStoreRefundLineItemResponse" 21269 // }, 21270 // "scopes": [ 21271 // "https://www.googleapis.com/auth/content" 21272 // ] 21273 // } 21274 21275} 21276 21277// method id "content.orders.list": 21278 21279type OrdersListCall struct { 21280 s *APIService 21281 merchantId uint64 21282 urlParams_ gensupport.URLParams 21283 ifNoneMatch_ string 21284 ctx_ context.Context 21285 header_ http.Header 21286} 21287 21288// List: Lists the orders in your Merchant Center account. 21289// 21290// - merchantId: The ID of the account that manages the order. This 21291// cannot be a multi-client account. 21292func (r *OrdersService) List(merchantId uint64) *OrdersListCall { 21293 c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21294 c.merchantId = merchantId 21295 return c 21296} 21297 21298// Acknowledged sets the optional parameter "acknowledged": Obtains 21299// orders that match the acknowledgement status. When set to true, 21300// obtains orders that have been acknowledged. When false, obtains 21301// orders that have not been acknowledged. We recommend using this 21302// filter set to `false`, in conjunction with the `acknowledge` call, 21303// such that only un-acknowledged orders are returned. 21304func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall { 21305 c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged)) 21306 return c 21307} 21308 21309// MaxResults sets the optional parameter "maxResults": The maximum 21310// number of orders to return in the response, used for paging. The 21311// default value is 25 orders per page, and the maximum allowed value is 21312// 250 orders per page. 21313func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall { 21314 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 21315 return c 21316} 21317 21318// OrderBy sets the optional parameter "orderBy": Order results by 21319// placement date in descending or ascending order. Acceptable values 21320// are: - placedDateAsc - placedDateDesc 21321func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall { 21322 c.urlParams_.Set("orderBy", orderBy) 21323 return c 21324} 21325 21326// PageToken sets the optional parameter "pageToken": The token returned 21327// by the previous request. 21328func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall { 21329 c.urlParams_.Set("pageToken", pageToken) 21330 return c 21331} 21332 21333// PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains 21334// orders placed before this date (exclusively), in ISO 8601 format. 21335func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall { 21336 c.urlParams_.Set("placedDateEnd", placedDateEnd) 21337 return c 21338} 21339 21340// PlacedDateStart sets the optional parameter "placedDateStart": 21341// Obtains orders placed after this date (inclusively), in ISO 8601 21342// format. 21343func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall { 21344 c.urlParams_.Set("placedDateStart", placedDateStart) 21345 return c 21346} 21347 21348// Statuses sets the optional parameter "statuses": Obtains orders that 21349// match any of the specified statuses. Please note that `active` is a 21350// shortcut for `pendingShipment` and `partiallyShipped`, and 21351// `completed` is a shortcut for `shipped`, `partiallyDelivered`, 21352// `delivered`, `partiallyReturned`, `returned`, and `canceled`. 21353// 21354// Possible values: 21355// "ACTIVE" 21356// "COMPLETED" 21357// "CANCELED" 21358// "IN_PROGRESS" 21359// "PENDING_SHIPMENT" 21360// "PARTIALLY_SHIPPED" 21361// "SHIPPED" 21362// "PARTIALLY_DELIVERED" 21363// "DELIVERED" 21364// "PARTIALLY_RETURNED" 21365// "RETURNED" 21366func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall { 21367 c.urlParams_.SetMulti("statuses", append([]string{}, statuses...)) 21368 return c 21369} 21370 21371// Fields allows partial responses to be retrieved. See 21372// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21373// for more information. 21374func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall { 21375 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21376 return c 21377} 21378 21379// IfNoneMatch sets the optional parameter which makes the operation 21380// fail if the object's ETag matches the given value. This is useful for 21381// getting updates only after the object has changed since the last 21382// request. Use googleapi.IsNotModified to check whether the response 21383// error from Do is the result of In-None-Match. 21384func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall { 21385 c.ifNoneMatch_ = entityTag 21386 return c 21387} 21388 21389// Context sets the context to be used in this call's Do method. Any 21390// pending HTTP request will be aborted if the provided context is 21391// canceled. 21392func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall { 21393 c.ctx_ = ctx 21394 return c 21395} 21396 21397// Header returns an http.Header that can be modified by the caller to 21398// add HTTP headers to the request. 21399func (c *OrdersListCall) Header() http.Header { 21400 if c.header_ == nil { 21401 c.header_ = make(http.Header) 21402 } 21403 return c.header_ 21404} 21405 21406func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) { 21407 reqHeaders := make(http.Header) 21408 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 21409 for k, v := range c.header_ { 21410 reqHeaders[k] = v 21411 } 21412 reqHeaders.Set("User-Agent", c.s.userAgent()) 21413 if c.ifNoneMatch_ != "" { 21414 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21415 } 21416 var body io.Reader = nil 21417 c.urlParams_.Set("alt", alt) 21418 c.urlParams_.Set("prettyPrint", "false") 21419 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders") 21420 urls += "?" + c.urlParams_.Encode() 21421 req, err := http.NewRequest("GET", urls, body) 21422 if err != nil { 21423 return nil, err 21424 } 21425 req.Header = reqHeaders 21426 googleapi.Expand(req.URL, map[string]string{ 21427 "merchantId": strconv.FormatUint(c.merchantId, 10), 21428 }) 21429 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21430} 21431 21432// Do executes the "content.orders.list" call. 21433// Exactly one of *OrdersListResponse or error will be non-nil. Any 21434// non-2xx status code is an error. Response headers are in either 21435// *OrdersListResponse.ServerResponse.Header or (if a response was 21436// returned at all) in error.(*googleapi.Error).Header. Use 21437// googleapi.IsNotModified to check whether the returned error was 21438// because http.StatusNotModified was returned. 21439func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) { 21440 gensupport.SetOptions(c.urlParams_, opts...) 21441 res, err := c.doRequest("json") 21442 if res != nil && res.StatusCode == http.StatusNotModified { 21443 if res.Body != nil { 21444 res.Body.Close() 21445 } 21446 return nil, &googleapi.Error{ 21447 Code: res.StatusCode, 21448 Header: res.Header, 21449 } 21450 } 21451 if err != nil { 21452 return nil, err 21453 } 21454 defer googleapi.CloseBody(res) 21455 if err := googleapi.CheckResponse(res); err != nil { 21456 return nil, err 21457 } 21458 ret := &OrdersListResponse{ 21459 ServerResponse: googleapi.ServerResponse{ 21460 Header: res.Header, 21461 HTTPStatusCode: res.StatusCode, 21462 }, 21463 } 21464 target := &ret 21465 if err := gensupport.DecodeResponse(target, res); err != nil { 21466 return nil, err 21467 } 21468 return ret, nil 21469 // { 21470 // "description": "Lists the orders in your Merchant Center account.", 21471 // "flatPath": "{merchantId}/orders", 21472 // "httpMethod": "GET", 21473 // "id": "content.orders.list", 21474 // "parameterOrder": [ 21475 // "merchantId" 21476 // ], 21477 // "parameters": { 21478 // "acknowledged": { 21479 // "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. ", 21480 // "location": "query", 21481 // "type": "boolean" 21482 // }, 21483 // "maxResults": { 21484 // "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.", 21485 // "format": "uint32", 21486 // "location": "query", 21487 // "type": "integer" 21488 // }, 21489 // "merchantId": { 21490 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21491 // "format": "uint64", 21492 // "location": "path", 21493 // "required": true, 21494 // "type": "string" 21495 // }, 21496 // "orderBy": { 21497 // "description": "Order results by placement date in descending or ascending order. Acceptable values are: - placedDateAsc - placedDateDesc ", 21498 // "location": "query", 21499 // "type": "string" 21500 // }, 21501 // "pageToken": { 21502 // "description": "The token returned by the previous request.", 21503 // "location": "query", 21504 // "type": "string" 21505 // }, 21506 // "placedDateEnd": { 21507 // "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.", 21508 // "location": "query", 21509 // "type": "string" 21510 // }, 21511 // "placedDateStart": { 21512 // "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.", 21513 // "location": "query", 21514 // "type": "string" 21515 // }, 21516 // "statuses": { 21517 // "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`.", 21518 // "enum": [ 21519 // "ACTIVE", 21520 // "COMPLETED", 21521 // "CANCELED", 21522 // "IN_PROGRESS", 21523 // "PENDING_SHIPMENT", 21524 // "PARTIALLY_SHIPPED", 21525 // "SHIPPED", 21526 // "PARTIALLY_DELIVERED", 21527 // "DELIVERED", 21528 // "PARTIALLY_RETURNED", 21529 // "RETURNED" 21530 // ], 21531 // "enumDescriptions": [ 21532 // "", 21533 // "", 21534 // "", 21535 // "", 21536 // "", 21537 // "", 21538 // "", 21539 // "", 21540 // "", 21541 // "", 21542 // "" 21543 // ], 21544 // "location": "query", 21545 // "repeated": true, 21546 // "type": "string" 21547 // } 21548 // }, 21549 // "path": "{merchantId}/orders", 21550 // "response": { 21551 // "$ref": "OrdersListResponse" 21552 // }, 21553 // "scopes": [ 21554 // "https://www.googleapis.com/auth/content" 21555 // ] 21556 // } 21557 21558} 21559 21560// Pages invokes f for each page of results. 21561// A non-nil error returned from f will halt the iteration. 21562// The provided context supersedes any context provided to the Context method. 21563func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error { 21564 c.ctx_ = ctx 21565 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21566 for { 21567 x, err := c.Do() 21568 if err != nil { 21569 return err 21570 } 21571 if err := f(x); err != nil { 21572 return err 21573 } 21574 if x.NextPageToken == "" { 21575 return nil 21576 } 21577 c.PageToken(x.NextPageToken) 21578 } 21579} 21580 21581// method id "content.orders.refund": 21582 21583type OrdersRefundCall struct { 21584 s *APIService 21585 merchantId uint64 21586 orderId string 21587 ordersrefundrequest *OrdersRefundRequest 21588 urlParams_ gensupport.URLParams 21589 ctx_ context.Context 21590 header_ http.Header 21591} 21592 21593// Refund: Deprecated, please use returnRefundLineItem instead. 21594// 21595// - merchantId: The ID of the account that manages the order. This 21596// cannot be a multi-client account. 21597// - orderId: The ID of the order to refund. 21598func (r *OrdersService) Refund(merchantId uint64, orderId string, ordersrefundrequest *OrdersRefundRequest) *OrdersRefundCall { 21599 c := &OrdersRefundCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21600 c.merchantId = merchantId 21601 c.orderId = orderId 21602 c.ordersrefundrequest = ordersrefundrequest 21603 return c 21604} 21605 21606// Fields allows partial responses to be retrieved. See 21607// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21608// for more information. 21609func (c *OrdersRefundCall) Fields(s ...googleapi.Field) *OrdersRefundCall { 21610 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21611 return c 21612} 21613 21614// Context sets the context to be used in this call's Do method. Any 21615// pending HTTP request will be aborted if the provided context is 21616// canceled. 21617func (c *OrdersRefundCall) Context(ctx context.Context) *OrdersRefundCall { 21618 c.ctx_ = ctx 21619 return c 21620} 21621 21622// Header returns an http.Header that can be modified by the caller to 21623// add HTTP headers to the request. 21624func (c *OrdersRefundCall) Header() http.Header { 21625 if c.header_ == nil { 21626 c.header_ = make(http.Header) 21627 } 21628 return c.header_ 21629} 21630 21631func (c *OrdersRefundCall) doRequest(alt string) (*http.Response, error) { 21632 reqHeaders := make(http.Header) 21633 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 21634 for k, v := range c.header_ { 21635 reqHeaders[k] = v 21636 } 21637 reqHeaders.Set("User-Agent", c.s.userAgent()) 21638 var body io.Reader = nil 21639 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundrequest) 21640 if err != nil { 21641 return nil, err 21642 } 21643 reqHeaders.Set("Content-Type", "application/json") 21644 c.urlParams_.Set("alt", alt) 21645 c.urlParams_.Set("prettyPrint", "false") 21646 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refund") 21647 urls += "?" + c.urlParams_.Encode() 21648 req, err := http.NewRequest("POST", urls, body) 21649 if err != nil { 21650 return nil, err 21651 } 21652 req.Header = reqHeaders 21653 googleapi.Expand(req.URL, map[string]string{ 21654 "merchantId": strconv.FormatUint(c.merchantId, 10), 21655 "orderId": c.orderId, 21656 }) 21657 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21658} 21659 21660// Do executes the "content.orders.refund" call. 21661// Exactly one of *OrdersRefundResponse or error will be non-nil. Any 21662// non-2xx status code is an error. Response headers are in either 21663// *OrdersRefundResponse.ServerResponse.Header or (if a response was 21664// returned at all) in error.(*googleapi.Error).Header. Use 21665// googleapi.IsNotModified to check whether the returned error was 21666// because http.StatusNotModified was returned. 21667func (c *OrdersRefundCall) Do(opts ...googleapi.CallOption) (*OrdersRefundResponse, error) { 21668 gensupport.SetOptions(c.urlParams_, opts...) 21669 res, err := c.doRequest("json") 21670 if res != nil && res.StatusCode == http.StatusNotModified { 21671 if res.Body != nil { 21672 res.Body.Close() 21673 } 21674 return nil, &googleapi.Error{ 21675 Code: res.StatusCode, 21676 Header: res.Header, 21677 } 21678 } 21679 if err != nil { 21680 return nil, err 21681 } 21682 defer googleapi.CloseBody(res) 21683 if err := googleapi.CheckResponse(res); err != nil { 21684 return nil, err 21685 } 21686 ret := &OrdersRefundResponse{ 21687 ServerResponse: googleapi.ServerResponse{ 21688 Header: res.Header, 21689 HTTPStatusCode: res.StatusCode, 21690 }, 21691 } 21692 target := &ret 21693 if err := gensupport.DecodeResponse(target, res); err != nil { 21694 return nil, err 21695 } 21696 return ret, nil 21697 // { 21698 // "description": "Deprecated, please use returnRefundLineItem instead.", 21699 // "flatPath": "{merchantId}/orders/{orderId}/refund", 21700 // "httpMethod": "POST", 21701 // "id": "content.orders.refund", 21702 // "parameterOrder": [ 21703 // "merchantId", 21704 // "orderId" 21705 // ], 21706 // "parameters": { 21707 // "merchantId": { 21708 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21709 // "format": "uint64", 21710 // "location": "path", 21711 // "required": true, 21712 // "type": "string" 21713 // }, 21714 // "orderId": { 21715 // "description": "The ID of the order to refund.", 21716 // "location": "path", 21717 // "required": true, 21718 // "type": "string" 21719 // } 21720 // }, 21721 // "path": "{merchantId}/orders/{orderId}/refund", 21722 // "request": { 21723 // "$ref": "OrdersRefundRequest" 21724 // }, 21725 // "response": { 21726 // "$ref": "OrdersRefundResponse" 21727 // }, 21728 // "scopes": [ 21729 // "https://www.googleapis.com/auth/content" 21730 // ] 21731 // } 21732 21733} 21734 21735// method id "content.orders.rejectreturnlineitem": 21736 21737type OrdersRejectreturnlineitemCall struct { 21738 s *APIService 21739 merchantId uint64 21740 orderId string 21741 ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest 21742 urlParams_ gensupport.URLParams 21743 ctx_ context.Context 21744 header_ http.Header 21745} 21746 21747// Rejectreturnlineitem: Rejects return on an line item. 21748// 21749// - merchantId: The ID of the account that manages the order. This 21750// cannot be a multi-client account. 21751// - orderId: The ID of the order. 21752func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall { 21753 c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21754 c.merchantId = merchantId 21755 c.orderId = orderId 21756 c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest 21757 return c 21758} 21759 21760// Fields allows partial responses to be retrieved. See 21761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21762// for more information. 21763func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall { 21764 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21765 return c 21766} 21767 21768// Context sets the context to be used in this call's Do method. Any 21769// pending HTTP request will be aborted if the provided context is 21770// canceled. 21771func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall { 21772 c.ctx_ = ctx 21773 return c 21774} 21775 21776// Header returns an http.Header that can be modified by the caller to 21777// add HTTP headers to the request. 21778func (c *OrdersRejectreturnlineitemCall) Header() http.Header { 21779 if c.header_ == nil { 21780 c.header_ = make(http.Header) 21781 } 21782 return c.header_ 21783} 21784 21785func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) { 21786 reqHeaders := make(http.Header) 21787 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 21788 for k, v := range c.header_ { 21789 reqHeaders[k] = v 21790 } 21791 reqHeaders.Set("User-Agent", c.s.userAgent()) 21792 var body io.Reader = nil 21793 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest) 21794 if err != nil { 21795 return nil, err 21796 } 21797 reqHeaders.Set("Content-Type", "application/json") 21798 c.urlParams_.Set("alt", alt) 21799 c.urlParams_.Set("prettyPrint", "false") 21800 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem") 21801 urls += "?" + c.urlParams_.Encode() 21802 req, err := http.NewRequest("POST", urls, body) 21803 if err != nil { 21804 return nil, err 21805 } 21806 req.Header = reqHeaders 21807 googleapi.Expand(req.URL, map[string]string{ 21808 "merchantId": strconv.FormatUint(c.merchantId, 10), 21809 "orderId": c.orderId, 21810 }) 21811 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21812} 21813 21814// Do executes the "content.orders.rejectreturnlineitem" call. 21815// Exactly one of *OrdersRejectReturnLineItemResponse or error will be 21816// non-nil. Any non-2xx status code is an error. Response headers are in 21817// either *OrdersRejectReturnLineItemResponse.ServerResponse.Header or 21818// (if a response was returned at all) in 21819// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21820// whether the returned error was because http.StatusNotModified was 21821// returned. 21822func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) { 21823 gensupport.SetOptions(c.urlParams_, opts...) 21824 res, err := c.doRequest("json") 21825 if res != nil && res.StatusCode == http.StatusNotModified { 21826 if res.Body != nil { 21827 res.Body.Close() 21828 } 21829 return nil, &googleapi.Error{ 21830 Code: res.StatusCode, 21831 Header: res.Header, 21832 } 21833 } 21834 if err != nil { 21835 return nil, err 21836 } 21837 defer googleapi.CloseBody(res) 21838 if err := googleapi.CheckResponse(res); err != nil { 21839 return nil, err 21840 } 21841 ret := &OrdersRejectReturnLineItemResponse{ 21842 ServerResponse: googleapi.ServerResponse{ 21843 Header: res.Header, 21844 HTTPStatusCode: res.StatusCode, 21845 }, 21846 } 21847 target := &ret 21848 if err := gensupport.DecodeResponse(target, res); err != nil { 21849 return nil, err 21850 } 21851 return ret, nil 21852 // { 21853 // "description": "Rejects return on an line item.", 21854 // "flatPath": "{merchantId}/orders/{orderId}/rejectReturnLineItem", 21855 // "httpMethod": "POST", 21856 // "id": "content.orders.rejectreturnlineitem", 21857 // "parameterOrder": [ 21858 // "merchantId", 21859 // "orderId" 21860 // ], 21861 // "parameters": { 21862 // "merchantId": { 21863 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 21864 // "format": "uint64", 21865 // "location": "path", 21866 // "required": true, 21867 // "type": "string" 21868 // }, 21869 // "orderId": { 21870 // "description": "The ID of the order.", 21871 // "location": "path", 21872 // "required": true, 21873 // "type": "string" 21874 // } 21875 // }, 21876 // "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem", 21877 // "request": { 21878 // "$ref": "OrdersRejectReturnLineItemRequest" 21879 // }, 21880 // "response": { 21881 // "$ref": "OrdersRejectReturnLineItemResponse" 21882 // }, 21883 // "scopes": [ 21884 // "https://www.googleapis.com/auth/content" 21885 // ] 21886 // } 21887 21888} 21889 21890// method id "content.orders.returnlineitem": 21891 21892type OrdersReturnlineitemCall struct { 21893 s *APIService 21894 merchantId uint64 21895 orderId string 21896 ordersreturnlineitemrequest *OrdersReturnLineItemRequest 21897 urlParams_ gensupport.URLParams 21898 ctx_ context.Context 21899 header_ http.Header 21900} 21901 21902// Returnlineitem: Returns a line item. 21903// 21904// - merchantId: The ID of the account that manages the order. This 21905// cannot be a multi-client account. 21906// - orderId: The ID of the order. 21907func (r *OrdersService) Returnlineitem(merchantId uint64, orderId string, ordersreturnlineitemrequest *OrdersReturnLineItemRequest) *OrdersReturnlineitemCall { 21908 c := &OrdersReturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21909 c.merchantId = merchantId 21910 c.orderId = orderId 21911 c.ordersreturnlineitemrequest = ordersreturnlineitemrequest 21912 return c 21913} 21914 21915// Fields allows partial responses to be retrieved. See 21916// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21917// for more information. 21918func (c *OrdersReturnlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnlineitemCall { 21919 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21920 return c 21921} 21922 21923// Context sets the context to be used in this call's Do method. Any 21924// pending HTTP request will be aborted if the provided context is 21925// canceled. 21926func (c *OrdersReturnlineitemCall) Context(ctx context.Context) *OrdersReturnlineitemCall { 21927 c.ctx_ = ctx 21928 return c 21929} 21930 21931// Header returns an http.Header that can be modified by the caller to 21932// add HTTP headers to the request. 21933func (c *OrdersReturnlineitemCall) Header() http.Header { 21934 if c.header_ == nil { 21935 c.header_ = make(http.Header) 21936 } 21937 return c.header_ 21938} 21939 21940func (c *OrdersReturnlineitemCall) doRequest(alt string) (*http.Response, error) { 21941 reqHeaders := make(http.Header) 21942 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 21943 for k, v := range c.header_ { 21944 reqHeaders[k] = v 21945 } 21946 reqHeaders.Set("User-Agent", c.s.userAgent()) 21947 var body io.Reader = nil 21948 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnlineitemrequest) 21949 if err != nil { 21950 return nil, err 21951 } 21952 reqHeaders.Set("Content-Type", "application/json") 21953 c.urlParams_.Set("alt", alt) 21954 c.urlParams_.Set("prettyPrint", "false") 21955 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnLineItem") 21956 urls += "?" + c.urlParams_.Encode() 21957 req, err := http.NewRequest("POST", urls, body) 21958 if err != nil { 21959 return nil, err 21960 } 21961 req.Header = reqHeaders 21962 googleapi.Expand(req.URL, map[string]string{ 21963 "merchantId": strconv.FormatUint(c.merchantId, 10), 21964 "orderId": c.orderId, 21965 }) 21966 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21967} 21968 21969// Do executes the "content.orders.returnlineitem" call. 21970// Exactly one of *OrdersReturnLineItemResponse or error will be 21971// non-nil. Any non-2xx status code is an error. Response headers are in 21972// either *OrdersReturnLineItemResponse.ServerResponse.Header or (if a 21973// response was returned at all) in error.(*googleapi.Error).Header. Use 21974// googleapi.IsNotModified to check whether the returned error was 21975// because http.StatusNotModified was returned. 21976func (c *OrdersReturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnLineItemResponse, error) { 21977 gensupport.SetOptions(c.urlParams_, opts...) 21978 res, err := c.doRequest("json") 21979 if res != nil && res.StatusCode == http.StatusNotModified { 21980 if res.Body != nil { 21981 res.Body.Close() 21982 } 21983 return nil, &googleapi.Error{ 21984 Code: res.StatusCode, 21985 Header: res.Header, 21986 } 21987 } 21988 if err != nil { 21989 return nil, err 21990 } 21991 defer googleapi.CloseBody(res) 21992 if err := googleapi.CheckResponse(res); err != nil { 21993 return nil, err 21994 } 21995 ret := &OrdersReturnLineItemResponse{ 21996 ServerResponse: googleapi.ServerResponse{ 21997 Header: res.Header, 21998 HTTPStatusCode: res.StatusCode, 21999 }, 22000 } 22001 target := &ret 22002 if err := gensupport.DecodeResponse(target, res); err != nil { 22003 return nil, err 22004 } 22005 return ret, nil 22006 // { 22007 // "description": "Returns a line item.", 22008 // "flatPath": "{merchantId}/orders/{orderId}/returnLineItem", 22009 // "httpMethod": "POST", 22010 // "id": "content.orders.returnlineitem", 22011 // "parameterOrder": [ 22012 // "merchantId", 22013 // "orderId" 22014 // ], 22015 // "parameters": { 22016 // "merchantId": { 22017 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22018 // "format": "uint64", 22019 // "location": "path", 22020 // "required": true, 22021 // "type": "string" 22022 // }, 22023 // "orderId": { 22024 // "description": "The ID of the order.", 22025 // "location": "path", 22026 // "required": true, 22027 // "type": "string" 22028 // } 22029 // }, 22030 // "path": "{merchantId}/orders/{orderId}/returnLineItem", 22031 // "request": { 22032 // "$ref": "OrdersReturnLineItemRequest" 22033 // }, 22034 // "response": { 22035 // "$ref": "OrdersReturnLineItemResponse" 22036 // }, 22037 // "scopes": [ 22038 // "https://www.googleapis.com/auth/content" 22039 // ] 22040 // } 22041 22042} 22043 22044// method id "content.orders.returnrefundlineitem": 22045 22046type OrdersReturnrefundlineitemCall struct { 22047 s *APIService 22048 merchantId uint64 22049 orderId string 22050 ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest 22051 urlParams_ gensupport.URLParams 22052 ctx_ context.Context 22053 header_ http.Header 22054} 22055 22056// Returnrefundlineitem: Returns and refunds a line item. Note that this 22057// method can only be called on fully shipped orders. Please also note 22058// that the Orderreturns API is the preferred way to handle returns 22059// after you receive a return from a customer. You can use 22060// Orderreturns.list or Orderreturns.get to search for the return, and 22061// then use Orderreturns.processreturn to issue the refund. If the 22062// return cannot be found, then we recommend using this API to issue a 22063// refund. 22064// 22065// - merchantId: The ID of the account that manages the order. This 22066// cannot be a multi-client account. 22067// - orderId: The ID of the order. 22068func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall { 22069 c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22070 c.merchantId = merchantId 22071 c.orderId = orderId 22072 c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest 22073 return c 22074} 22075 22076// Fields allows partial responses to be retrieved. See 22077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22078// for more information. 22079func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall { 22080 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22081 return c 22082} 22083 22084// Context sets the context to be used in this call's Do method. Any 22085// pending HTTP request will be aborted if the provided context is 22086// canceled. 22087func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall { 22088 c.ctx_ = ctx 22089 return c 22090} 22091 22092// Header returns an http.Header that can be modified by the caller to 22093// add HTTP headers to the request. 22094func (c *OrdersReturnrefundlineitemCall) Header() http.Header { 22095 if c.header_ == nil { 22096 c.header_ = make(http.Header) 22097 } 22098 return c.header_ 22099} 22100 22101func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) { 22102 reqHeaders := make(http.Header) 22103 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 22104 for k, v := range c.header_ { 22105 reqHeaders[k] = v 22106 } 22107 reqHeaders.Set("User-Agent", c.s.userAgent()) 22108 var body io.Reader = nil 22109 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest) 22110 if err != nil { 22111 return nil, err 22112 } 22113 reqHeaders.Set("Content-Type", "application/json") 22114 c.urlParams_.Set("alt", alt) 22115 c.urlParams_.Set("prettyPrint", "false") 22116 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem") 22117 urls += "?" + c.urlParams_.Encode() 22118 req, err := http.NewRequest("POST", urls, body) 22119 if err != nil { 22120 return nil, err 22121 } 22122 req.Header = reqHeaders 22123 googleapi.Expand(req.URL, map[string]string{ 22124 "merchantId": strconv.FormatUint(c.merchantId, 10), 22125 "orderId": c.orderId, 22126 }) 22127 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22128} 22129 22130// Do executes the "content.orders.returnrefundlineitem" call. 22131// Exactly one of *OrdersReturnRefundLineItemResponse or error will be 22132// non-nil. Any non-2xx status code is an error. Response headers are in 22133// either *OrdersReturnRefundLineItemResponse.ServerResponse.Header or 22134// (if a response was returned at all) in 22135// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22136// whether the returned error was because http.StatusNotModified was 22137// returned. 22138func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) { 22139 gensupport.SetOptions(c.urlParams_, opts...) 22140 res, err := c.doRequest("json") 22141 if res != nil && res.StatusCode == http.StatusNotModified { 22142 if res.Body != nil { 22143 res.Body.Close() 22144 } 22145 return nil, &googleapi.Error{ 22146 Code: res.StatusCode, 22147 Header: res.Header, 22148 } 22149 } 22150 if err != nil { 22151 return nil, err 22152 } 22153 defer googleapi.CloseBody(res) 22154 if err := googleapi.CheckResponse(res); err != nil { 22155 return nil, err 22156 } 22157 ret := &OrdersReturnRefundLineItemResponse{ 22158 ServerResponse: googleapi.ServerResponse{ 22159 Header: res.Header, 22160 HTTPStatusCode: res.StatusCode, 22161 }, 22162 } 22163 target := &ret 22164 if err := gensupport.DecodeResponse(target, res); err != nil { 22165 return nil, err 22166 } 22167 return ret, nil 22168 // { 22169 // "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.", 22170 // "flatPath": "{merchantId}/orders/{orderId}/returnRefundLineItem", 22171 // "httpMethod": "POST", 22172 // "id": "content.orders.returnrefundlineitem", 22173 // "parameterOrder": [ 22174 // "merchantId", 22175 // "orderId" 22176 // ], 22177 // "parameters": { 22178 // "merchantId": { 22179 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22180 // "format": "uint64", 22181 // "location": "path", 22182 // "required": true, 22183 // "type": "string" 22184 // }, 22185 // "orderId": { 22186 // "description": "The ID of the order.", 22187 // "location": "path", 22188 // "required": true, 22189 // "type": "string" 22190 // } 22191 // }, 22192 // "path": "{merchantId}/orders/{orderId}/returnRefundLineItem", 22193 // "request": { 22194 // "$ref": "OrdersReturnRefundLineItemRequest" 22195 // }, 22196 // "response": { 22197 // "$ref": "OrdersReturnRefundLineItemResponse" 22198 // }, 22199 // "scopes": [ 22200 // "https://www.googleapis.com/auth/content" 22201 // ] 22202 // } 22203 22204} 22205 22206// method id "content.orders.setlineitemmetadata": 22207 22208type OrdersSetlineitemmetadataCall struct { 22209 s *APIService 22210 merchantId uint64 22211 orderId string 22212 orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest 22213 urlParams_ gensupport.URLParams 22214 ctx_ context.Context 22215 header_ http.Header 22216} 22217 22218// Setlineitemmetadata: Sets (or overrides if it already exists) 22219// merchant provided annotations in the form of key-value pairs. A 22220// common use case would be to supply us with additional structured 22221// information about a line item that cannot be provided via other 22222// methods. Submitted key-value pairs can be retrieved as part of the 22223// orders resource. 22224// 22225// - merchantId: The ID of the account that manages the order. This 22226// cannot be a multi-client account. 22227// - orderId: The ID of the order. 22228func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall { 22229 c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22230 c.merchantId = merchantId 22231 c.orderId = orderId 22232 c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest 22233 return c 22234} 22235 22236// Fields allows partial responses to be retrieved. See 22237// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22238// for more information. 22239func (c *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall { 22240 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22241 return c 22242} 22243 22244// Context sets the context to be used in this call's Do method. Any 22245// pending HTTP request will be aborted if the provided context is 22246// canceled. 22247func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall { 22248 c.ctx_ = ctx 22249 return c 22250} 22251 22252// Header returns an http.Header that can be modified by the caller to 22253// add HTTP headers to the request. 22254func (c *OrdersSetlineitemmetadataCall) Header() http.Header { 22255 if c.header_ == nil { 22256 c.header_ = make(http.Header) 22257 } 22258 return c.header_ 22259} 22260 22261func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) { 22262 reqHeaders := make(http.Header) 22263 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 22264 for k, v := range c.header_ { 22265 reqHeaders[k] = v 22266 } 22267 reqHeaders.Set("User-Agent", c.s.userAgent()) 22268 var body io.Reader = nil 22269 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest) 22270 if err != nil { 22271 return nil, err 22272 } 22273 reqHeaders.Set("Content-Type", "application/json") 22274 c.urlParams_.Set("alt", alt) 22275 c.urlParams_.Set("prettyPrint", "false") 22276 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata") 22277 urls += "?" + c.urlParams_.Encode() 22278 req, err := http.NewRequest("POST", urls, body) 22279 if err != nil { 22280 return nil, err 22281 } 22282 req.Header = reqHeaders 22283 googleapi.Expand(req.URL, map[string]string{ 22284 "merchantId": strconv.FormatUint(c.merchantId, 10), 22285 "orderId": c.orderId, 22286 }) 22287 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22288} 22289 22290// Do executes the "content.orders.setlineitemmetadata" call. 22291// Exactly one of *OrdersSetLineItemMetadataResponse or error will be 22292// non-nil. Any non-2xx status code is an error. Response headers are in 22293// either *OrdersSetLineItemMetadataResponse.ServerResponse.Header or 22294// (if a response was returned at all) in 22295// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22296// whether the returned error was because http.StatusNotModified was 22297// returned. 22298func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) { 22299 gensupport.SetOptions(c.urlParams_, opts...) 22300 res, err := c.doRequest("json") 22301 if res != nil && res.StatusCode == http.StatusNotModified { 22302 if res.Body != nil { 22303 res.Body.Close() 22304 } 22305 return nil, &googleapi.Error{ 22306 Code: res.StatusCode, 22307 Header: res.Header, 22308 } 22309 } 22310 if err != nil { 22311 return nil, err 22312 } 22313 defer googleapi.CloseBody(res) 22314 if err := googleapi.CheckResponse(res); err != nil { 22315 return nil, err 22316 } 22317 ret := &OrdersSetLineItemMetadataResponse{ 22318 ServerResponse: googleapi.ServerResponse{ 22319 Header: res.Header, 22320 HTTPStatusCode: res.StatusCode, 22321 }, 22322 } 22323 target := &ret 22324 if err := gensupport.DecodeResponse(target, res); err != nil { 22325 return nil, err 22326 } 22327 return ret, nil 22328 // { 22329 // "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.", 22330 // "flatPath": "{merchantId}/orders/{orderId}/setLineItemMetadata", 22331 // "httpMethod": "POST", 22332 // "id": "content.orders.setlineitemmetadata", 22333 // "parameterOrder": [ 22334 // "merchantId", 22335 // "orderId" 22336 // ], 22337 // "parameters": { 22338 // "merchantId": { 22339 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22340 // "format": "uint64", 22341 // "location": "path", 22342 // "required": true, 22343 // "type": "string" 22344 // }, 22345 // "orderId": { 22346 // "description": "The ID of the order.", 22347 // "location": "path", 22348 // "required": true, 22349 // "type": "string" 22350 // } 22351 // }, 22352 // "path": "{merchantId}/orders/{orderId}/setLineItemMetadata", 22353 // "request": { 22354 // "$ref": "OrdersSetLineItemMetadataRequest" 22355 // }, 22356 // "response": { 22357 // "$ref": "OrdersSetLineItemMetadataResponse" 22358 // }, 22359 // "scopes": [ 22360 // "https://www.googleapis.com/auth/content" 22361 // ] 22362 // } 22363 22364} 22365 22366// method id "content.orders.shiplineitems": 22367 22368type OrdersShiplineitemsCall struct { 22369 s *APIService 22370 merchantId uint64 22371 orderId string 22372 ordersshiplineitemsrequest *OrdersShipLineItemsRequest 22373 urlParams_ gensupport.URLParams 22374 ctx_ context.Context 22375 header_ http.Header 22376} 22377 22378// Shiplineitems: Marks line item(s) as shipped. 22379// 22380// - merchantId: The ID of the account that manages the order. This 22381// cannot be a multi-client account. 22382// - orderId: The ID of the order. 22383func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall { 22384 c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22385 c.merchantId = merchantId 22386 c.orderId = orderId 22387 c.ordersshiplineitemsrequest = ordersshiplineitemsrequest 22388 return c 22389} 22390 22391// Fields allows partial responses to be retrieved. See 22392// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22393// for more information. 22394func (c *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall { 22395 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22396 return c 22397} 22398 22399// Context sets the context to be used in this call's Do method. Any 22400// pending HTTP request will be aborted if the provided context is 22401// canceled. 22402func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall { 22403 c.ctx_ = ctx 22404 return c 22405} 22406 22407// Header returns an http.Header that can be modified by the caller to 22408// add HTTP headers to the request. 22409func (c *OrdersShiplineitemsCall) Header() http.Header { 22410 if c.header_ == nil { 22411 c.header_ = make(http.Header) 22412 } 22413 return c.header_ 22414} 22415 22416func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) { 22417 reqHeaders := make(http.Header) 22418 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 22419 for k, v := range c.header_ { 22420 reqHeaders[k] = v 22421 } 22422 reqHeaders.Set("User-Agent", c.s.userAgent()) 22423 var body io.Reader = nil 22424 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest) 22425 if err != nil { 22426 return nil, err 22427 } 22428 reqHeaders.Set("Content-Type", "application/json") 22429 c.urlParams_.Set("alt", alt) 22430 c.urlParams_.Set("prettyPrint", "false") 22431 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems") 22432 urls += "?" + c.urlParams_.Encode() 22433 req, err := http.NewRequest("POST", urls, body) 22434 if err != nil { 22435 return nil, err 22436 } 22437 req.Header = reqHeaders 22438 googleapi.Expand(req.URL, map[string]string{ 22439 "merchantId": strconv.FormatUint(c.merchantId, 10), 22440 "orderId": c.orderId, 22441 }) 22442 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22443} 22444 22445// Do executes the "content.orders.shiplineitems" call. 22446// Exactly one of *OrdersShipLineItemsResponse or error will be non-nil. 22447// Any non-2xx status code is an error. Response headers are in either 22448// *OrdersShipLineItemsResponse.ServerResponse.Header or (if a response 22449// was returned at all) in error.(*googleapi.Error).Header. Use 22450// googleapi.IsNotModified to check whether the returned error was 22451// because http.StatusNotModified was returned. 22452func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) { 22453 gensupport.SetOptions(c.urlParams_, opts...) 22454 res, err := c.doRequest("json") 22455 if res != nil && res.StatusCode == http.StatusNotModified { 22456 if res.Body != nil { 22457 res.Body.Close() 22458 } 22459 return nil, &googleapi.Error{ 22460 Code: res.StatusCode, 22461 Header: res.Header, 22462 } 22463 } 22464 if err != nil { 22465 return nil, err 22466 } 22467 defer googleapi.CloseBody(res) 22468 if err := googleapi.CheckResponse(res); err != nil { 22469 return nil, err 22470 } 22471 ret := &OrdersShipLineItemsResponse{ 22472 ServerResponse: googleapi.ServerResponse{ 22473 Header: res.Header, 22474 HTTPStatusCode: res.StatusCode, 22475 }, 22476 } 22477 target := &ret 22478 if err := gensupport.DecodeResponse(target, res); err != nil { 22479 return nil, err 22480 } 22481 return ret, nil 22482 // { 22483 // "description": "Marks line item(s) as shipped.", 22484 // "flatPath": "{merchantId}/orders/{orderId}/shipLineItems", 22485 // "httpMethod": "POST", 22486 // "id": "content.orders.shiplineitems", 22487 // "parameterOrder": [ 22488 // "merchantId", 22489 // "orderId" 22490 // ], 22491 // "parameters": { 22492 // "merchantId": { 22493 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22494 // "format": "uint64", 22495 // "location": "path", 22496 // "required": true, 22497 // "type": "string" 22498 // }, 22499 // "orderId": { 22500 // "description": "The ID of the order.", 22501 // "location": "path", 22502 // "required": true, 22503 // "type": "string" 22504 // } 22505 // }, 22506 // "path": "{merchantId}/orders/{orderId}/shipLineItems", 22507 // "request": { 22508 // "$ref": "OrdersShipLineItemsRequest" 22509 // }, 22510 // "response": { 22511 // "$ref": "OrdersShipLineItemsResponse" 22512 // }, 22513 // "scopes": [ 22514 // "https://www.googleapis.com/auth/content" 22515 // ] 22516 // } 22517 22518} 22519 22520// method id "content.orders.updatelineitemshippingdetails": 22521 22522type OrdersUpdatelineitemshippingdetailsCall struct { 22523 s *APIService 22524 merchantId uint64 22525 orderId string 22526 ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest 22527 urlParams_ gensupport.URLParams 22528 ctx_ context.Context 22529 header_ http.Header 22530} 22531 22532// Updatelineitemshippingdetails: Updates ship by and delivery by dates 22533// for a line item. 22534// 22535// - merchantId: The ID of the account that manages the order. This 22536// cannot be a multi-client account. 22537// - orderId: The ID of the order. 22538func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall { 22539 c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22540 c.merchantId = merchantId 22541 c.orderId = orderId 22542 c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest 22543 return c 22544} 22545 22546// Fields allows partial responses to be retrieved. See 22547// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22548// for more information. 22549func (c *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall { 22550 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22551 return c 22552} 22553 22554// Context sets the context to be used in this call's Do method. Any 22555// pending HTTP request will be aborted if the provided context is 22556// canceled. 22557func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall { 22558 c.ctx_ = ctx 22559 return c 22560} 22561 22562// Header returns an http.Header that can be modified by the caller to 22563// add HTTP headers to the request. 22564func (c *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header { 22565 if c.header_ == nil { 22566 c.header_ = make(http.Header) 22567 } 22568 return c.header_ 22569} 22570 22571func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) { 22572 reqHeaders := make(http.Header) 22573 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 22574 for k, v := range c.header_ { 22575 reqHeaders[k] = v 22576 } 22577 reqHeaders.Set("User-Agent", c.s.userAgent()) 22578 var body io.Reader = nil 22579 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatelineitemshippingdetailsrequest) 22580 if err != nil { 22581 return nil, err 22582 } 22583 reqHeaders.Set("Content-Type", "application/json") 22584 c.urlParams_.Set("alt", alt) 22585 c.urlParams_.Set("prettyPrint", "false") 22586 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails") 22587 urls += "?" + c.urlParams_.Encode() 22588 req, err := http.NewRequest("POST", urls, body) 22589 if err != nil { 22590 return nil, err 22591 } 22592 req.Header = reqHeaders 22593 googleapi.Expand(req.URL, map[string]string{ 22594 "merchantId": strconv.FormatUint(c.merchantId, 10), 22595 "orderId": c.orderId, 22596 }) 22597 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22598} 22599 22600// Do executes the "content.orders.updatelineitemshippingdetails" call. 22601// Exactly one of *OrdersUpdateLineItemShippingDetailsResponse or error 22602// will be non-nil. Any non-2xx status code is an error. Response 22603// headers are in either 22604// *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or 22605// (if a response was returned at all) in 22606// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22607// whether the returned error was because http.StatusNotModified was 22608// returned. 22609func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) { 22610 gensupport.SetOptions(c.urlParams_, opts...) 22611 res, err := c.doRequest("json") 22612 if res != nil && res.StatusCode == http.StatusNotModified { 22613 if res.Body != nil { 22614 res.Body.Close() 22615 } 22616 return nil, &googleapi.Error{ 22617 Code: res.StatusCode, 22618 Header: res.Header, 22619 } 22620 } 22621 if err != nil { 22622 return nil, err 22623 } 22624 defer googleapi.CloseBody(res) 22625 if err := googleapi.CheckResponse(res); err != nil { 22626 return nil, err 22627 } 22628 ret := &OrdersUpdateLineItemShippingDetailsResponse{ 22629 ServerResponse: googleapi.ServerResponse{ 22630 Header: res.Header, 22631 HTTPStatusCode: res.StatusCode, 22632 }, 22633 } 22634 target := &ret 22635 if err := gensupport.DecodeResponse(target, res); err != nil { 22636 return nil, err 22637 } 22638 return ret, nil 22639 // { 22640 // "description": "Updates ship by and delivery by dates for a line item.", 22641 // "flatPath": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", 22642 // "httpMethod": "POST", 22643 // "id": "content.orders.updatelineitemshippingdetails", 22644 // "parameterOrder": [ 22645 // "merchantId", 22646 // "orderId" 22647 // ], 22648 // "parameters": { 22649 // "merchantId": { 22650 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22651 // "format": "uint64", 22652 // "location": "path", 22653 // "required": true, 22654 // "type": "string" 22655 // }, 22656 // "orderId": { 22657 // "description": "The ID of the order.", 22658 // "location": "path", 22659 // "required": true, 22660 // "type": "string" 22661 // } 22662 // }, 22663 // "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", 22664 // "request": { 22665 // "$ref": "OrdersUpdateLineItemShippingDetailsRequest" 22666 // }, 22667 // "response": { 22668 // "$ref": "OrdersUpdateLineItemShippingDetailsResponse" 22669 // }, 22670 // "scopes": [ 22671 // "https://www.googleapis.com/auth/content" 22672 // ] 22673 // } 22674 22675} 22676 22677// method id "content.orders.updatemerchantorderid": 22678 22679type OrdersUpdatemerchantorderidCall struct { 22680 s *APIService 22681 merchantId uint64 22682 orderId string 22683 ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest 22684 urlParams_ gensupport.URLParams 22685 ctx_ context.Context 22686 header_ http.Header 22687} 22688 22689// Updatemerchantorderid: Updates the merchant order ID for a given 22690// order. 22691// 22692// - merchantId: The ID of the account that manages the order. This 22693// cannot be a multi-client account. 22694// - orderId: The ID of the order. 22695func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall { 22696 c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22697 c.merchantId = merchantId 22698 c.orderId = orderId 22699 c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest 22700 return c 22701} 22702 22703// Fields allows partial responses to be retrieved. See 22704// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22705// for more information. 22706func (c *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall { 22707 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22708 return c 22709} 22710 22711// Context sets the context to be used in this call's Do method. Any 22712// pending HTTP request will be aborted if the provided context is 22713// canceled. 22714func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall { 22715 c.ctx_ = ctx 22716 return c 22717} 22718 22719// Header returns an http.Header that can be modified by the caller to 22720// add HTTP headers to the request. 22721func (c *OrdersUpdatemerchantorderidCall) Header() http.Header { 22722 if c.header_ == nil { 22723 c.header_ = make(http.Header) 22724 } 22725 return c.header_ 22726} 22727 22728func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) { 22729 reqHeaders := make(http.Header) 22730 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 22731 for k, v := range c.header_ { 22732 reqHeaders[k] = v 22733 } 22734 reqHeaders.Set("User-Agent", c.s.userAgent()) 22735 var body io.Reader = nil 22736 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest) 22737 if err != nil { 22738 return nil, err 22739 } 22740 reqHeaders.Set("Content-Type", "application/json") 22741 c.urlParams_.Set("alt", alt) 22742 c.urlParams_.Set("prettyPrint", "false") 22743 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId") 22744 urls += "?" + c.urlParams_.Encode() 22745 req, err := http.NewRequest("POST", urls, body) 22746 if err != nil { 22747 return nil, err 22748 } 22749 req.Header = reqHeaders 22750 googleapi.Expand(req.URL, map[string]string{ 22751 "merchantId": strconv.FormatUint(c.merchantId, 10), 22752 "orderId": c.orderId, 22753 }) 22754 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22755} 22756 22757// Do executes the "content.orders.updatemerchantorderid" call. 22758// Exactly one of *OrdersUpdateMerchantOrderIdResponse or error will be 22759// non-nil. Any non-2xx status code is an error. Response headers are in 22760// either *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or 22761// (if a response was returned at all) in 22762// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22763// whether the returned error was because http.StatusNotModified was 22764// returned. 22765func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) { 22766 gensupport.SetOptions(c.urlParams_, opts...) 22767 res, err := c.doRequest("json") 22768 if res != nil && res.StatusCode == http.StatusNotModified { 22769 if res.Body != nil { 22770 res.Body.Close() 22771 } 22772 return nil, &googleapi.Error{ 22773 Code: res.StatusCode, 22774 Header: res.Header, 22775 } 22776 } 22777 if err != nil { 22778 return nil, err 22779 } 22780 defer googleapi.CloseBody(res) 22781 if err := googleapi.CheckResponse(res); err != nil { 22782 return nil, err 22783 } 22784 ret := &OrdersUpdateMerchantOrderIdResponse{ 22785 ServerResponse: googleapi.ServerResponse{ 22786 Header: res.Header, 22787 HTTPStatusCode: res.StatusCode, 22788 }, 22789 } 22790 target := &ret 22791 if err := gensupport.DecodeResponse(target, res); err != nil { 22792 return nil, err 22793 } 22794 return ret, nil 22795 // { 22796 // "description": "Updates the merchant order ID for a given order.", 22797 // "flatPath": "{merchantId}/orders/{orderId}/updateMerchantOrderId", 22798 // "httpMethod": "POST", 22799 // "id": "content.orders.updatemerchantorderid", 22800 // "parameterOrder": [ 22801 // "merchantId", 22802 // "orderId" 22803 // ], 22804 // "parameters": { 22805 // "merchantId": { 22806 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22807 // "format": "uint64", 22808 // "location": "path", 22809 // "required": true, 22810 // "type": "string" 22811 // }, 22812 // "orderId": { 22813 // "description": "The ID of the order.", 22814 // "location": "path", 22815 // "required": true, 22816 // "type": "string" 22817 // } 22818 // }, 22819 // "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId", 22820 // "request": { 22821 // "$ref": "OrdersUpdateMerchantOrderIdRequest" 22822 // }, 22823 // "response": { 22824 // "$ref": "OrdersUpdateMerchantOrderIdResponse" 22825 // }, 22826 // "scopes": [ 22827 // "https://www.googleapis.com/auth/content" 22828 // ] 22829 // } 22830 22831} 22832 22833// method id "content.orders.updateshipment": 22834 22835type OrdersUpdateshipmentCall struct { 22836 s *APIService 22837 merchantId uint64 22838 orderId string 22839 ordersupdateshipmentrequest *OrdersUpdateShipmentRequest 22840 urlParams_ gensupport.URLParams 22841 ctx_ context.Context 22842 header_ http.Header 22843} 22844 22845// Updateshipment: Updates a shipment's status, carrier, and/or tracking 22846// ID. 22847// 22848// - merchantId: The ID of the account that manages the order. This 22849// cannot be a multi-client account. 22850// - orderId: The ID of the order. 22851func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall { 22852 c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22853 c.merchantId = merchantId 22854 c.orderId = orderId 22855 c.ordersupdateshipmentrequest = ordersupdateshipmentrequest 22856 return c 22857} 22858 22859// Fields allows partial responses to be retrieved. See 22860// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22861// for more information. 22862func (c *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall { 22863 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22864 return c 22865} 22866 22867// Context sets the context to be used in this call's Do method. Any 22868// pending HTTP request will be aborted if the provided context is 22869// canceled. 22870func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall { 22871 c.ctx_ = ctx 22872 return c 22873} 22874 22875// Header returns an http.Header that can be modified by the caller to 22876// add HTTP headers to the request. 22877func (c *OrdersUpdateshipmentCall) Header() http.Header { 22878 if c.header_ == nil { 22879 c.header_ = make(http.Header) 22880 } 22881 return c.header_ 22882} 22883 22884func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) { 22885 reqHeaders := make(http.Header) 22886 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 22887 for k, v := range c.header_ { 22888 reqHeaders[k] = v 22889 } 22890 reqHeaders.Set("User-Agent", c.s.userAgent()) 22891 var body io.Reader = nil 22892 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest) 22893 if err != nil { 22894 return nil, err 22895 } 22896 reqHeaders.Set("Content-Type", "application/json") 22897 c.urlParams_.Set("alt", alt) 22898 c.urlParams_.Set("prettyPrint", "false") 22899 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment") 22900 urls += "?" + c.urlParams_.Encode() 22901 req, err := http.NewRequest("POST", urls, body) 22902 if err != nil { 22903 return nil, err 22904 } 22905 req.Header = reqHeaders 22906 googleapi.Expand(req.URL, map[string]string{ 22907 "merchantId": strconv.FormatUint(c.merchantId, 10), 22908 "orderId": c.orderId, 22909 }) 22910 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22911} 22912 22913// Do executes the "content.orders.updateshipment" call. 22914// Exactly one of *OrdersUpdateShipmentResponse or error will be 22915// non-nil. Any non-2xx status code is an error. Response headers are in 22916// either *OrdersUpdateShipmentResponse.ServerResponse.Header or (if a 22917// response was returned at all) in error.(*googleapi.Error).Header. Use 22918// googleapi.IsNotModified to check whether the returned error was 22919// because http.StatusNotModified was returned. 22920func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) { 22921 gensupport.SetOptions(c.urlParams_, opts...) 22922 res, err := c.doRequest("json") 22923 if res != nil && res.StatusCode == http.StatusNotModified { 22924 if res.Body != nil { 22925 res.Body.Close() 22926 } 22927 return nil, &googleapi.Error{ 22928 Code: res.StatusCode, 22929 Header: res.Header, 22930 } 22931 } 22932 if err != nil { 22933 return nil, err 22934 } 22935 defer googleapi.CloseBody(res) 22936 if err := googleapi.CheckResponse(res); err != nil { 22937 return nil, err 22938 } 22939 ret := &OrdersUpdateShipmentResponse{ 22940 ServerResponse: googleapi.ServerResponse{ 22941 Header: res.Header, 22942 HTTPStatusCode: res.StatusCode, 22943 }, 22944 } 22945 target := &ret 22946 if err := gensupport.DecodeResponse(target, res); err != nil { 22947 return nil, err 22948 } 22949 return ret, nil 22950 // { 22951 // "description": "Updates a shipment's status, carrier, and/or tracking ID.", 22952 // "flatPath": "{merchantId}/orders/{orderId}/updateShipment", 22953 // "httpMethod": "POST", 22954 // "id": "content.orders.updateshipment", 22955 // "parameterOrder": [ 22956 // "merchantId", 22957 // "orderId" 22958 // ], 22959 // "parameters": { 22960 // "merchantId": { 22961 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 22962 // "format": "uint64", 22963 // "location": "path", 22964 // "required": true, 22965 // "type": "string" 22966 // }, 22967 // "orderId": { 22968 // "description": "The ID of the order.", 22969 // "location": "path", 22970 // "required": true, 22971 // "type": "string" 22972 // } 22973 // }, 22974 // "path": "{merchantId}/orders/{orderId}/updateShipment", 22975 // "request": { 22976 // "$ref": "OrdersUpdateShipmentRequest" 22977 // }, 22978 // "response": { 22979 // "$ref": "OrdersUpdateShipmentResponse" 22980 // }, 22981 // "scopes": [ 22982 // "https://www.googleapis.com/auth/content" 22983 // ] 22984 // } 22985 22986} 22987 22988// method id "content.pos.custombatch": 22989 22990type PosCustombatchCall struct { 22991 s *APIService 22992 poscustombatchrequest *PosCustomBatchRequest 22993 urlParams_ gensupport.URLParams 22994 ctx_ context.Context 22995 header_ http.Header 22996} 22997 22998// Custombatch: Batches multiple POS-related calls in a single request. 22999func (r *PosService) Custombatch(poscustombatchrequest *PosCustomBatchRequest) *PosCustombatchCall { 23000 c := &PosCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23001 c.poscustombatchrequest = poscustombatchrequest 23002 return c 23003} 23004 23005// DryRun sets the optional parameter "dryRun": Flag to simulate a 23006// request like in a live environment. If set to true, dry-run mode 23007// checks the validity of the request and returns errors (if any). 23008func (c *PosCustombatchCall) DryRun(dryRun bool) *PosCustombatchCall { 23009 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23010 return c 23011} 23012 23013// Fields allows partial responses to be retrieved. See 23014// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23015// for more information. 23016func (c *PosCustombatchCall) Fields(s ...googleapi.Field) *PosCustombatchCall { 23017 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23018 return c 23019} 23020 23021// Context sets the context to be used in this call's Do method. Any 23022// pending HTTP request will be aborted if the provided context is 23023// canceled. 23024func (c *PosCustombatchCall) Context(ctx context.Context) *PosCustombatchCall { 23025 c.ctx_ = ctx 23026 return c 23027} 23028 23029// Header returns an http.Header that can be modified by the caller to 23030// add HTTP headers to the request. 23031func (c *PosCustombatchCall) Header() http.Header { 23032 if c.header_ == nil { 23033 c.header_ = make(http.Header) 23034 } 23035 return c.header_ 23036} 23037 23038func (c *PosCustombatchCall) doRequest(alt string) (*http.Response, error) { 23039 reqHeaders := make(http.Header) 23040 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 23041 for k, v := range c.header_ { 23042 reqHeaders[k] = v 23043 } 23044 reqHeaders.Set("User-Agent", c.s.userAgent()) 23045 var body io.Reader = nil 23046 body, err := googleapi.WithoutDataWrapper.JSONReader(c.poscustombatchrequest) 23047 if err != nil { 23048 return nil, err 23049 } 23050 reqHeaders.Set("Content-Type", "application/json") 23051 c.urlParams_.Set("alt", alt) 23052 c.urlParams_.Set("prettyPrint", "false") 23053 urls := googleapi.ResolveRelative(c.s.BasePath, "pos/batch") 23054 urls += "?" + c.urlParams_.Encode() 23055 req, err := http.NewRequest("POST", urls, body) 23056 if err != nil { 23057 return nil, err 23058 } 23059 req.Header = reqHeaders 23060 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23061} 23062 23063// Do executes the "content.pos.custombatch" call. 23064// Exactly one of *PosCustomBatchResponse or error will be non-nil. Any 23065// non-2xx status code is an error. Response headers are in either 23066// *PosCustomBatchResponse.ServerResponse.Header or (if a response was 23067// returned at all) in error.(*googleapi.Error).Header. Use 23068// googleapi.IsNotModified to check whether the returned error was 23069// because http.StatusNotModified was returned. 23070func (c *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchResponse, error) { 23071 gensupport.SetOptions(c.urlParams_, opts...) 23072 res, err := c.doRequest("json") 23073 if res != nil && res.StatusCode == http.StatusNotModified { 23074 if res.Body != nil { 23075 res.Body.Close() 23076 } 23077 return nil, &googleapi.Error{ 23078 Code: res.StatusCode, 23079 Header: res.Header, 23080 } 23081 } 23082 if err != nil { 23083 return nil, err 23084 } 23085 defer googleapi.CloseBody(res) 23086 if err := googleapi.CheckResponse(res); err != nil { 23087 return nil, err 23088 } 23089 ret := &PosCustomBatchResponse{ 23090 ServerResponse: googleapi.ServerResponse{ 23091 Header: res.Header, 23092 HTTPStatusCode: res.StatusCode, 23093 }, 23094 } 23095 target := &ret 23096 if err := gensupport.DecodeResponse(target, res); err != nil { 23097 return nil, err 23098 } 23099 return ret, nil 23100 // { 23101 // "description": "Batches multiple POS-related calls in a single request.", 23102 // "flatPath": "pos/batch", 23103 // "httpMethod": "POST", 23104 // "id": "content.pos.custombatch", 23105 // "parameterOrder": [], 23106 // "parameters": { 23107 // "dryRun": { 23108 // "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).", 23109 // "location": "query", 23110 // "type": "boolean" 23111 // } 23112 // }, 23113 // "path": "pos/batch", 23114 // "request": { 23115 // "$ref": "PosCustomBatchRequest" 23116 // }, 23117 // "response": { 23118 // "$ref": "PosCustomBatchResponse" 23119 // }, 23120 // "scopes": [ 23121 // "https://www.googleapis.com/auth/content" 23122 // ] 23123 // } 23124 23125} 23126 23127// method id "content.pos.delete": 23128 23129type PosDeleteCall struct { 23130 s *APIService 23131 merchantId uint64 23132 targetMerchantId uint64 23133 storeCode string 23134 urlParams_ gensupport.URLParams 23135 ctx_ context.Context 23136 header_ http.Header 23137} 23138 23139// Delete: Deletes a store for the given merchant. 23140// 23141// - merchantId: The ID of the POS or inventory data provider. 23142// - storeCode: A store code that is unique per merchant. 23143// - targetMerchantId: The ID of the target merchant. 23144func (r *PosService) Delete(merchantId uint64, targetMerchantId uint64, storeCode string) *PosDeleteCall { 23145 c := &PosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23146 c.merchantId = merchantId 23147 c.targetMerchantId = targetMerchantId 23148 c.storeCode = storeCode 23149 return c 23150} 23151 23152// DryRun sets the optional parameter "dryRun": Flag to simulate a 23153// request like in a live environment. If set to true, dry-run mode 23154// checks the validity of the request and returns errors (if any). 23155func (c *PosDeleteCall) DryRun(dryRun bool) *PosDeleteCall { 23156 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23157 return c 23158} 23159 23160// Fields allows partial responses to be retrieved. See 23161// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23162// for more information. 23163func (c *PosDeleteCall) Fields(s ...googleapi.Field) *PosDeleteCall { 23164 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23165 return c 23166} 23167 23168// Context sets the context to be used in this call's Do method. Any 23169// pending HTTP request will be aborted if the provided context is 23170// canceled. 23171func (c *PosDeleteCall) Context(ctx context.Context) *PosDeleteCall { 23172 c.ctx_ = ctx 23173 return c 23174} 23175 23176// Header returns an http.Header that can be modified by the caller to 23177// add HTTP headers to the request. 23178func (c *PosDeleteCall) Header() http.Header { 23179 if c.header_ == nil { 23180 c.header_ = make(http.Header) 23181 } 23182 return c.header_ 23183} 23184 23185func (c *PosDeleteCall) doRequest(alt string) (*http.Response, error) { 23186 reqHeaders := make(http.Header) 23187 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 23188 for k, v := range c.header_ { 23189 reqHeaders[k] = v 23190 } 23191 reqHeaders.Set("User-Agent", c.s.userAgent()) 23192 var body io.Reader = nil 23193 c.urlParams_.Set("alt", alt) 23194 c.urlParams_.Set("prettyPrint", "false") 23195 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") 23196 urls += "?" + c.urlParams_.Encode() 23197 req, err := http.NewRequest("DELETE", urls, body) 23198 if err != nil { 23199 return nil, err 23200 } 23201 req.Header = reqHeaders 23202 googleapi.Expand(req.URL, map[string]string{ 23203 "merchantId": strconv.FormatUint(c.merchantId, 10), 23204 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23205 "storeCode": c.storeCode, 23206 }) 23207 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23208} 23209 23210// Do executes the "content.pos.delete" call. 23211func (c *PosDeleteCall) Do(opts ...googleapi.CallOption) error { 23212 gensupport.SetOptions(c.urlParams_, opts...) 23213 res, err := c.doRequest("json") 23214 if err != nil { 23215 return err 23216 } 23217 defer googleapi.CloseBody(res) 23218 if err := googleapi.CheckResponse(res); err != nil { 23219 return err 23220 } 23221 return nil 23222 // { 23223 // "description": "Deletes a store for the given merchant.", 23224 // "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23225 // "httpMethod": "DELETE", 23226 // "id": "content.pos.delete", 23227 // "parameterOrder": [ 23228 // "merchantId", 23229 // "targetMerchantId", 23230 // "storeCode" 23231 // ], 23232 // "parameters": { 23233 // "dryRun": { 23234 // "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).", 23235 // "location": "query", 23236 // "type": "boolean" 23237 // }, 23238 // "merchantId": { 23239 // "description": "The ID of the POS or inventory data provider.", 23240 // "format": "uint64", 23241 // "location": "path", 23242 // "required": true, 23243 // "type": "string" 23244 // }, 23245 // "storeCode": { 23246 // "description": "A store code that is unique per merchant.", 23247 // "location": "path", 23248 // "required": true, 23249 // "type": "string" 23250 // }, 23251 // "targetMerchantId": { 23252 // "description": "The ID of the target merchant.", 23253 // "format": "uint64", 23254 // "location": "path", 23255 // "required": true, 23256 // "type": "string" 23257 // } 23258 // }, 23259 // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23260 // "scopes": [ 23261 // "https://www.googleapis.com/auth/content" 23262 // ] 23263 // } 23264 23265} 23266 23267// method id "content.pos.get": 23268 23269type PosGetCall struct { 23270 s *APIService 23271 merchantId uint64 23272 targetMerchantId uint64 23273 storeCode string 23274 urlParams_ gensupport.URLParams 23275 ifNoneMatch_ string 23276 ctx_ context.Context 23277 header_ http.Header 23278} 23279 23280// Get: Retrieves information about the given store. 23281// 23282// - merchantId: The ID of the POS or inventory data provider. 23283// - storeCode: A store code that is unique per merchant. 23284// - targetMerchantId: The ID of the target merchant. 23285func (r *PosService) Get(merchantId uint64, targetMerchantId uint64, storeCode string) *PosGetCall { 23286 c := &PosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23287 c.merchantId = merchantId 23288 c.targetMerchantId = targetMerchantId 23289 c.storeCode = storeCode 23290 return c 23291} 23292 23293// Fields allows partial responses to be retrieved. See 23294// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23295// for more information. 23296func (c *PosGetCall) Fields(s ...googleapi.Field) *PosGetCall { 23297 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23298 return c 23299} 23300 23301// IfNoneMatch sets the optional parameter which makes the operation 23302// fail if the object's ETag matches the given value. This is useful for 23303// getting updates only after the object has changed since the last 23304// request. Use googleapi.IsNotModified to check whether the response 23305// error from Do is the result of In-None-Match. 23306func (c *PosGetCall) IfNoneMatch(entityTag string) *PosGetCall { 23307 c.ifNoneMatch_ = entityTag 23308 return c 23309} 23310 23311// Context sets the context to be used in this call's Do method. Any 23312// pending HTTP request will be aborted if the provided context is 23313// canceled. 23314func (c *PosGetCall) Context(ctx context.Context) *PosGetCall { 23315 c.ctx_ = ctx 23316 return c 23317} 23318 23319// Header returns an http.Header that can be modified by the caller to 23320// add HTTP headers to the request. 23321func (c *PosGetCall) Header() http.Header { 23322 if c.header_ == nil { 23323 c.header_ = make(http.Header) 23324 } 23325 return c.header_ 23326} 23327 23328func (c *PosGetCall) doRequest(alt string) (*http.Response, error) { 23329 reqHeaders := make(http.Header) 23330 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 23331 for k, v := range c.header_ { 23332 reqHeaders[k] = v 23333 } 23334 reqHeaders.Set("User-Agent", c.s.userAgent()) 23335 if c.ifNoneMatch_ != "" { 23336 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23337 } 23338 var body io.Reader = nil 23339 c.urlParams_.Set("alt", alt) 23340 c.urlParams_.Set("prettyPrint", "false") 23341 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}") 23342 urls += "?" + c.urlParams_.Encode() 23343 req, err := http.NewRequest("GET", urls, body) 23344 if err != nil { 23345 return nil, err 23346 } 23347 req.Header = reqHeaders 23348 googleapi.Expand(req.URL, map[string]string{ 23349 "merchantId": strconv.FormatUint(c.merchantId, 10), 23350 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23351 "storeCode": c.storeCode, 23352 }) 23353 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23354} 23355 23356// Do executes the "content.pos.get" call. 23357// Exactly one of *PosStore or error will be non-nil. Any non-2xx status 23358// code is an error. Response headers are in either 23359// *PosStore.ServerResponse.Header or (if a response was returned at 23360// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 23361// to check whether the returned error was because 23362// http.StatusNotModified was returned. 23363func (c *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { 23364 gensupport.SetOptions(c.urlParams_, opts...) 23365 res, err := c.doRequest("json") 23366 if res != nil && res.StatusCode == http.StatusNotModified { 23367 if res.Body != nil { 23368 res.Body.Close() 23369 } 23370 return nil, &googleapi.Error{ 23371 Code: res.StatusCode, 23372 Header: res.Header, 23373 } 23374 } 23375 if err != nil { 23376 return nil, err 23377 } 23378 defer googleapi.CloseBody(res) 23379 if err := googleapi.CheckResponse(res); err != nil { 23380 return nil, err 23381 } 23382 ret := &PosStore{ 23383 ServerResponse: googleapi.ServerResponse{ 23384 Header: res.Header, 23385 HTTPStatusCode: res.StatusCode, 23386 }, 23387 } 23388 target := &ret 23389 if err := gensupport.DecodeResponse(target, res); err != nil { 23390 return nil, err 23391 } 23392 return ret, nil 23393 // { 23394 // "description": "Retrieves information about the given store.", 23395 // "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23396 // "httpMethod": "GET", 23397 // "id": "content.pos.get", 23398 // "parameterOrder": [ 23399 // "merchantId", 23400 // "targetMerchantId", 23401 // "storeCode" 23402 // ], 23403 // "parameters": { 23404 // "merchantId": { 23405 // "description": "The ID of the POS or inventory data provider.", 23406 // "format": "uint64", 23407 // "location": "path", 23408 // "required": true, 23409 // "type": "string" 23410 // }, 23411 // "storeCode": { 23412 // "description": "A store code that is unique per merchant.", 23413 // "location": "path", 23414 // "required": true, 23415 // "type": "string" 23416 // }, 23417 // "targetMerchantId": { 23418 // "description": "The ID of the target merchant.", 23419 // "format": "uint64", 23420 // "location": "path", 23421 // "required": true, 23422 // "type": "string" 23423 // } 23424 // }, 23425 // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", 23426 // "response": { 23427 // "$ref": "PosStore" 23428 // }, 23429 // "scopes": [ 23430 // "https://www.googleapis.com/auth/content" 23431 // ] 23432 // } 23433 23434} 23435 23436// method id "content.pos.insert": 23437 23438type PosInsertCall struct { 23439 s *APIService 23440 merchantId uint64 23441 targetMerchantId uint64 23442 posstore *PosStore 23443 urlParams_ gensupport.URLParams 23444 ctx_ context.Context 23445 header_ http.Header 23446} 23447 23448// Insert: Creates a store for the given merchant. 23449// 23450// - merchantId: The ID of the POS or inventory data provider. 23451// - targetMerchantId: The ID of the target merchant. 23452func (r *PosService) Insert(merchantId uint64, targetMerchantId uint64, posstore *PosStore) *PosInsertCall { 23453 c := &PosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23454 c.merchantId = merchantId 23455 c.targetMerchantId = targetMerchantId 23456 c.posstore = posstore 23457 return c 23458} 23459 23460// DryRun sets the optional parameter "dryRun": Flag to simulate a 23461// request like in a live environment. If set to true, dry-run mode 23462// checks the validity of the request and returns errors (if any). 23463func (c *PosInsertCall) DryRun(dryRun bool) *PosInsertCall { 23464 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23465 return c 23466} 23467 23468// Fields allows partial responses to be retrieved. See 23469// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23470// for more information. 23471func (c *PosInsertCall) Fields(s ...googleapi.Field) *PosInsertCall { 23472 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23473 return c 23474} 23475 23476// Context sets the context to be used in this call's Do method. Any 23477// pending HTTP request will be aborted if the provided context is 23478// canceled. 23479func (c *PosInsertCall) Context(ctx context.Context) *PosInsertCall { 23480 c.ctx_ = ctx 23481 return c 23482} 23483 23484// Header returns an http.Header that can be modified by the caller to 23485// add HTTP headers to the request. 23486func (c *PosInsertCall) Header() http.Header { 23487 if c.header_ == nil { 23488 c.header_ = make(http.Header) 23489 } 23490 return c.header_ 23491} 23492 23493func (c *PosInsertCall) doRequest(alt string) (*http.Response, error) { 23494 reqHeaders := make(http.Header) 23495 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 23496 for k, v := range c.header_ { 23497 reqHeaders[k] = v 23498 } 23499 reqHeaders.Set("User-Agent", c.s.userAgent()) 23500 var body io.Reader = nil 23501 body, err := googleapi.WithoutDataWrapper.JSONReader(c.posstore) 23502 if err != nil { 23503 return nil, err 23504 } 23505 reqHeaders.Set("Content-Type", "application/json") 23506 c.urlParams_.Set("alt", alt) 23507 c.urlParams_.Set("prettyPrint", "false") 23508 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") 23509 urls += "?" + c.urlParams_.Encode() 23510 req, err := http.NewRequest("POST", urls, body) 23511 if err != nil { 23512 return nil, err 23513 } 23514 req.Header = reqHeaders 23515 googleapi.Expand(req.URL, map[string]string{ 23516 "merchantId": strconv.FormatUint(c.merchantId, 10), 23517 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23518 }) 23519 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23520} 23521 23522// Do executes the "content.pos.insert" call. 23523// Exactly one of *PosStore or error will be non-nil. Any non-2xx status 23524// code is an error. Response headers are in either 23525// *PosStore.ServerResponse.Header or (if a response was returned at 23526// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 23527// to check whether the returned error was because 23528// http.StatusNotModified was returned. 23529func (c *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) { 23530 gensupport.SetOptions(c.urlParams_, opts...) 23531 res, err := c.doRequest("json") 23532 if res != nil && res.StatusCode == http.StatusNotModified { 23533 if res.Body != nil { 23534 res.Body.Close() 23535 } 23536 return nil, &googleapi.Error{ 23537 Code: res.StatusCode, 23538 Header: res.Header, 23539 } 23540 } 23541 if err != nil { 23542 return nil, err 23543 } 23544 defer googleapi.CloseBody(res) 23545 if err := googleapi.CheckResponse(res); err != nil { 23546 return nil, err 23547 } 23548 ret := &PosStore{ 23549 ServerResponse: googleapi.ServerResponse{ 23550 Header: res.Header, 23551 HTTPStatusCode: res.StatusCode, 23552 }, 23553 } 23554 target := &ret 23555 if err := gensupport.DecodeResponse(target, res); err != nil { 23556 return nil, err 23557 } 23558 return ret, nil 23559 // { 23560 // "description": "Creates a store for the given merchant.", 23561 // "flatPath": "{merchantId}/pos/{targetMerchantId}/store", 23562 // "httpMethod": "POST", 23563 // "id": "content.pos.insert", 23564 // "parameterOrder": [ 23565 // "merchantId", 23566 // "targetMerchantId" 23567 // ], 23568 // "parameters": { 23569 // "dryRun": { 23570 // "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).", 23571 // "location": "query", 23572 // "type": "boolean" 23573 // }, 23574 // "merchantId": { 23575 // "description": "The ID of the POS or inventory data provider.", 23576 // "format": "uint64", 23577 // "location": "path", 23578 // "required": true, 23579 // "type": "string" 23580 // }, 23581 // "targetMerchantId": { 23582 // "description": "The ID of the target merchant.", 23583 // "format": "uint64", 23584 // "location": "path", 23585 // "required": true, 23586 // "type": "string" 23587 // } 23588 // }, 23589 // "path": "{merchantId}/pos/{targetMerchantId}/store", 23590 // "request": { 23591 // "$ref": "PosStore" 23592 // }, 23593 // "response": { 23594 // "$ref": "PosStore" 23595 // }, 23596 // "scopes": [ 23597 // "https://www.googleapis.com/auth/content" 23598 // ] 23599 // } 23600 23601} 23602 23603// method id "content.pos.inventory": 23604 23605type PosInventoryCall struct { 23606 s *APIService 23607 merchantId uint64 23608 targetMerchantId uint64 23609 posinventoryrequest *PosInventoryRequest 23610 urlParams_ gensupport.URLParams 23611 ctx_ context.Context 23612 header_ http.Header 23613} 23614 23615// Inventory: Submit inventory for the given merchant. 23616// 23617// - merchantId: The ID of the POS or inventory data provider. 23618// - targetMerchantId: The ID of the target merchant. 23619func (r *PosService) Inventory(merchantId uint64, targetMerchantId uint64, posinventoryrequest *PosInventoryRequest) *PosInventoryCall { 23620 c := &PosInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23621 c.merchantId = merchantId 23622 c.targetMerchantId = targetMerchantId 23623 c.posinventoryrequest = posinventoryrequest 23624 return c 23625} 23626 23627// DryRun sets the optional parameter "dryRun": Flag to simulate a 23628// request like in a live environment. If set to true, dry-run mode 23629// checks the validity of the request and returns errors (if any). 23630func (c *PosInventoryCall) DryRun(dryRun bool) *PosInventoryCall { 23631 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23632 return c 23633} 23634 23635// Fields allows partial responses to be retrieved. See 23636// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23637// for more information. 23638func (c *PosInventoryCall) Fields(s ...googleapi.Field) *PosInventoryCall { 23639 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23640 return c 23641} 23642 23643// Context sets the context to be used in this call's Do method. Any 23644// pending HTTP request will be aborted if the provided context is 23645// canceled. 23646func (c *PosInventoryCall) Context(ctx context.Context) *PosInventoryCall { 23647 c.ctx_ = ctx 23648 return c 23649} 23650 23651// Header returns an http.Header that can be modified by the caller to 23652// add HTTP headers to the request. 23653func (c *PosInventoryCall) Header() http.Header { 23654 if c.header_ == nil { 23655 c.header_ = make(http.Header) 23656 } 23657 return c.header_ 23658} 23659 23660func (c *PosInventoryCall) doRequest(alt string) (*http.Response, error) { 23661 reqHeaders := make(http.Header) 23662 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 23663 for k, v := range c.header_ { 23664 reqHeaders[k] = v 23665 } 23666 reqHeaders.Set("User-Agent", c.s.userAgent()) 23667 var body io.Reader = nil 23668 body, err := googleapi.WithoutDataWrapper.JSONReader(c.posinventoryrequest) 23669 if err != nil { 23670 return nil, err 23671 } 23672 reqHeaders.Set("Content-Type", "application/json") 23673 c.urlParams_.Set("alt", alt) 23674 c.urlParams_.Set("prettyPrint", "false") 23675 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/inventory") 23676 urls += "?" + c.urlParams_.Encode() 23677 req, err := http.NewRequest("POST", urls, body) 23678 if err != nil { 23679 return nil, err 23680 } 23681 req.Header = reqHeaders 23682 googleapi.Expand(req.URL, map[string]string{ 23683 "merchantId": strconv.FormatUint(c.merchantId, 10), 23684 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23685 }) 23686 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23687} 23688 23689// Do executes the "content.pos.inventory" call. 23690// Exactly one of *PosInventoryResponse or error will be non-nil. Any 23691// non-2xx status code is an error. Response headers are in either 23692// *PosInventoryResponse.ServerResponse.Header or (if a response was 23693// returned at all) in error.(*googleapi.Error).Header. Use 23694// googleapi.IsNotModified to check whether the returned error was 23695// because http.StatusNotModified was returned. 23696func (c *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryResponse, error) { 23697 gensupport.SetOptions(c.urlParams_, opts...) 23698 res, err := c.doRequest("json") 23699 if res != nil && res.StatusCode == http.StatusNotModified { 23700 if res.Body != nil { 23701 res.Body.Close() 23702 } 23703 return nil, &googleapi.Error{ 23704 Code: res.StatusCode, 23705 Header: res.Header, 23706 } 23707 } 23708 if err != nil { 23709 return nil, err 23710 } 23711 defer googleapi.CloseBody(res) 23712 if err := googleapi.CheckResponse(res); err != nil { 23713 return nil, err 23714 } 23715 ret := &PosInventoryResponse{ 23716 ServerResponse: googleapi.ServerResponse{ 23717 Header: res.Header, 23718 HTTPStatusCode: res.StatusCode, 23719 }, 23720 } 23721 target := &ret 23722 if err := gensupport.DecodeResponse(target, res); err != nil { 23723 return nil, err 23724 } 23725 return ret, nil 23726 // { 23727 // "description": "Submit inventory for the given merchant.", 23728 // "flatPath": "{merchantId}/pos/{targetMerchantId}/inventory", 23729 // "httpMethod": "POST", 23730 // "id": "content.pos.inventory", 23731 // "parameterOrder": [ 23732 // "merchantId", 23733 // "targetMerchantId" 23734 // ], 23735 // "parameters": { 23736 // "dryRun": { 23737 // "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).", 23738 // "location": "query", 23739 // "type": "boolean" 23740 // }, 23741 // "merchantId": { 23742 // "description": "The ID of the POS or inventory data provider.", 23743 // "format": "uint64", 23744 // "location": "path", 23745 // "required": true, 23746 // "type": "string" 23747 // }, 23748 // "targetMerchantId": { 23749 // "description": "The ID of the target merchant.", 23750 // "format": "uint64", 23751 // "location": "path", 23752 // "required": true, 23753 // "type": "string" 23754 // } 23755 // }, 23756 // "path": "{merchantId}/pos/{targetMerchantId}/inventory", 23757 // "request": { 23758 // "$ref": "PosInventoryRequest" 23759 // }, 23760 // "response": { 23761 // "$ref": "PosInventoryResponse" 23762 // }, 23763 // "scopes": [ 23764 // "https://www.googleapis.com/auth/content" 23765 // ] 23766 // } 23767 23768} 23769 23770// method id "content.pos.list": 23771 23772type PosListCall struct { 23773 s *APIService 23774 merchantId uint64 23775 targetMerchantId uint64 23776 urlParams_ gensupport.URLParams 23777 ifNoneMatch_ string 23778 ctx_ context.Context 23779 header_ http.Header 23780} 23781 23782// List: Lists the stores of the target merchant. 23783// 23784// - merchantId: The ID of the POS or inventory data provider. 23785// - targetMerchantId: The ID of the target merchant. 23786func (r *PosService) List(merchantId uint64, targetMerchantId uint64) *PosListCall { 23787 c := &PosListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23788 c.merchantId = merchantId 23789 c.targetMerchantId = targetMerchantId 23790 return c 23791} 23792 23793// Fields allows partial responses to be retrieved. See 23794// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23795// for more information. 23796func (c *PosListCall) Fields(s ...googleapi.Field) *PosListCall { 23797 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23798 return c 23799} 23800 23801// IfNoneMatch sets the optional parameter which makes the operation 23802// fail if the object's ETag matches the given value. This is useful for 23803// getting updates only after the object has changed since the last 23804// request. Use googleapi.IsNotModified to check whether the response 23805// error from Do is the result of In-None-Match. 23806func (c *PosListCall) IfNoneMatch(entityTag string) *PosListCall { 23807 c.ifNoneMatch_ = entityTag 23808 return c 23809} 23810 23811// Context sets the context to be used in this call's Do method. Any 23812// pending HTTP request will be aborted if the provided context is 23813// canceled. 23814func (c *PosListCall) Context(ctx context.Context) *PosListCall { 23815 c.ctx_ = ctx 23816 return c 23817} 23818 23819// Header returns an http.Header that can be modified by the caller to 23820// add HTTP headers to the request. 23821func (c *PosListCall) Header() http.Header { 23822 if c.header_ == nil { 23823 c.header_ = make(http.Header) 23824 } 23825 return c.header_ 23826} 23827 23828func (c *PosListCall) doRequest(alt string) (*http.Response, error) { 23829 reqHeaders := make(http.Header) 23830 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 23831 for k, v := range c.header_ { 23832 reqHeaders[k] = v 23833 } 23834 reqHeaders.Set("User-Agent", c.s.userAgent()) 23835 if c.ifNoneMatch_ != "" { 23836 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23837 } 23838 var body io.Reader = nil 23839 c.urlParams_.Set("alt", alt) 23840 c.urlParams_.Set("prettyPrint", "false") 23841 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store") 23842 urls += "?" + c.urlParams_.Encode() 23843 req, err := http.NewRequest("GET", urls, body) 23844 if err != nil { 23845 return nil, err 23846 } 23847 req.Header = reqHeaders 23848 googleapi.Expand(req.URL, map[string]string{ 23849 "merchantId": strconv.FormatUint(c.merchantId, 10), 23850 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 23851 }) 23852 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23853} 23854 23855// Do executes the "content.pos.list" call. 23856// Exactly one of *PosListResponse or error will be non-nil. Any non-2xx 23857// status code is an error. Response headers are in either 23858// *PosListResponse.ServerResponse.Header or (if a response was returned 23859// at all) in error.(*googleapi.Error).Header. Use 23860// googleapi.IsNotModified to check whether the returned error was 23861// because http.StatusNotModified was returned. 23862func (c *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) { 23863 gensupport.SetOptions(c.urlParams_, opts...) 23864 res, err := c.doRequest("json") 23865 if res != nil && res.StatusCode == http.StatusNotModified { 23866 if res.Body != nil { 23867 res.Body.Close() 23868 } 23869 return nil, &googleapi.Error{ 23870 Code: res.StatusCode, 23871 Header: res.Header, 23872 } 23873 } 23874 if err != nil { 23875 return nil, err 23876 } 23877 defer googleapi.CloseBody(res) 23878 if err := googleapi.CheckResponse(res); err != nil { 23879 return nil, err 23880 } 23881 ret := &PosListResponse{ 23882 ServerResponse: googleapi.ServerResponse{ 23883 Header: res.Header, 23884 HTTPStatusCode: res.StatusCode, 23885 }, 23886 } 23887 target := &ret 23888 if err := gensupport.DecodeResponse(target, res); err != nil { 23889 return nil, err 23890 } 23891 return ret, nil 23892 // { 23893 // "description": "Lists the stores of the target merchant.", 23894 // "flatPath": "{merchantId}/pos/{targetMerchantId}/store", 23895 // "httpMethod": "GET", 23896 // "id": "content.pos.list", 23897 // "parameterOrder": [ 23898 // "merchantId", 23899 // "targetMerchantId" 23900 // ], 23901 // "parameters": { 23902 // "merchantId": { 23903 // "description": "The ID of the POS or inventory data provider.", 23904 // "format": "uint64", 23905 // "location": "path", 23906 // "required": true, 23907 // "type": "string" 23908 // }, 23909 // "targetMerchantId": { 23910 // "description": "The ID of the target merchant.", 23911 // "format": "uint64", 23912 // "location": "path", 23913 // "required": true, 23914 // "type": "string" 23915 // } 23916 // }, 23917 // "path": "{merchantId}/pos/{targetMerchantId}/store", 23918 // "response": { 23919 // "$ref": "PosListResponse" 23920 // }, 23921 // "scopes": [ 23922 // "https://www.googleapis.com/auth/content" 23923 // ] 23924 // } 23925 23926} 23927 23928// method id "content.pos.sale": 23929 23930type PosSaleCall struct { 23931 s *APIService 23932 merchantId uint64 23933 targetMerchantId uint64 23934 possalerequest *PosSaleRequest 23935 urlParams_ gensupport.URLParams 23936 ctx_ context.Context 23937 header_ http.Header 23938} 23939 23940// Sale: Submit a sale event for the given merchant. 23941// 23942// - merchantId: The ID of the POS or inventory data provider. 23943// - targetMerchantId: The ID of the target merchant. 23944func (r *PosService) Sale(merchantId uint64, targetMerchantId uint64, possalerequest *PosSaleRequest) *PosSaleCall { 23945 c := &PosSaleCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23946 c.merchantId = merchantId 23947 c.targetMerchantId = targetMerchantId 23948 c.possalerequest = possalerequest 23949 return c 23950} 23951 23952// DryRun sets the optional parameter "dryRun": Flag to simulate a 23953// request like in a live environment. If set to true, dry-run mode 23954// checks the validity of the request and returns errors (if any). 23955func (c *PosSaleCall) DryRun(dryRun bool) *PosSaleCall { 23956 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 23957 return c 23958} 23959 23960// Fields allows partial responses to be retrieved. See 23961// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23962// for more information. 23963func (c *PosSaleCall) Fields(s ...googleapi.Field) *PosSaleCall { 23964 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23965 return c 23966} 23967 23968// Context sets the context to be used in this call's Do method. Any 23969// pending HTTP request will be aborted if the provided context is 23970// canceled. 23971func (c *PosSaleCall) Context(ctx context.Context) *PosSaleCall { 23972 c.ctx_ = ctx 23973 return c 23974} 23975 23976// Header returns an http.Header that can be modified by the caller to 23977// add HTTP headers to the request. 23978func (c *PosSaleCall) Header() http.Header { 23979 if c.header_ == nil { 23980 c.header_ = make(http.Header) 23981 } 23982 return c.header_ 23983} 23984 23985func (c *PosSaleCall) doRequest(alt string) (*http.Response, error) { 23986 reqHeaders := make(http.Header) 23987 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 23988 for k, v := range c.header_ { 23989 reqHeaders[k] = v 23990 } 23991 reqHeaders.Set("User-Agent", c.s.userAgent()) 23992 var body io.Reader = nil 23993 body, err := googleapi.WithoutDataWrapper.JSONReader(c.possalerequest) 23994 if err != nil { 23995 return nil, err 23996 } 23997 reqHeaders.Set("Content-Type", "application/json") 23998 c.urlParams_.Set("alt", alt) 23999 c.urlParams_.Set("prettyPrint", "false") 24000 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/sale") 24001 urls += "?" + c.urlParams_.Encode() 24002 req, err := http.NewRequest("POST", urls, body) 24003 if err != nil { 24004 return nil, err 24005 } 24006 req.Header = reqHeaders 24007 googleapi.Expand(req.URL, map[string]string{ 24008 "merchantId": strconv.FormatUint(c.merchantId, 10), 24009 "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10), 24010 }) 24011 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24012} 24013 24014// Do executes the "content.pos.sale" call. 24015// Exactly one of *PosSaleResponse or error will be non-nil. Any non-2xx 24016// status code is an error. Response headers are in either 24017// *PosSaleResponse.ServerResponse.Header or (if a response was returned 24018// at all) in error.(*googleapi.Error).Header. Use 24019// googleapi.IsNotModified to check whether the returned error was 24020// because http.StatusNotModified was returned. 24021func (c *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) { 24022 gensupport.SetOptions(c.urlParams_, opts...) 24023 res, err := c.doRequest("json") 24024 if res != nil && res.StatusCode == http.StatusNotModified { 24025 if res.Body != nil { 24026 res.Body.Close() 24027 } 24028 return nil, &googleapi.Error{ 24029 Code: res.StatusCode, 24030 Header: res.Header, 24031 } 24032 } 24033 if err != nil { 24034 return nil, err 24035 } 24036 defer googleapi.CloseBody(res) 24037 if err := googleapi.CheckResponse(res); err != nil { 24038 return nil, err 24039 } 24040 ret := &PosSaleResponse{ 24041 ServerResponse: googleapi.ServerResponse{ 24042 Header: res.Header, 24043 HTTPStatusCode: res.StatusCode, 24044 }, 24045 } 24046 target := &ret 24047 if err := gensupport.DecodeResponse(target, res); err != nil { 24048 return nil, err 24049 } 24050 return ret, nil 24051 // { 24052 // "description": "Submit a sale event for the given merchant.", 24053 // "flatPath": "{merchantId}/pos/{targetMerchantId}/sale", 24054 // "httpMethod": "POST", 24055 // "id": "content.pos.sale", 24056 // "parameterOrder": [ 24057 // "merchantId", 24058 // "targetMerchantId" 24059 // ], 24060 // "parameters": { 24061 // "dryRun": { 24062 // "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).", 24063 // "location": "query", 24064 // "type": "boolean" 24065 // }, 24066 // "merchantId": { 24067 // "description": "The ID of the POS or inventory data provider.", 24068 // "format": "uint64", 24069 // "location": "path", 24070 // "required": true, 24071 // "type": "string" 24072 // }, 24073 // "targetMerchantId": { 24074 // "description": "The ID of the target merchant.", 24075 // "format": "uint64", 24076 // "location": "path", 24077 // "required": true, 24078 // "type": "string" 24079 // } 24080 // }, 24081 // "path": "{merchantId}/pos/{targetMerchantId}/sale", 24082 // "request": { 24083 // "$ref": "PosSaleRequest" 24084 // }, 24085 // "response": { 24086 // "$ref": "PosSaleResponse" 24087 // }, 24088 // "scopes": [ 24089 // "https://www.googleapis.com/auth/content" 24090 // ] 24091 // } 24092 24093} 24094 24095// method id "content.products.custombatch": 24096 24097type ProductsCustombatchCall struct { 24098 s *APIService 24099 productscustombatchrequest *ProductsCustomBatchRequest 24100 urlParams_ gensupport.URLParams 24101 ctx_ context.Context 24102 header_ http.Header 24103} 24104 24105// Custombatch: Retrieves, inserts, and deletes multiple products in a 24106// single request. 24107func (r *ProductsService) Custombatch(productscustombatchrequest *ProductsCustomBatchRequest) *ProductsCustombatchCall { 24108 c := &ProductsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24109 c.productscustombatchrequest = productscustombatchrequest 24110 return c 24111} 24112 24113// DryRun sets the optional parameter "dryRun": Flag to simulate a 24114// request like in a live environment. If set to true, dry-run mode 24115// checks the validity of the request and returns errors (if any). 24116func (c *ProductsCustombatchCall) DryRun(dryRun bool) *ProductsCustombatchCall { 24117 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24118 return c 24119} 24120 24121// Fields allows partial responses to be retrieved. See 24122// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24123// for more information. 24124func (c *ProductsCustombatchCall) Fields(s ...googleapi.Field) *ProductsCustombatchCall { 24125 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24126 return c 24127} 24128 24129// Context sets the context to be used in this call's Do method. Any 24130// pending HTTP request will be aborted if the provided context is 24131// canceled. 24132func (c *ProductsCustombatchCall) Context(ctx context.Context) *ProductsCustombatchCall { 24133 c.ctx_ = ctx 24134 return c 24135} 24136 24137// Header returns an http.Header that can be modified by the caller to 24138// add HTTP headers to the request. 24139func (c *ProductsCustombatchCall) Header() http.Header { 24140 if c.header_ == nil { 24141 c.header_ = make(http.Header) 24142 } 24143 return c.header_ 24144} 24145 24146func (c *ProductsCustombatchCall) doRequest(alt string) (*http.Response, error) { 24147 reqHeaders := make(http.Header) 24148 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 24149 for k, v := range c.header_ { 24150 reqHeaders[k] = v 24151 } 24152 reqHeaders.Set("User-Agent", c.s.userAgent()) 24153 var body io.Reader = nil 24154 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productscustombatchrequest) 24155 if err != nil { 24156 return nil, err 24157 } 24158 reqHeaders.Set("Content-Type", "application/json") 24159 c.urlParams_.Set("alt", alt) 24160 c.urlParams_.Set("prettyPrint", "false") 24161 urls := googleapi.ResolveRelative(c.s.BasePath, "products/batch") 24162 urls += "?" + c.urlParams_.Encode() 24163 req, err := http.NewRequest("POST", urls, body) 24164 if err != nil { 24165 return nil, err 24166 } 24167 req.Header = reqHeaders 24168 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24169} 24170 24171// Do executes the "content.products.custombatch" call. 24172// Exactly one of *ProductsCustomBatchResponse or error will be non-nil. 24173// Any non-2xx status code is an error. Response headers are in either 24174// *ProductsCustomBatchResponse.ServerResponse.Header or (if a response 24175// was returned at all) in error.(*googleapi.Error).Header. Use 24176// googleapi.IsNotModified to check whether the returned error was 24177// because http.StatusNotModified was returned. 24178func (c *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCustomBatchResponse, error) { 24179 gensupport.SetOptions(c.urlParams_, opts...) 24180 res, err := c.doRequest("json") 24181 if res != nil && res.StatusCode == http.StatusNotModified { 24182 if res.Body != nil { 24183 res.Body.Close() 24184 } 24185 return nil, &googleapi.Error{ 24186 Code: res.StatusCode, 24187 Header: res.Header, 24188 } 24189 } 24190 if err != nil { 24191 return nil, err 24192 } 24193 defer googleapi.CloseBody(res) 24194 if err := googleapi.CheckResponse(res); err != nil { 24195 return nil, err 24196 } 24197 ret := &ProductsCustomBatchResponse{ 24198 ServerResponse: googleapi.ServerResponse{ 24199 Header: res.Header, 24200 HTTPStatusCode: res.StatusCode, 24201 }, 24202 } 24203 target := &ret 24204 if err := gensupport.DecodeResponse(target, res); err != nil { 24205 return nil, err 24206 } 24207 return ret, nil 24208 // { 24209 // "description": "Retrieves, inserts, and deletes multiple products in a single request.", 24210 // "flatPath": "products/batch", 24211 // "httpMethod": "POST", 24212 // "id": "content.products.custombatch", 24213 // "parameterOrder": [], 24214 // "parameters": { 24215 // "dryRun": { 24216 // "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).", 24217 // "location": "query", 24218 // "type": "boolean" 24219 // } 24220 // }, 24221 // "path": "products/batch", 24222 // "request": { 24223 // "$ref": "ProductsCustomBatchRequest" 24224 // }, 24225 // "response": { 24226 // "$ref": "ProductsCustomBatchResponse" 24227 // }, 24228 // "scopes": [ 24229 // "https://www.googleapis.com/auth/content" 24230 // ] 24231 // } 24232 24233} 24234 24235// method id "content.products.delete": 24236 24237type ProductsDeleteCall struct { 24238 s *APIService 24239 merchantId uint64 24240 productId string 24241 urlParams_ gensupport.URLParams 24242 ctx_ context.Context 24243 header_ http.Header 24244} 24245 24246// Delete: Deletes a product from your Merchant Center account. 24247// 24248// - merchantId: The ID of the account that contains the product. This 24249// account cannot be a multi-client account. 24250// - productId: The REST ID of the product. 24251func (r *ProductsService) Delete(merchantId uint64, productId string) *ProductsDeleteCall { 24252 c := &ProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24253 c.merchantId = merchantId 24254 c.productId = productId 24255 return c 24256} 24257 24258// DryRun sets the optional parameter "dryRun": Flag to simulate a 24259// request like in a live environment. If set to true, dry-run mode 24260// checks the validity of the request and returns errors (if any). 24261func (c *ProductsDeleteCall) DryRun(dryRun bool) *ProductsDeleteCall { 24262 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24263 return c 24264} 24265 24266// Fields allows partial responses to be retrieved. See 24267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24268// for more information. 24269func (c *ProductsDeleteCall) Fields(s ...googleapi.Field) *ProductsDeleteCall { 24270 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24271 return c 24272} 24273 24274// Context sets the context to be used in this call's Do method. Any 24275// pending HTTP request will be aborted if the provided context is 24276// canceled. 24277func (c *ProductsDeleteCall) Context(ctx context.Context) *ProductsDeleteCall { 24278 c.ctx_ = ctx 24279 return c 24280} 24281 24282// Header returns an http.Header that can be modified by the caller to 24283// add HTTP headers to the request. 24284func (c *ProductsDeleteCall) Header() http.Header { 24285 if c.header_ == nil { 24286 c.header_ = make(http.Header) 24287 } 24288 return c.header_ 24289} 24290 24291func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) { 24292 reqHeaders := make(http.Header) 24293 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 24294 for k, v := range c.header_ { 24295 reqHeaders[k] = v 24296 } 24297 reqHeaders.Set("User-Agent", c.s.userAgent()) 24298 var body io.Reader = nil 24299 c.urlParams_.Set("alt", alt) 24300 c.urlParams_.Set("prettyPrint", "false") 24301 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") 24302 urls += "?" + c.urlParams_.Encode() 24303 req, err := http.NewRequest("DELETE", urls, body) 24304 if err != nil { 24305 return nil, err 24306 } 24307 req.Header = reqHeaders 24308 googleapi.Expand(req.URL, map[string]string{ 24309 "merchantId": strconv.FormatUint(c.merchantId, 10), 24310 "productId": c.productId, 24311 }) 24312 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24313} 24314 24315// Do executes the "content.products.delete" call. 24316func (c *ProductsDeleteCall) Do(opts ...googleapi.CallOption) error { 24317 gensupport.SetOptions(c.urlParams_, opts...) 24318 res, err := c.doRequest("json") 24319 if err != nil { 24320 return err 24321 } 24322 defer googleapi.CloseBody(res) 24323 if err := googleapi.CheckResponse(res); err != nil { 24324 return err 24325 } 24326 return nil 24327 // { 24328 // "description": "Deletes a product from your Merchant Center account.", 24329 // "flatPath": "{merchantId}/products/{productId}", 24330 // "httpMethod": "DELETE", 24331 // "id": "content.products.delete", 24332 // "parameterOrder": [ 24333 // "merchantId", 24334 // "productId" 24335 // ], 24336 // "parameters": { 24337 // "dryRun": { 24338 // "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).", 24339 // "location": "query", 24340 // "type": "boolean" 24341 // }, 24342 // "merchantId": { 24343 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 24344 // "format": "uint64", 24345 // "location": "path", 24346 // "required": true, 24347 // "type": "string" 24348 // }, 24349 // "productId": { 24350 // "description": "The REST ID of the product.", 24351 // "location": "path", 24352 // "required": true, 24353 // "type": "string" 24354 // } 24355 // }, 24356 // "path": "{merchantId}/products/{productId}", 24357 // "scopes": [ 24358 // "https://www.googleapis.com/auth/content" 24359 // ] 24360 // } 24361 24362} 24363 24364// method id "content.products.get": 24365 24366type ProductsGetCall struct { 24367 s *APIService 24368 merchantId uint64 24369 productId string 24370 urlParams_ gensupport.URLParams 24371 ifNoneMatch_ string 24372 ctx_ context.Context 24373 header_ http.Header 24374} 24375 24376// Get: Retrieves a product from your Merchant Center account. 24377// 24378// - merchantId: The ID of the account that contains the product. This 24379// account cannot be a multi-client account. 24380// - productId: The REST ID of the product. 24381func (r *ProductsService) Get(merchantId uint64, productId string) *ProductsGetCall { 24382 c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24383 c.merchantId = merchantId 24384 c.productId = productId 24385 return c 24386} 24387 24388// Fields allows partial responses to be retrieved. See 24389// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24390// for more information. 24391func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall { 24392 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24393 return c 24394} 24395 24396// IfNoneMatch sets the optional parameter which makes the operation 24397// fail if the object's ETag matches the given value. This is useful for 24398// getting updates only after the object has changed since the last 24399// request. Use googleapi.IsNotModified to check whether the response 24400// error from Do is the result of In-None-Match. 24401func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall { 24402 c.ifNoneMatch_ = entityTag 24403 return c 24404} 24405 24406// Context sets the context to be used in this call's Do method. Any 24407// pending HTTP request will be aborted if the provided context is 24408// canceled. 24409func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall { 24410 c.ctx_ = ctx 24411 return c 24412} 24413 24414// Header returns an http.Header that can be modified by the caller to 24415// add HTTP headers to the request. 24416func (c *ProductsGetCall) Header() http.Header { 24417 if c.header_ == nil { 24418 c.header_ = make(http.Header) 24419 } 24420 return c.header_ 24421} 24422 24423func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) { 24424 reqHeaders := make(http.Header) 24425 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 24426 for k, v := range c.header_ { 24427 reqHeaders[k] = v 24428 } 24429 reqHeaders.Set("User-Agent", c.s.userAgent()) 24430 if c.ifNoneMatch_ != "" { 24431 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24432 } 24433 var body io.Reader = nil 24434 c.urlParams_.Set("alt", alt) 24435 c.urlParams_.Set("prettyPrint", "false") 24436 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}") 24437 urls += "?" + c.urlParams_.Encode() 24438 req, err := http.NewRequest("GET", urls, body) 24439 if err != nil { 24440 return nil, err 24441 } 24442 req.Header = reqHeaders 24443 googleapi.Expand(req.URL, map[string]string{ 24444 "merchantId": strconv.FormatUint(c.merchantId, 10), 24445 "productId": c.productId, 24446 }) 24447 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24448} 24449 24450// Do executes the "content.products.get" call. 24451// Exactly one of *Product or error will be non-nil. Any non-2xx status 24452// code is an error. Response headers are in either 24453// *Product.ServerResponse.Header or (if a response was returned at all) 24454// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 24455// check whether the returned error was because http.StatusNotModified 24456// was returned. 24457func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) { 24458 gensupport.SetOptions(c.urlParams_, opts...) 24459 res, err := c.doRequest("json") 24460 if res != nil && res.StatusCode == http.StatusNotModified { 24461 if res.Body != nil { 24462 res.Body.Close() 24463 } 24464 return nil, &googleapi.Error{ 24465 Code: res.StatusCode, 24466 Header: res.Header, 24467 } 24468 } 24469 if err != nil { 24470 return nil, err 24471 } 24472 defer googleapi.CloseBody(res) 24473 if err := googleapi.CheckResponse(res); err != nil { 24474 return nil, err 24475 } 24476 ret := &Product{ 24477 ServerResponse: googleapi.ServerResponse{ 24478 Header: res.Header, 24479 HTTPStatusCode: res.StatusCode, 24480 }, 24481 } 24482 target := &ret 24483 if err := gensupport.DecodeResponse(target, res); err != nil { 24484 return nil, err 24485 } 24486 return ret, nil 24487 // { 24488 // "description": "Retrieves a product from your Merchant Center account.", 24489 // "flatPath": "{merchantId}/products/{productId}", 24490 // "httpMethod": "GET", 24491 // "id": "content.products.get", 24492 // "parameterOrder": [ 24493 // "merchantId", 24494 // "productId" 24495 // ], 24496 // "parameters": { 24497 // "merchantId": { 24498 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 24499 // "format": "uint64", 24500 // "location": "path", 24501 // "required": true, 24502 // "type": "string" 24503 // }, 24504 // "productId": { 24505 // "description": "The REST ID of the product.", 24506 // "location": "path", 24507 // "required": true, 24508 // "type": "string" 24509 // } 24510 // }, 24511 // "path": "{merchantId}/products/{productId}", 24512 // "response": { 24513 // "$ref": "Product" 24514 // }, 24515 // "scopes": [ 24516 // "https://www.googleapis.com/auth/content" 24517 // ] 24518 // } 24519 24520} 24521 24522// method id "content.products.insert": 24523 24524type ProductsInsertCall struct { 24525 s *APIService 24526 merchantId uint64 24527 product *Product 24528 urlParams_ gensupport.URLParams 24529 ctx_ context.Context 24530 header_ http.Header 24531} 24532 24533// Insert: Uploads a product to your Merchant Center account. If an item 24534// with the same channel, contentLanguage, offerId, and targetCountry 24535// already exists, this method updates that entry. 24536// 24537// - merchantId: The ID of the account that contains the product. This 24538// account cannot be a multi-client account. 24539func (r *ProductsService) Insert(merchantId uint64, product *Product) *ProductsInsertCall { 24540 c := &ProductsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24541 c.merchantId = merchantId 24542 c.product = product 24543 return c 24544} 24545 24546// DryRun sets the optional parameter "dryRun": Flag to simulate a 24547// request like in a live environment. If set to true, dry-run mode 24548// checks the validity of the request and returns errors (if any). 24549func (c *ProductsInsertCall) DryRun(dryRun bool) *ProductsInsertCall { 24550 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 24551 return c 24552} 24553 24554// Fields allows partial responses to be retrieved. See 24555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24556// for more information. 24557func (c *ProductsInsertCall) Fields(s ...googleapi.Field) *ProductsInsertCall { 24558 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24559 return c 24560} 24561 24562// Context sets the context to be used in this call's Do method. Any 24563// pending HTTP request will be aborted if the provided context is 24564// canceled. 24565func (c *ProductsInsertCall) Context(ctx context.Context) *ProductsInsertCall { 24566 c.ctx_ = ctx 24567 return c 24568} 24569 24570// Header returns an http.Header that can be modified by the caller to 24571// add HTTP headers to the request. 24572func (c *ProductsInsertCall) Header() http.Header { 24573 if c.header_ == nil { 24574 c.header_ = make(http.Header) 24575 } 24576 return c.header_ 24577} 24578 24579func (c *ProductsInsertCall) doRequest(alt string) (*http.Response, error) { 24580 reqHeaders := make(http.Header) 24581 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 24582 for k, v := range c.header_ { 24583 reqHeaders[k] = v 24584 } 24585 reqHeaders.Set("User-Agent", c.s.userAgent()) 24586 var body io.Reader = nil 24587 body, err := googleapi.WithoutDataWrapper.JSONReader(c.product) 24588 if err != nil { 24589 return nil, err 24590 } 24591 reqHeaders.Set("Content-Type", "application/json") 24592 c.urlParams_.Set("alt", alt) 24593 c.urlParams_.Set("prettyPrint", "false") 24594 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") 24595 urls += "?" + c.urlParams_.Encode() 24596 req, err := http.NewRequest("POST", urls, body) 24597 if err != nil { 24598 return nil, err 24599 } 24600 req.Header = reqHeaders 24601 googleapi.Expand(req.URL, map[string]string{ 24602 "merchantId": strconv.FormatUint(c.merchantId, 10), 24603 }) 24604 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24605} 24606 24607// Do executes the "content.products.insert" call. 24608// Exactly one of *Product or error will be non-nil. Any non-2xx status 24609// code is an error. Response headers are in either 24610// *Product.ServerResponse.Header or (if a response was returned at all) 24611// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 24612// check whether the returned error was because http.StatusNotModified 24613// was returned. 24614func (c *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) { 24615 gensupport.SetOptions(c.urlParams_, opts...) 24616 res, err := c.doRequest("json") 24617 if res != nil && res.StatusCode == http.StatusNotModified { 24618 if res.Body != nil { 24619 res.Body.Close() 24620 } 24621 return nil, &googleapi.Error{ 24622 Code: res.StatusCode, 24623 Header: res.Header, 24624 } 24625 } 24626 if err != nil { 24627 return nil, err 24628 } 24629 defer googleapi.CloseBody(res) 24630 if err := googleapi.CheckResponse(res); err != nil { 24631 return nil, err 24632 } 24633 ret := &Product{ 24634 ServerResponse: googleapi.ServerResponse{ 24635 Header: res.Header, 24636 HTTPStatusCode: res.StatusCode, 24637 }, 24638 } 24639 target := &ret 24640 if err := gensupport.DecodeResponse(target, res); err != nil { 24641 return nil, err 24642 } 24643 return ret, nil 24644 // { 24645 // "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.", 24646 // "flatPath": "{merchantId}/products", 24647 // "httpMethod": "POST", 24648 // "id": "content.products.insert", 24649 // "parameterOrder": [ 24650 // "merchantId" 24651 // ], 24652 // "parameters": { 24653 // "dryRun": { 24654 // "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).", 24655 // "location": "query", 24656 // "type": "boolean" 24657 // }, 24658 // "merchantId": { 24659 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 24660 // "format": "uint64", 24661 // "location": "path", 24662 // "required": true, 24663 // "type": "string" 24664 // } 24665 // }, 24666 // "path": "{merchantId}/products", 24667 // "request": { 24668 // "$ref": "Product" 24669 // }, 24670 // "response": { 24671 // "$ref": "Product" 24672 // }, 24673 // "scopes": [ 24674 // "https://www.googleapis.com/auth/content" 24675 // ] 24676 // } 24677 24678} 24679 24680// method id "content.products.list": 24681 24682type ProductsListCall struct { 24683 s *APIService 24684 merchantId uint64 24685 urlParams_ gensupport.URLParams 24686 ifNoneMatch_ string 24687 ctx_ context.Context 24688 header_ http.Header 24689} 24690 24691// List: Lists the products in your Merchant Center account. The 24692// response might contain fewer items than specified by maxResults. Rely 24693// on nextPageToken to determine if there are more items to be 24694// requested. 24695// 24696// - merchantId: The ID of the account that contains the products. This 24697// account cannot be a multi-client account. 24698func (r *ProductsService) List(merchantId uint64) *ProductsListCall { 24699 c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24700 c.merchantId = merchantId 24701 return c 24702} 24703 24704// IncludeInvalidInsertedItems sets the optional parameter 24705// "includeInvalidInsertedItems": Flag to include the invalid inserted 24706// items in the result of the list request. By default the invalid items 24707// are not shown (the default value is false). 24708func (c *ProductsListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductsListCall { 24709 c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems)) 24710 return c 24711} 24712 24713// MaxResults sets the optional parameter "maxResults": The maximum 24714// number of products to return in the response, used for paging. 24715func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall { 24716 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 24717 return c 24718} 24719 24720// PageToken sets the optional parameter "pageToken": The token returned 24721// by the previous request. 24722func (c *ProductsListCall) PageToken(pageToken string) *ProductsListCall { 24723 c.urlParams_.Set("pageToken", pageToken) 24724 return c 24725} 24726 24727// Fields allows partial responses to be retrieved. See 24728// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24729// for more information. 24730func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall { 24731 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24732 return c 24733} 24734 24735// IfNoneMatch sets the optional parameter which makes the operation 24736// fail if the object's ETag matches the given value. This is useful for 24737// getting updates only after the object has changed since the last 24738// request. Use googleapi.IsNotModified to check whether the response 24739// error from Do is the result of In-None-Match. 24740func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall { 24741 c.ifNoneMatch_ = entityTag 24742 return c 24743} 24744 24745// Context sets the context to be used in this call's Do method. Any 24746// pending HTTP request will be aborted if the provided context is 24747// canceled. 24748func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall { 24749 c.ctx_ = ctx 24750 return c 24751} 24752 24753// Header returns an http.Header that can be modified by the caller to 24754// add HTTP headers to the request. 24755func (c *ProductsListCall) Header() http.Header { 24756 if c.header_ == nil { 24757 c.header_ = make(http.Header) 24758 } 24759 return c.header_ 24760} 24761 24762func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) { 24763 reqHeaders := make(http.Header) 24764 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 24765 for k, v := range c.header_ { 24766 reqHeaders[k] = v 24767 } 24768 reqHeaders.Set("User-Agent", c.s.userAgent()) 24769 if c.ifNoneMatch_ != "" { 24770 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24771 } 24772 var body io.Reader = nil 24773 c.urlParams_.Set("alt", alt) 24774 c.urlParams_.Set("prettyPrint", "false") 24775 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products") 24776 urls += "?" + c.urlParams_.Encode() 24777 req, err := http.NewRequest("GET", urls, body) 24778 if err != nil { 24779 return nil, err 24780 } 24781 req.Header = reqHeaders 24782 googleapi.Expand(req.URL, map[string]string{ 24783 "merchantId": strconv.FormatUint(c.merchantId, 10), 24784 }) 24785 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24786} 24787 24788// Do executes the "content.products.list" call. 24789// Exactly one of *ProductsListResponse or error will be non-nil. Any 24790// non-2xx status code is an error. Response headers are in either 24791// *ProductsListResponse.ServerResponse.Header or (if a response was 24792// returned at all) in error.(*googleapi.Error).Header. Use 24793// googleapi.IsNotModified to check whether the returned error was 24794// because http.StatusNotModified was returned. 24795func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) { 24796 gensupport.SetOptions(c.urlParams_, opts...) 24797 res, err := c.doRequest("json") 24798 if res != nil && res.StatusCode == http.StatusNotModified { 24799 if res.Body != nil { 24800 res.Body.Close() 24801 } 24802 return nil, &googleapi.Error{ 24803 Code: res.StatusCode, 24804 Header: res.Header, 24805 } 24806 } 24807 if err != nil { 24808 return nil, err 24809 } 24810 defer googleapi.CloseBody(res) 24811 if err := googleapi.CheckResponse(res); err != nil { 24812 return nil, err 24813 } 24814 ret := &ProductsListResponse{ 24815 ServerResponse: googleapi.ServerResponse{ 24816 Header: res.Header, 24817 HTTPStatusCode: res.StatusCode, 24818 }, 24819 } 24820 target := &ret 24821 if err := gensupport.DecodeResponse(target, res); err != nil { 24822 return nil, err 24823 } 24824 return ret, nil 24825 // { 24826 // "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.", 24827 // "flatPath": "{merchantId}/products", 24828 // "httpMethod": "GET", 24829 // "id": "content.products.list", 24830 // "parameterOrder": [ 24831 // "merchantId" 24832 // ], 24833 // "parameters": { 24834 // "includeInvalidInsertedItems": { 24835 // "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).", 24836 // "location": "query", 24837 // "type": "boolean" 24838 // }, 24839 // "maxResults": { 24840 // "description": "The maximum number of products to return in the response, used for paging.", 24841 // "format": "uint32", 24842 // "location": "query", 24843 // "type": "integer" 24844 // }, 24845 // "merchantId": { 24846 // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", 24847 // "format": "uint64", 24848 // "location": "path", 24849 // "required": true, 24850 // "type": "string" 24851 // }, 24852 // "pageToken": { 24853 // "description": "The token returned by the previous request.", 24854 // "location": "query", 24855 // "type": "string" 24856 // } 24857 // }, 24858 // "path": "{merchantId}/products", 24859 // "response": { 24860 // "$ref": "ProductsListResponse" 24861 // }, 24862 // "scopes": [ 24863 // "https://www.googleapis.com/auth/content" 24864 // ] 24865 // } 24866 24867} 24868 24869// Pages invokes f for each page of results. 24870// A non-nil error returned from f will halt the iteration. 24871// The provided context supersedes any context provided to the Context method. 24872func (c *ProductsListCall) Pages(ctx context.Context, f func(*ProductsListResponse) error) error { 24873 c.ctx_ = ctx 24874 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 24875 for { 24876 x, err := c.Do() 24877 if err != nil { 24878 return err 24879 } 24880 if err := f(x); err != nil { 24881 return err 24882 } 24883 if x.NextPageToken == "" { 24884 return nil 24885 } 24886 c.PageToken(x.NextPageToken) 24887 } 24888} 24889 24890// method id "content.productstatuses.custombatch": 24891 24892type ProductstatusesCustombatchCall struct { 24893 s *APIService 24894 productstatusescustombatchrequest *ProductstatusesCustomBatchRequest 24895 urlParams_ gensupport.URLParams 24896 ctx_ context.Context 24897 header_ http.Header 24898} 24899 24900// Custombatch: Gets the statuses of multiple products in a single 24901// request. 24902func (r *ProductstatusesService) Custombatch(productstatusescustombatchrequest *ProductstatusesCustomBatchRequest) *ProductstatusesCustombatchCall { 24903 c := &ProductstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24904 c.productstatusescustombatchrequest = productstatusescustombatchrequest 24905 return c 24906} 24907 24908// IncludeAttributes sets the optional parameter "includeAttributes": 24909// Flag to include full product data in the results of this request. The 24910// default value is false. 24911func (c *ProductstatusesCustombatchCall) IncludeAttributes(includeAttributes bool) *ProductstatusesCustombatchCall { 24912 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 24913 return c 24914} 24915 24916// Fields allows partial responses to be retrieved. See 24917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24918// for more information. 24919func (c *ProductstatusesCustombatchCall) Fields(s ...googleapi.Field) *ProductstatusesCustombatchCall { 24920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24921 return c 24922} 24923 24924// Context sets the context to be used in this call's Do method. Any 24925// pending HTTP request will be aborted if the provided context is 24926// canceled. 24927func (c *ProductstatusesCustombatchCall) Context(ctx context.Context) *ProductstatusesCustombatchCall { 24928 c.ctx_ = ctx 24929 return c 24930} 24931 24932// Header returns an http.Header that can be modified by the caller to 24933// add HTTP headers to the request. 24934func (c *ProductstatusesCustombatchCall) Header() http.Header { 24935 if c.header_ == nil { 24936 c.header_ = make(http.Header) 24937 } 24938 return c.header_ 24939} 24940 24941func (c *ProductstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { 24942 reqHeaders := make(http.Header) 24943 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 24944 for k, v := range c.header_ { 24945 reqHeaders[k] = v 24946 } 24947 reqHeaders.Set("User-Agent", c.s.userAgent()) 24948 var body io.Reader = nil 24949 body, err := googleapi.WithoutDataWrapper.JSONReader(c.productstatusescustombatchrequest) 24950 if err != nil { 24951 return nil, err 24952 } 24953 reqHeaders.Set("Content-Type", "application/json") 24954 c.urlParams_.Set("alt", alt) 24955 c.urlParams_.Set("prettyPrint", "false") 24956 urls := googleapi.ResolveRelative(c.s.BasePath, "productstatuses/batch") 24957 urls += "?" + c.urlParams_.Encode() 24958 req, err := http.NewRequest("POST", urls, body) 24959 if err != nil { 24960 return nil, err 24961 } 24962 req.Header = reqHeaders 24963 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24964} 24965 24966// Do executes the "content.productstatuses.custombatch" call. 24967// Exactly one of *ProductstatusesCustomBatchResponse or error will be 24968// non-nil. Any non-2xx status code is an error. Response headers are in 24969// either *ProductstatusesCustomBatchResponse.ServerResponse.Header or 24970// (if a response was returned at all) in 24971// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 24972// whether the returned error was because http.StatusNotModified was 24973// returned. 24974func (c *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductstatusesCustomBatchResponse, error) { 24975 gensupport.SetOptions(c.urlParams_, opts...) 24976 res, err := c.doRequest("json") 24977 if res != nil && res.StatusCode == http.StatusNotModified { 24978 if res.Body != nil { 24979 res.Body.Close() 24980 } 24981 return nil, &googleapi.Error{ 24982 Code: res.StatusCode, 24983 Header: res.Header, 24984 } 24985 } 24986 if err != nil { 24987 return nil, err 24988 } 24989 defer googleapi.CloseBody(res) 24990 if err := googleapi.CheckResponse(res); err != nil { 24991 return nil, err 24992 } 24993 ret := &ProductstatusesCustomBatchResponse{ 24994 ServerResponse: googleapi.ServerResponse{ 24995 Header: res.Header, 24996 HTTPStatusCode: res.StatusCode, 24997 }, 24998 } 24999 target := &ret 25000 if err := gensupport.DecodeResponse(target, res); err != nil { 25001 return nil, err 25002 } 25003 return ret, nil 25004 // { 25005 // "description": "Gets the statuses of multiple products in a single request.", 25006 // "flatPath": "productstatuses/batch", 25007 // "httpMethod": "POST", 25008 // "id": "content.productstatuses.custombatch", 25009 // "parameterOrder": [], 25010 // "parameters": { 25011 // "includeAttributes": { 25012 // "description": "Flag to include full product data in the results of this request. The default value is false.", 25013 // "location": "query", 25014 // "type": "boolean" 25015 // } 25016 // }, 25017 // "path": "productstatuses/batch", 25018 // "request": { 25019 // "$ref": "ProductstatusesCustomBatchRequest" 25020 // }, 25021 // "response": { 25022 // "$ref": "ProductstatusesCustomBatchResponse" 25023 // }, 25024 // "scopes": [ 25025 // "https://www.googleapis.com/auth/content" 25026 // ] 25027 // } 25028 25029} 25030 25031// method id "content.productstatuses.get": 25032 25033type ProductstatusesGetCall struct { 25034 s *APIService 25035 merchantId uint64 25036 productId string 25037 urlParams_ gensupport.URLParams 25038 ifNoneMatch_ string 25039 ctx_ context.Context 25040 header_ http.Header 25041} 25042 25043// Get: Gets the status of a product from your Merchant Center account. 25044// 25045// - merchantId: The ID of the account that contains the product. This 25046// account cannot be a multi-client account. 25047// - productId: The REST ID of the product. 25048func (r *ProductstatusesService) Get(merchantId uint64, productId string) *ProductstatusesGetCall { 25049 c := &ProductstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25050 c.merchantId = merchantId 25051 c.productId = productId 25052 return c 25053} 25054 25055// Destinations sets the optional parameter "destinations": If set, only 25056// issues for the specified destinations are returned, otherwise only 25057// issues for the Shopping destination. 25058func (c *ProductstatusesGetCall) Destinations(destinations ...string) *ProductstatusesGetCall { 25059 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 25060 return c 25061} 25062 25063// IncludeAttributes sets the optional parameter "includeAttributes": 25064// Flag to include full product data in the result of this get request. 25065// The default value is false. 25066func (c *ProductstatusesGetCall) IncludeAttributes(includeAttributes bool) *ProductstatusesGetCall { 25067 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 25068 return c 25069} 25070 25071// Fields allows partial responses to be retrieved. See 25072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25073// for more information. 25074func (c *ProductstatusesGetCall) Fields(s ...googleapi.Field) *ProductstatusesGetCall { 25075 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25076 return c 25077} 25078 25079// IfNoneMatch sets the optional parameter which makes the operation 25080// fail if the object's ETag matches the given value. This is useful for 25081// getting updates only after the object has changed since the last 25082// request. Use googleapi.IsNotModified to check whether the response 25083// error from Do is the result of In-None-Match. 25084func (c *ProductstatusesGetCall) IfNoneMatch(entityTag string) *ProductstatusesGetCall { 25085 c.ifNoneMatch_ = entityTag 25086 return c 25087} 25088 25089// Context sets the context to be used in this call's Do method. Any 25090// pending HTTP request will be aborted if the provided context is 25091// canceled. 25092func (c *ProductstatusesGetCall) Context(ctx context.Context) *ProductstatusesGetCall { 25093 c.ctx_ = ctx 25094 return c 25095} 25096 25097// Header returns an http.Header that can be modified by the caller to 25098// add HTTP headers to the request. 25099func (c *ProductstatusesGetCall) Header() http.Header { 25100 if c.header_ == nil { 25101 c.header_ = make(http.Header) 25102 } 25103 return c.header_ 25104} 25105 25106func (c *ProductstatusesGetCall) doRequest(alt string) (*http.Response, error) { 25107 reqHeaders := make(http.Header) 25108 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 25109 for k, v := range c.header_ { 25110 reqHeaders[k] = v 25111 } 25112 reqHeaders.Set("User-Agent", c.s.userAgent()) 25113 if c.ifNoneMatch_ != "" { 25114 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25115 } 25116 var body io.Reader = nil 25117 c.urlParams_.Set("alt", alt) 25118 c.urlParams_.Set("prettyPrint", "false") 25119 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses/{productId}") 25120 urls += "?" + c.urlParams_.Encode() 25121 req, err := http.NewRequest("GET", urls, body) 25122 if err != nil { 25123 return nil, err 25124 } 25125 req.Header = reqHeaders 25126 googleapi.Expand(req.URL, map[string]string{ 25127 "merchantId": strconv.FormatUint(c.merchantId, 10), 25128 "productId": c.productId, 25129 }) 25130 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25131} 25132 25133// Do executes the "content.productstatuses.get" call. 25134// Exactly one of *ProductStatus or error will be non-nil. Any non-2xx 25135// status code is an error. Response headers are in either 25136// *ProductStatus.ServerResponse.Header or (if a response was returned 25137// at all) in error.(*googleapi.Error).Header. Use 25138// googleapi.IsNotModified to check whether the returned error was 25139// because http.StatusNotModified was returned. 25140func (c *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatus, error) { 25141 gensupport.SetOptions(c.urlParams_, opts...) 25142 res, err := c.doRequest("json") 25143 if res != nil && res.StatusCode == http.StatusNotModified { 25144 if res.Body != nil { 25145 res.Body.Close() 25146 } 25147 return nil, &googleapi.Error{ 25148 Code: res.StatusCode, 25149 Header: res.Header, 25150 } 25151 } 25152 if err != nil { 25153 return nil, err 25154 } 25155 defer googleapi.CloseBody(res) 25156 if err := googleapi.CheckResponse(res); err != nil { 25157 return nil, err 25158 } 25159 ret := &ProductStatus{ 25160 ServerResponse: googleapi.ServerResponse{ 25161 Header: res.Header, 25162 HTTPStatusCode: res.StatusCode, 25163 }, 25164 } 25165 target := &ret 25166 if err := gensupport.DecodeResponse(target, res); err != nil { 25167 return nil, err 25168 } 25169 return ret, nil 25170 // { 25171 // "description": "Gets the status of a product from your Merchant Center account.", 25172 // "flatPath": "{merchantId}/productstatuses/{productId}", 25173 // "httpMethod": "GET", 25174 // "id": "content.productstatuses.get", 25175 // "parameterOrder": [ 25176 // "merchantId", 25177 // "productId" 25178 // ], 25179 // "parameters": { 25180 // "destinations": { 25181 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 25182 // "location": "query", 25183 // "repeated": true, 25184 // "type": "string" 25185 // }, 25186 // "includeAttributes": { 25187 // "description": "Flag to include full product data in the result of this get request. The default value is false.", 25188 // "location": "query", 25189 // "type": "boolean" 25190 // }, 25191 // "merchantId": { 25192 // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", 25193 // "format": "uint64", 25194 // "location": "path", 25195 // "required": true, 25196 // "type": "string" 25197 // }, 25198 // "productId": { 25199 // "description": "The REST ID of the product.", 25200 // "location": "path", 25201 // "required": true, 25202 // "type": "string" 25203 // } 25204 // }, 25205 // "path": "{merchantId}/productstatuses/{productId}", 25206 // "response": { 25207 // "$ref": "ProductStatus" 25208 // }, 25209 // "scopes": [ 25210 // "https://www.googleapis.com/auth/content" 25211 // ] 25212 // } 25213 25214} 25215 25216// method id "content.productstatuses.list": 25217 25218type ProductstatusesListCall struct { 25219 s *APIService 25220 merchantId uint64 25221 urlParams_ gensupport.URLParams 25222 ifNoneMatch_ string 25223 ctx_ context.Context 25224 header_ http.Header 25225} 25226 25227// List: Lists the statuses of the products in your Merchant Center 25228// account. 25229// 25230// - merchantId: The ID of the account that contains the products. This 25231// account cannot be a multi-client account. 25232func (r *ProductstatusesService) List(merchantId uint64) *ProductstatusesListCall { 25233 c := &ProductstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25234 c.merchantId = merchantId 25235 return c 25236} 25237 25238// Destinations sets the optional parameter "destinations": If set, only 25239// issues for the specified destinations are returned, otherwise only 25240// issues for the Shopping destination. 25241func (c *ProductstatusesListCall) Destinations(destinations ...string) *ProductstatusesListCall { 25242 c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 25243 return c 25244} 25245 25246// IncludeAttributes sets the optional parameter "includeAttributes": 25247// Flag to include full product data in the results of the list request. 25248// The default value is false. 25249func (c *ProductstatusesListCall) IncludeAttributes(includeAttributes bool) *ProductstatusesListCall { 25250 c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes)) 25251 return c 25252} 25253 25254// IncludeInvalidInsertedItems sets the optional parameter 25255// "includeInvalidInsertedItems": Flag to include the invalid inserted 25256// items in the result of the list request. By default the invalid items 25257// are not shown (the default value is false). 25258func (c *ProductstatusesListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductstatusesListCall { 25259 c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems)) 25260 return c 25261} 25262 25263// MaxResults sets the optional parameter "maxResults": The maximum 25264// number of product statuses to return in the response, used for 25265// paging. 25266func (c *ProductstatusesListCall) MaxResults(maxResults int64) *ProductstatusesListCall { 25267 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 25268 return c 25269} 25270 25271// PageToken sets the optional parameter "pageToken": The token returned 25272// by the previous request. 25273func (c *ProductstatusesListCall) PageToken(pageToken string) *ProductstatusesListCall { 25274 c.urlParams_.Set("pageToken", pageToken) 25275 return c 25276} 25277 25278// Fields allows partial responses to be retrieved. See 25279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25280// for more information. 25281func (c *ProductstatusesListCall) Fields(s ...googleapi.Field) *ProductstatusesListCall { 25282 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25283 return c 25284} 25285 25286// IfNoneMatch sets the optional parameter which makes the operation 25287// fail if the object's ETag matches the given value. This is useful for 25288// getting updates only after the object has changed since the last 25289// request. Use googleapi.IsNotModified to check whether the response 25290// error from Do is the result of In-None-Match. 25291func (c *ProductstatusesListCall) IfNoneMatch(entityTag string) *ProductstatusesListCall { 25292 c.ifNoneMatch_ = entityTag 25293 return c 25294} 25295 25296// Context sets the context to be used in this call's Do method. Any 25297// pending HTTP request will be aborted if the provided context is 25298// canceled. 25299func (c *ProductstatusesListCall) Context(ctx context.Context) *ProductstatusesListCall { 25300 c.ctx_ = ctx 25301 return c 25302} 25303 25304// Header returns an http.Header that can be modified by the caller to 25305// add HTTP headers to the request. 25306func (c *ProductstatusesListCall) Header() http.Header { 25307 if c.header_ == nil { 25308 c.header_ = make(http.Header) 25309 } 25310 return c.header_ 25311} 25312 25313func (c *ProductstatusesListCall) doRequest(alt string) (*http.Response, error) { 25314 reqHeaders := make(http.Header) 25315 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 25316 for k, v := range c.header_ { 25317 reqHeaders[k] = v 25318 } 25319 reqHeaders.Set("User-Agent", c.s.userAgent()) 25320 if c.ifNoneMatch_ != "" { 25321 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25322 } 25323 var body io.Reader = nil 25324 c.urlParams_.Set("alt", alt) 25325 c.urlParams_.Set("prettyPrint", "false") 25326 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses") 25327 urls += "?" + c.urlParams_.Encode() 25328 req, err := http.NewRequest("GET", urls, body) 25329 if err != nil { 25330 return nil, err 25331 } 25332 req.Header = reqHeaders 25333 googleapi.Expand(req.URL, map[string]string{ 25334 "merchantId": strconv.FormatUint(c.merchantId, 10), 25335 }) 25336 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25337} 25338 25339// Do executes the "content.productstatuses.list" call. 25340// Exactly one of *ProductstatusesListResponse or error will be non-nil. 25341// Any non-2xx status code is an error. Response headers are in either 25342// *ProductstatusesListResponse.ServerResponse.Header or (if a response 25343// was returned at all) in error.(*googleapi.Error).Header. Use 25344// googleapi.IsNotModified to check whether the returned error was 25345// because http.StatusNotModified was returned. 25346func (c *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*ProductstatusesListResponse, error) { 25347 gensupport.SetOptions(c.urlParams_, opts...) 25348 res, err := c.doRequest("json") 25349 if res != nil && res.StatusCode == http.StatusNotModified { 25350 if res.Body != nil { 25351 res.Body.Close() 25352 } 25353 return nil, &googleapi.Error{ 25354 Code: res.StatusCode, 25355 Header: res.Header, 25356 } 25357 } 25358 if err != nil { 25359 return nil, err 25360 } 25361 defer googleapi.CloseBody(res) 25362 if err := googleapi.CheckResponse(res); err != nil { 25363 return nil, err 25364 } 25365 ret := &ProductstatusesListResponse{ 25366 ServerResponse: googleapi.ServerResponse{ 25367 Header: res.Header, 25368 HTTPStatusCode: res.StatusCode, 25369 }, 25370 } 25371 target := &ret 25372 if err := gensupport.DecodeResponse(target, res); err != nil { 25373 return nil, err 25374 } 25375 return ret, nil 25376 // { 25377 // "description": "Lists the statuses of the products in your Merchant Center account.", 25378 // "flatPath": "{merchantId}/productstatuses", 25379 // "httpMethod": "GET", 25380 // "id": "content.productstatuses.list", 25381 // "parameterOrder": [ 25382 // "merchantId" 25383 // ], 25384 // "parameters": { 25385 // "destinations": { 25386 // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", 25387 // "location": "query", 25388 // "repeated": true, 25389 // "type": "string" 25390 // }, 25391 // "includeAttributes": { 25392 // "description": "Flag to include full product data in the results of the list request. The default value is false.", 25393 // "location": "query", 25394 // "type": "boolean" 25395 // }, 25396 // "includeInvalidInsertedItems": { 25397 // "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).", 25398 // "location": "query", 25399 // "type": "boolean" 25400 // }, 25401 // "maxResults": { 25402 // "description": "The maximum number of product statuses to return in the response, used for paging.", 25403 // "format": "uint32", 25404 // "location": "query", 25405 // "type": "integer" 25406 // }, 25407 // "merchantId": { 25408 // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", 25409 // "format": "uint64", 25410 // "location": "path", 25411 // "required": true, 25412 // "type": "string" 25413 // }, 25414 // "pageToken": { 25415 // "description": "The token returned by the previous request.", 25416 // "location": "query", 25417 // "type": "string" 25418 // } 25419 // }, 25420 // "path": "{merchantId}/productstatuses", 25421 // "response": { 25422 // "$ref": "ProductstatusesListResponse" 25423 // }, 25424 // "scopes": [ 25425 // "https://www.googleapis.com/auth/content" 25426 // ] 25427 // } 25428 25429} 25430 25431// Pages invokes f for each page of results. 25432// A non-nil error returned from f will halt the iteration. 25433// The provided context supersedes any context provided to the Context method. 25434func (c *ProductstatusesListCall) Pages(ctx context.Context, f func(*ProductstatusesListResponse) error) error { 25435 c.ctx_ = ctx 25436 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 25437 for { 25438 x, err := c.Do() 25439 if err != nil { 25440 return err 25441 } 25442 if err := f(x); err != nil { 25443 return err 25444 } 25445 if x.NextPageToken == "" { 25446 return nil 25447 } 25448 c.PageToken(x.NextPageToken) 25449 } 25450} 25451 25452// method id "content.shippingsettings.custombatch": 25453 25454type ShippingsettingsCustombatchCall struct { 25455 s *APIService 25456 shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest 25457 urlParams_ gensupport.URLParams 25458 ctx_ context.Context 25459 header_ http.Header 25460} 25461 25462// Custombatch: Retrieves and updates the shipping settings of multiple 25463// accounts in a single request. 25464func (r *ShippingsettingsService) Custombatch(shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest) *ShippingsettingsCustombatchCall { 25465 c := &ShippingsettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25466 c.shippingsettingscustombatchrequest = shippingsettingscustombatchrequest 25467 return c 25468} 25469 25470// DryRun sets the optional parameter "dryRun": Flag to simulate a 25471// request like in a live environment. If set to true, dry-run mode 25472// checks the validity of the request and returns errors (if any). 25473func (c *ShippingsettingsCustombatchCall) DryRun(dryRun bool) *ShippingsettingsCustombatchCall { 25474 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 25475 return c 25476} 25477 25478// Fields allows partial responses to be retrieved. See 25479// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25480// for more information. 25481func (c *ShippingsettingsCustombatchCall) Fields(s ...googleapi.Field) *ShippingsettingsCustombatchCall { 25482 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25483 return c 25484} 25485 25486// Context sets the context to be used in this call's Do method. Any 25487// pending HTTP request will be aborted if the provided context is 25488// canceled. 25489func (c *ShippingsettingsCustombatchCall) Context(ctx context.Context) *ShippingsettingsCustombatchCall { 25490 c.ctx_ = ctx 25491 return c 25492} 25493 25494// Header returns an http.Header that can be modified by the caller to 25495// add HTTP headers to the request. 25496func (c *ShippingsettingsCustombatchCall) Header() http.Header { 25497 if c.header_ == nil { 25498 c.header_ = make(http.Header) 25499 } 25500 return c.header_ 25501} 25502 25503func (c *ShippingsettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { 25504 reqHeaders := make(http.Header) 25505 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 25506 for k, v := range c.header_ { 25507 reqHeaders[k] = v 25508 } 25509 reqHeaders.Set("User-Agent", c.s.userAgent()) 25510 var body io.Reader = nil 25511 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettingscustombatchrequest) 25512 if err != nil { 25513 return nil, err 25514 } 25515 reqHeaders.Set("Content-Type", "application/json") 25516 c.urlParams_.Set("alt", alt) 25517 c.urlParams_.Set("prettyPrint", "false") 25518 urls := googleapi.ResolveRelative(c.s.BasePath, "shippingsettings/batch") 25519 urls += "?" + c.urlParams_.Encode() 25520 req, err := http.NewRequest("POST", urls, body) 25521 if err != nil { 25522 return nil, err 25523 } 25524 req.Header = reqHeaders 25525 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25526} 25527 25528// Do executes the "content.shippingsettings.custombatch" call. 25529// Exactly one of *ShippingsettingsCustomBatchResponse or error will be 25530// non-nil. Any non-2xx status code is an error. Response headers are in 25531// either *ShippingsettingsCustomBatchResponse.ServerResponse.Header or 25532// (if a response was returned at all) in 25533// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 25534// whether the returned error was because http.StatusNotModified was 25535// returned. 25536func (c *ShippingsettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsCustomBatchResponse, error) { 25537 gensupport.SetOptions(c.urlParams_, opts...) 25538 res, err := c.doRequest("json") 25539 if res != nil && res.StatusCode == http.StatusNotModified { 25540 if res.Body != nil { 25541 res.Body.Close() 25542 } 25543 return nil, &googleapi.Error{ 25544 Code: res.StatusCode, 25545 Header: res.Header, 25546 } 25547 } 25548 if err != nil { 25549 return nil, err 25550 } 25551 defer googleapi.CloseBody(res) 25552 if err := googleapi.CheckResponse(res); err != nil { 25553 return nil, err 25554 } 25555 ret := &ShippingsettingsCustomBatchResponse{ 25556 ServerResponse: googleapi.ServerResponse{ 25557 Header: res.Header, 25558 HTTPStatusCode: res.StatusCode, 25559 }, 25560 } 25561 target := &ret 25562 if err := gensupport.DecodeResponse(target, res); err != nil { 25563 return nil, err 25564 } 25565 return ret, nil 25566 // { 25567 // "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", 25568 // "flatPath": "shippingsettings/batch", 25569 // "httpMethod": "POST", 25570 // "id": "content.shippingsettings.custombatch", 25571 // "parameterOrder": [], 25572 // "parameters": { 25573 // "dryRun": { 25574 // "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).", 25575 // "location": "query", 25576 // "type": "boolean" 25577 // } 25578 // }, 25579 // "path": "shippingsettings/batch", 25580 // "request": { 25581 // "$ref": "ShippingsettingsCustomBatchRequest" 25582 // }, 25583 // "response": { 25584 // "$ref": "ShippingsettingsCustomBatchResponse" 25585 // }, 25586 // "scopes": [ 25587 // "https://www.googleapis.com/auth/content" 25588 // ] 25589 // } 25590 25591} 25592 25593// method id "content.shippingsettings.get": 25594 25595type ShippingsettingsGetCall struct { 25596 s *APIService 25597 merchantId uint64 25598 accountId uint64 25599 urlParams_ gensupport.URLParams 25600 ifNoneMatch_ string 25601 ctx_ context.Context 25602 header_ http.Header 25603} 25604 25605// Get: Retrieves the shipping settings of the account. 25606// 25607// - accountId: The ID of the account for which to get/update shipping 25608// settings. 25609// - merchantId: The ID of the managing account. If this parameter is 25610// not the same as accountId, then this account must be a multi-client 25611// account and `accountId` must be the ID of a sub-account of this 25612// account. 25613func (r *ShippingsettingsService) Get(merchantId uint64, accountId uint64) *ShippingsettingsGetCall { 25614 c := &ShippingsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25615 c.merchantId = merchantId 25616 c.accountId = accountId 25617 return c 25618} 25619 25620// Fields allows partial responses to be retrieved. See 25621// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25622// for more information. 25623func (c *ShippingsettingsGetCall) Fields(s ...googleapi.Field) *ShippingsettingsGetCall { 25624 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25625 return c 25626} 25627 25628// IfNoneMatch sets the optional parameter which makes the operation 25629// fail if the object's ETag matches the given value. This is useful for 25630// getting updates only after the object has changed since the last 25631// request. Use googleapi.IsNotModified to check whether the response 25632// error from Do is the result of In-None-Match. 25633func (c *ShippingsettingsGetCall) IfNoneMatch(entityTag string) *ShippingsettingsGetCall { 25634 c.ifNoneMatch_ = entityTag 25635 return c 25636} 25637 25638// Context sets the context to be used in this call's Do method. Any 25639// pending HTTP request will be aborted if the provided context is 25640// canceled. 25641func (c *ShippingsettingsGetCall) Context(ctx context.Context) *ShippingsettingsGetCall { 25642 c.ctx_ = ctx 25643 return c 25644} 25645 25646// Header returns an http.Header that can be modified by the caller to 25647// add HTTP headers to the request. 25648func (c *ShippingsettingsGetCall) Header() http.Header { 25649 if c.header_ == nil { 25650 c.header_ = make(http.Header) 25651 } 25652 return c.header_ 25653} 25654 25655func (c *ShippingsettingsGetCall) doRequest(alt string) (*http.Response, error) { 25656 reqHeaders := make(http.Header) 25657 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 25658 for k, v := range c.header_ { 25659 reqHeaders[k] = v 25660 } 25661 reqHeaders.Set("User-Agent", c.s.userAgent()) 25662 if c.ifNoneMatch_ != "" { 25663 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25664 } 25665 var body io.Reader = nil 25666 c.urlParams_.Set("alt", alt) 25667 c.urlParams_.Set("prettyPrint", "false") 25668 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}") 25669 urls += "?" + c.urlParams_.Encode() 25670 req, err := http.NewRequest("GET", urls, body) 25671 if err != nil { 25672 return nil, err 25673 } 25674 req.Header = reqHeaders 25675 googleapi.Expand(req.URL, map[string]string{ 25676 "merchantId": strconv.FormatUint(c.merchantId, 10), 25677 "accountId": strconv.FormatUint(c.accountId, 10), 25678 }) 25679 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25680} 25681 25682// Do executes the "content.shippingsettings.get" call. 25683// Exactly one of *ShippingSettings or error will be non-nil. Any 25684// non-2xx status code is an error. Response headers are in either 25685// *ShippingSettings.ServerResponse.Header or (if a response was 25686// returned at all) in error.(*googleapi.Error).Header. Use 25687// googleapi.IsNotModified to check whether the returned error was 25688// because http.StatusNotModified was returned. 25689func (c *ShippingsettingsGetCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) { 25690 gensupport.SetOptions(c.urlParams_, opts...) 25691 res, err := c.doRequest("json") 25692 if res != nil && res.StatusCode == http.StatusNotModified { 25693 if res.Body != nil { 25694 res.Body.Close() 25695 } 25696 return nil, &googleapi.Error{ 25697 Code: res.StatusCode, 25698 Header: res.Header, 25699 } 25700 } 25701 if err != nil { 25702 return nil, err 25703 } 25704 defer googleapi.CloseBody(res) 25705 if err := googleapi.CheckResponse(res); err != nil { 25706 return nil, err 25707 } 25708 ret := &ShippingSettings{ 25709 ServerResponse: googleapi.ServerResponse{ 25710 Header: res.Header, 25711 HTTPStatusCode: res.StatusCode, 25712 }, 25713 } 25714 target := &ret 25715 if err := gensupport.DecodeResponse(target, res); err != nil { 25716 return nil, err 25717 } 25718 return ret, nil 25719 // { 25720 // "description": "Retrieves the shipping settings of the account.", 25721 // "flatPath": "{merchantId}/shippingsettings/{accountId}", 25722 // "httpMethod": "GET", 25723 // "id": "content.shippingsettings.get", 25724 // "parameterOrder": [ 25725 // "merchantId", 25726 // "accountId" 25727 // ], 25728 // "parameters": { 25729 // "accountId": { 25730 // "description": "The ID of the account for which to get/update shipping settings.", 25731 // "format": "uint64", 25732 // "location": "path", 25733 // "required": true, 25734 // "type": "string" 25735 // }, 25736 // "merchantId": { 25737 // "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.", 25738 // "format": "uint64", 25739 // "location": "path", 25740 // "required": true, 25741 // "type": "string" 25742 // } 25743 // }, 25744 // "path": "{merchantId}/shippingsettings/{accountId}", 25745 // "response": { 25746 // "$ref": "ShippingSettings" 25747 // }, 25748 // "scopes": [ 25749 // "https://www.googleapis.com/auth/content" 25750 // ] 25751 // } 25752 25753} 25754 25755// method id "content.shippingsettings.getsupportedcarriers": 25756 25757type ShippingsettingsGetsupportedcarriersCall struct { 25758 s *APIService 25759 merchantId uint64 25760 urlParams_ gensupport.URLParams 25761 ifNoneMatch_ string 25762 ctx_ context.Context 25763 header_ http.Header 25764} 25765 25766// Getsupportedcarriers: Retrieves supported carriers and carrier 25767// services for an account. 25768// 25769// - merchantId: The ID of the account for which to retrieve the 25770// supported carriers. 25771func (r *ShippingsettingsService) Getsupportedcarriers(merchantId uint64) *ShippingsettingsGetsupportedcarriersCall { 25772 c := &ShippingsettingsGetsupportedcarriersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25773 c.merchantId = merchantId 25774 return c 25775} 25776 25777// Fields allows partial responses to be retrieved. See 25778// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25779// for more information. 25780func (c *ShippingsettingsGetsupportedcarriersCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedcarriersCall { 25781 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25782 return c 25783} 25784 25785// IfNoneMatch sets the optional parameter which makes the operation 25786// fail if the object's ETag matches the given value. This is useful for 25787// getting updates only after the object has changed since the last 25788// request. Use googleapi.IsNotModified to check whether the response 25789// error from Do is the result of In-None-Match. 25790func (c *ShippingsettingsGetsupportedcarriersCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedcarriersCall { 25791 c.ifNoneMatch_ = entityTag 25792 return c 25793} 25794 25795// Context sets the context to be used in this call's Do method. Any 25796// pending HTTP request will be aborted if the provided context is 25797// canceled. 25798func (c *ShippingsettingsGetsupportedcarriersCall) Context(ctx context.Context) *ShippingsettingsGetsupportedcarriersCall { 25799 c.ctx_ = ctx 25800 return c 25801} 25802 25803// Header returns an http.Header that can be modified by the caller to 25804// add HTTP headers to the request. 25805func (c *ShippingsettingsGetsupportedcarriersCall) Header() http.Header { 25806 if c.header_ == nil { 25807 c.header_ = make(http.Header) 25808 } 25809 return c.header_ 25810} 25811 25812func (c *ShippingsettingsGetsupportedcarriersCall) doRequest(alt string) (*http.Response, error) { 25813 reqHeaders := make(http.Header) 25814 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 25815 for k, v := range c.header_ { 25816 reqHeaders[k] = v 25817 } 25818 reqHeaders.Set("User-Agent", c.s.userAgent()) 25819 if c.ifNoneMatch_ != "" { 25820 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25821 } 25822 var body io.Reader = nil 25823 c.urlParams_.Set("alt", alt) 25824 c.urlParams_.Set("prettyPrint", "false") 25825 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedCarriers") 25826 urls += "?" + c.urlParams_.Encode() 25827 req, err := http.NewRequest("GET", urls, body) 25828 if err != nil { 25829 return nil, err 25830 } 25831 req.Header = reqHeaders 25832 googleapi.Expand(req.URL, map[string]string{ 25833 "merchantId": strconv.FormatUint(c.merchantId, 10), 25834 }) 25835 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25836} 25837 25838// Do executes the "content.shippingsettings.getsupportedcarriers" call. 25839// Exactly one of *ShippingsettingsGetSupportedCarriersResponse or error 25840// will be non-nil. Any non-2xx status code is an error. Response 25841// headers are in either 25842// *ShippingsettingsGetSupportedCarriersResponse.ServerResponse.Header 25843// or (if a response was returned at all) in 25844// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 25845// whether the returned error was because http.StatusNotModified was 25846// returned. 25847func (c *ShippingsettingsGetsupportedcarriersCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedCarriersResponse, error) { 25848 gensupport.SetOptions(c.urlParams_, opts...) 25849 res, err := c.doRequest("json") 25850 if res != nil && res.StatusCode == http.StatusNotModified { 25851 if res.Body != nil { 25852 res.Body.Close() 25853 } 25854 return nil, &googleapi.Error{ 25855 Code: res.StatusCode, 25856 Header: res.Header, 25857 } 25858 } 25859 if err != nil { 25860 return nil, err 25861 } 25862 defer googleapi.CloseBody(res) 25863 if err := googleapi.CheckResponse(res); err != nil { 25864 return nil, err 25865 } 25866 ret := &ShippingsettingsGetSupportedCarriersResponse{ 25867 ServerResponse: googleapi.ServerResponse{ 25868 Header: res.Header, 25869 HTTPStatusCode: res.StatusCode, 25870 }, 25871 } 25872 target := &ret 25873 if err := gensupport.DecodeResponse(target, res); err != nil { 25874 return nil, err 25875 } 25876 return ret, nil 25877 // { 25878 // "description": "Retrieves supported carriers and carrier services for an account.", 25879 // "flatPath": "{merchantId}/supportedCarriers", 25880 // "httpMethod": "GET", 25881 // "id": "content.shippingsettings.getsupportedcarriers", 25882 // "parameterOrder": [ 25883 // "merchantId" 25884 // ], 25885 // "parameters": { 25886 // "merchantId": { 25887 // "description": "The ID of the account for which to retrieve the supported carriers.", 25888 // "format": "uint64", 25889 // "location": "path", 25890 // "required": true, 25891 // "type": "string" 25892 // } 25893 // }, 25894 // "path": "{merchantId}/supportedCarriers", 25895 // "response": { 25896 // "$ref": "ShippingsettingsGetSupportedCarriersResponse" 25897 // }, 25898 // "scopes": [ 25899 // "https://www.googleapis.com/auth/content" 25900 // ] 25901 // } 25902 25903} 25904 25905// method id "content.shippingsettings.getsupportedholidays": 25906 25907type ShippingsettingsGetsupportedholidaysCall struct { 25908 s *APIService 25909 merchantId uint64 25910 urlParams_ gensupport.URLParams 25911 ifNoneMatch_ string 25912 ctx_ context.Context 25913 header_ http.Header 25914} 25915 25916// Getsupportedholidays: Retrieves supported holidays for an account. 25917// 25918// - merchantId: The ID of the account for which to retrieve the 25919// supported holidays. 25920func (r *ShippingsettingsService) Getsupportedholidays(merchantId uint64) *ShippingsettingsGetsupportedholidaysCall { 25921 c := &ShippingsettingsGetsupportedholidaysCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25922 c.merchantId = merchantId 25923 return c 25924} 25925 25926// Fields allows partial responses to be retrieved. See 25927// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25928// for more information. 25929func (c *ShippingsettingsGetsupportedholidaysCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedholidaysCall { 25930 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25931 return c 25932} 25933 25934// IfNoneMatch sets the optional parameter which makes the operation 25935// fail if the object's ETag matches the given value. This is useful for 25936// getting updates only after the object has changed since the last 25937// request. Use googleapi.IsNotModified to check whether the response 25938// error from Do is the result of In-None-Match. 25939func (c *ShippingsettingsGetsupportedholidaysCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedholidaysCall { 25940 c.ifNoneMatch_ = entityTag 25941 return c 25942} 25943 25944// Context sets the context to be used in this call's Do method. Any 25945// pending HTTP request will be aborted if the provided context is 25946// canceled. 25947func (c *ShippingsettingsGetsupportedholidaysCall) Context(ctx context.Context) *ShippingsettingsGetsupportedholidaysCall { 25948 c.ctx_ = ctx 25949 return c 25950} 25951 25952// Header returns an http.Header that can be modified by the caller to 25953// add HTTP headers to the request. 25954func (c *ShippingsettingsGetsupportedholidaysCall) Header() http.Header { 25955 if c.header_ == nil { 25956 c.header_ = make(http.Header) 25957 } 25958 return c.header_ 25959} 25960 25961func (c *ShippingsettingsGetsupportedholidaysCall) doRequest(alt string) (*http.Response, error) { 25962 reqHeaders := make(http.Header) 25963 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 25964 for k, v := range c.header_ { 25965 reqHeaders[k] = v 25966 } 25967 reqHeaders.Set("User-Agent", c.s.userAgent()) 25968 if c.ifNoneMatch_ != "" { 25969 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25970 } 25971 var body io.Reader = nil 25972 c.urlParams_.Set("alt", alt) 25973 c.urlParams_.Set("prettyPrint", "false") 25974 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedHolidays") 25975 urls += "?" + c.urlParams_.Encode() 25976 req, err := http.NewRequest("GET", urls, body) 25977 if err != nil { 25978 return nil, err 25979 } 25980 req.Header = reqHeaders 25981 googleapi.Expand(req.URL, map[string]string{ 25982 "merchantId": strconv.FormatUint(c.merchantId, 10), 25983 }) 25984 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25985} 25986 25987// Do executes the "content.shippingsettings.getsupportedholidays" call. 25988// Exactly one of *ShippingsettingsGetSupportedHolidaysResponse or error 25989// will be non-nil. Any non-2xx status code is an error. Response 25990// headers are in either 25991// *ShippingsettingsGetSupportedHolidaysResponse.ServerResponse.Header 25992// or (if a response was returned at all) in 25993// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 25994// whether the returned error was because http.StatusNotModified was 25995// returned. 25996func (c *ShippingsettingsGetsupportedholidaysCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedHolidaysResponse, error) { 25997 gensupport.SetOptions(c.urlParams_, opts...) 25998 res, err := c.doRequest("json") 25999 if res != nil && res.StatusCode == http.StatusNotModified { 26000 if res.Body != nil { 26001 res.Body.Close() 26002 } 26003 return nil, &googleapi.Error{ 26004 Code: res.StatusCode, 26005 Header: res.Header, 26006 } 26007 } 26008 if err != nil { 26009 return nil, err 26010 } 26011 defer googleapi.CloseBody(res) 26012 if err := googleapi.CheckResponse(res); err != nil { 26013 return nil, err 26014 } 26015 ret := &ShippingsettingsGetSupportedHolidaysResponse{ 26016 ServerResponse: googleapi.ServerResponse{ 26017 Header: res.Header, 26018 HTTPStatusCode: res.StatusCode, 26019 }, 26020 } 26021 target := &ret 26022 if err := gensupport.DecodeResponse(target, res); err != nil { 26023 return nil, err 26024 } 26025 return ret, nil 26026 // { 26027 // "description": "Retrieves supported holidays for an account.", 26028 // "flatPath": "{merchantId}/supportedHolidays", 26029 // "httpMethod": "GET", 26030 // "id": "content.shippingsettings.getsupportedholidays", 26031 // "parameterOrder": [ 26032 // "merchantId" 26033 // ], 26034 // "parameters": { 26035 // "merchantId": { 26036 // "description": "The ID of the account for which to retrieve the supported holidays.", 26037 // "format": "uint64", 26038 // "location": "path", 26039 // "required": true, 26040 // "type": "string" 26041 // } 26042 // }, 26043 // "path": "{merchantId}/supportedHolidays", 26044 // "response": { 26045 // "$ref": "ShippingsettingsGetSupportedHolidaysResponse" 26046 // }, 26047 // "scopes": [ 26048 // "https://www.googleapis.com/auth/content" 26049 // ] 26050 // } 26051 26052} 26053 26054// method id "content.shippingsettings.getsupportedpickupservices": 26055 26056type ShippingsettingsGetsupportedpickupservicesCall struct { 26057 s *APIService 26058 merchantId uint64 26059 urlParams_ gensupport.URLParams 26060 ifNoneMatch_ string 26061 ctx_ context.Context 26062 header_ http.Header 26063} 26064 26065// Getsupportedpickupservices: Retrieves supported pickup services for 26066// an account. 26067// 26068// - merchantId: The ID of the account for which to retrieve the 26069// supported pickup services. 26070func (r *ShippingsettingsService) Getsupportedpickupservices(merchantId uint64) *ShippingsettingsGetsupportedpickupservicesCall { 26071 c := &ShippingsettingsGetsupportedpickupservicesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26072 c.merchantId = merchantId 26073 return c 26074} 26075 26076// Fields allows partial responses to be retrieved. See 26077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26078// for more information. 26079func (c *ShippingsettingsGetsupportedpickupservicesCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedpickupservicesCall { 26080 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26081 return c 26082} 26083 26084// IfNoneMatch sets the optional parameter which makes the operation 26085// fail if the object's ETag matches the given value. This is useful for 26086// getting updates only after the object has changed since the last 26087// request. Use googleapi.IsNotModified to check whether the response 26088// error from Do is the result of In-None-Match. 26089func (c *ShippingsettingsGetsupportedpickupservicesCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedpickupservicesCall { 26090 c.ifNoneMatch_ = entityTag 26091 return c 26092} 26093 26094// Context sets the context to be used in this call's Do method. Any 26095// pending HTTP request will be aborted if the provided context is 26096// canceled. 26097func (c *ShippingsettingsGetsupportedpickupservicesCall) Context(ctx context.Context) *ShippingsettingsGetsupportedpickupservicesCall { 26098 c.ctx_ = ctx 26099 return c 26100} 26101 26102// Header returns an http.Header that can be modified by the caller to 26103// add HTTP headers to the request. 26104func (c *ShippingsettingsGetsupportedpickupservicesCall) Header() http.Header { 26105 if c.header_ == nil { 26106 c.header_ = make(http.Header) 26107 } 26108 return c.header_ 26109} 26110 26111func (c *ShippingsettingsGetsupportedpickupservicesCall) doRequest(alt string) (*http.Response, error) { 26112 reqHeaders := make(http.Header) 26113 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 26114 for k, v := range c.header_ { 26115 reqHeaders[k] = v 26116 } 26117 reqHeaders.Set("User-Agent", c.s.userAgent()) 26118 if c.ifNoneMatch_ != "" { 26119 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 26120 } 26121 var body io.Reader = nil 26122 c.urlParams_.Set("alt", alt) 26123 c.urlParams_.Set("prettyPrint", "false") 26124 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedPickupServices") 26125 urls += "?" + c.urlParams_.Encode() 26126 req, err := http.NewRequest("GET", urls, body) 26127 if err != nil { 26128 return nil, err 26129 } 26130 req.Header = reqHeaders 26131 googleapi.Expand(req.URL, map[string]string{ 26132 "merchantId": strconv.FormatUint(c.merchantId, 10), 26133 }) 26134 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26135} 26136 26137// Do executes the "content.shippingsettings.getsupportedpickupservices" call. 26138// Exactly one of *ShippingsettingsGetSupportedPickupServicesResponse or 26139// error will be non-nil. Any non-2xx status code is an error. Response 26140// headers are in either 26141// *ShippingsettingsGetSupportedPickupServicesResponse.ServerResponse.Hea 26142// der or (if a response was returned at all) in 26143// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 26144// whether the returned error was because http.StatusNotModified was 26145// returned. 26146func (c *ShippingsettingsGetsupportedpickupservicesCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedPickupServicesResponse, error) { 26147 gensupport.SetOptions(c.urlParams_, opts...) 26148 res, err := c.doRequest("json") 26149 if res != nil && res.StatusCode == http.StatusNotModified { 26150 if res.Body != nil { 26151 res.Body.Close() 26152 } 26153 return nil, &googleapi.Error{ 26154 Code: res.StatusCode, 26155 Header: res.Header, 26156 } 26157 } 26158 if err != nil { 26159 return nil, err 26160 } 26161 defer googleapi.CloseBody(res) 26162 if err := googleapi.CheckResponse(res); err != nil { 26163 return nil, err 26164 } 26165 ret := &ShippingsettingsGetSupportedPickupServicesResponse{ 26166 ServerResponse: googleapi.ServerResponse{ 26167 Header: res.Header, 26168 HTTPStatusCode: res.StatusCode, 26169 }, 26170 } 26171 target := &ret 26172 if err := gensupport.DecodeResponse(target, res); err != nil { 26173 return nil, err 26174 } 26175 return ret, nil 26176 // { 26177 // "description": "Retrieves supported pickup services for an account.", 26178 // "flatPath": "{merchantId}/supportedPickupServices", 26179 // "httpMethod": "GET", 26180 // "id": "content.shippingsettings.getsupportedpickupservices", 26181 // "parameterOrder": [ 26182 // "merchantId" 26183 // ], 26184 // "parameters": { 26185 // "merchantId": { 26186 // "description": "The ID of the account for which to retrieve the supported pickup services.", 26187 // "format": "uint64", 26188 // "location": "path", 26189 // "required": true, 26190 // "type": "string" 26191 // } 26192 // }, 26193 // "path": "{merchantId}/supportedPickupServices", 26194 // "response": { 26195 // "$ref": "ShippingsettingsGetSupportedPickupServicesResponse" 26196 // }, 26197 // "scopes": [ 26198 // "https://www.googleapis.com/auth/content" 26199 // ] 26200 // } 26201 26202} 26203 26204// method id "content.shippingsettings.list": 26205 26206type ShippingsettingsListCall struct { 26207 s *APIService 26208 merchantId uint64 26209 urlParams_ gensupport.URLParams 26210 ifNoneMatch_ string 26211 ctx_ context.Context 26212 header_ http.Header 26213} 26214 26215// List: Lists the shipping settings of the sub-accounts in your 26216// Merchant Center account. 26217// 26218// - merchantId: The ID of the managing account. This must be a 26219// multi-client account. 26220func (r *ShippingsettingsService) List(merchantId uint64) *ShippingsettingsListCall { 26221 c := &ShippingsettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26222 c.merchantId = merchantId 26223 return c 26224} 26225 26226// MaxResults sets the optional parameter "maxResults": The maximum 26227// number of shipping settings to return in the response, used for 26228// paging. 26229func (c *ShippingsettingsListCall) MaxResults(maxResults int64) *ShippingsettingsListCall { 26230 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 26231 return c 26232} 26233 26234// PageToken sets the optional parameter "pageToken": The token returned 26235// by the previous request. 26236func (c *ShippingsettingsListCall) PageToken(pageToken string) *ShippingsettingsListCall { 26237 c.urlParams_.Set("pageToken", pageToken) 26238 return c 26239} 26240 26241// Fields allows partial responses to be retrieved. See 26242// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26243// for more information. 26244func (c *ShippingsettingsListCall) Fields(s ...googleapi.Field) *ShippingsettingsListCall { 26245 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26246 return c 26247} 26248 26249// IfNoneMatch sets the optional parameter which makes the operation 26250// fail if the object's ETag matches the given value. This is useful for 26251// getting updates only after the object has changed since the last 26252// request. Use googleapi.IsNotModified to check whether the response 26253// error from Do is the result of In-None-Match. 26254func (c *ShippingsettingsListCall) IfNoneMatch(entityTag string) *ShippingsettingsListCall { 26255 c.ifNoneMatch_ = entityTag 26256 return c 26257} 26258 26259// Context sets the context to be used in this call's Do method. Any 26260// pending HTTP request will be aborted if the provided context is 26261// canceled. 26262func (c *ShippingsettingsListCall) Context(ctx context.Context) *ShippingsettingsListCall { 26263 c.ctx_ = ctx 26264 return c 26265} 26266 26267// Header returns an http.Header that can be modified by the caller to 26268// add HTTP headers to the request. 26269func (c *ShippingsettingsListCall) Header() http.Header { 26270 if c.header_ == nil { 26271 c.header_ = make(http.Header) 26272 } 26273 return c.header_ 26274} 26275 26276func (c *ShippingsettingsListCall) doRequest(alt string) (*http.Response, error) { 26277 reqHeaders := make(http.Header) 26278 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 26279 for k, v := range c.header_ { 26280 reqHeaders[k] = v 26281 } 26282 reqHeaders.Set("User-Agent", c.s.userAgent()) 26283 if c.ifNoneMatch_ != "" { 26284 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 26285 } 26286 var body io.Reader = nil 26287 c.urlParams_.Set("alt", alt) 26288 c.urlParams_.Set("prettyPrint", "false") 26289 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings") 26290 urls += "?" + c.urlParams_.Encode() 26291 req, err := http.NewRequest("GET", urls, body) 26292 if err != nil { 26293 return nil, err 26294 } 26295 req.Header = reqHeaders 26296 googleapi.Expand(req.URL, map[string]string{ 26297 "merchantId": strconv.FormatUint(c.merchantId, 10), 26298 }) 26299 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26300} 26301 26302// Do executes the "content.shippingsettings.list" call. 26303// Exactly one of *ShippingsettingsListResponse or error will be 26304// non-nil. Any non-2xx status code is an error. Response headers are in 26305// either *ShippingsettingsListResponse.ServerResponse.Header or (if a 26306// response was returned at all) in error.(*googleapi.Error).Header. Use 26307// googleapi.IsNotModified to check whether the returned error was 26308// because http.StatusNotModified was returned. 26309func (c *ShippingsettingsListCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsListResponse, error) { 26310 gensupport.SetOptions(c.urlParams_, opts...) 26311 res, err := c.doRequest("json") 26312 if res != nil && res.StatusCode == http.StatusNotModified { 26313 if res.Body != nil { 26314 res.Body.Close() 26315 } 26316 return nil, &googleapi.Error{ 26317 Code: res.StatusCode, 26318 Header: res.Header, 26319 } 26320 } 26321 if err != nil { 26322 return nil, err 26323 } 26324 defer googleapi.CloseBody(res) 26325 if err := googleapi.CheckResponse(res); err != nil { 26326 return nil, err 26327 } 26328 ret := &ShippingsettingsListResponse{ 26329 ServerResponse: googleapi.ServerResponse{ 26330 Header: res.Header, 26331 HTTPStatusCode: res.StatusCode, 26332 }, 26333 } 26334 target := &ret 26335 if err := gensupport.DecodeResponse(target, res); err != nil { 26336 return nil, err 26337 } 26338 return ret, nil 26339 // { 26340 // "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", 26341 // "flatPath": "{merchantId}/shippingsettings", 26342 // "httpMethod": "GET", 26343 // "id": "content.shippingsettings.list", 26344 // "parameterOrder": [ 26345 // "merchantId" 26346 // ], 26347 // "parameters": { 26348 // "maxResults": { 26349 // "description": "The maximum number of shipping settings to return in the response, used for paging.", 26350 // "format": "uint32", 26351 // "location": "query", 26352 // "type": "integer" 26353 // }, 26354 // "merchantId": { 26355 // "description": "The ID of the managing account. This must be a multi-client account.", 26356 // "format": "uint64", 26357 // "location": "path", 26358 // "required": true, 26359 // "type": "string" 26360 // }, 26361 // "pageToken": { 26362 // "description": "The token returned by the previous request.", 26363 // "location": "query", 26364 // "type": "string" 26365 // } 26366 // }, 26367 // "path": "{merchantId}/shippingsettings", 26368 // "response": { 26369 // "$ref": "ShippingsettingsListResponse" 26370 // }, 26371 // "scopes": [ 26372 // "https://www.googleapis.com/auth/content" 26373 // ] 26374 // } 26375 26376} 26377 26378// Pages invokes f for each page of results. 26379// A non-nil error returned from f will halt the iteration. 26380// The provided context supersedes any context provided to the Context method. 26381func (c *ShippingsettingsListCall) Pages(ctx context.Context, f func(*ShippingsettingsListResponse) error) error { 26382 c.ctx_ = ctx 26383 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 26384 for { 26385 x, err := c.Do() 26386 if err != nil { 26387 return err 26388 } 26389 if err := f(x); err != nil { 26390 return err 26391 } 26392 if x.NextPageToken == "" { 26393 return nil 26394 } 26395 c.PageToken(x.NextPageToken) 26396 } 26397} 26398 26399// method id "content.shippingsettings.update": 26400 26401type ShippingsettingsUpdateCall struct { 26402 s *APIService 26403 merchantId uint64 26404 accountId uint64 26405 shippingsettings *ShippingSettings 26406 urlParams_ gensupport.URLParams 26407 ctx_ context.Context 26408 header_ http.Header 26409} 26410 26411// Update: Updates the shipping settings of the account. Any fields that 26412// are not provided are deleted from the resource. 26413// 26414// - accountId: The ID of the account for which to get/update shipping 26415// settings. 26416// - merchantId: The ID of the managing account. If this parameter is 26417// not the same as accountId, then this account must be a multi-client 26418// account and `accountId` must be the ID of a sub-account of this 26419// account. 26420func (r *ShippingsettingsService) Update(merchantId uint64, accountId uint64, shippingsettings *ShippingSettings) *ShippingsettingsUpdateCall { 26421 c := &ShippingsettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26422 c.merchantId = merchantId 26423 c.accountId = accountId 26424 c.shippingsettings = shippingsettings 26425 return c 26426} 26427 26428// DryRun sets the optional parameter "dryRun": Flag to simulate a 26429// request like in a live environment. If set to true, dry-run mode 26430// checks the validity of the request and returns errors (if any). 26431func (c *ShippingsettingsUpdateCall) DryRun(dryRun bool) *ShippingsettingsUpdateCall { 26432 c.urlParams_.Set("dryRun", fmt.Sprint(dryRun)) 26433 return c 26434} 26435 26436// Fields allows partial responses to be retrieved. See 26437// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26438// for more information. 26439func (c *ShippingsettingsUpdateCall) Fields(s ...googleapi.Field) *ShippingsettingsUpdateCall { 26440 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26441 return c 26442} 26443 26444// Context sets the context to be used in this call's Do method. Any 26445// pending HTTP request will be aborted if the provided context is 26446// canceled. 26447func (c *ShippingsettingsUpdateCall) Context(ctx context.Context) *ShippingsettingsUpdateCall { 26448 c.ctx_ = ctx 26449 return c 26450} 26451 26452// Header returns an http.Header that can be modified by the caller to 26453// add HTTP headers to the request. 26454func (c *ShippingsettingsUpdateCall) Header() http.Header { 26455 if c.header_ == nil { 26456 c.header_ = make(http.Header) 26457 } 26458 return c.header_ 26459} 26460 26461func (c *ShippingsettingsUpdateCall) doRequest(alt string) (*http.Response, error) { 26462 reqHeaders := make(http.Header) 26463 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210502") 26464 for k, v := range c.header_ { 26465 reqHeaders[k] = v 26466 } 26467 reqHeaders.Set("User-Agent", c.s.userAgent()) 26468 var body io.Reader = nil 26469 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettings) 26470 if err != nil { 26471 return nil, err 26472 } 26473 reqHeaders.Set("Content-Type", "application/json") 26474 c.urlParams_.Set("alt", alt) 26475 c.urlParams_.Set("prettyPrint", "false") 26476 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}") 26477 urls += "?" + c.urlParams_.Encode() 26478 req, err := http.NewRequest("PUT", urls, body) 26479 if err != nil { 26480 return nil, err 26481 } 26482 req.Header = reqHeaders 26483 googleapi.Expand(req.URL, map[string]string{ 26484 "merchantId": strconv.FormatUint(c.merchantId, 10), 26485 "accountId": strconv.FormatUint(c.accountId, 10), 26486 }) 26487 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26488} 26489 26490// Do executes the "content.shippingsettings.update" call. 26491// Exactly one of *ShippingSettings or error will be non-nil. Any 26492// non-2xx status code is an error. Response headers are in either 26493// *ShippingSettings.ServerResponse.Header or (if a response was 26494// returned at all) in error.(*googleapi.Error).Header. Use 26495// googleapi.IsNotModified to check whether the returned error was 26496// because http.StatusNotModified was returned. 26497func (c *ShippingsettingsUpdateCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) { 26498 gensupport.SetOptions(c.urlParams_, opts...) 26499 res, err := c.doRequest("json") 26500 if res != nil && res.StatusCode == http.StatusNotModified { 26501 if res.Body != nil { 26502 res.Body.Close() 26503 } 26504 return nil, &googleapi.Error{ 26505 Code: res.StatusCode, 26506 Header: res.Header, 26507 } 26508 } 26509 if err != nil { 26510 return nil, err 26511 } 26512 defer googleapi.CloseBody(res) 26513 if err := googleapi.CheckResponse(res); err != nil { 26514 return nil, err 26515 } 26516 ret := &ShippingSettings{ 26517 ServerResponse: googleapi.ServerResponse{ 26518 Header: res.Header, 26519 HTTPStatusCode: res.StatusCode, 26520 }, 26521 } 26522 target := &ret 26523 if err := gensupport.DecodeResponse(target, res); err != nil { 26524 return nil, err 26525 } 26526 return ret, nil 26527 // { 26528 // "description": "Updates the shipping settings of the account. Any fields that are not provided are deleted from the resource.", 26529 // "flatPath": "{merchantId}/shippingsettings/{accountId}", 26530 // "httpMethod": "PUT", 26531 // "id": "content.shippingsettings.update", 26532 // "parameterOrder": [ 26533 // "merchantId", 26534 // "accountId" 26535 // ], 26536 // "parameters": { 26537 // "accountId": { 26538 // "description": "The ID of the account for which to get/update shipping settings.", 26539 // "format": "uint64", 26540 // "location": "path", 26541 // "required": true, 26542 // "type": "string" 26543 // }, 26544 // "dryRun": { 26545 // "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).", 26546 // "location": "query", 26547 // "type": "boolean" 26548 // }, 26549 // "merchantId": { 26550 // "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.", 26551 // "format": "uint64", 26552 // "location": "path", 26553 // "required": true, 26554 // "type": "string" 26555 // } 26556 // }, 26557 // "path": "{merchantId}/shippingsettings/{accountId}", 26558 // "request": { 26559 // "$ref": "ShippingSettings" 26560 // }, 26561 // "response": { 26562 // "$ref": "ShippingSettings" 26563 // }, 26564 // "scopes": [ 26565 // "https://www.googleapis.com/auth/content" 26566 // ] 26567 // } 26568 26569} 26570