1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package content provides access to the Content API for Shopping. 8// 9// For product documentation, see: https://developers.google.com/shopping-content 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/content/v2sandbox" 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/v2sandbox" 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 htransport "google.golang.org/api/transport/http" 56) 57 58// Always reference these packages, just in case the auto-generated code 59// below doesn't. 60var _ = bytes.NewBuffer 61var _ = strconv.Itoa 62var _ = fmt.Sprintf 63var _ = json.NewDecoder 64var _ = io.Copy 65var _ = url.Parse 66var _ = gensupport.MarshalJSON 67var _ = googleapi.Version 68var _ = errors.New 69var _ = strings.Replace 70var _ = context.Canceled 71 72const apiId = "content:v2sandbox" 73const apiName = "content" 74const apiVersion = "v2sandbox" 75const basePath = "https://www.googleapis.com/content/v2sandbox/" 76 77// OAuth2 scopes used by this API. 78const ( 79 // Manage your product listings and accounts for Google Shopping 80 ContentScope = "https://www.googleapis.com/auth/content" 81) 82 83// NewService creates a new APIService. 84func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 85 scopesOption := option.WithScopes( 86 "https://www.googleapis.com/auth/content", 87 ) 88 // NOTE: prepend, so we don't override user-specified scopes. 89 opts = append([]option.ClientOption{scopesOption}, opts...) 90 client, endpoint, err := htransport.NewClient(ctx, opts...) 91 if err != nil { 92 return nil, err 93 } 94 s, err := New(client) 95 if err != nil { 96 return nil, err 97 } 98 if endpoint != "" { 99 s.BasePath = endpoint 100 } 101 return s, nil 102} 103 104// New creates a new APIService. It uses the provided http.Client for requests. 105// 106// Deprecated: please use NewService instead. 107// To provide a custom HTTP client, use option.WithHTTPClient. 108// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 109func New(client *http.Client) (*APIService, error) { 110 if client == nil { 111 return nil, errors.New("client is nil") 112 } 113 s := &APIService{client: client, BasePath: basePath} 114 s.Orderinvoices = NewOrderinvoicesService(s) 115 s.Orderpayments = NewOrderpaymentsService(s) 116 s.Orderreturns = NewOrderreturnsService(s) 117 s.Orders = NewOrdersService(s) 118 return s, nil 119} 120 121type APIService struct { 122 client *http.Client 123 BasePath string // API endpoint base URL 124 UserAgent string // optional additional User-Agent fragment 125 126 Orderinvoices *OrderinvoicesService 127 128 Orderpayments *OrderpaymentsService 129 130 Orderreturns *OrderreturnsService 131 132 Orders *OrdersService 133} 134 135func (s *APIService) userAgent() string { 136 if s.UserAgent == "" { 137 return googleapi.UserAgent 138 } 139 return googleapi.UserAgent + " " + s.UserAgent 140} 141 142func NewOrderinvoicesService(s *APIService) *OrderinvoicesService { 143 rs := &OrderinvoicesService{s: s} 144 return rs 145} 146 147type OrderinvoicesService struct { 148 s *APIService 149} 150 151func NewOrderpaymentsService(s *APIService) *OrderpaymentsService { 152 rs := &OrderpaymentsService{s: s} 153 return rs 154} 155 156type OrderpaymentsService struct { 157 s *APIService 158} 159 160func NewOrderreturnsService(s *APIService) *OrderreturnsService { 161 rs := &OrderreturnsService{s: s} 162 return rs 163} 164 165type OrderreturnsService struct { 166 s *APIService 167} 168 169func NewOrdersService(s *APIService) *OrdersService { 170 rs := &OrdersService{s: s} 171 return rs 172} 173 174type OrdersService struct { 175 s *APIService 176} 177 178type Amount struct { 179 // Pretax: [required] Value before taxes. 180 Pretax *Price `json:"pretax,omitempty"` 181 182 // Tax: [required] Tax value. 183 Tax *Price `json:"tax,omitempty"` 184 185 // ForceSendFields is a list of field names (e.g. "Pretax") to 186 // unconditionally include in API requests. By default, fields with 187 // empty values are omitted from API requests. However, any non-pointer, 188 // non-interface field appearing in ForceSendFields will be sent to the 189 // server regardless of whether the field is empty or not. This may be 190 // used to include empty fields in Patch requests. 191 ForceSendFields []string `json:"-"` 192 193 // NullFields is a list of field names (e.g. "Pretax") to include in API 194 // requests with the JSON null value. By default, fields with empty 195 // values are omitted from API requests. However, any field with an 196 // empty value appearing in NullFields will be sent to the server as 197 // null. It is an error if a field in this list has a non-empty value. 198 // This may be used to include null fields in Patch requests. 199 NullFields []string `json:"-"` 200} 201 202func (s *Amount) MarshalJSON() ([]byte, error) { 203 type NoMethod Amount 204 raw := NoMethod(*s) 205 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 206} 207 208type CustomerReturnReason struct { 209 Description string `json:"description,omitempty"` 210 211 ReasonCode string `json:"reasonCode,omitempty"` 212 213 // ForceSendFields is a list of field names (e.g. "Description") to 214 // unconditionally include in API requests. By default, fields with 215 // empty values are omitted from API requests. However, any non-pointer, 216 // non-interface field appearing in ForceSendFields will be sent to the 217 // server regardless of whether the field is empty or not. This may be 218 // used to include empty fields in Patch requests. 219 ForceSendFields []string `json:"-"` 220 221 // NullFields is a list of field names (e.g. "Description") to include 222 // in API requests with the JSON null value. By default, fields with 223 // empty values are omitted from API requests. However, any field with 224 // an empty value appearing in NullFields will be sent to the server as 225 // null. It is an error if a field in this list has a non-empty value. 226 // This may be used to include null fields in Patch requests. 227 NullFields []string `json:"-"` 228} 229 230func (s *CustomerReturnReason) MarshalJSON() ([]byte, error) { 231 type NoMethod CustomerReturnReason 232 raw := NoMethod(*s) 233 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 234} 235 236// Error: An error returned by the API. 237type Error struct { 238 // Domain: The domain of the error. 239 Domain string `json:"domain,omitempty"` 240 241 // Message: A description of the error. 242 Message string `json:"message,omitempty"` 243 244 // Reason: The error code. 245 Reason string `json:"reason,omitempty"` 246 247 // ForceSendFields is a list of field names (e.g. "Domain") to 248 // unconditionally include in API requests. By default, fields with 249 // empty values are omitted from API requests. However, any non-pointer, 250 // non-interface field appearing in ForceSendFields will be sent to the 251 // server regardless of whether the field is empty or not. This may be 252 // used to include empty fields in Patch requests. 253 ForceSendFields []string `json:"-"` 254 255 // NullFields is a list of field names (e.g. "Domain") to include in API 256 // requests with the JSON null value. By default, fields with empty 257 // values are omitted from API requests. However, any field with an 258 // empty value appearing in NullFields will be sent to the server as 259 // null. It is an error if a field in this list has a non-empty value. 260 // This may be used to include null fields in Patch requests. 261 NullFields []string `json:"-"` 262} 263 264func (s *Error) MarshalJSON() ([]byte, error) { 265 type NoMethod Error 266 raw := NoMethod(*s) 267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 268} 269 270// Errors: A list of errors returned by a failed batch entry. 271type Errors struct { 272 // Code: The HTTP status of the first error in errors. 273 Code int64 `json:"code,omitempty"` 274 275 // Errors: A list of errors. 276 Errors []*Error `json:"errors,omitempty"` 277 278 // Message: The message of the first error in errors. 279 Message string `json:"message,omitempty"` 280 281 // ForceSendFields is a list of field names (e.g. "Code") to 282 // unconditionally include in API requests. By default, fields with 283 // empty values are omitted from API requests. However, any non-pointer, 284 // non-interface field appearing in ForceSendFields will be sent to the 285 // server regardless of whether the field is empty or not. This may be 286 // used to include empty fields in Patch requests. 287 ForceSendFields []string `json:"-"` 288 289 // NullFields is a list of field names (e.g. "Code") to include in API 290 // requests with the JSON null value. By default, fields with empty 291 // values are omitted from API requests. However, any field with an 292 // empty value appearing in NullFields will be sent to the server as 293 // null. It is an error if a field in this list has a non-empty value. 294 // This may be used to include null fields in Patch requests. 295 NullFields []string `json:"-"` 296} 297 298func (s *Errors) MarshalJSON() ([]byte, error) { 299 type NoMethod Errors 300 raw := NoMethod(*s) 301 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 302} 303 304type InvoiceSummary struct { 305 // AdditionalChargeSummaries: Summary of the total amounts of the 306 // additional charges. 307 AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"` 308 309 // CustomerBalance: [required] Customer balance on this invoice. A 310 // negative amount means the customer is paying, a positive one means 311 // the customer is receiving money. Note: the sum of merchant_balance, 312 // customer_balance and google_balance must always be zero. 313 // 314 // Furthermore the absolute value of this amount is expected to be equal 315 // to the sum of product amount and additional charges, minus 316 // promotions. 317 CustomerBalance *Amount `json:"customerBalance,omitempty"` 318 319 // GoogleBalance: [required] Google balance on this invoice. A negative 320 // amount means Google is paying, a positive one means Google is 321 // receiving money. Note: the sum of merchant_balance, customer_balance 322 // and google_balance must always be zero. 323 GoogleBalance *Amount `json:"googleBalance,omitempty"` 324 325 // MerchantBalance: [required] Merchant balance on this invoice. A 326 // negative amount means the merchant is paying, a positive one means 327 // the merchant is receiving money. Note: the sum of merchant_balance, 328 // customer_balance and google_balance must always be zero. 329 MerchantBalance *Amount `json:"merchantBalance,omitempty"` 330 331 // ProductTotal: [required] Total price for the product. 332 ProductTotal *Amount `json:"productTotal,omitempty"` 333 334 // PromotionSummaries: Summary for each promotion. 335 PromotionSummaries []*Promotion `json:"promotionSummaries,omitempty"` 336 337 // ForceSendFields is a list of field names (e.g. 338 // "AdditionalChargeSummaries") to unconditionally include in API 339 // requests. By default, fields with empty values are omitted from API 340 // requests. However, any non-pointer, non-interface field appearing in 341 // ForceSendFields will be sent to the server regardless of whether the 342 // field is empty or not. This may be used to include empty fields in 343 // Patch requests. 344 ForceSendFields []string `json:"-"` 345 346 // NullFields is a list of field names (e.g. 347 // "AdditionalChargeSummaries") to include in API requests with the JSON 348 // null value. By default, fields with empty values are omitted from API 349 // requests. However, any field with an empty value appearing in 350 // NullFields will be sent to the server as null. It is an error if a 351 // field in this list has a non-empty value. This may be used to include 352 // null fields in Patch requests. 353 NullFields []string `json:"-"` 354} 355 356func (s *InvoiceSummary) MarshalJSON() ([]byte, error) { 357 type NoMethod InvoiceSummary 358 raw := NoMethod(*s) 359 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 360} 361 362type InvoiceSummaryAdditionalChargeSummary struct { 363 // TotalAmount: [required] Total additional charge for this type. 364 TotalAmount *Amount `json:"totalAmount,omitempty"` 365 366 // Type: [required] Type of the additional charge. 367 Type string `json:"type,omitempty"` 368 369 // ForceSendFields is a list of field names (e.g. "TotalAmount") to 370 // unconditionally include in API requests. By default, fields with 371 // empty values are omitted from API requests. However, any non-pointer, 372 // non-interface field appearing in ForceSendFields will be sent to the 373 // server regardless of whether the field is empty or not. This may be 374 // used to include empty fields in Patch requests. 375 ForceSendFields []string `json:"-"` 376 377 // NullFields is a list of field names (e.g. "TotalAmount") to include 378 // in API requests with the JSON null value. By default, fields with 379 // empty values are omitted from API requests. However, any field with 380 // an empty value appearing in NullFields will be sent to the server as 381 // null. It is an error if a field in this list has a non-empty value. 382 // This may be used to include null fields in Patch requests. 383 NullFields []string `json:"-"` 384} 385 386func (s *InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) { 387 type NoMethod InvoiceSummaryAdditionalChargeSummary 388 raw := NoMethod(*s) 389 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 390} 391 392type MerchantOrderReturn struct { 393 CreationDate string `json:"creationDate,omitempty"` 394 395 MerchantOrderId string `json:"merchantOrderId,omitempty"` 396 397 OrderId string `json:"orderId,omitempty"` 398 399 OrderReturnId string `json:"orderReturnId,omitempty"` 400 401 ReturnItems []*MerchantOrderReturnItem `json:"returnItems,omitempty"` 402 403 ReturnShipments []*ReturnShipment `json:"returnShipments,omitempty"` 404 405 // ServerResponse contains the HTTP response code and headers from the 406 // server. 407 googleapi.ServerResponse `json:"-"` 408 409 // ForceSendFields is a list of field names (e.g. "CreationDate") to 410 // unconditionally include in API requests. By default, fields with 411 // empty values are omitted from API requests. However, any non-pointer, 412 // non-interface field appearing in ForceSendFields will be sent to the 413 // server regardless of whether the field is empty or not. This may be 414 // used to include empty fields in Patch requests. 415 ForceSendFields []string `json:"-"` 416 417 // NullFields is a list of field names (e.g. "CreationDate") to include 418 // in API requests with the JSON null value. By default, fields with 419 // empty values are omitted from API requests. However, any field with 420 // an empty value appearing in NullFields will be sent to the server as 421 // null. It is an error if a field in this list has a non-empty value. 422 // This may be used to include null fields in Patch requests. 423 NullFields []string `json:"-"` 424} 425 426func (s *MerchantOrderReturn) MarshalJSON() ([]byte, error) { 427 type NoMethod MerchantOrderReturn 428 raw := NoMethod(*s) 429 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 430} 431 432type MerchantOrderReturnItem struct { 433 CustomerReturnReason *CustomerReturnReason `json:"customerReturnReason,omitempty"` 434 435 ItemId string `json:"itemId,omitempty"` 436 437 MerchantReturnReason *RefundReason `json:"merchantReturnReason,omitempty"` 438 439 Product *OrderLineItemProduct `json:"product,omitempty"` 440 441 ReturnShipmentIds []string `json:"returnShipmentIds,omitempty"` 442 443 State string `json:"state,omitempty"` 444 445 // ForceSendFields is a list of field names (e.g. 446 // "CustomerReturnReason") to unconditionally include in API requests. 447 // By default, fields with empty values are omitted from API requests. 448 // However, any non-pointer, non-interface field appearing in 449 // ForceSendFields will be sent to the server regardless of whether the 450 // field is empty or not. This may be used to include empty fields in 451 // Patch requests. 452 ForceSendFields []string `json:"-"` 453 454 // NullFields is a list of field names (e.g. "CustomerReturnReason") to 455 // include in API requests with the JSON null value. By default, fields 456 // with empty values are omitted from API requests. However, any field 457 // with an empty value appearing in NullFields will be sent to the 458 // server as null. It is an error if a field in this list has a 459 // non-empty value. This may be used to include null fields in Patch 460 // requests. 461 NullFields []string `json:"-"` 462} 463 464func (s *MerchantOrderReturnItem) MarshalJSON() ([]byte, error) { 465 type NoMethod MerchantOrderReturnItem 466 raw := NoMethod(*s) 467 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 468} 469 470type Order struct { 471 // Acknowledged: Whether the order was acknowledged. 472 Acknowledged bool `json:"acknowledged,omitempty"` 473 474 // ChannelType: The channel type of the order: "purchaseOnGoogle" or 475 // "googleExpress". 476 ChannelType string `json:"channelType,omitempty"` 477 478 // Customer: The details of the customer who placed the order. 479 Customer *OrderCustomer `json:"customer,omitempty"` 480 481 // DeliveryDetails: The details for the delivery. 482 DeliveryDetails *OrderDeliveryDetails `json:"deliveryDetails,omitempty"` 483 484 // Id: The REST id of the order. Globally unique. 485 Id string `json:"id,omitempty"` 486 487 // Kind: Identifies what kind of resource this is. Value: the fixed 488 // string "content#order". 489 Kind string `json:"kind,omitempty"` 490 491 // LineItems: Line items that are ordered. 492 LineItems []*OrderLineItem `json:"lineItems,omitempty"` 493 494 MerchantId uint64 `json:"merchantId,omitempty,string"` 495 496 // MerchantOrderId: Merchant-provided id of the order. 497 MerchantOrderId string `json:"merchantOrderId,omitempty"` 498 499 // NetAmount: The net amount for the order. For example, if an order was 500 // originally for a grand total of $100 and a refund was issued for $20, 501 // the net amount will be $80. 502 NetAmount *Price `json:"netAmount,omitempty"` 503 504 // PaymentMethod: The details of the payment method. 505 PaymentMethod *OrderPaymentMethod `json:"paymentMethod,omitempty"` 506 507 // PaymentStatus: The status of the payment. 508 PaymentStatus string `json:"paymentStatus,omitempty"` 509 510 // PlacedDate: The date when the order was placed, in ISO 8601 format. 511 PlacedDate string `json:"placedDate,omitempty"` 512 513 // Promotions: Deprecated. The details of the merchant provided 514 // promotions applied to the order. More details about the program are 515 // here. 516 Promotions []*OrderLegacyPromotion `json:"promotions,omitempty"` 517 518 // Refunds: Refunds for the order. 519 Refunds []*OrderRefund `json:"refunds,omitempty"` 520 521 // Shipments: Shipments of the order. 522 Shipments []*OrderShipment `json:"shipments,omitempty"` 523 524 // ShippingCost: The total cost of shipping for all items. 525 ShippingCost *Price `json:"shippingCost,omitempty"` 526 527 // ShippingCostTax: The tax for the total shipping cost. 528 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 529 530 // ShippingOption: The requested shipping option. 531 ShippingOption string `json:"shippingOption,omitempty"` 532 533 // Status: The status of the order. 534 Status string `json:"status,omitempty"` 535 536 // ServerResponse contains the HTTP response code and headers from the 537 // server. 538 googleapi.ServerResponse `json:"-"` 539 540 // ForceSendFields is a list of field names (e.g. "Acknowledged") to 541 // unconditionally include in API requests. By default, fields with 542 // empty values are omitted from API requests. However, any non-pointer, 543 // non-interface field appearing in ForceSendFields will be sent to the 544 // server regardless of whether the field is empty or not. This may be 545 // used to include empty fields in Patch requests. 546 ForceSendFields []string `json:"-"` 547 548 // NullFields is a list of field names (e.g. "Acknowledged") to include 549 // in API requests with the JSON null value. By default, fields with 550 // empty values are omitted from API requests. However, any field with 551 // an empty value appearing in NullFields will be sent to the server as 552 // null. It is an error if a field in this list has a non-empty value. 553 // This may be used to include null fields in Patch requests. 554 NullFields []string `json:"-"` 555} 556 557func (s *Order) MarshalJSON() ([]byte, error) { 558 type NoMethod Order 559 raw := NoMethod(*s) 560 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 561} 562 563type OrderAddress struct { 564 // Country: CLDR country code (e.g. "US"). 565 Country string `json:"country,omitempty"` 566 567 // FullAddress: Strings representing the lines of the printed label for 568 // mailing the order, for example: 569 // John Smith 570 // 1600 Amphitheatre Parkway 571 // Mountain View, CA, 94043 572 // United States 573 FullAddress []string `json:"fullAddress,omitempty"` 574 575 // IsPostOfficeBox: Whether the address is a post office box. 576 IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"` 577 578 // Locality: City, town or commune. May also include dependent 579 // localities or sublocalities (e.g. neighborhoods or suburbs). 580 Locality string `json:"locality,omitempty"` 581 582 // PostalCode: Postal Code or ZIP (e.g. "94043"). 583 PostalCode string `json:"postalCode,omitempty"` 584 585 // RecipientName: Name of the recipient. 586 RecipientName string `json:"recipientName,omitempty"` 587 588 // Region: Top-level administrative subdivision of the country. For 589 // example, a state like California ("CA") or a province like Quebec 590 // ("QC"). 591 Region string `json:"region,omitempty"` 592 593 // StreetAddress: Street-level part of the address. 594 StreetAddress []string `json:"streetAddress,omitempty"` 595 596 // ForceSendFields is a list of field names (e.g. "Country") to 597 // unconditionally include in API requests. By default, fields with 598 // empty values are omitted from API requests. However, any non-pointer, 599 // non-interface field appearing in ForceSendFields will be sent to the 600 // server regardless of whether the field is empty or not. This may be 601 // used to include empty fields in Patch requests. 602 ForceSendFields []string `json:"-"` 603 604 // NullFields is a list of field names (e.g. "Country") to include in 605 // API requests with the JSON null value. By default, fields with empty 606 // values are omitted from API requests. However, any field with an 607 // empty value appearing in NullFields will be sent to the server as 608 // null. It is an error if a field in this list has a non-empty value. 609 // This may be used to include null fields in Patch requests. 610 NullFields []string `json:"-"` 611} 612 613func (s *OrderAddress) MarshalJSON() ([]byte, error) { 614 type NoMethod OrderAddress 615 raw := NoMethod(*s) 616 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 617} 618 619type OrderCancellation struct { 620 // Actor: The actor that created the cancellation. 621 Actor string `json:"actor,omitempty"` 622 623 // CreationDate: Date on which the cancellation has been created, in ISO 624 // 8601 format. 625 CreationDate string `json:"creationDate,omitempty"` 626 627 // Quantity: The quantity that was canceled. 628 Quantity int64 `json:"quantity,omitempty"` 629 630 // Reason: The reason for the cancellation. Orders that are cancelled 631 // with a noInventory reason will lead to the removal of the product 632 // from Shopping Actions until you make an update to that product. This 633 // will not affect your Shopping ads. 634 Reason string `json:"reason,omitempty"` 635 636 // ReasonText: The explanation of the reason. 637 ReasonText string `json:"reasonText,omitempty"` 638 639 // ForceSendFields is a list of field names (e.g. "Actor") to 640 // unconditionally include in API requests. By default, fields with 641 // empty values are omitted from API requests. However, any non-pointer, 642 // non-interface field appearing in ForceSendFields will be sent to the 643 // server regardless of whether the field is empty or not. This may be 644 // used to include empty fields in Patch requests. 645 ForceSendFields []string `json:"-"` 646 647 // NullFields is a list of field names (e.g. "Actor") to include in API 648 // requests with the JSON null value. By default, fields with empty 649 // values are omitted from API requests. However, any field with an 650 // empty value appearing in NullFields will be sent to the server as 651 // null. It is an error if a field in this list has a non-empty value. 652 // This may be used to include null fields in Patch requests. 653 NullFields []string `json:"-"` 654} 655 656func (s *OrderCancellation) MarshalJSON() ([]byte, error) { 657 type NoMethod OrderCancellation 658 raw := NoMethod(*s) 659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 660} 661 662type OrderCustomer struct { 663 // Email: Deprecated. 664 Email string `json:"email,omitempty"` 665 666 // ExplicitMarketingPreference: Deprecated. Please use 667 // marketingRightsInfo instead. 668 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 669 670 // FullName: Full name of the customer. 671 FullName string `json:"fullName,omitempty"` 672 673 // MarketingRightsInfo: Customer's marketing preferences. 674 MarketingRightsInfo *OrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 675 676 // ForceSendFields is a list of field names (e.g. "Email") to 677 // unconditionally include in API requests. By default, fields with 678 // empty values are omitted from API requests. However, any non-pointer, 679 // non-interface field appearing in ForceSendFields will be sent to the 680 // server regardless of whether the field is empty or not. This may be 681 // used to include empty fields in Patch requests. 682 ForceSendFields []string `json:"-"` 683 684 // NullFields is a list of field names (e.g. "Email") to include in API 685 // requests with the JSON null value. By default, fields with empty 686 // values are omitted from API requests. However, any field with an 687 // empty value appearing in NullFields will be sent to the server as 688 // null. It is an error if a field in this list has a non-empty value. 689 // This may be used to include null fields in Patch requests. 690 NullFields []string `json:"-"` 691} 692 693func (s *OrderCustomer) MarshalJSON() ([]byte, error) { 694 type NoMethod OrderCustomer 695 raw := NoMethod(*s) 696 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 697} 698 699type OrderCustomerMarketingRightsInfo struct { 700 // ExplicitMarketingPreference: Last known user selection regarding 701 // marketing preferences. In certain cases this selection might not be 702 // known, so this field would be empty. 703 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 704 705 // LastUpdatedTimestamp: Timestamp when last time marketing preference 706 // was updated. Could be empty, if user wasn't offered a selection yet. 707 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 708 709 // MarketingEmailAddress: Email address that can be used for marketing 710 // purposes. This field is only filled when explicitMarketingPreference 711 // is equal to 'granted'. 712 MarketingEmailAddress string `json:"marketingEmailAddress,omitempty"` 713 714 // ForceSendFields is a list of field names (e.g. 715 // "ExplicitMarketingPreference") to unconditionally include in API 716 // requests. By default, fields with empty values are omitted from API 717 // requests. However, any non-pointer, non-interface field appearing in 718 // ForceSendFields will be sent to the server regardless of whether the 719 // field is empty or not. This may be used to include empty fields in 720 // Patch requests. 721 ForceSendFields []string `json:"-"` 722 723 // NullFields is a list of field names (e.g. 724 // "ExplicitMarketingPreference") to include in API requests with the 725 // JSON null value. By default, fields with empty values are omitted 726 // from API requests. However, any field with an empty value appearing 727 // in NullFields will be sent to the server as null. It is an error if a 728 // field in this list has a non-empty value. This may be used to include 729 // null fields in Patch requests. 730 NullFields []string `json:"-"` 731} 732 733func (s *OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 734 type NoMethod OrderCustomerMarketingRightsInfo 735 raw := NoMethod(*s) 736 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 737} 738 739type OrderDeliveryDetails struct { 740 // Address: The delivery address 741 Address *OrderAddress `json:"address,omitempty"` 742 743 // PhoneNumber: The phone number of the person receiving the delivery. 744 PhoneNumber string `json:"phoneNumber,omitempty"` 745 746 // ForceSendFields is a list of field names (e.g. "Address") to 747 // unconditionally include in API requests. By default, fields with 748 // empty values are omitted from API requests. However, any non-pointer, 749 // non-interface field appearing in ForceSendFields will be sent to the 750 // server regardless of whether the field is empty or not. This may be 751 // used to include empty fields in Patch requests. 752 ForceSendFields []string `json:"-"` 753 754 // NullFields is a list of field names (e.g. "Address") to include in 755 // API requests with the JSON null value. By default, fields with empty 756 // values are omitted from API requests. However, any field with an 757 // empty value appearing in NullFields will be sent to the server as 758 // null. It is an error if a field in this list has a non-empty value. 759 // This may be used to include null fields in Patch requests. 760 NullFields []string `json:"-"` 761} 762 763func (s *OrderDeliveryDetails) MarshalJSON() ([]byte, error) { 764 type NoMethod OrderDeliveryDetails 765 raw := NoMethod(*s) 766 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 767} 768 769type OrderLegacyPromotion struct { 770 Benefits []*OrderLegacyPromotionBenefit `json:"benefits,omitempty"` 771 772 // EffectiveDates: The date and time frame when the promotion is active 773 // and ready for validation review. Note that the promotion live time 774 // may be delayed for a few hours due to the validation review. 775 // Start date and end date are separated by a forward slash (/). The 776 // start date is specified by the format (YYYY-MM-DD), followed by the 777 // letter ?T?, the time of the day when the sale starts (in Greenwich 778 // Mean Time, GMT), followed by an expression of the time zone for the 779 // sale. The end date is in the same format. 780 EffectiveDates string `json:"effectiveDates,omitempty"` 781 782 // GenericRedemptionCode: Optional. The text code that corresponds to 783 // the promotion when applied on the retailer?s website. 784 GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"` 785 786 // Id: The unique ID of the promotion. 787 Id string `json:"id,omitempty"` 788 789 // LongTitle: The full title of the promotion. 790 LongTitle string `json:"longTitle,omitempty"` 791 792 // ProductApplicability: Whether the promotion is applicable to all 793 // products or only specific products. 794 ProductApplicability string `json:"productApplicability,omitempty"` 795 796 // RedemptionChannel: Indicates that the promotion is valid online. 797 RedemptionChannel string `json:"redemptionChannel,omitempty"` 798 799 // ForceSendFields is a list of field names (e.g. "Benefits") to 800 // unconditionally include in API requests. By default, fields with 801 // empty values are omitted from API requests. However, any non-pointer, 802 // non-interface field appearing in ForceSendFields will be sent to the 803 // server regardless of whether the field is empty or not. This may be 804 // used to include empty fields in Patch requests. 805 ForceSendFields []string `json:"-"` 806 807 // NullFields is a list of field names (e.g. "Benefits") to include in 808 // API requests with the JSON null value. By default, fields with empty 809 // values are omitted from API requests. However, any field with an 810 // empty value appearing in NullFields will be sent to the server as 811 // null. It is an error if a field in this list has a non-empty value. 812 // This may be used to include null fields in Patch requests. 813 NullFields []string `json:"-"` 814} 815 816func (s *OrderLegacyPromotion) MarshalJSON() ([]byte, error) { 817 type NoMethod OrderLegacyPromotion 818 raw := NoMethod(*s) 819 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 820} 821 822type OrderLegacyPromotionBenefit struct { 823 // Discount: The discount in the order price when the promotion is 824 // applied. 825 Discount *Price `json:"discount,omitempty"` 826 827 // OfferIds: The OfferId(s) that were purchased in this order and map to 828 // this specific benefit of the promotion. 829 OfferIds []string `json:"offerIds,omitempty"` 830 831 // SubType: Further describes the benefit of the promotion. Note that we 832 // will expand on this enumeration as we support new promotion 833 // sub-types. 834 SubType string `json:"subType,omitempty"` 835 836 // TaxImpact: The impact on tax when the promotion is applied. 837 TaxImpact *Price `json:"taxImpact,omitempty"` 838 839 // Type: Describes whether the promotion applies to products (e.g. 20% 840 // off) or to shipping (e.g. Free Shipping). 841 Type string `json:"type,omitempty"` 842 843 // ForceSendFields is a list of field names (e.g. "Discount") to 844 // unconditionally include in API requests. By default, fields with 845 // empty values are omitted from API requests. However, any non-pointer, 846 // non-interface field appearing in ForceSendFields will be sent to the 847 // server regardless of whether the field is empty or not. This may be 848 // used to include empty fields in Patch requests. 849 ForceSendFields []string `json:"-"` 850 851 // NullFields is a list of field names (e.g. "Discount") to include in 852 // API requests with the JSON null value. By default, fields with empty 853 // values are omitted from API requests. However, any field with an 854 // empty value appearing in NullFields will be sent to the server as 855 // null. It is an error if a field in this list has a non-empty value. 856 // This may be used to include null fields in Patch requests. 857 NullFields []string `json:"-"` 858} 859 860func (s *OrderLegacyPromotionBenefit) MarshalJSON() ([]byte, error) { 861 type NoMethod OrderLegacyPromotionBenefit 862 raw := NoMethod(*s) 863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 864} 865 866type OrderLineItem struct { 867 // Annotations: Annotations that are attached to the line item. 868 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 869 870 // Cancellations: Cancellations of the line item. 871 Cancellations []*OrderCancellation `json:"cancellations,omitempty"` 872 873 // Id: The id of the line item. 874 Id string `json:"id,omitempty"` 875 876 // Price: Total price for the line item. For example, if two items for 877 // $10 are purchased, the total price will be $20. 878 Price *Price `json:"price,omitempty"` 879 880 // Product: Product data from the time of the order placement. 881 Product *OrderLineItemProduct `json:"product,omitempty"` 882 883 // QuantityCanceled: Number of items canceled. 884 QuantityCanceled int64 `json:"quantityCanceled,omitempty"` 885 886 // QuantityDelivered: Number of items delivered. 887 QuantityDelivered int64 `json:"quantityDelivered,omitempty"` 888 889 // QuantityOrdered: Number of items ordered. 890 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 891 892 // QuantityPending: Number of items pending. 893 QuantityPending int64 `json:"quantityPending,omitempty"` 894 895 // QuantityReturned: Number of items returned. 896 QuantityReturned int64 `json:"quantityReturned,omitempty"` 897 898 // QuantityShipped: Number of items shipped. 899 QuantityShipped int64 `json:"quantityShipped,omitempty"` 900 901 // ReturnInfo: Details of the return policy for the line item. 902 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 903 904 // Returns: Returns of the line item. 905 Returns []*OrderReturn `json:"returns,omitempty"` 906 907 // ShippingDetails: Details of the requested shipping for the line item. 908 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 909 910 // Tax: Total tax amount for the line item. For example, if two items 911 // are purchased, and each have a cost tax of $2, the total tax amount 912 // will be $4. 913 Tax *Price `json:"tax,omitempty"` 914 915 // ForceSendFields is a list of field names (e.g. "Annotations") to 916 // unconditionally include in API requests. By default, fields with 917 // empty values are omitted from API requests. However, any non-pointer, 918 // non-interface field appearing in ForceSendFields will be sent to the 919 // server regardless of whether the field is empty or not. This may be 920 // used to include empty fields in Patch requests. 921 ForceSendFields []string `json:"-"` 922 923 // NullFields is a list of field names (e.g. "Annotations") to include 924 // in API requests with the JSON null value. By default, fields with 925 // empty values are omitted from API requests. However, any field with 926 // an empty value appearing in NullFields will be sent to the server as 927 // null. It is an error if a field in this list has a non-empty value. 928 // This may be used to include null fields in Patch requests. 929 NullFields []string `json:"-"` 930} 931 932func (s *OrderLineItem) MarshalJSON() ([]byte, error) { 933 type NoMethod OrderLineItem 934 raw := NoMethod(*s) 935 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 936} 937 938type OrderLineItemProduct struct { 939 // Brand: Brand of the item. 940 Brand string `json:"brand,omitempty"` 941 942 // Channel: The item's channel (online or local). 943 Channel string `json:"channel,omitempty"` 944 945 // Condition: Condition or state of the item. 946 Condition string `json:"condition,omitempty"` 947 948 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 949 ContentLanguage string `json:"contentLanguage,omitempty"` 950 951 // Gtin: Global Trade Item Number (GTIN) of the item. 952 Gtin string `json:"gtin,omitempty"` 953 954 // Id: The REST id of the product. 955 Id string `json:"id,omitempty"` 956 957 // ImageLink: URL of an image of the item. 958 ImageLink string `json:"imageLink,omitempty"` 959 960 // ItemGroupId: Shared identifier for all variants of the same product. 961 ItemGroupId string `json:"itemGroupId,omitempty"` 962 963 // Mpn: Manufacturer Part Number (MPN) of the item. 964 Mpn string `json:"mpn,omitempty"` 965 966 // OfferId: An identifier of the item. 967 OfferId string `json:"offerId,omitempty"` 968 969 // Price: Price of the item. 970 Price *Price `json:"price,omitempty"` 971 972 // ShownImage: URL to the cached image shown to the user when order was 973 // placed. 974 ShownImage string `json:"shownImage,omitempty"` 975 976 // TargetCountry: The CLDR territory code of the target country of the 977 // product. 978 TargetCountry string `json:"targetCountry,omitempty"` 979 980 // Title: The title of the product. 981 Title string `json:"title,omitempty"` 982 983 // VariantAttributes: Variant attributes for the item. These are 984 // dimensions of the product, such as color, gender, material, pattern, 985 // and size. You can find a comprehensive list of variant attributes 986 // here. 987 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 988 989 // ForceSendFields is a list of field names (e.g. "Brand") to 990 // unconditionally include in API requests. By default, fields with 991 // empty values are omitted from API requests. However, any non-pointer, 992 // non-interface field appearing in ForceSendFields will be sent to the 993 // server regardless of whether the field is empty or not. This may be 994 // used to include empty fields in Patch requests. 995 ForceSendFields []string `json:"-"` 996 997 // NullFields is a list of field names (e.g. "Brand") to include in API 998 // requests with the JSON null value. By default, fields with empty 999 // values are omitted from API requests. However, any field with an 1000 // empty value appearing in NullFields will be sent to the server as 1001 // null. It is an error if a field in this list has a non-empty value. 1002 // This may be used to include null fields in Patch requests. 1003 NullFields []string `json:"-"` 1004} 1005 1006func (s *OrderLineItemProduct) MarshalJSON() ([]byte, error) { 1007 type NoMethod OrderLineItemProduct 1008 raw := NoMethod(*s) 1009 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1010} 1011 1012type OrderLineItemProductVariantAttribute struct { 1013 // Dimension: The dimension of the variant. 1014 Dimension string `json:"dimension,omitempty"` 1015 1016 // Value: The value for the dimension. 1017 Value string `json:"value,omitempty"` 1018 1019 // ForceSendFields is a list of field names (e.g. "Dimension") to 1020 // unconditionally include in API requests. By default, fields with 1021 // empty values are omitted from API requests. However, any non-pointer, 1022 // non-interface field appearing in ForceSendFields will be sent to the 1023 // server regardless of whether the field is empty or not. This may be 1024 // used to include empty fields in Patch requests. 1025 ForceSendFields []string `json:"-"` 1026 1027 // NullFields is a list of field names (e.g. "Dimension") to include in 1028 // API requests with the JSON null value. By default, fields with empty 1029 // values are omitted from API requests. However, any field with an 1030 // empty value appearing in NullFields will be sent to the server as 1031 // null. It is an error if a field in this list has a non-empty value. 1032 // This may be used to include null fields in Patch requests. 1033 NullFields []string `json:"-"` 1034} 1035 1036func (s *OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) { 1037 type NoMethod OrderLineItemProductVariantAttribute 1038 raw := NoMethod(*s) 1039 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1040} 1041 1042type OrderLineItemReturnInfo struct { 1043 // DaysToReturn: How many days later the item can be returned. 1044 DaysToReturn int64 `json:"daysToReturn,omitempty"` 1045 1046 // IsReturnable: Whether the item is returnable. 1047 IsReturnable bool `json:"isReturnable,omitempty"` 1048 1049 // PolicyUrl: URL of the item return policy. 1050 PolicyUrl string `json:"policyUrl,omitempty"` 1051 1052 // ForceSendFields is a list of field names (e.g. "DaysToReturn") to 1053 // unconditionally include in API requests. By default, fields with 1054 // empty values are omitted from API requests. However, any non-pointer, 1055 // non-interface field appearing in ForceSendFields will be sent to the 1056 // server regardless of whether the field is empty or not. This may be 1057 // used to include empty fields in Patch requests. 1058 ForceSendFields []string `json:"-"` 1059 1060 // NullFields is a list of field names (e.g. "DaysToReturn") to include 1061 // in API requests with the JSON null value. By default, fields with 1062 // empty values are omitted from API requests. However, any field with 1063 // an empty value appearing in NullFields will be sent to the server as 1064 // null. It is an error if a field in this list has a non-empty value. 1065 // This may be used to include null fields in Patch requests. 1066 NullFields []string `json:"-"` 1067} 1068 1069func (s *OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) { 1070 type NoMethod OrderLineItemReturnInfo 1071 raw := NoMethod(*s) 1072 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1073} 1074 1075type OrderLineItemShippingDetails struct { 1076 // DeliverByDate: The delivery by date, in ISO 8601 format. 1077 DeliverByDate string `json:"deliverByDate,omitempty"` 1078 1079 // Method: Details of the shipping method. 1080 Method *OrderLineItemShippingDetailsMethod `json:"method,omitempty"` 1081 1082 // ShipByDate: The ship by date, in ISO 8601 format. 1083 ShipByDate string `json:"shipByDate,omitempty"` 1084 1085 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 1086 // unconditionally include in API requests. By default, fields with 1087 // empty values are omitted from API requests. However, any non-pointer, 1088 // non-interface field appearing in ForceSendFields will be sent to the 1089 // server regardless of whether the field is empty or not. This may be 1090 // used to include empty fields in Patch requests. 1091 ForceSendFields []string `json:"-"` 1092 1093 // NullFields is a list of field names (e.g. "DeliverByDate") to include 1094 // in API requests with the JSON null value. By default, fields with 1095 // empty values are omitted from API requests. However, any field with 1096 // an empty value appearing in NullFields will be sent to the server as 1097 // null. It is an error if a field in this list has a non-empty value. 1098 // This may be used to include null fields in Patch requests. 1099 NullFields []string `json:"-"` 1100} 1101 1102func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) { 1103 type NoMethod OrderLineItemShippingDetails 1104 raw := NoMethod(*s) 1105 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1106} 1107 1108type OrderLineItemShippingDetailsMethod struct { 1109 // Carrier: The carrier for the shipping. Optional. See 1110 // shipments[].carrier for a list of acceptable values. 1111 Carrier string `json:"carrier,omitempty"` 1112 1113 // MaxDaysInTransit: Maximum transit time. 1114 MaxDaysInTransit int64 `json:"maxDaysInTransit,omitempty"` 1115 1116 // MethodName: The name of the shipping method. 1117 MethodName string `json:"methodName,omitempty"` 1118 1119 // MinDaysInTransit: Minimum transit time. 1120 MinDaysInTransit int64 `json:"minDaysInTransit,omitempty"` 1121 1122 // ForceSendFields is a list of field names (e.g. "Carrier") to 1123 // unconditionally include in API requests. By default, fields with 1124 // empty values are omitted from API requests. However, any non-pointer, 1125 // non-interface field appearing in ForceSendFields will be sent to the 1126 // server regardless of whether the field is empty or not. This may be 1127 // used to include empty fields in Patch requests. 1128 ForceSendFields []string `json:"-"` 1129 1130 // NullFields is a list of field names (e.g. "Carrier") to include in 1131 // API requests with the JSON null value. By default, fields with empty 1132 // values are omitted from API requests. However, any field with an 1133 // empty value appearing in NullFields will be sent to the server as 1134 // null. It is an error if a field in this list has a non-empty value. 1135 // This may be used to include null fields in Patch requests. 1136 NullFields []string `json:"-"` 1137} 1138 1139func (s *OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) { 1140 type NoMethod OrderLineItemShippingDetailsMethod 1141 raw := NoMethod(*s) 1142 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1143} 1144 1145type OrderMerchantProvidedAnnotation struct { 1146 // Key: Key for additional merchant provided (as key-value pairs) 1147 // annotation about the line item. 1148 Key string `json:"key,omitempty"` 1149 1150 // Value: Value for additional merchant provided (as key-value pairs) 1151 // annotation about the line item. 1152 Value string `json:"value,omitempty"` 1153 1154 // ForceSendFields is a list of field names (e.g. "Key") to 1155 // unconditionally include in API requests. By default, fields with 1156 // empty values are omitted from API requests. However, any non-pointer, 1157 // non-interface field appearing in ForceSendFields will be sent to the 1158 // server regardless of whether the field is empty or not. This may be 1159 // used to include empty fields in Patch requests. 1160 ForceSendFields []string `json:"-"` 1161 1162 // NullFields is a list of field names (e.g. "Key") to include in API 1163 // requests with the JSON null value. By default, fields with empty 1164 // values are omitted from API requests. However, any field with an 1165 // empty value appearing in NullFields will be sent to the server as 1166 // null. It is an error if a field in this list has a non-empty value. 1167 // This may be used to include null fields in Patch requests. 1168 NullFields []string `json:"-"` 1169} 1170 1171func (s *OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) { 1172 type NoMethod OrderMerchantProvidedAnnotation 1173 raw := NoMethod(*s) 1174 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1175} 1176 1177type OrderPaymentMethod struct { 1178 // BillingAddress: The billing address. 1179 BillingAddress *OrderAddress `json:"billingAddress,omitempty"` 1180 1181 // ExpirationMonth: The card expiration month (January = 1, February = 2 1182 // etc.). 1183 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 1184 1185 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 1186 ExpirationYear int64 `json:"expirationYear,omitempty"` 1187 1188 // LastFourDigits: The last four digits of the card number. 1189 LastFourDigits string `json:"lastFourDigits,omitempty"` 1190 1191 // PhoneNumber: The billing phone number. 1192 PhoneNumber string `json:"phoneNumber,omitempty"` 1193 1194 // Type: The type of instrument. 1195 // 1196 // Acceptable values are: 1197 // - "AMEX" 1198 // - "DISCOVER" 1199 // - "JCB" 1200 // - "MASTERCARD" 1201 // - "UNIONPAY" 1202 // - "VISA" 1203 // - "" 1204 Type string `json:"type,omitempty"` 1205 1206 // ForceSendFields is a list of field names (e.g. "BillingAddress") to 1207 // unconditionally include in API requests. By default, fields with 1208 // empty values are omitted from API requests. However, any non-pointer, 1209 // non-interface field appearing in ForceSendFields will be sent to the 1210 // server regardless of whether the field is empty or not. This may be 1211 // used to include empty fields in Patch requests. 1212 ForceSendFields []string `json:"-"` 1213 1214 // NullFields is a list of field names (e.g. "BillingAddress") to 1215 // include in API requests with the JSON null value. By default, fields 1216 // with empty values are omitted from API requests. However, any field 1217 // with an empty value appearing in NullFields will be sent to the 1218 // server as null. It is an error if a field in this list has a 1219 // non-empty value. This may be used to include null fields in Patch 1220 // requests. 1221 NullFields []string `json:"-"` 1222} 1223 1224func (s *OrderPaymentMethod) MarshalJSON() ([]byte, error) { 1225 type NoMethod OrderPaymentMethod 1226 raw := NoMethod(*s) 1227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1228} 1229 1230type OrderRefund struct { 1231 // Actor: The actor that created the refund. 1232 Actor string `json:"actor,omitempty"` 1233 1234 // Amount: The amount that is refunded. 1235 Amount *Price `json:"amount,omitempty"` 1236 1237 // CreationDate: Date on which the item has been created, in ISO 8601 1238 // format. 1239 CreationDate string `json:"creationDate,omitempty"` 1240 1241 // Reason: The reason for the refund. 1242 Reason string `json:"reason,omitempty"` 1243 1244 // ReasonText: The explanation of the reason. 1245 ReasonText string `json:"reasonText,omitempty"` 1246 1247 // ForceSendFields is a list of field names (e.g. "Actor") to 1248 // unconditionally include in API requests. By default, fields with 1249 // empty values are omitted from API requests. However, any non-pointer, 1250 // non-interface field appearing in ForceSendFields will be sent to the 1251 // server regardless of whether the field is empty or not. This may be 1252 // used to include empty fields in Patch requests. 1253 ForceSendFields []string `json:"-"` 1254 1255 // NullFields is a list of field names (e.g. "Actor") to include in API 1256 // requests with the JSON null value. By default, fields with empty 1257 // values are omitted from API requests. However, any field with an 1258 // empty value appearing in NullFields will be sent to the server as 1259 // null. It is an error if a field in this list has a non-empty value. 1260 // This may be used to include null fields in Patch requests. 1261 NullFields []string `json:"-"` 1262} 1263 1264func (s *OrderRefund) MarshalJSON() ([]byte, error) { 1265 type NoMethod OrderRefund 1266 raw := NoMethod(*s) 1267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1268} 1269 1270type OrderReturn struct { 1271 // Actor: The actor that created the refund. 1272 Actor string `json:"actor,omitempty"` 1273 1274 // CreationDate: Date on which the item has been created, in ISO 8601 1275 // format. 1276 CreationDate string `json:"creationDate,omitempty"` 1277 1278 // Quantity: Quantity that is returned. 1279 Quantity int64 `json:"quantity,omitempty"` 1280 1281 // Reason: The reason for the return. 1282 Reason string `json:"reason,omitempty"` 1283 1284 // ReasonText: The explanation of the reason. 1285 ReasonText string `json:"reasonText,omitempty"` 1286 1287 // ForceSendFields is a list of field names (e.g. "Actor") to 1288 // unconditionally include in API requests. By default, fields with 1289 // empty values are omitted from API requests. However, any non-pointer, 1290 // non-interface field appearing in ForceSendFields will be sent to the 1291 // server regardless of whether the field is empty or not. This may be 1292 // used to include empty fields in Patch requests. 1293 ForceSendFields []string `json:"-"` 1294 1295 // NullFields is a list of field names (e.g. "Actor") to include in API 1296 // requests with the JSON null value. By default, fields with empty 1297 // values are omitted from API requests. However, any field with an 1298 // empty value appearing in NullFields will be sent to the server as 1299 // null. It is an error if a field in this list has a non-empty value. 1300 // This may be used to include null fields in Patch requests. 1301 NullFields []string `json:"-"` 1302} 1303 1304func (s *OrderReturn) MarshalJSON() ([]byte, error) { 1305 type NoMethod OrderReturn 1306 raw := NoMethod(*s) 1307 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1308} 1309 1310type OrderShipment struct { 1311 // Carrier: The carrier handling the shipment. 1312 // 1313 // Acceptable values are: 1314 // - "gsx" 1315 // - "ups" 1316 // - "usps" 1317 // - "fedex" 1318 // - "dhl" 1319 // - "ecourier" 1320 // - "cxt" 1321 // - "google" 1322 // - "ontrac" 1323 // - "emsy" 1324 // - "ont" 1325 // - "deliv" 1326 // - "dynamex" 1327 // - "lasership" 1328 // - "mpx" 1329 // - "uds" 1330 Carrier string `json:"carrier,omitempty"` 1331 1332 // CreationDate: Date on which the shipment has been created, in ISO 1333 // 8601 format. 1334 CreationDate string `json:"creationDate,omitempty"` 1335 1336 // DeliveryDate: Date on which the shipment has been delivered, in ISO 1337 // 8601 format. Present only if status is delivered 1338 DeliveryDate string `json:"deliveryDate,omitempty"` 1339 1340 // Id: The id of the shipment. 1341 Id string `json:"id,omitempty"` 1342 1343 // LineItems: The line items that are shipped. 1344 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 1345 1346 // Status: The status of the shipment. 1347 Status string `json:"status,omitempty"` 1348 1349 // TrackingId: The tracking id for the shipment. 1350 TrackingId string `json:"trackingId,omitempty"` 1351 1352 // ForceSendFields is a list of field names (e.g. "Carrier") to 1353 // unconditionally include in API requests. By default, fields with 1354 // empty values are omitted from API requests. However, any non-pointer, 1355 // non-interface field appearing in ForceSendFields will be sent to the 1356 // server regardless of whether the field is empty or not. This may be 1357 // used to include empty fields in Patch requests. 1358 ForceSendFields []string `json:"-"` 1359 1360 // NullFields is a list of field names (e.g. "Carrier") to include in 1361 // API requests with the JSON null value. By default, fields with empty 1362 // values are omitted from API requests. However, any field with an 1363 // empty value appearing in NullFields will be sent to the server as 1364 // null. It is an error if a field in this list has a non-empty value. 1365 // This may be used to include null fields in Patch requests. 1366 NullFields []string `json:"-"` 1367} 1368 1369func (s *OrderShipment) MarshalJSON() ([]byte, error) { 1370 type NoMethod OrderShipment 1371 raw := NoMethod(*s) 1372 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1373} 1374 1375type OrderShipmentLineItemShipment struct { 1376 // LineItemId: The id of the line item that is shipped. Either 1377 // lineItemId or productId is required. 1378 LineItemId string `json:"lineItemId,omitempty"` 1379 1380 // ProductId: The ID of the product to ship. This is the REST ID used in 1381 // the products service. Either lineItemId or productId is required. 1382 ProductId string `json:"productId,omitempty"` 1383 1384 // Quantity: The quantity that is shipped. 1385 Quantity int64 `json:"quantity,omitempty"` 1386 1387 // ForceSendFields is a list of field names (e.g. "LineItemId") to 1388 // unconditionally include in API requests. By default, fields with 1389 // empty values are omitted from API requests. However, any non-pointer, 1390 // non-interface field appearing in ForceSendFields will be sent to the 1391 // server regardless of whether the field is empty or not. This may be 1392 // used to include empty fields in Patch requests. 1393 ForceSendFields []string `json:"-"` 1394 1395 // NullFields is a list of field names (e.g. "LineItemId") to include in 1396 // API requests with the JSON null value. By default, fields with empty 1397 // values are omitted from API requests. However, any field with an 1398 // empty value appearing in NullFields will be sent to the server as 1399 // null. It is an error if a field in this list has a non-empty value. 1400 // This may be used to include null fields in Patch requests. 1401 NullFields []string `json:"-"` 1402} 1403 1404func (s *OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) { 1405 type NoMethod OrderShipmentLineItemShipment 1406 raw := NoMethod(*s) 1407 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1408} 1409 1410type OrderinvoicesCreateChargeInvoiceRequest struct { 1411 // InvoiceId: [required] The ID of the invoice. 1412 InvoiceId string `json:"invoiceId,omitempty"` 1413 1414 // InvoiceSummary: [required] Invoice summary. 1415 InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` 1416 1417 // LineItemInvoices: [required] Invoice details per line item. 1418 LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` 1419 1420 // OperationId: [required] The ID of the operation, unique across all 1421 // operations for a given order. 1422 OperationId string `json:"operationId,omitempty"` 1423 1424 // ShipmentGroupId: [required] ID of the shipment group. 1425 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 1426 1427 // ForceSendFields is a list of field names (e.g. "InvoiceId") to 1428 // unconditionally include in API requests. By default, fields with 1429 // empty values are omitted from API requests. However, any non-pointer, 1430 // non-interface field appearing in ForceSendFields will be sent to the 1431 // server regardless of whether the field is empty or not. This may be 1432 // used to include empty fields in Patch requests. 1433 ForceSendFields []string `json:"-"` 1434 1435 // NullFields is a list of field names (e.g. "InvoiceId") to include in 1436 // API requests with the JSON null value. By default, fields with empty 1437 // values are omitted from API requests. However, any field with an 1438 // empty value appearing in NullFields will be sent to the server as 1439 // null. It is an error if a field in this list has a non-empty value. 1440 // This may be used to include null fields in Patch requests. 1441 NullFields []string `json:"-"` 1442} 1443 1444func (s *OrderinvoicesCreateChargeInvoiceRequest) MarshalJSON() ([]byte, error) { 1445 type NoMethod OrderinvoicesCreateChargeInvoiceRequest 1446 raw := NoMethod(*s) 1447 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1448} 1449 1450type OrderinvoicesCreateChargeInvoiceResponse struct { 1451 // ExecutionStatus: The status of the execution. 1452 ExecutionStatus string `json:"executionStatus,omitempty"` 1453 1454 // Kind: Identifies what kind of resource this is. Value: the fixed 1455 // string "content#orderinvoicesCreateChargeInvoiceResponse". 1456 Kind string `json:"kind,omitempty"` 1457 1458 // ServerResponse contains the HTTP response code and headers from the 1459 // server. 1460 googleapi.ServerResponse `json:"-"` 1461 1462 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 1463 // unconditionally include in API requests. By default, fields with 1464 // empty values are omitted from API requests. However, any non-pointer, 1465 // non-interface field appearing in ForceSendFields will be sent to the 1466 // server regardless of whether the field is empty or not. This may be 1467 // used to include empty fields in Patch requests. 1468 ForceSendFields []string `json:"-"` 1469 1470 // NullFields is a list of field names (e.g. "ExecutionStatus") to 1471 // include in API requests with the JSON null value. By default, fields 1472 // with empty values are omitted from API requests. However, any field 1473 // with an empty value appearing in NullFields will be sent to the 1474 // server as null. It is an error if a field in this list has a 1475 // non-empty value. This may be used to include null fields in Patch 1476 // requests. 1477 NullFields []string `json:"-"` 1478} 1479 1480func (s *OrderinvoicesCreateChargeInvoiceResponse) MarshalJSON() ([]byte, error) { 1481 type NoMethod OrderinvoicesCreateChargeInvoiceResponse 1482 raw := NoMethod(*s) 1483 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1484} 1485 1486type OrderinvoicesCreateRefundInvoiceRequest struct { 1487 // InvoiceId: [required] The ID of the invoice. 1488 InvoiceId string `json:"invoiceId,omitempty"` 1489 1490 // OperationId: [required] The ID of the operation, unique across all 1491 // operations for a given order. 1492 OperationId string `json:"operationId,omitempty"` 1493 1494 // RefundOnlyOption: Option to create a refund-only invoice. Exactly one 1495 // of refundOnlyOption or returnOption must be provided. 1496 RefundOnlyOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption `json:"refundOnlyOption,omitempty"` 1497 1498 // ReturnOption: Option to create an invoice for a refund and mark all 1499 // items within the invoice as returned. Exactly one of refundOnlyOption 1500 // or returnOption must be provided. 1501 ReturnOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption `json:"returnOption,omitempty"` 1502 1503 // ShipmentInvoices: Invoice details for different shipment groups. 1504 ShipmentInvoices []*ShipmentInvoice `json:"shipmentInvoices,omitempty"` 1505 1506 // ForceSendFields is a list of field names (e.g. "InvoiceId") to 1507 // unconditionally include in API requests. By default, fields with 1508 // empty values are omitted from API requests. However, any non-pointer, 1509 // non-interface field appearing in ForceSendFields will be sent to the 1510 // server regardless of whether the field is empty or not. This may be 1511 // used to include empty fields in Patch requests. 1512 ForceSendFields []string `json:"-"` 1513 1514 // NullFields is a list of field names (e.g. "InvoiceId") to include in 1515 // API requests with the JSON null value. By default, fields with empty 1516 // values are omitted from API requests. However, any field with an 1517 // empty value appearing in NullFields will be sent to the server as 1518 // null. It is an error if a field in this list has a non-empty value. 1519 // This may be used to include null fields in Patch requests. 1520 NullFields []string `json:"-"` 1521} 1522 1523func (s *OrderinvoicesCreateRefundInvoiceRequest) MarshalJSON() ([]byte, error) { 1524 type NoMethod OrderinvoicesCreateRefundInvoiceRequest 1525 raw := NoMethod(*s) 1526 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1527} 1528 1529type OrderinvoicesCreateRefundInvoiceResponse struct { 1530 // ExecutionStatus: The status of the execution. 1531 ExecutionStatus string `json:"executionStatus,omitempty"` 1532 1533 // Kind: Identifies what kind of resource this is. Value: the fixed 1534 // string "content#orderinvoicesCreateRefundInvoiceResponse". 1535 Kind string `json:"kind,omitempty"` 1536 1537 // ServerResponse contains the HTTP response code and headers from the 1538 // server. 1539 googleapi.ServerResponse `json:"-"` 1540 1541 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 1542 // unconditionally include in API requests. By default, fields with 1543 // empty values are omitted from API requests. However, any non-pointer, 1544 // non-interface field appearing in ForceSendFields will be sent to the 1545 // server regardless of whether the field is empty or not. This may be 1546 // used to include empty fields in Patch requests. 1547 ForceSendFields []string `json:"-"` 1548 1549 // NullFields is a list of field names (e.g. "ExecutionStatus") to 1550 // include in API requests with the JSON null value. By default, fields 1551 // with empty values are omitted from API requests. However, any field 1552 // with an empty value appearing in NullFields will be sent to the 1553 // server as null. It is an error if a field in this list has a 1554 // non-empty value. This may be used to include null fields in Patch 1555 // requests. 1556 NullFields []string `json:"-"` 1557} 1558 1559func (s *OrderinvoicesCreateRefundInvoiceResponse) MarshalJSON() ([]byte, error) { 1560 type NoMethod OrderinvoicesCreateRefundInvoiceResponse 1561 raw := NoMethod(*s) 1562 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1563} 1564 1565type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption struct { 1566 // Description: Optional description of the refund reason. 1567 Description string `json:"description,omitempty"` 1568 1569 // Reason: [required] Reason for the refund. 1570 Reason string `json:"reason,omitempty"` 1571 1572 // ForceSendFields is a list of field names (e.g. "Description") to 1573 // unconditionally include in API requests. By default, fields with 1574 // empty values are omitted from API requests. However, any non-pointer, 1575 // non-interface field appearing in ForceSendFields will be sent to the 1576 // server regardless of whether the field is empty or not. This may be 1577 // used to include empty fields in Patch requests. 1578 ForceSendFields []string `json:"-"` 1579 1580 // NullFields is a list of field names (e.g. "Description") to include 1581 // in API requests with the JSON null value. By default, fields with 1582 // empty values are omitted from API requests. However, any field with 1583 // an empty value appearing in NullFields will be sent to the server as 1584 // null. It is an error if a field in this list has a non-empty value. 1585 // This may be used to include null fields in Patch requests. 1586 NullFields []string `json:"-"` 1587} 1588 1589func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption) MarshalJSON() ([]byte, error) { 1590 type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption 1591 raw := NoMethod(*s) 1592 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1593} 1594 1595type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption struct { 1596 // Description: Optional description of the return reason. 1597 Description string `json:"description,omitempty"` 1598 1599 // Reason: [required] Reason for the return. 1600 Reason string `json:"reason,omitempty"` 1601 1602 // ForceSendFields is a list of field names (e.g. "Description") to 1603 // unconditionally include in API requests. By default, fields with 1604 // empty values are omitted from API requests. However, any non-pointer, 1605 // non-interface field appearing in ForceSendFields will be sent to the 1606 // server regardless of whether the field is empty or not. This may be 1607 // used to include empty fields in Patch requests. 1608 ForceSendFields []string `json:"-"` 1609 1610 // NullFields is a list of field names (e.g. "Description") to include 1611 // in API requests with the JSON null value. By default, fields with 1612 // empty values are omitted from API requests. However, any field with 1613 // an empty value appearing in NullFields will be sent to the server as 1614 // null. It is an error if a field in this list has a non-empty value. 1615 // This may be used to include null fields in Patch requests. 1616 NullFields []string `json:"-"` 1617} 1618 1619func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption) MarshalJSON() ([]byte, error) { 1620 type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption 1621 raw := NoMethod(*s) 1622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1623} 1624 1625type OrderpaymentsNotifyAuthApprovedRequest struct { 1626 AuthAmountPretax *Price `json:"authAmountPretax,omitempty"` 1627 1628 AuthAmountTax *Price `json:"authAmountTax,omitempty"` 1629 1630 // ForceSendFields is a list of field names (e.g. "AuthAmountPretax") to 1631 // unconditionally include in API requests. By default, fields with 1632 // empty values are omitted from API requests. However, any non-pointer, 1633 // non-interface field appearing in ForceSendFields will be sent to the 1634 // server regardless of whether the field is empty or not. This may be 1635 // used to include empty fields in Patch requests. 1636 ForceSendFields []string `json:"-"` 1637 1638 // NullFields is a list of field names (e.g. "AuthAmountPretax") to 1639 // include in API requests with the JSON null value. By default, fields 1640 // with empty values are omitted from API requests. However, any field 1641 // with an empty value appearing in NullFields will be sent to the 1642 // server as null. It is an error if a field in this list has a 1643 // non-empty value. This may be used to include null fields in Patch 1644 // requests. 1645 NullFields []string `json:"-"` 1646} 1647 1648func (s *OrderpaymentsNotifyAuthApprovedRequest) MarshalJSON() ([]byte, error) { 1649 type NoMethod OrderpaymentsNotifyAuthApprovedRequest 1650 raw := NoMethod(*s) 1651 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1652} 1653 1654type OrderpaymentsNotifyAuthApprovedResponse struct { 1655 // ExecutionStatus: The status of the execution. 1656 ExecutionStatus string `json:"executionStatus,omitempty"` 1657 1658 // Kind: Identifies what kind of resource this is. Value: the fixed 1659 // string "content#orderpaymentsNotifyAuthApprovedResponse". 1660 Kind string `json:"kind,omitempty"` 1661 1662 // ServerResponse contains the HTTP response code and headers from the 1663 // server. 1664 googleapi.ServerResponse `json:"-"` 1665 1666 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 1667 // unconditionally include in API requests. By default, fields with 1668 // empty values are omitted from API requests. However, any non-pointer, 1669 // non-interface field appearing in ForceSendFields will be sent to the 1670 // server regardless of whether the field is empty or not. This may be 1671 // used to include empty fields in Patch requests. 1672 ForceSendFields []string `json:"-"` 1673 1674 // NullFields is a list of field names (e.g. "ExecutionStatus") to 1675 // include in API requests with the JSON null value. By default, fields 1676 // with empty values are omitted from API requests. However, any field 1677 // with an empty value appearing in NullFields will be sent to the 1678 // server as null. It is an error if a field in this list has a 1679 // non-empty value. This may be used to include null fields in Patch 1680 // requests. 1681 NullFields []string `json:"-"` 1682} 1683 1684func (s *OrderpaymentsNotifyAuthApprovedResponse) MarshalJSON() ([]byte, error) { 1685 type NoMethod OrderpaymentsNotifyAuthApprovedResponse 1686 raw := NoMethod(*s) 1687 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1688} 1689 1690type OrderpaymentsNotifyAuthDeclinedRequest struct { 1691 // DeclineReason: Reason why payment authorization was declined. 1692 DeclineReason string `json:"declineReason,omitempty"` 1693 1694 // ForceSendFields is a list of field names (e.g. "DeclineReason") to 1695 // unconditionally include in API requests. By default, fields with 1696 // empty values are omitted from API requests. However, any non-pointer, 1697 // non-interface field appearing in ForceSendFields will be sent to the 1698 // server regardless of whether the field is empty or not. This may be 1699 // used to include empty fields in Patch requests. 1700 ForceSendFields []string `json:"-"` 1701 1702 // NullFields is a list of field names (e.g. "DeclineReason") to include 1703 // in API requests with the JSON null value. By default, fields with 1704 // empty values are omitted from API requests. However, any field with 1705 // an empty value appearing in NullFields will be sent to the server as 1706 // null. It is an error if a field in this list has a non-empty value. 1707 // This may be used to include null fields in Patch requests. 1708 NullFields []string `json:"-"` 1709} 1710 1711func (s *OrderpaymentsNotifyAuthDeclinedRequest) MarshalJSON() ([]byte, error) { 1712 type NoMethod OrderpaymentsNotifyAuthDeclinedRequest 1713 raw := NoMethod(*s) 1714 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1715} 1716 1717type OrderpaymentsNotifyAuthDeclinedResponse struct { 1718 // ExecutionStatus: The status of the execution. 1719 ExecutionStatus string `json:"executionStatus,omitempty"` 1720 1721 // Kind: Identifies what kind of resource this is. Value: the fixed 1722 // string "content#orderpaymentsNotifyAuthDeclinedResponse". 1723 Kind string `json:"kind,omitempty"` 1724 1725 // ServerResponse contains the HTTP response code and headers from the 1726 // server. 1727 googleapi.ServerResponse `json:"-"` 1728 1729 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 1730 // unconditionally include in API requests. By default, fields with 1731 // empty values are omitted from API requests. However, any non-pointer, 1732 // non-interface field appearing in ForceSendFields will be sent to the 1733 // server regardless of whether the field is empty or not. This may be 1734 // used to include empty fields in Patch requests. 1735 ForceSendFields []string `json:"-"` 1736 1737 // NullFields is a list of field names (e.g. "ExecutionStatus") to 1738 // include in API requests with the JSON null value. By default, fields 1739 // with empty values are omitted from API requests. However, any field 1740 // with an empty value appearing in NullFields will be sent to the 1741 // server as null. It is an error if a field in this list has a 1742 // non-empty value. This may be used to include null fields in Patch 1743 // requests. 1744 NullFields []string `json:"-"` 1745} 1746 1747func (s *OrderpaymentsNotifyAuthDeclinedResponse) MarshalJSON() ([]byte, error) { 1748 type NoMethod OrderpaymentsNotifyAuthDeclinedResponse 1749 raw := NoMethod(*s) 1750 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1751} 1752 1753type OrderpaymentsNotifyChargeRequest struct { 1754 // ChargeState: Whether charge was successful. 1755 ChargeState string `json:"chargeState,omitempty"` 1756 1757 // InvoiceId: Deprecated. Please use invoiceIds instead. 1758 InvoiceId string `json:"invoiceId,omitempty"` 1759 1760 // InvoiceIds: Invoice IDs from the orderinvoices service that 1761 // correspond to the charge. 1762 InvoiceIds []string `json:"invoiceIds,omitempty"` 1763 1764 // ForceSendFields is a list of field names (e.g. "ChargeState") to 1765 // unconditionally include in API requests. By default, fields with 1766 // empty values are omitted from API requests. However, any non-pointer, 1767 // non-interface field appearing in ForceSendFields will be sent to the 1768 // server regardless of whether the field is empty or not. This may be 1769 // used to include empty fields in Patch requests. 1770 ForceSendFields []string `json:"-"` 1771 1772 // NullFields is a list of field names (e.g. "ChargeState") to include 1773 // in API requests with the JSON null value. By default, fields with 1774 // empty values are omitted from API requests. However, any field with 1775 // an empty value appearing in NullFields will be sent to the server as 1776 // null. It is an error if a field in this list has a non-empty value. 1777 // This may be used to include null fields in Patch requests. 1778 NullFields []string `json:"-"` 1779} 1780 1781func (s *OrderpaymentsNotifyChargeRequest) MarshalJSON() ([]byte, error) { 1782 type NoMethod OrderpaymentsNotifyChargeRequest 1783 raw := NoMethod(*s) 1784 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1785} 1786 1787type OrderpaymentsNotifyChargeResponse struct { 1788 // ExecutionStatus: The status of the execution. 1789 ExecutionStatus string `json:"executionStatus,omitempty"` 1790 1791 // Kind: Identifies what kind of resource this is. Value: the fixed 1792 // string "content#orderpaymentsNotifyChargeResponse". 1793 Kind string `json:"kind,omitempty"` 1794 1795 // ServerResponse contains the HTTP response code and headers from the 1796 // server. 1797 googleapi.ServerResponse `json:"-"` 1798 1799 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 1800 // unconditionally include in API requests. By default, fields with 1801 // empty values are omitted from API requests. However, any non-pointer, 1802 // non-interface field appearing in ForceSendFields will be sent to the 1803 // server regardless of whether the field is empty or not. This may be 1804 // used to include empty fields in Patch requests. 1805 ForceSendFields []string `json:"-"` 1806 1807 // NullFields is a list of field names (e.g. "ExecutionStatus") to 1808 // include in API requests with the JSON null value. By default, fields 1809 // with empty values are omitted from API requests. However, any field 1810 // with an empty value appearing in NullFields will be sent to the 1811 // server as null. It is an error if a field in this list has a 1812 // non-empty value. This may be used to include null fields in Patch 1813 // requests. 1814 NullFields []string `json:"-"` 1815} 1816 1817func (s *OrderpaymentsNotifyChargeResponse) MarshalJSON() ([]byte, error) { 1818 type NoMethod OrderpaymentsNotifyChargeResponse 1819 raw := NoMethod(*s) 1820 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1821} 1822 1823type OrderpaymentsNotifyRefundRequest struct { 1824 // InvoiceId: Deprecated. Please use invoiceIds instead. 1825 InvoiceId string `json:"invoiceId,omitempty"` 1826 1827 // InvoiceIds: Invoice IDs from the orderinvoices service that 1828 // correspond to the refund. 1829 InvoiceIds []string `json:"invoiceIds,omitempty"` 1830 1831 // RefundState: Whether refund was successful. 1832 RefundState string `json:"refundState,omitempty"` 1833 1834 // ForceSendFields is a list of field names (e.g. "InvoiceId") to 1835 // unconditionally include in API requests. By default, fields with 1836 // empty values are omitted from API requests. However, any non-pointer, 1837 // non-interface field appearing in ForceSendFields will be sent to the 1838 // server regardless of whether the field is empty or not. This may be 1839 // used to include empty fields in Patch requests. 1840 ForceSendFields []string `json:"-"` 1841 1842 // NullFields is a list of field names (e.g. "InvoiceId") to include in 1843 // API requests with the JSON null value. By default, fields with empty 1844 // values are omitted from API requests. However, any field with an 1845 // empty value appearing in NullFields will be sent to the server as 1846 // null. It is an error if a field in this list has a non-empty value. 1847 // This may be used to include null fields in Patch requests. 1848 NullFields []string `json:"-"` 1849} 1850 1851func (s *OrderpaymentsNotifyRefundRequest) MarshalJSON() ([]byte, error) { 1852 type NoMethod OrderpaymentsNotifyRefundRequest 1853 raw := NoMethod(*s) 1854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1855} 1856 1857type OrderpaymentsNotifyRefundResponse struct { 1858 // ExecutionStatus: The status of the execution. 1859 ExecutionStatus string `json:"executionStatus,omitempty"` 1860 1861 // Kind: Identifies what kind of resource this is. Value: the fixed 1862 // string "content#orderpaymentsNotifyRefundResponse". 1863 Kind string `json:"kind,omitempty"` 1864 1865 // ServerResponse contains the HTTP response code and headers from the 1866 // server. 1867 googleapi.ServerResponse `json:"-"` 1868 1869 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 1870 // unconditionally include in API requests. By default, fields with 1871 // empty values are omitted from API requests. However, any non-pointer, 1872 // non-interface field appearing in ForceSendFields will be sent to the 1873 // server regardless of whether the field is empty or not. This may be 1874 // used to include empty fields in Patch requests. 1875 ForceSendFields []string `json:"-"` 1876 1877 // NullFields is a list of field names (e.g. "ExecutionStatus") to 1878 // include in API requests with the JSON null value. By default, fields 1879 // with empty values are omitted from API requests. However, any field 1880 // with an empty value appearing in NullFields will be sent to the 1881 // server as null. It is an error if a field in this list has a 1882 // non-empty value. This may be used to include null fields in Patch 1883 // requests. 1884 NullFields []string `json:"-"` 1885} 1886 1887func (s *OrderpaymentsNotifyRefundResponse) MarshalJSON() ([]byte, error) { 1888 type NoMethod OrderpaymentsNotifyRefundResponse 1889 raw := NoMethod(*s) 1890 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1891} 1892 1893type OrderreturnsListResponse struct { 1894 // Kind: Identifies what kind of resource this is. Value: the fixed 1895 // string "content#orderreturnsListResponse". 1896 Kind string `json:"kind,omitempty"` 1897 1898 // NextPageToken: The token for the retrieval of the next page of 1899 // returns. 1900 NextPageToken string `json:"nextPageToken,omitempty"` 1901 1902 Resources []*MerchantOrderReturn `json:"resources,omitempty"` 1903 1904 // ServerResponse contains the HTTP response code and headers from the 1905 // server. 1906 googleapi.ServerResponse `json:"-"` 1907 1908 // ForceSendFields is a list of field names (e.g. "Kind") to 1909 // unconditionally include in API requests. By default, fields with 1910 // empty values are omitted from API requests. However, any non-pointer, 1911 // non-interface field appearing in ForceSendFields will be sent to the 1912 // server regardless of whether the field is empty or not. This may be 1913 // used to include empty fields in Patch requests. 1914 ForceSendFields []string `json:"-"` 1915 1916 // NullFields is a list of field names (e.g. "Kind") to include in API 1917 // requests with the JSON null value. By default, fields with empty 1918 // values are omitted from API requests. However, any field with an 1919 // empty value appearing in NullFields will be sent to the server as 1920 // null. It is an error if a field in this list has a non-empty value. 1921 // This may be used to include null fields in Patch requests. 1922 NullFields []string `json:"-"` 1923} 1924 1925func (s *OrderreturnsListResponse) MarshalJSON() ([]byte, error) { 1926 type NoMethod OrderreturnsListResponse 1927 raw := NoMethod(*s) 1928 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1929} 1930 1931type OrdersAcknowledgeRequest struct { 1932 // OperationId: The ID of the operation. Unique across all operations 1933 // for a given order. 1934 OperationId string `json:"operationId,omitempty"` 1935 1936 // ForceSendFields is a list of field names (e.g. "OperationId") to 1937 // unconditionally include in API requests. By default, fields with 1938 // empty values are omitted from API requests. However, any non-pointer, 1939 // non-interface field appearing in ForceSendFields will be sent to the 1940 // server regardless of whether the field is empty or not. This may be 1941 // used to include empty fields in Patch requests. 1942 ForceSendFields []string `json:"-"` 1943 1944 // NullFields is a list of field names (e.g. "OperationId") to include 1945 // in API requests with the JSON null value. By default, fields with 1946 // empty values are omitted from API requests. However, any field with 1947 // an empty value appearing in NullFields will be sent to the server as 1948 // null. It is an error if a field in this list has a non-empty value. 1949 // This may be used to include null fields in Patch requests. 1950 NullFields []string `json:"-"` 1951} 1952 1953func (s *OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) { 1954 type NoMethod OrdersAcknowledgeRequest 1955 raw := NoMethod(*s) 1956 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1957} 1958 1959type OrdersAcknowledgeResponse struct { 1960 // ExecutionStatus: The status of the execution. 1961 ExecutionStatus string `json:"executionStatus,omitempty"` 1962 1963 // Kind: Identifies what kind of resource this is. Value: the fixed 1964 // string "content#ordersAcknowledgeResponse". 1965 Kind string `json:"kind,omitempty"` 1966 1967 // ServerResponse contains the HTTP response code and headers from the 1968 // server. 1969 googleapi.ServerResponse `json:"-"` 1970 1971 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 1972 // unconditionally include in API requests. By default, fields with 1973 // empty values are omitted from API requests. However, any non-pointer, 1974 // non-interface field appearing in ForceSendFields will be sent to the 1975 // server regardless of whether the field is empty or not. This may be 1976 // used to include empty fields in Patch requests. 1977 ForceSendFields []string `json:"-"` 1978 1979 // NullFields is a list of field names (e.g. "ExecutionStatus") to 1980 // include in API requests with the JSON null value. By default, fields 1981 // with empty values are omitted from API requests. However, any field 1982 // with an empty value appearing in NullFields will be sent to the 1983 // server as null. It is an error if a field in this list has a 1984 // non-empty value. This may be used to include null fields in Patch 1985 // requests. 1986 NullFields []string `json:"-"` 1987} 1988 1989func (s *OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) { 1990 type NoMethod OrdersAcknowledgeResponse 1991 raw := NoMethod(*s) 1992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1993} 1994 1995type OrdersAdvanceTestOrderResponse struct { 1996 // Kind: Identifies what kind of resource this is. Value: the fixed 1997 // string "content#ordersAdvanceTestOrderResponse". 1998 Kind string `json:"kind,omitempty"` 1999 2000 // ServerResponse contains the HTTP response code and headers from the 2001 // server. 2002 googleapi.ServerResponse `json:"-"` 2003 2004 // ForceSendFields is a list of field names (e.g. "Kind") to 2005 // unconditionally include in API requests. By default, fields with 2006 // empty values are omitted from API requests. However, any non-pointer, 2007 // non-interface field appearing in ForceSendFields will be sent to the 2008 // server regardless of whether the field is empty or not. This may be 2009 // used to include empty fields in Patch requests. 2010 ForceSendFields []string `json:"-"` 2011 2012 // NullFields is a list of field names (e.g. "Kind") to include in API 2013 // requests with the JSON null value. By default, fields with empty 2014 // values are omitted from API requests. However, any field with an 2015 // empty value appearing in NullFields will be sent to the server as 2016 // null. It is an error if a field in this list has a non-empty value. 2017 // This may be used to include null fields in Patch requests. 2018 NullFields []string `json:"-"` 2019} 2020 2021func (s *OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) { 2022 type NoMethod OrdersAdvanceTestOrderResponse 2023 raw := NoMethod(*s) 2024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2025} 2026 2027type OrdersCancelLineItemRequest struct { 2028 // Amount: Deprecated. Please use amountPretax and amountTax instead. 2029 Amount *Price `json:"amount,omitempty"` 2030 2031 // AmountPretax: Amount to refund for the cancelation. Optional. If not 2032 // set, Google will calculate the default based on the price and tax of 2033 // the items involved. The amount must not be larger than the net amount 2034 // left on the order. 2035 AmountPretax *Price `json:"amountPretax,omitempty"` 2036 2037 // AmountTax: Tax amount that correspond to cancellation amount in 2038 // amountPretax. 2039 AmountTax *Price `json:"amountTax,omitempty"` 2040 2041 // LineItemId: The ID of the line item to cancel. Either lineItemId or 2042 // productId is required. 2043 LineItemId string `json:"lineItemId,omitempty"` 2044 2045 // OperationId: The ID of the operation. Unique across all operations 2046 // for a given order. 2047 OperationId string `json:"operationId,omitempty"` 2048 2049 // ProductId: The ID of the product to cancel. This is the REST ID used 2050 // in the products service. Either lineItemId or productId is required. 2051 ProductId string `json:"productId,omitempty"` 2052 2053 // Quantity: The quantity to cancel. 2054 Quantity int64 `json:"quantity,omitempty"` 2055 2056 // Reason: The reason for the cancellation. 2057 Reason string `json:"reason,omitempty"` 2058 2059 // ReasonText: The explanation of the reason. 2060 ReasonText string `json:"reasonText,omitempty"` 2061 2062 // ForceSendFields is a list of field names (e.g. "Amount") to 2063 // unconditionally include in API requests. By default, fields with 2064 // empty values are omitted from API requests. However, any non-pointer, 2065 // non-interface field appearing in ForceSendFields will be sent to the 2066 // server regardless of whether the field is empty or not. This may be 2067 // used to include empty fields in Patch requests. 2068 ForceSendFields []string `json:"-"` 2069 2070 // NullFields is a list of field names (e.g. "Amount") to include in API 2071 // requests with the JSON null value. By default, fields with empty 2072 // values are omitted from API requests. However, any field with an 2073 // empty value appearing in NullFields will be sent to the server as 2074 // null. It is an error if a field in this list has a non-empty value. 2075 // This may be used to include null fields in Patch requests. 2076 NullFields []string `json:"-"` 2077} 2078 2079func (s *OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) { 2080 type NoMethod OrdersCancelLineItemRequest 2081 raw := NoMethod(*s) 2082 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2083} 2084 2085type OrdersCancelLineItemResponse struct { 2086 // ExecutionStatus: The status of the execution. 2087 ExecutionStatus string `json:"executionStatus,omitempty"` 2088 2089 // Kind: Identifies what kind of resource this is. Value: the fixed 2090 // string "content#ordersCancelLineItemResponse". 2091 Kind string `json:"kind,omitempty"` 2092 2093 // ServerResponse contains the HTTP response code and headers from the 2094 // server. 2095 googleapi.ServerResponse `json:"-"` 2096 2097 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") to 2106 // include in API requests with the JSON null value. By default, fields 2107 // with empty values are omitted from API requests. However, any field 2108 // with an empty value appearing in NullFields will be sent to the 2109 // server as null. It is an error if a field in this list has a 2110 // non-empty value. This may be used to include null fields in Patch 2111 // requests. 2112 NullFields []string `json:"-"` 2113} 2114 2115func (s *OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) { 2116 type NoMethod OrdersCancelLineItemResponse 2117 raw := NoMethod(*s) 2118 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2119} 2120 2121type OrdersCancelRequest struct { 2122 // OperationId: The ID of the operation. Unique across all operations 2123 // for a given order. 2124 OperationId string `json:"operationId,omitempty"` 2125 2126 // Reason: The reason for the cancellation. 2127 Reason string `json:"reason,omitempty"` 2128 2129 // ReasonText: The explanation of the reason. 2130 ReasonText string `json:"reasonText,omitempty"` 2131 2132 // ForceSendFields is a list of field names (e.g. "OperationId") to 2133 // unconditionally include in API requests. By default, fields with 2134 // empty values are omitted from API requests. However, any non-pointer, 2135 // non-interface field appearing in ForceSendFields will be sent to the 2136 // server regardless of whether the field is empty or not. This may be 2137 // used to include empty fields in Patch requests. 2138 ForceSendFields []string `json:"-"` 2139 2140 // NullFields is a list of field names (e.g. "OperationId") to include 2141 // in API requests with the JSON null value. By default, fields with 2142 // empty values are omitted from API requests. However, any field with 2143 // an empty value appearing in NullFields will be sent to the server as 2144 // null. It is an error if a field in this list has a non-empty value. 2145 // This may be used to include null fields in Patch requests. 2146 NullFields []string `json:"-"` 2147} 2148 2149func (s *OrdersCancelRequest) MarshalJSON() ([]byte, error) { 2150 type NoMethod OrdersCancelRequest 2151 raw := NoMethod(*s) 2152 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2153} 2154 2155type OrdersCancelResponse struct { 2156 // ExecutionStatus: The status of the execution. 2157 ExecutionStatus string `json:"executionStatus,omitempty"` 2158 2159 // Kind: Identifies what kind of resource this is. Value: the fixed 2160 // string "content#ordersCancelResponse". 2161 Kind string `json:"kind,omitempty"` 2162 2163 // ServerResponse contains the HTTP response code and headers from the 2164 // server. 2165 googleapi.ServerResponse `json:"-"` 2166 2167 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 2168 // unconditionally include in API requests. By default, fields with 2169 // empty values are omitted from API requests. However, any non-pointer, 2170 // non-interface field appearing in ForceSendFields will be sent to the 2171 // server regardless of whether the field is empty or not. This may be 2172 // used to include empty fields in Patch requests. 2173 ForceSendFields []string `json:"-"` 2174 2175 // NullFields is a list of field names (e.g. "ExecutionStatus") to 2176 // include in API requests with the JSON null value. By default, fields 2177 // with empty values are omitted from API requests. However, any field 2178 // with an empty value appearing in NullFields will be sent to the 2179 // server as null. It is an error if a field in this list has a 2180 // non-empty value. This may be used to include null fields in Patch 2181 // requests. 2182 NullFields []string `json:"-"` 2183} 2184 2185func (s *OrdersCancelResponse) MarshalJSON() ([]byte, error) { 2186 type NoMethod OrdersCancelResponse 2187 raw := NoMethod(*s) 2188 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2189} 2190 2191type OrdersCancelTestOrderByCustomerRequest struct { 2192 // Reason: The reason for the cancellation. 2193 Reason string `json:"reason,omitempty"` 2194 2195 // ForceSendFields is a list of field names (e.g. "Reason") to 2196 // unconditionally include in API requests. By default, fields with 2197 // empty values are omitted from API requests. However, any non-pointer, 2198 // non-interface field appearing in ForceSendFields will be sent to the 2199 // server regardless of whether the field is empty or not. This may be 2200 // used to include empty fields in Patch requests. 2201 ForceSendFields []string `json:"-"` 2202 2203 // NullFields is a list of field names (e.g. "Reason") to include in API 2204 // requests with the JSON null value. By default, fields with empty 2205 // values are omitted from API requests. However, any field with an 2206 // empty value appearing in NullFields will be sent to the server as 2207 // null. It is an error if a field in this list has a non-empty value. 2208 // This may be used to include null fields in Patch requests. 2209 NullFields []string `json:"-"` 2210} 2211 2212func (s *OrdersCancelTestOrderByCustomerRequest) MarshalJSON() ([]byte, error) { 2213 type NoMethod OrdersCancelTestOrderByCustomerRequest 2214 raw := NoMethod(*s) 2215 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2216} 2217 2218type OrdersCancelTestOrderByCustomerResponse struct { 2219 // Kind: Identifies what kind of resource this is. Value: the fixed 2220 // string "content#ordersCancelTestOrderByCustomerResponse". 2221 Kind string `json:"kind,omitempty"` 2222 2223 // ServerResponse contains the HTTP response code and headers from the 2224 // server. 2225 googleapi.ServerResponse `json:"-"` 2226 2227 // ForceSendFields is a list of field names (e.g. "Kind") to 2228 // unconditionally include in API requests. By default, fields with 2229 // empty values are omitted from API requests. However, any non-pointer, 2230 // non-interface field appearing in ForceSendFields will be sent to the 2231 // server regardless of whether the field is empty or not. This may be 2232 // used to include empty fields in Patch requests. 2233 ForceSendFields []string `json:"-"` 2234 2235 // NullFields is a list of field names (e.g. "Kind") to include in API 2236 // requests with the JSON null value. By default, fields with empty 2237 // values are omitted from API requests. However, any field with an 2238 // empty value appearing in NullFields will be sent to the server as 2239 // null. It is an error if a field in this list has a non-empty value. 2240 // This may be used to include null fields in Patch requests. 2241 NullFields []string `json:"-"` 2242} 2243 2244func (s *OrdersCancelTestOrderByCustomerResponse) MarshalJSON() ([]byte, error) { 2245 type NoMethod OrdersCancelTestOrderByCustomerResponse 2246 raw := NoMethod(*s) 2247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2248} 2249 2250type OrdersCreateTestOrderRequest struct { 2251 // Country: The CLDR territory code of the country of the test order to 2252 // create. Affects the currency and addresses of orders created via 2253 // template_name, or the addresses of orders created via 2254 // test_order. 2255 // 2256 // Acceptable values are: 2257 // - "US" 2258 // - "FR" Defaults to US. 2259 Country string `json:"country,omitempty"` 2260 2261 // TemplateName: The test order template to use. Specify as an 2262 // alternative to testOrder as a shortcut for retrieving a template and 2263 // then creating an order using that template. 2264 TemplateName string `json:"templateName,omitempty"` 2265 2266 // TestOrder: The test order to create. 2267 TestOrder *TestOrder `json:"testOrder,omitempty"` 2268 2269 // ForceSendFields is a list of field names (e.g. "Country") to 2270 // unconditionally include in API requests. By default, fields with 2271 // empty values are omitted from API requests. However, any non-pointer, 2272 // non-interface field appearing in ForceSendFields will be sent to the 2273 // server regardless of whether the field is empty or not. This may be 2274 // used to include empty fields in Patch requests. 2275 ForceSendFields []string `json:"-"` 2276 2277 // NullFields is a list of field names (e.g. "Country") to include in 2278 // API requests with the JSON null value. By default, fields with empty 2279 // values are omitted from API requests. However, any field with an 2280 // empty value appearing in NullFields will be sent to the server as 2281 // null. It is an error if a field in this list has a non-empty value. 2282 // This may be used to include null fields in Patch requests. 2283 NullFields []string `json:"-"` 2284} 2285 2286func (s *OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) { 2287 type NoMethod OrdersCreateTestOrderRequest 2288 raw := NoMethod(*s) 2289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2290} 2291 2292type OrdersCreateTestOrderResponse struct { 2293 // Kind: Identifies what kind of resource this is. Value: the fixed 2294 // string "content#ordersCreateTestOrderResponse". 2295 Kind string `json:"kind,omitempty"` 2296 2297 // OrderId: The ID of the newly created test order. 2298 OrderId string `json:"orderId,omitempty"` 2299 2300 // ServerResponse contains the HTTP response code and headers from the 2301 // server. 2302 googleapi.ServerResponse `json:"-"` 2303 2304 // ForceSendFields is a list of field names (e.g. "Kind") to 2305 // unconditionally include in API requests. By default, fields with 2306 // empty values are omitted from API requests. However, any non-pointer, 2307 // non-interface field appearing in ForceSendFields will be sent to the 2308 // server regardless of whether the field is empty or not. This may be 2309 // used to include empty fields in Patch requests. 2310 ForceSendFields []string `json:"-"` 2311 2312 // NullFields is a list of field names (e.g. "Kind") to include in API 2313 // requests with the JSON null value. By default, fields with empty 2314 // values are omitted from API requests. However, any field with an 2315 // empty value appearing in NullFields will be sent to the server as 2316 // null. It is an error if a field in this list has a non-empty value. 2317 // This may be used to include null fields in Patch requests. 2318 NullFields []string `json:"-"` 2319} 2320 2321func (s *OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) { 2322 type NoMethod OrdersCreateTestOrderResponse 2323 raw := NoMethod(*s) 2324 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2325} 2326 2327type OrdersCreateTestReturnRequest struct { 2328 // Items: Returned items. 2329 Items []*OrdersCustomBatchRequestEntryCreateTestReturnReturnItem `json:"items,omitempty"` 2330 2331 // ForceSendFields is a list of field names (e.g. "Items") to 2332 // unconditionally include in API requests. By default, fields with 2333 // empty values are omitted from API requests. However, any non-pointer, 2334 // non-interface field appearing in ForceSendFields will be sent to the 2335 // server regardless of whether the field is empty or not. This may be 2336 // used to include empty fields in Patch requests. 2337 ForceSendFields []string `json:"-"` 2338 2339 // NullFields is a list of field names (e.g. "Items") to include in API 2340 // requests with the JSON null value. By default, fields with empty 2341 // values are omitted from API requests. However, any field with an 2342 // empty value appearing in NullFields will be sent to the server as 2343 // null. It is an error if a field in this list has a non-empty value. 2344 // This may be used to include null fields in Patch requests. 2345 NullFields []string `json:"-"` 2346} 2347 2348func (s *OrdersCreateTestReturnRequest) MarshalJSON() ([]byte, error) { 2349 type NoMethod OrdersCreateTestReturnRequest 2350 raw := NoMethod(*s) 2351 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2352} 2353 2354type OrdersCreateTestReturnResponse struct { 2355 // Kind: Identifies what kind of resource this is. Value: the fixed 2356 // string "content#ordersCreateTestReturnResponse". 2357 Kind string `json:"kind,omitempty"` 2358 2359 // ReturnId: The ID of the newly created test order return. 2360 ReturnId string `json:"returnId,omitempty"` 2361 2362 // ServerResponse contains the HTTP response code and headers from the 2363 // server. 2364 googleapi.ServerResponse `json:"-"` 2365 2366 // ForceSendFields is a list of field names (e.g. "Kind") to 2367 // unconditionally include in API requests. By default, fields with 2368 // empty values are omitted from API requests. However, any non-pointer, 2369 // non-interface field appearing in ForceSendFields will be sent to the 2370 // server regardless of whether the field is empty or not. This may be 2371 // used to include empty fields in Patch requests. 2372 ForceSendFields []string `json:"-"` 2373 2374 // NullFields is a list of field names (e.g. "Kind") to include in API 2375 // requests with the JSON null value. By default, fields with empty 2376 // values are omitted from API requests. However, any field with an 2377 // empty value appearing in NullFields will be sent to the server as 2378 // null. It is an error if a field in this list has a non-empty value. 2379 // This may be used to include null fields in Patch requests. 2380 NullFields []string `json:"-"` 2381} 2382 2383func (s *OrdersCreateTestReturnResponse) MarshalJSON() ([]byte, error) { 2384 type NoMethod OrdersCreateTestReturnResponse 2385 raw := NoMethod(*s) 2386 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2387} 2388 2389type OrdersCustomBatchRequest struct { 2390 // Entries: The request entries to be processed in the batch. 2391 Entries []*OrdersCustomBatchRequestEntry `json:"entries,omitempty"` 2392 2393 // ForceSendFields is a list of field names (e.g. "Entries") to 2394 // unconditionally include in API requests. By default, fields with 2395 // empty values are omitted from API requests. However, any non-pointer, 2396 // non-interface field appearing in ForceSendFields will be sent to the 2397 // server regardless of whether the field is empty or not. This may be 2398 // used to include empty fields in Patch requests. 2399 ForceSendFields []string `json:"-"` 2400 2401 // NullFields is a list of field names (e.g. "Entries") to include in 2402 // API requests with the JSON null value. By default, fields with empty 2403 // values are omitted from API requests. However, any field with an 2404 // empty value appearing in NullFields will be sent to the server as 2405 // null. It is an error if a field in this list has a non-empty value. 2406 // This may be used to include null fields in Patch requests. 2407 NullFields []string `json:"-"` 2408} 2409 2410func (s *OrdersCustomBatchRequest) MarshalJSON() ([]byte, error) { 2411 type NoMethod OrdersCustomBatchRequest 2412 raw := NoMethod(*s) 2413 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2414} 2415 2416type OrdersCustomBatchRequestEntry struct { 2417 // BatchId: An entry ID, unique within the batch request. 2418 BatchId int64 `json:"batchId,omitempty"` 2419 2420 // Cancel: Required for cancel method. 2421 Cancel *OrdersCustomBatchRequestEntryCancel `json:"cancel,omitempty"` 2422 2423 // CancelLineItem: Required for cancelLineItem method. 2424 CancelLineItem *OrdersCustomBatchRequestEntryCancelLineItem `json:"cancelLineItem,omitempty"` 2425 2426 // InStoreRefundLineItem: Required for inStoreReturnLineItem method. 2427 InStoreRefundLineItem *OrdersCustomBatchRequestEntryInStoreRefundLineItem `json:"inStoreRefundLineItem,omitempty"` 2428 2429 // MerchantId: The ID of the managing account. 2430 MerchantId uint64 `json:"merchantId,omitempty,string"` 2431 2432 // MerchantOrderId: The merchant order id. Required for 2433 // updateMerchantOrderId and getByMerchantOrderId methods. 2434 MerchantOrderId string `json:"merchantOrderId,omitempty"` 2435 2436 // Method: The method to apply. 2437 Method string `json:"method,omitempty"` 2438 2439 // OperationId: The ID of the operation. Unique across all operations 2440 // for a given order. Required for all methods beside get and 2441 // getByMerchantOrderId. 2442 OperationId string `json:"operationId,omitempty"` 2443 2444 // OrderId: The ID of the order. Required for all methods beside 2445 // getByMerchantOrderId. 2446 OrderId string `json:"orderId,omitempty"` 2447 2448 // Refund: Required for refund method. 2449 Refund *OrdersCustomBatchRequestEntryRefund `json:"refund,omitempty"` 2450 2451 // RejectReturnLineItem: Required for rejectReturnLineItem method. 2452 RejectReturnLineItem *OrdersCustomBatchRequestEntryRejectReturnLineItem `json:"rejectReturnLineItem,omitempty"` 2453 2454 // ReturnLineItem: Required for returnLineItem method. 2455 ReturnLineItem *OrdersCustomBatchRequestEntryReturnLineItem `json:"returnLineItem,omitempty"` 2456 2457 // ReturnRefundLineItem: Required for returnRefundLineItem method. 2458 ReturnRefundLineItem *OrdersCustomBatchRequestEntryReturnRefundLineItem `json:"returnRefundLineItem,omitempty"` 2459 2460 // SetLineItemMetadata: Required for setLineItemMetadata method. 2461 SetLineItemMetadata *OrdersCustomBatchRequestEntrySetLineItemMetadata `json:"setLineItemMetadata,omitempty"` 2462 2463 // ShipLineItems: Required for shipLineItems method. 2464 ShipLineItems *OrdersCustomBatchRequestEntryShipLineItems `json:"shipLineItems,omitempty"` 2465 2466 // UpdateLineItemShippingDetails: Required for 2467 // updateLineItemShippingDate method. 2468 UpdateLineItemShippingDetails *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails `json:"updateLineItemShippingDetails,omitempty"` 2469 2470 // UpdateShipment: Required for updateShipment method. 2471 UpdateShipment *OrdersCustomBatchRequestEntryUpdateShipment `json:"updateShipment,omitempty"` 2472 2473 // ForceSendFields is a list of field names (e.g. "BatchId") to 2474 // unconditionally include in API requests. By default, fields with 2475 // empty values are omitted from API requests. However, any non-pointer, 2476 // non-interface field appearing in ForceSendFields will be sent to the 2477 // server regardless of whether the field is empty or not. This may be 2478 // used to include empty fields in Patch requests. 2479 ForceSendFields []string `json:"-"` 2480 2481 // NullFields is a list of field names (e.g. "BatchId") to include in 2482 // API requests with the JSON null value. By default, fields with empty 2483 // values are omitted from API requests. However, any field with an 2484 // empty value appearing in NullFields will be sent to the server as 2485 // null. It is an error if a field in this list has a non-empty value. 2486 // This may be used to include null fields in Patch requests. 2487 NullFields []string `json:"-"` 2488} 2489 2490func (s *OrdersCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { 2491 type NoMethod OrdersCustomBatchRequestEntry 2492 raw := NoMethod(*s) 2493 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2494} 2495 2496type OrdersCustomBatchRequestEntryCancel struct { 2497 // Reason: The reason for the cancellation. 2498 Reason string `json:"reason,omitempty"` 2499 2500 // ReasonText: The explanation of the reason. 2501 ReasonText string `json:"reasonText,omitempty"` 2502 2503 // ForceSendFields is a list of field names (e.g. "Reason") to 2504 // unconditionally include in API requests. By default, fields with 2505 // empty values are omitted from API requests. However, any non-pointer, 2506 // non-interface field appearing in ForceSendFields will be sent to the 2507 // server regardless of whether the field is empty or not. This may be 2508 // used to include empty fields in Patch requests. 2509 ForceSendFields []string `json:"-"` 2510 2511 // NullFields is a list of field names (e.g. "Reason") to include in API 2512 // requests with the JSON null value. By default, fields with empty 2513 // values are omitted from API requests. However, any field with an 2514 // empty value appearing in NullFields will be sent to the server as 2515 // null. It is an error if a field in this list has a non-empty value. 2516 // This may be used to include null fields in Patch requests. 2517 NullFields []string `json:"-"` 2518} 2519 2520func (s *OrdersCustomBatchRequestEntryCancel) MarshalJSON() ([]byte, error) { 2521 type NoMethod OrdersCustomBatchRequestEntryCancel 2522 raw := NoMethod(*s) 2523 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2524} 2525 2526type OrdersCustomBatchRequestEntryCancelLineItem struct { 2527 // Amount: Deprecated. Please use amountPretax and amountTax instead. 2528 Amount *Price `json:"amount,omitempty"` 2529 2530 // AmountPretax: Amount to refund for the cancelation. Optional. If not 2531 // set, Google will calculate the default based on the price and tax of 2532 // the items involved. The amount must not be larger than the net amount 2533 // left on the order. 2534 AmountPretax *Price `json:"amountPretax,omitempty"` 2535 2536 // AmountTax: Tax amount that correspond to cancellation amount in 2537 // amountPretax. 2538 AmountTax *Price `json:"amountTax,omitempty"` 2539 2540 // LineItemId: The ID of the line item to cancel. Either lineItemId or 2541 // productId is required. 2542 LineItemId string `json:"lineItemId,omitempty"` 2543 2544 // ProductId: The ID of the product to cancel. This is the REST ID used 2545 // in the products service. Either lineItemId or productId is required. 2546 ProductId string `json:"productId,omitempty"` 2547 2548 // Quantity: The quantity to cancel. 2549 Quantity int64 `json:"quantity,omitempty"` 2550 2551 // Reason: The reason for the cancellation. 2552 Reason string `json:"reason,omitempty"` 2553 2554 // ReasonText: The explanation of the reason. 2555 ReasonText string `json:"reasonText,omitempty"` 2556 2557 // ForceSendFields is a list of field names (e.g. "Amount") to 2558 // unconditionally include in API requests. By default, fields with 2559 // empty values are omitted from API requests. However, any non-pointer, 2560 // non-interface field appearing in ForceSendFields will be sent to the 2561 // server regardless of whether the field is empty or not. This may be 2562 // used to include empty fields in Patch requests. 2563 ForceSendFields []string `json:"-"` 2564 2565 // NullFields is a list of field names (e.g. "Amount") to include in API 2566 // requests with the JSON null value. By default, fields with empty 2567 // values are omitted from API requests. However, any field with an 2568 // empty value appearing in NullFields will be sent to the server as 2569 // null. It is an error if a field in this list has a non-empty value. 2570 // This may be used to include null fields in Patch requests. 2571 NullFields []string `json:"-"` 2572} 2573 2574func (s *OrdersCustomBatchRequestEntryCancelLineItem) MarshalJSON() ([]byte, error) { 2575 type NoMethod OrdersCustomBatchRequestEntryCancelLineItem 2576 raw := NoMethod(*s) 2577 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2578} 2579 2580type OrdersCustomBatchRequestEntryCreateTestReturnReturnItem struct { 2581 // LineItemId: The ID of the line item to return. 2582 LineItemId string `json:"lineItemId,omitempty"` 2583 2584 // Quantity: Quantity that is returned. 2585 Quantity int64 `json:"quantity,omitempty"` 2586 2587 // ForceSendFields is a list of field names (e.g. "LineItemId") to 2588 // unconditionally include in API requests. By default, fields with 2589 // empty values are omitted from API requests. However, any non-pointer, 2590 // non-interface field appearing in ForceSendFields will be sent to the 2591 // server regardless of whether the field is empty or not. This may be 2592 // used to include empty fields in Patch requests. 2593 ForceSendFields []string `json:"-"` 2594 2595 // NullFields is a list of field names (e.g. "LineItemId") to include in 2596 // API requests with the JSON null value. By default, fields with empty 2597 // values are omitted from API requests. However, any field with an 2598 // empty value appearing in NullFields will be sent to the server as 2599 // null. It is an error if a field in this list has a non-empty value. 2600 // This may be used to include null fields in Patch requests. 2601 NullFields []string `json:"-"` 2602} 2603 2604func (s *OrdersCustomBatchRequestEntryCreateTestReturnReturnItem) MarshalJSON() ([]byte, error) { 2605 type NoMethod OrdersCustomBatchRequestEntryCreateTestReturnReturnItem 2606 raw := NoMethod(*s) 2607 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2608} 2609 2610type OrdersCustomBatchRequestEntryInStoreRefundLineItem struct { 2611 // AmountPretax: The amount that is refunded. Required. 2612 AmountPretax *Price `json:"amountPretax,omitempty"` 2613 2614 // AmountTax: Tax amount that correspond to refund amount in 2615 // amountPretax. Required. 2616 AmountTax *Price `json:"amountTax,omitempty"` 2617 2618 // LineItemId: The ID of the line item to return. Either lineItemId or 2619 // productId is required. 2620 LineItemId string `json:"lineItemId,omitempty"` 2621 2622 // ProductId: The ID of the product to return. This is the REST ID used 2623 // in the products service. Either lineItemId or productId is required. 2624 ProductId string `json:"productId,omitempty"` 2625 2626 // Quantity: The quantity to return and refund. 2627 Quantity int64 `json:"quantity,omitempty"` 2628 2629 // Reason: The reason for the return. 2630 Reason string `json:"reason,omitempty"` 2631 2632 // ReasonText: The explanation of the reason. 2633 ReasonText string `json:"reasonText,omitempty"` 2634 2635 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 2636 // unconditionally include in API requests. By default, fields with 2637 // empty values are omitted from API requests. However, any non-pointer, 2638 // non-interface field appearing in ForceSendFields will be sent to the 2639 // server regardless of whether the field is empty or not. This may be 2640 // used to include empty fields in Patch requests. 2641 ForceSendFields []string `json:"-"` 2642 2643 // NullFields is a list of field names (e.g. "AmountPretax") to include 2644 // in API requests with the JSON null value. By default, fields with 2645 // empty values are omitted from API requests. However, any field with 2646 // an empty value appearing in NullFields will be sent to the server as 2647 // null. It is an error if a field in this list has a non-empty value. 2648 // This may be used to include null fields in Patch requests. 2649 NullFields []string `json:"-"` 2650} 2651 2652func (s *OrdersCustomBatchRequestEntryInStoreRefundLineItem) MarshalJSON() ([]byte, error) { 2653 type NoMethod OrdersCustomBatchRequestEntryInStoreRefundLineItem 2654 raw := NoMethod(*s) 2655 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2656} 2657 2658type OrdersCustomBatchRequestEntryRefund struct { 2659 // Amount: Deprecated. Please use amountPretax and amountTax instead. 2660 Amount *Price `json:"amount,omitempty"` 2661 2662 // AmountPretax: The amount that is refunded. Either amount or 2663 // amountPretax and amountTax should be filled. 2664 AmountPretax *Price `json:"amountPretax,omitempty"` 2665 2666 // AmountTax: Tax amount that correspond to refund amount in 2667 // amountPretax. 2668 AmountTax *Price `json:"amountTax,omitempty"` 2669 2670 // Reason: The reason for the refund. 2671 Reason string `json:"reason,omitempty"` 2672 2673 // ReasonText: The explanation of the reason. 2674 ReasonText string `json:"reasonText,omitempty"` 2675 2676 // ForceSendFields is a list of field names (e.g. "Amount") to 2677 // unconditionally include in API requests. By default, fields with 2678 // empty values are omitted from API requests. However, any non-pointer, 2679 // non-interface field appearing in ForceSendFields will be sent to the 2680 // server regardless of whether the field is empty or not. This may be 2681 // used to include empty fields in Patch requests. 2682 ForceSendFields []string `json:"-"` 2683 2684 // NullFields is a list of field names (e.g. "Amount") to include in API 2685 // requests with the JSON null value. By default, fields with empty 2686 // values are omitted from API requests. However, any field with an 2687 // empty value appearing in NullFields will be sent to the server as 2688 // null. It is an error if a field in this list has a non-empty value. 2689 // This may be used to include null fields in Patch requests. 2690 NullFields []string `json:"-"` 2691} 2692 2693func (s *OrdersCustomBatchRequestEntryRefund) MarshalJSON() ([]byte, error) { 2694 type NoMethod OrdersCustomBatchRequestEntryRefund 2695 raw := NoMethod(*s) 2696 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2697} 2698 2699type OrdersCustomBatchRequestEntryRejectReturnLineItem struct { 2700 // LineItemId: The ID of the line item to return. Either lineItemId or 2701 // productId is required. 2702 LineItemId string `json:"lineItemId,omitempty"` 2703 2704 // ProductId: The ID of the product to return. This is the REST ID used 2705 // in the products service. Either lineItemId or productId is required. 2706 ProductId string `json:"productId,omitempty"` 2707 2708 // Quantity: The quantity to return and refund. 2709 Quantity int64 `json:"quantity,omitempty"` 2710 2711 // Reason: The reason for the return. 2712 Reason string `json:"reason,omitempty"` 2713 2714 // ReasonText: The explanation of the reason. 2715 ReasonText string `json:"reasonText,omitempty"` 2716 2717 // ForceSendFields is a list of field names (e.g. "LineItemId") to 2718 // unconditionally include in API requests. By default, fields with 2719 // empty values are omitted from API requests. However, any non-pointer, 2720 // non-interface field appearing in ForceSendFields will be sent to the 2721 // server regardless of whether the field is empty or not. This may be 2722 // used to include empty fields in Patch requests. 2723 ForceSendFields []string `json:"-"` 2724 2725 // NullFields is a list of field names (e.g. "LineItemId") to include in 2726 // API requests with the JSON null value. By default, fields with empty 2727 // values are omitted from API requests. However, any field with an 2728 // empty value appearing in NullFields will be sent to the server as 2729 // null. It is an error if a field in this list has a non-empty value. 2730 // This may be used to include null fields in Patch requests. 2731 NullFields []string `json:"-"` 2732} 2733 2734func (s *OrdersCustomBatchRequestEntryRejectReturnLineItem) MarshalJSON() ([]byte, error) { 2735 type NoMethod OrdersCustomBatchRequestEntryRejectReturnLineItem 2736 raw := NoMethod(*s) 2737 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2738} 2739 2740type OrdersCustomBatchRequestEntryReturnLineItem struct { 2741 // LineItemId: The ID of the line item to return. Either lineItemId or 2742 // productId is required. 2743 LineItemId string `json:"lineItemId,omitempty"` 2744 2745 // ProductId: The ID of the product to return. This is the REST ID used 2746 // in the products service. Either lineItemId or productId is required. 2747 ProductId string `json:"productId,omitempty"` 2748 2749 // Quantity: The quantity to return. 2750 Quantity int64 `json:"quantity,omitempty"` 2751 2752 // Reason: The reason for the return. 2753 Reason string `json:"reason,omitempty"` 2754 2755 // ReasonText: The explanation of the reason. 2756 ReasonText string `json:"reasonText,omitempty"` 2757 2758 // ForceSendFields is a list of field names (e.g. "LineItemId") to 2759 // unconditionally include in API requests. By default, fields with 2760 // empty values are omitted from API requests. However, any non-pointer, 2761 // non-interface field appearing in ForceSendFields will be sent to the 2762 // server regardless of whether the field is empty or not. This may be 2763 // used to include empty fields in Patch requests. 2764 ForceSendFields []string `json:"-"` 2765 2766 // NullFields is a list of field names (e.g. "LineItemId") to include in 2767 // API requests with the JSON null value. By default, fields with empty 2768 // values are omitted from API requests. However, any field with an 2769 // empty value appearing in NullFields will be sent to the server as 2770 // null. It is an error if a field in this list has a non-empty value. 2771 // This may be used to include null fields in Patch requests. 2772 NullFields []string `json:"-"` 2773} 2774 2775func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, error) { 2776 type NoMethod OrdersCustomBatchRequestEntryReturnLineItem 2777 raw := NoMethod(*s) 2778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2779} 2780 2781type OrdersCustomBatchRequestEntryReturnRefundLineItem struct { 2782 // AmountPretax: The amount that is refunded. If omitted, refundless 2783 // return is assumed (same as calling returnLineItem method). Optional, 2784 // but if filled then both amountPretax and amountTax must be set. 2785 AmountPretax *Price `json:"amountPretax,omitempty"` 2786 2787 // AmountTax: Tax amount that correspond to refund amount in 2788 // amountPretax. 2789 AmountTax *Price `json:"amountTax,omitempty"` 2790 2791 // LineItemId: The ID of the line item to return. Either lineItemId or 2792 // productId is required. 2793 LineItemId string `json:"lineItemId,omitempty"` 2794 2795 // ProductId: The ID of the product to return. This is the REST ID used 2796 // in the products service. Either lineItemId or productId is required. 2797 ProductId string `json:"productId,omitempty"` 2798 2799 // Quantity: The quantity to return and refund. 2800 Quantity int64 `json:"quantity,omitempty"` 2801 2802 // Reason: The reason for the return. 2803 Reason string `json:"reason,omitempty"` 2804 2805 // ReasonText: The explanation of the reason. 2806 ReasonText string `json:"reasonText,omitempty"` 2807 2808 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 2809 // unconditionally include in API requests. By default, fields with 2810 // empty values are omitted from API requests. However, any non-pointer, 2811 // non-interface field appearing in ForceSendFields will be sent to the 2812 // server regardless of whether the field is empty or not. This may be 2813 // used to include empty fields in Patch requests. 2814 ForceSendFields []string `json:"-"` 2815 2816 // NullFields is a list of field names (e.g. "AmountPretax") to include 2817 // in API requests with the JSON null value. By default, fields with 2818 // empty values are omitted from API requests. However, any field with 2819 // an empty value appearing in NullFields will be sent to the server as 2820 // null. It is an error if a field in this list has a non-empty value. 2821 // This may be used to include null fields in Patch requests. 2822 NullFields []string `json:"-"` 2823} 2824 2825func (s *OrdersCustomBatchRequestEntryReturnRefundLineItem) MarshalJSON() ([]byte, error) { 2826 type NoMethod OrdersCustomBatchRequestEntryReturnRefundLineItem 2827 raw := NoMethod(*s) 2828 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2829} 2830 2831type OrdersCustomBatchRequestEntrySetLineItemMetadata struct { 2832 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 2833 2834 // LineItemId: The ID of the line item to set metadata. Either 2835 // lineItemId or productId is required. 2836 LineItemId string `json:"lineItemId,omitempty"` 2837 2838 // ProductId: The ID of the product to set metadata. This is the REST ID 2839 // used in the products service. Either lineItemId or productId is 2840 // required. 2841 ProductId string `json:"productId,omitempty"` 2842 2843 // ForceSendFields is a list of field names (e.g. "Annotations") to 2844 // unconditionally include in API requests. By default, fields with 2845 // empty values are omitted from API requests. However, any non-pointer, 2846 // non-interface field appearing in ForceSendFields will be sent to the 2847 // server regardless of whether the field is empty or not. This may be 2848 // used to include empty fields in Patch requests. 2849 ForceSendFields []string `json:"-"` 2850 2851 // NullFields is a list of field names (e.g. "Annotations") to include 2852 // in API requests with the JSON null value. By default, fields with 2853 // empty values are omitted from API requests. However, any field with 2854 // an empty value appearing in NullFields will be sent to the server as 2855 // null. It is an error if a field in this list has a non-empty value. 2856 // This may be used to include null fields in Patch requests. 2857 NullFields []string `json:"-"` 2858} 2859 2860func (s *OrdersCustomBatchRequestEntrySetLineItemMetadata) MarshalJSON() ([]byte, error) { 2861 type NoMethod OrdersCustomBatchRequestEntrySetLineItemMetadata 2862 raw := NoMethod(*s) 2863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2864} 2865 2866type OrdersCustomBatchRequestEntryShipLineItems struct { 2867 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 2868 // handling the shipment. See shipments[].carrier in the Orders 2869 // resource representation for a list of acceptable values. 2870 Carrier string `json:"carrier,omitempty"` 2871 2872 // LineItems: Line items to ship. 2873 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 2874 2875 // ShipmentGroupId: ID of the shipment group. Required for orders that 2876 // use the orderinvoices service. 2877 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 2878 2879 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 2880 // the shipment. 2881 ShipmentId string `json:"shipmentId,omitempty"` 2882 2883 // ShipmentInfos: Shipment information. This field is repeated because a 2884 // single line item can be shipped in several packages (and have several 2885 // tracking IDs). 2886 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 2887 2888 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 2889 // id for the shipment. 2890 TrackingId string `json:"trackingId,omitempty"` 2891 2892 // ForceSendFields is a list of field names (e.g. "Carrier") to 2893 // unconditionally include in API requests. By default, fields with 2894 // empty values are omitted from API requests. However, any non-pointer, 2895 // non-interface field appearing in ForceSendFields will be sent to the 2896 // server regardless of whether the field is empty or not. This may be 2897 // used to include empty fields in Patch requests. 2898 ForceSendFields []string `json:"-"` 2899 2900 // NullFields is a list of field names (e.g. "Carrier") to include in 2901 // API requests with the JSON null value. By default, fields with empty 2902 // values are omitted from API requests. However, any field with an 2903 // empty value appearing in NullFields will be sent to the server as 2904 // null. It is an error if a field in this list has a non-empty value. 2905 // This may be used to include null fields in Patch requests. 2906 NullFields []string `json:"-"` 2907} 2908 2909func (s *OrdersCustomBatchRequestEntryShipLineItems) MarshalJSON() ([]byte, error) { 2910 type NoMethod OrdersCustomBatchRequestEntryShipLineItems 2911 raw := NoMethod(*s) 2912 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2913} 2914 2915type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct { 2916 // Carrier: The carrier handling the shipment. See shipments[].carrier 2917 // in the Orders resource representation for a list of acceptable 2918 // values. 2919 Carrier string `json:"carrier,omitempty"` 2920 2921 // ShipmentId: The ID of the shipment. 2922 ShipmentId string `json:"shipmentId,omitempty"` 2923 2924 // TrackingId: The tracking id for the shipment. 2925 TrackingId string `json:"trackingId,omitempty"` 2926 2927 // ForceSendFields is a list of field names (e.g. "Carrier") to 2928 // unconditionally include in API requests. By default, fields with 2929 // empty values are omitted from API requests. However, any non-pointer, 2930 // non-interface field appearing in ForceSendFields will be sent to the 2931 // server regardless of whether the field is empty or not. This may be 2932 // used to include empty fields in Patch requests. 2933 ForceSendFields []string `json:"-"` 2934 2935 // NullFields is a list of field names (e.g. "Carrier") to include in 2936 // API requests with the JSON null value. By default, fields with empty 2937 // values are omitted from API requests. However, any field with an 2938 // empty value appearing in NullFields will be sent to the server as 2939 // null. It is an error if a field in this list has a non-empty value. 2940 // This may be used to include null fields in Patch requests. 2941 NullFields []string `json:"-"` 2942} 2943 2944func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) { 2945 type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo 2946 raw := NoMethod(*s) 2947 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2948} 2949 2950type OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails struct { 2951 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 2952 // specified only ship by date is updated. 2953 DeliverByDate string `json:"deliverByDate,omitempty"` 2954 2955 // LineItemId: The ID of the line item to set metadata. Either 2956 // lineItemId or productId is required. 2957 LineItemId string `json:"lineItemId,omitempty"` 2958 2959 // ProductId: The ID of the product to set metadata. This is the REST ID 2960 // used in the products service. Either lineItemId or productId is 2961 // required. 2962 ProductId string `json:"productId,omitempty"` 2963 2964 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 2965 // specified only deliver by date is updated. 2966 ShipByDate string `json:"shipByDate,omitempty"` 2967 2968 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 2969 // unconditionally include in API requests. By default, fields with 2970 // empty values are omitted from API requests. However, any non-pointer, 2971 // non-interface field appearing in ForceSendFields will be sent to the 2972 // server regardless of whether the field is empty or not. This may be 2973 // used to include empty fields in Patch requests. 2974 ForceSendFields []string `json:"-"` 2975 2976 // NullFields is a list of field names (e.g. "DeliverByDate") to include 2977 // in API requests with the JSON null value. By default, fields with 2978 // empty values are omitted from API requests. However, any field with 2979 // an empty value appearing in NullFields will be sent to the server as 2980 // null. It is an error if a field in this list has a non-empty value. 2981 // This may be used to include null fields in Patch requests. 2982 NullFields []string `json:"-"` 2983} 2984 2985func (s *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails) MarshalJSON() ([]byte, error) { 2986 type NoMethod OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails 2987 raw := NoMethod(*s) 2988 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2989} 2990 2991type OrdersCustomBatchRequestEntryUpdateShipment struct { 2992 // Carrier: The carrier handling the shipment. Not updated if missing. 2993 // See shipments[].carrier in the Orders resource representation for a 2994 // list of acceptable values. 2995 Carrier string `json:"carrier,omitempty"` 2996 2997 // DeliveryDate: Date on which the shipment has been delivered, in ISO 2998 // 8601 format. Optional and can be provided only if status is 2999 // delivered. 3000 DeliveryDate string `json:"deliveryDate,omitempty"` 3001 3002 // ShipmentId: The ID of the shipment. 3003 ShipmentId string `json:"shipmentId,omitempty"` 3004 3005 // Status: New status for the shipment. Not updated if missing. 3006 Status string `json:"status,omitempty"` 3007 3008 // TrackingId: The tracking id for the shipment. Not updated if missing. 3009 TrackingId string `json:"trackingId,omitempty"` 3010 3011 // ForceSendFields is a list of field names (e.g. "Carrier") to 3012 // unconditionally include in API requests. By default, fields with 3013 // empty values are omitted from API requests. However, any non-pointer, 3014 // non-interface field appearing in ForceSendFields will be sent to the 3015 // server regardless of whether the field is empty or not. This may be 3016 // used to include empty fields in Patch requests. 3017 ForceSendFields []string `json:"-"` 3018 3019 // NullFields is a list of field names (e.g. "Carrier") to include in 3020 // API requests with the JSON null value. By default, fields with empty 3021 // values are omitted from API requests. However, any field with an 3022 // empty value appearing in NullFields will be sent to the server as 3023 // null. It is an error if a field in this list has a non-empty value. 3024 // This may be used to include null fields in Patch requests. 3025 NullFields []string `json:"-"` 3026} 3027 3028func (s *OrdersCustomBatchRequestEntryUpdateShipment) MarshalJSON() ([]byte, error) { 3029 type NoMethod OrdersCustomBatchRequestEntryUpdateShipment 3030 raw := NoMethod(*s) 3031 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3032} 3033 3034type OrdersCustomBatchResponse struct { 3035 // Entries: The result of the execution of the batch requests. 3036 Entries []*OrdersCustomBatchResponseEntry `json:"entries,omitempty"` 3037 3038 // Kind: Identifies what kind of resource this is. Value: the fixed 3039 // string "content#ordersCustomBatchResponse". 3040 Kind string `json:"kind,omitempty"` 3041 3042 // ServerResponse contains the HTTP response code and headers from the 3043 // server. 3044 googleapi.ServerResponse `json:"-"` 3045 3046 // ForceSendFields is a list of field names (e.g. "Entries") to 3047 // unconditionally include in API requests. By default, fields with 3048 // empty values are omitted from API requests. However, any non-pointer, 3049 // non-interface field appearing in ForceSendFields will be sent to the 3050 // server regardless of whether the field is empty or not. This may be 3051 // used to include empty fields in Patch requests. 3052 ForceSendFields []string `json:"-"` 3053 3054 // NullFields is a list of field names (e.g. "Entries") to include in 3055 // API requests with the JSON null value. By default, fields with empty 3056 // values are omitted from API requests. However, any field with an 3057 // empty value appearing in NullFields will be sent to the server as 3058 // null. It is an error if a field in this list has a non-empty value. 3059 // This may be used to include null fields in Patch requests. 3060 NullFields []string `json:"-"` 3061} 3062 3063func (s *OrdersCustomBatchResponse) MarshalJSON() ([]byte, error) { 3064 type NoMethod OrdersCustomBatchResponse 3065 raw := NoMethod(*s) 3066 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3067} 3068 3069type OrdersCustomBatchResponseEntry struct { 3070 // BatchId: The ID of the request entry this entry responds to. 3071 BatchId int64 `json:"batchId,omitempty"` 3072 3073 // Errors: A list of errors defined if and only if the request failed. 3074 Errors *Errors `json:"errors,omitempty"` 3075 3076 // ExecutionStatus: The status of the execution. Only defined if 3077 // - the request was successful; and 3078 // - the method is not get, getByMerchantOrderId, or one of the test 3079 // methods. 3080 ExecutionStatus string `json:"executionStatus,omitempty"` 3081 3082 // Kind: Identifies what kind of resource this is. Value: the fixed 3083 // string "content#ordersCustomBatchResponseEntry". 3084 Kind string `json:"kind,omitempty"` 3085 3086 // Order: The retrieved order. Only defined if the method is get and if 3087 // the request was successful. 3088 Order *Order `json:"order,omitempty"` 3089 3090 // ForceSendFields is a list of field names (e.g. "BatchId") to 3091 // unconditionally include in API requests. By default, fields with 3092 // empty values are omitted from API requests. However, any non-pointer, 3093 // non-interface field appearing in ForceSendFields will be sent to the 3094 // server regardless of whether the field is empty or not. This may be 3095 // used to include empty fields in Patch requests. 3096 ForceSendFields []string `json:"-"` 3097 3098 // NullFields is a list of field names (e.g. "BatchId") to include in 3099 // API requests with the JSON null value. By default, fields with empty 3100 // values are omitted from API requests. However, any field with an 3101 // empty value appearing in NullFields will be sent to the server as 3102 // null. It is an error if a field in this list has a non-empty value. 3103 // This may be used to include null fields in Patch requests. 3104 NullFields []string `json:"-"` 3105} 3106 3107func (s *OrdersCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { 3108 type NoMethod OrdersCustomBatchResponseEntry 3109 raw := NoMethod(*s) 3110 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3111} 3112 3113type OrdersGetByMerchantOrderIdResponse struct { 3114 // Kind: Identifies what kind of resource this is. Value: the fixed 3115 // string "content#ordersGetByMerchantOrderIdResponse". 3116 Kind string `json:"kind,omitempty"` 3117 3118 // Order: The requested order. 3119 Order *Order `json:"order,omitempty"` 3120 3121 // ServerResponse contains the HTTP response code and headers from the 3122 // server. 3123 googleapi.ServerResponse `json:"-"` 3124 3125 // ForceSendFields is a list of field names (e.g. "Kind") to 3126 // unconditionally include in API requests. By default, fields with 3127 // empty values are omitted from API requests. However, any non-pointer, 3128 // non-interface field appearing in ForceSendFields will be sent to the 3129 // server regardless of whether the field is empty or not. This may be 3130 // used to include empty fields in Patch requests. 3131 ForceSendFields []string `json:"-"` 3132 3133 // NullFields is a list of field names (e.g. "Kind") to include in API 3134 // requests with the JSON null value. By default, fields with empty 3135 // values are omitted from API requests. However, any field with an 3136 // empty value appearing in NullFields will be sent to the server as 3137 // null. It is an error if a field in this list has a non-empty value. 3138 // This may be used to include null fields in Patch requests. 3139 NullFields []string `json:"-"` 3140} 3141 3142func (s *OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 3143 type NoMethod OrdersGetByMerchantOrderIdResponse 3144 raw := NoMethod(*s) 3145 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3146} 3147 3148type OrdersGetTestOrderTemplateResponse struct { 3149 // Kind: Identifies what kind of resource this is. Value: the fixed 3150 // string "content#ordersGetTestOrderTemplateResponse". 3151 Kind string `json:"kind,omitempty"` 3152 3153 // Template: The requested test order template. 3154 Template *TestOrder `json:"template,omitempty"` 3155 3156 // ServerResponse contains the HTTP response code and headers from the 3157 // server. 3158 googleapi.ServerResponse `json:"-"` 3159 3160 // ForceSendFields is a list of field names (e.g. "Kind") to 3161 // unconditionally include in API requests. By default, fields with 3162 // empty values are omitted from API requests. However, any non-pointer, 3163 // non-interface field appearing in ForceSendFields will be sent to the 3164 // server regardless of whether the field is empty or not. This may be 3165 // used to include empty fields in Patch requests. 3166 ForceSendFields []string `json:"-"` 3167 3168 // NullFields is a list of field names (e.g. "Kind") to include in API 3169 // requests with the JSON null value. By default, fields with empty 3170 // values are omitted from API requests. However, any field with an 3171 // empty value appearing in NullFields will be sent to the server as 3172 // null. It is an error if a field in this list has a non-empty value. 3173 // This may be used to include null fields in Patch requests. 3174 NullFields []string `json:"-"` 3175} 3176 3177func (s *OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) { 3178 type NoMethod OrdersGetTestOrderTemplateResponse 3179 raw := NoMethod(*s) 3180 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3181} 3182 3183type OrdersInStoreRefundLineItemRequest struct { 3184 // AmountPretax: The amount that is refunded. Required. 3185 AmountPretax *Price `json:"amountPretax,omitempty"` 3186 3187 // AmountTax: Tax amount that correspond to refund amount in 3188 // amountPretax. Required. 3189 AmountTax *Price `json:"amountTax,omitempty"` 3190 3191 // LineItemId: The ID of the line item to return. Either lineItemId or 3192 // productId is required. 3193 LineItemId string `json:"lineItemId,omitempty"` 3194 3195 // OperationId: The ID of the operation. Unique across all operations 3196 // for a given order. 3197 OperationId string `json:"operationId,omitempty"` 3198 3199 // ProductId: The ID of the product to return. This is the REST ID used 3200 // in the products service. Either lineItemId or productId is required. 3201 ProductId string `json:"productId,omitempty"` 3202 3203 // Quantity: The quantity to return and refund. 3204 Quantity int64 `json:"quantity,omitempty"` 3205 3206 // Reason: The reason for the return. 3207 Reason string `json:"reason,omitempty"` 3208 3209 // ReasonText: The explanation of the reason. 3210 ReasonText string `json:"reasonText,omitempty"` 3211 3212 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 3213 // unconditionally include in API requests. By default, fields with 3214 // empty values are omitted from API requests. However, any non-pointer, 3215 // non-interface field appearing in ForceSendFields will be sent to the 3216 // server regardless of whether the field is empty or not. This may be 3217 // used to include empty fields in Patch requests. 3218 ForceSendFields []string `json:"-"` 3219 3220 // NullFields is a list of field names (e.g. "AmountPretax") to include 3221 // in API requests with the JSON null value. By default, fields with 3222 // empty values are omitted from API requests. However, any field with 3223 // an empty value appearing in NullFields will be sent to the server as 3224 // null. It is an error if a field in this list has a non-empty value. 3225 // This may be used to include null fields in Patch requests. 3226 NullFields []string `json:"-"` 3227} 3228 3229func (s *OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) { 3230 type NoMethod OrdersInStoreRefundLineItemRequest 3231 raw := NoMethod(*s) 3232 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3233} 3234 3235type OrdersInStoreRefundLineItemResponse struct { 3236 // ExecutionStatus: The status of the execution. 3237 ExecutionStatus string `json:"executionStatus,omitempty"` 3238 3239 // Kind: Identifies what kind of resource this is. Value: the fixed 3240 // string "content#ordersInStoreRefundLineItemResponse". 3241 Kind string `json:"kind,omitempty"` 3242 3243 // ServerResponse contains the HTTP response code and headers from the 3244 // server. 3245 googleapi.ServerResponse `json:"-"` 3246 3247 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 3248 // unconditionally include in API requests. By default, fields with 3249 // empty values are omitted from API requests. However, any non-pointer, 3250 // non-interface field appearing in ForceSendFields will be sent to the 3251 // server regardless of whether the field is empty or not. This may be 3252 // used to include empty fields in Patch requests. 3253 ForceSendFields []string `json:"-"` 3254 3255 // NullFields is a list of field names (e.g. "ExecutionStatus") to 3256 // include in API requests with the JSON null value. By default, fields 3257 // with empty values are omitted from API requests. However, any field 3258 // with an empty value appearing in NullFields will be sent to the 3259 // server as null. It is an error if a field in this list has a 3260 // non-empty value. This may be used to include null fields in Patch 3261 // requests. 3262 NullFields []string `json:"-"` 3263} 3264 3265func (s *OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) { 3266 type NoMethod OrdersInStoreRefundLineItemResponse 3267 raw := NoMethod(*s) 3268 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3269} 3270 3271type OrdersListResponse struct { 3272 // Kind: Identifies what kind of resource this is. Value: the fixed 3273 // string "content#ordersListResponse". 3274 Kind string `json:"kind,omitempty"` 3275 3276 // NextPageToken: The token for the retrieval of the next page of 3277 // orders. 3278 NextPageToken string `json:"nextPageToken,omitempty"` 3279 3280 Resources []*Order `json:"resources,omitempty"` 3281 3282 // ServerResponse contains the HTTP response code and headers from the 3283 // server. 3284 googleapi.ServerResponse `json:"-"` 3285 3286 // ForceSendFields is a list of field names (e.g. "Kind") to 3287 // unconditionally include in API requests. By default, fields with 3288 // empty values are omitted from API requests. However, any non-pointer, 3289 // non-interface field appearing in ForceSendFields will be sent to the 3290 // server regardless of whether the field is empty or not. This may be 3291 // used to include empty fields in Patch requests. 3292 ForceSendFields []string `json:"-"` 3293 3294 // NullFields is a list of field names (e.g. "Kind") to include in API 3295 // requests with the JSON null value. By default, fields with empty 3296 // values are omitted from API requests. However, any field with an 3297 // empty value appearing in NullFields will be sent to the server as 3298 // null. It is an error if a field in this list has a non-empty value. 3299 // This may be used to include null fields in Patch requests. 3300 NullFields []string `json:"-"` 3301} 3302 3303func (s *OrdersListResponse) MarshalJSON() ([]byte, error) { 3304 type NoMethod OrdersListResponse 3305 raw := NoMethod(*s) 3306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3307} 3308 3309type OrdersRefundRequest struct { 3310 // Amount: Deprecated. Please use amountPretax and amountTax instead. 3311 Amount *Price `json:"amount,omitempty"` 3312 3313 // AmountPretax: The amount that is refunded. Either amount or 3314 // amountPretax and amountTax should be filled. 3315 AmountPretax *Price `json:"amountPretax,omitempty"` 3316 3317 // AmountTax: Tax amount that correspond to refund amount in 3318 // amountPretax. 3319 AmountTax *Price `json:"amountTax,omitempty"` 3320 3321 // OperationId: The ID of the operation. Unique across all operations 3322 // for a given order. 3323 OperationId string `json:"operationId,omitempty"` 3324 3325 // Reason: The reason for the refund. 3326 Reason string `json:"reason,omitempty"` 3327 3328 // ReasonText: The explanation of the reason. 3329 ReasonText string `json:"reasonText,omitempty"` 3330 3331 // ForceSendFields is a list of field names (e.g. "Amount") to 3332 // unconditionally include in API requests. By default, fields with 3333 // empty values are omitted from API requests. However, any non-pointer, 3334 // non-interface field appearing in ForceSendFields will be sent to the 3335 // server regardless of whether the field is empty or not. This may be 3336 // used to include empty fields in Patch requests. 3337 ForceSendFields []string `json:"-"` 3338 3339 // NullFields is a list of field names (e.g. "Amount") to include in API 3340 // requests with the JSON null value. By default, fields with empty 3341 // values are omitted from API requests. However, any field with an 3342 // empty value appearing in NullFields will be sent to the server as 3343 // null. It is an error if a field in this list has a non-empty value. 3344 // This may be used to include null fields in Patch requests. 3345 NullFields []string `json:"-"` 3346} 3347 3348func (s *OrdersRefundRequest) MarshalJSON() ([]byte, error) { 3349 type NoMethod OrdersRefundRequest 3350 raw := NoMethod(*s) 3351 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3352} 3353 3354type OrdersRefundResponse struct { 3355 // ExecutionStatus: The status of the execution. 3356 ExecutionStatus string `json:"executionStatus,omitempty"` 3357 3358 // Kind: Identifies what kind of resource this is. Value: the fixed 3359 // string "content#ordersRefundResponse". 3360 Kind string `json:"kind,omitempty"` 3361 3362 // ServerResponse contains the HTTP response code and headers from the 3363 // server. 3364 googleapi.ServerResponse `json:"-"` 3365 3366 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 3367 // unconditionally include in API requests. By default, fields with 3368 // empty values are omitted from API requests. However, any non-pointer, 3369 // non-interface field appearing in ForceSendFields will be sent to the 3370 // server regardless of whether the field is empty or not. This may be 3371 // used to include empty fields in Patch requests. 3372 ForceSendFields []string `json:"-"` 3373 3374 // NullFields is a list of field names (e.g. "ExecutionStatus") to 3375 // include in API requests with the JSON null value. By default, fields 3376 // with empty values are omitted from API requests. However, any field 3377 // with an empty value appearing in NullFields will be sent to the 3378 // server as null. It is an error if a field in this list has a 3379 // non-empty value. This may be used to include null fields in Patch 3380 // requests. 3381 NullFields []string `json:"-"` 3382} 3383 3384func (s *OrdersRefundResponse) MarshalJSON() ([]byte, error) { 3385 type NoMethod OrdersRefundResponse 3386 raw := NoMethod(*s) 3387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3388} 3389 3390type OrdersRejectReturnLineItemRequest struct { 3391 // LineItemId: The ID of the line item to return. Either lineItemId or 3392 // productId is required. 3393 LineItemId string `json:"lineItemId,omitempty"` 3394 3395 // OperationId: The ID of the operation. Unique across all operations 3396 // for a given order. 3397 OperationId string `json:"operationId,omitempty"` 3398 3399 // ProductId: The ID of the product to return. This is the REST ID used 3400 // in the products service. Either lineItemId or productId is required. 3401 ProductId string `json:"productId,omitempty"` 3402 3403 // Quantity: The quantity to return and refund. 3404 Quantity int64 `json:"quantity,omitempty"` 3405 3406 // Reason: The reason for the return. 3407 Reason string `json:"reason,omitempty"` 3408 3409 // ReasonText: The explanation of the reason. 3410 ReasonText string `json:"reasonText,omitempty"` 3411 3412 // ForceSendFields is a list of field names (e.g. "LineItemId") to 3413 // unconditionally include in API requests. By default, fields with 3414 // empty values are omitted from API requests. However, any non-pointer, 3415 // non-interface field appearing in ForceSendFields will be sent to the 3416 // server regardless of whether the field is empty or not. This may be 3417 // used to include empty fields in Patch requests. 3418 ForceSendFields []string `json:"-"` 3419 3420 // NullFields is a list of field names (e.g. "LineItemId") to include in 3421 // API requests with the JSON null value. By default, fields with empty 3422 // values are omitted from API requests. However, any field with an 3423 // empty value appearing in NullFields will be sent to the server as 3424 // null. It is an error if a field in this list has a non-empty value. 3425 // This may be used to include null fields in Patch requests. 3426 NullFields []string `json:"-"` 3427} 3428 3429func (s *OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) { 3430 type NoMethod OrdersRejectReturnLineItemRequest 3431 raw := NoMethod(*s) 3432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3433} 3434 3435type OrdersRejectReturnLineItemResponse struct { 3436 // ExecutionStatus: The status of the execution. 3437 ExecutionStatus string `json:"executionStatus,omitempty"` 3438 3439 // Kind: Identifies what kind of resource this is. Value: the fixed 3440 // string "content#ordersRejectReturnLineItemResponse". 3441 Kind string `json:"kind,omitempty"` 3442 3443 // ServerResponse contains the HTTP response code and headers from the 3444 // server. 3445 googleapi.ServerResponse `json:"-"` 3446 3447 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 3448 // unconditionally include in API requests. By default, fields with 3449 // empty values are omitted from API requests. However, any non-pointer, 3450 // non-interface field appearing in ForceSendFields will be sent to the 3451 // server regardless of whether the field is empty or not. This may be 3452 // used to include empty fields in Patch requests. 3453 ForceSendFields []string `json:"-"` 3454 3455 // NullFields is a list of field names (e.g. "ExecutionStatus") to 3456 // include in API requests with the JSON null value. By default, fields 3457 // with empty values are omitted from API requests. However, any field 3458 // with an empty value appearing in NullFields will be sent to the 3459 // server as null. It is an error if a field in this list has a 3460 // non-empty value. This may be used to include null fields in Patch 3461 // requests. 3462 NullFields []string `json:"-"` 3463} 3464 3465func (s *OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) { 3466 type NoMethod OrdersRejectReturnLineItemResponse 3467 raw := NoMethod(*s) 3468 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3469} 3470 3471type OrdersReturnLineItemRequest struct { 3472 // LineItemId: The ID of the line item to return. Either lineItemId or 3473 // productId is required. 3474 LineItemId string `json:"lineItemId,omitempty"` 3475 3476 // OperationId: The ID of the operation. Unique across all operations 3477 // for a given order. 3478 OperationId string `json:"operationId,omitempty"` 3479 3480 // ProductId: The ID of the product to return. This is the REST ID used 3481 // in the products service. Either lineItemId or productId is required. 3482 ProductId string `json:"productId,omitempty"` 3483 3484 // Quantity: The quantity to return. 3485 Quantity int64 `json:"quantity,omitempty"` 3486 3487 // Reason: The reason for the return. 3488 Reason string `json:"reason,omitempty"` 3489 3490 // ReasonText: The explanation of the reason. 3491 ReasonText string `json:"reasonText,omitempty"` 3492 3493 // ForceSendFields is a list of field names (e.g. "LineItemId") to 3494 // unconditionally include in API requests. By default, fields with 3495 // empty values are omitted from API requests. However, any non-pointer, 3496 // non-interface field appearing in ForceSendFields will be sent to the 3497 // server regardless of whether the field is empty or not. This may be 3498 // used to include empty fields in Patch requests. 3499 ForceSendFields []string `json:"-"` 3500 3501 // NullFields is a list of field names (e.g. "LineItemId") to include in 3502 // API requests with the JSON null value. By default, fields with empty 3503 // values are omitted from API requests. However, any field with an 3504 // empty value appearing in NullFields will be sent to the server as 3505 // null. It is an error if a field in this list has a non-empty value. 3506 // This may be used to include null fields in Patch requests. 3507 NullFields []string `json:"-"` 3508} 3509 3510func (s *OrdersReturnLineItemRequest) MarshalJSON() ([]byte, error) { 3511 type NoMethod OrdersReturnLineItemRequest 3512 raw := NoMethod(*s) 3513 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3514} 3515 3516type OrdersReturnLineItemResponse struct { 3517 // ExecutionStatus: The status of the execution. 3518 ExecutionStatus string `json:"executionStatus,omitempty"` 3519 3520 // Kind: Identifies what kind of resource this is. Value: the fixed 3521 // string "content#ordersReturnLineItemResponse". 3522 Kind string `json:"kind,omitempty"` 3523 3524 // ServerResponse contains the HTTP response code and headers from the 3525 // server. 3526 googleapi.ServerResponse `json:"-"` 3527 3528 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 3529 // unconditionally include in API requests. By default, fields with 3530 // empty values are omitted from API requests. However, any non-pointer, 3531 // non-interface field appearing in ForceSendFields will be sent to the 3532 // server regardless of whether the field is empty or not. This may be 3533 // used to include empty fields in Patch requests. 3534 ForceSendFields []string `json:"-"` 3535 3536 // NullFields is a list of field names (e.g. "ExecutionStatus") to 3537 // include in API requests with the JSON null value. By default, fields 3538 // with empty values are omitted from API requests. However, any field 3539 // with an empty value appearing in NullFields will be sent to the 3540 // server as null. It is an error if a field in this list has a 3541 // non-empty value. This may be used to include null fields in Patch 3542 // requests. 3543 NullFields []string `json:"-"` 3544} 3545 3546func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) { 3547 type NoMethod OrdersReturnLineItemResponse 3548 raw := NoMethod(*s) 3549 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3550} 3551 3552type OrdersReturnRefundLineItemRequest struct { 3553 // AmountPretax: The amount that is refunded. If omitted, refundless 3554 // return is assumed (same as calling returnLineItem method). Optional, 3555 // but if filled then both amountPretax and amountTax must be set. 3556 AmountPretax *Price `json:"amountPretax,omitempty"` 3557 3558 // AmountTax: Tax amount that correspond to refund amount in 3559 // amountPretax. 3560 AmountTax *Price `json:"amountTax,omitempty"` 3561 3562 // LineItemId: The ID of the line item to return. Either lineItemId or 3563 // productId is required. 3564 LineItemId string `json:"lineItemId,omitempty"` 3565 3566 // OperationId: The ID of the operation. Unique across all operations 3567 // for a given order. 3568 OperationId string `json:"operationId,omitempty"` 3569 3570 // ProductId: The ID of the product to return. This is the REST ID used 3571 // in the products service. Either lineItemId or productId is required. 3572 ProductId string `json:"productId,omitempty"` 3573 3574 // Quantity: The quantity to return and refund. 3575 Quantity int64 `json:"quantity,omitempty"` 3576 3577 // Reason: The reason for the return. 3578 Reason string `json:"reason,omitempty"` 3579 3580 // ReasonText: The explanation of the reason. 3581 ReasonText string `json:"reasonText,omitempty"` 3582 3583 // ForceSendFields is a list of field names (e.g. "AmountPretax") to 3584 // unconditionally include in API requests. By default, fields with 3585 // empty values are omitted from API requests. However, any non-pointer, 3586 // non-interface field appearing in ForceSendFields will be sent to the 3587 // server regardless of whether the field is empty or not. This may be 3588 // used to include empty fields in Patch requests. 3589 ForceSendFields []string `json:"-"` 3590 3591 // NullFields is a list of field names (e.g. "AmountPretax") to include 3592 // in API requests with the JSON null value. By default, fields with 3593 // empty values are omitted from API requests. However, any field with 3594 // an empty value appearing in NullFields will be sent to the server as 3595 // null. It is an error if a field in this list has a non-empty value. 3596 // This may be used to include null fields in Patch requests. 3597 NullFields []string `json:"-"` 3598} 3599 3600func (s *OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) { 3601 type NoMethod OrdersReturnRefundLineItemRequest 3602 raw := NoMethod(*s) 3603 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3604} 3605 3606type OrdersReturnRefundLineItemResponse struct { 3607 // ExecutionStatus: The status of the execution. 3608 ExecutionStatus string `json:"executionStatus,omitempty"` 3609 3610 // Kind: Identifies what kind of resource this is. Value: the fixed 3611 // string "content#ordersReturnRefundLineItemResponse". 3612 Kind string `json:"kind,omitempty"` 3613 3614 // ServerResponse contains the HTTP response code and headers from the 3615 // server. 3616 googleapi.ServerResponse `json:"-"` 3617 3618 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 3619 // unconditionally include in API requests. By default, fields with 3620 // empty values are omitted from API requests. However, any non-pointer, 3621 // non-interface field appearing in ForceSendFields will be sent to the 3622 // server regardless of whether the field is empty or not. This may be 3623 // used to include empty fields in Patch requests. 3624 ForceSendFields []string `json:"-"` 3625 3626 // NullFields is a list of field names (e.g. "ExecutionStatus") to 3627 // include in API requests with the JSON null value. By default, fields 3628 // with empty values are omitted from API requests. However, any field 3629 // with an empty value appearing in NullFields will be sent to the 3630 // server as null. It is an error if a field in this list has a 3631 // non-empty value. This may be used to include null fields in Patch 3632 // requests. 3633 NullFields []string `json:"-"` 3634} 3635 3636func (s *OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) { 3637 type NoMethod OrdersReturnRefundLineItemResponse 3638 raw := NoMethod(*s) 3639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3640} 3641 3642type OrdersSetLineItemMetadataRequest struct { 3643 Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` 3644 3645 // LineItemId: The ID of the line item to set metadata. Either 3646 // lineItemId or productId is required. 3647 LineItemId string `json:"lineItemId,omitempty"` 3648 3649 // OperationId: The ID of the operation. Unique across all operations 3650 // for a given order. 3651 OperationId string `json:"operationId,omitempty"` 3652 3653 // ProductId: The ID of the product to set metadata. This is the REST ID 3654 // used in the products service. Either lineItemId or productId is 3655 // required. 3656 ProductId string `json:"productId,omitempty"` 3657 3658 // ForceSendFields is a list of field names (e.g. "Annotations") to 3659 // unconditionally include in API requests. By default, fields with 3660 // empty values are omitted from API requests. However, any non-pointer, 3661 // non-interface field appearing in ForceSendFields will be sent to the 3662 // server regardless of whether the field is empty or not. This may be 3663 // used to include empty fields in Patch requests. 3664 ForceSendFields []string `json:"-"` 3665 3666 // NullFields is a list of field names (e.g. "Annotations") to include 3667 // in API requests with the JSON null value. By default, fields with 3668 // empty values are omitted from API requests. However, any field with 3669 // an empty value appearing in NullFields will be sent to the server as 3670 // null. It is an error if a field in this list has a non-empty value. 3671 // This may be used to include null fields in Patch requests. 3672 NullFields []string `json:"-"` 3673} 3674 3675func (s *OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) { 3676 type NoMethod OrdersSetLineItemMetadataRequest 3677 raw := NoMethod(*s) 3678 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3679} 3680 3681type OrdersSetLineItemMetadataResponse struct { 3682 // ExecutionStatus: The status of the execution. 3683 ExecutionStatus string `json:"executionStatus,omitempty"` 3684 3685 // Kind: Identifies what kind of resource this is. Value: the fixed 3686 // string "content#ordersSetLineItemMetadataResponse". 3687 Kind string `json:"kind,omitempty"` 3688 3689 // ServerResponse contains the HTTP response code and headers from the 3690 // server. 3691 googleapi.ServerResponse `json:"-"` 3692 3693 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 3694 // unconditionally include in API requests. By default, fields with 3695 // empty values are omitted from API requests. However, any non-pointer, 3696 // non-interface field appearing in ForceSendFields will be sent to the 3697 // server regardless of whether the field is empty or not. This may be 3698 // used to include empty fields in Patch requests. 3699 ForceSendFields []string `json:"-"` 3700 3701 // NullFields is a list of field names (e.g. "ExecutionStatus") to 3702 // include in API requests with the JSON null value. By default, fields 3703 // with empty values are omitted from API requests. However, any field 3704 // with an empty value appearing in NullFields will be sent to the 3705 // server as null. It is an error if a field in this list has a 3706 // non-empty value. This may be used to include null fields in Patch 3707 // requests. 3708 NullFields []string `json:"-"` 3709} 3710 3711func (s *OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) { 3712 type NoMethod OrdersSetLineItemMetadataResponse 3713 raw := NoMethod(*s) 3714 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3715} 3716 3717type OrdersShipLineItemsRequest struct { 3718 // Carrier: Deprecated. Please use shipmentInfo instead. The carrier 3719 // handling the shipment. See shipments[].carrier in the Orders 3720 // resource representation for a list of acceptable values. 3721 Carrier string `json:"carrier,omitempty"` 3722 3723 // LineItems: Line items to ship. 3724 LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` 3725 3726 // OperationId: The ID of the operation. Unique across all operations 3727 // for a given order. 3728 OperationId string `json:"operationId,omitempty"` 3729 3730 // ShipmentGroupId: ID of the shipment group. Required for orders that 3731 // use the orderinvoices service. 3732 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 3733 3734 // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of 3735 // the shipment. 3736 ShipmentId string `json:"shipmentId,omitempty"` 3737 3738 // ShipmentInfos: Shipment information. This field is repeated because a 3739 // single line item can be shipped in several packages (and have several 3740 // tracking IDs). 3741 ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` 3742 3743 // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking 3744 // id for the shipment. 3745 TrackingId string `json:"trackingId,omitempty"` 3746 3747 // ForceSendFields is a list of field names (e.g. "Carrier") to 3748 // unconditionally include in API requests. By default, fields with 3749 // empty values are omitted from API requests. However, any non-pointer, 3750 // non-interface field appearing in ForceSendFields will be sent to the 3751 // server regardless of whether the field is empty or not. This may be 3752 // used to include empty fields in Patch requests. 3753 ForceSendFields []string `json:"-"` 3754 3755 // NullFields is a list of field names (e.g. "Carrier") to include in 3756 // API requests with the JSON null value. By default, fields with empty 3757 // values are omitted from API requests. However, any field with an 3758 // empty value appearing in NullFields will be sent to the server as 3759 // null. It is an error if a field in this list has a non-empty value. 3760 // This may be used to include null fields in Patch requests. 3761 NullFields []string `json:"-"` 3762} 3763 3764func (s *OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) { 3765 type NoMethod OrdersShipLineItemsRequest 3766 raw := NoMethod(*s) 3767 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3768} 3769 3770type OrdersShipLineItemsResponse struct { 3771 // ExecutionStatus: The status of the execution. 3772 ExecutionStatus string `json:"executionStatus,omitempty"` 3773 3774 // Kind: Identifies what kind of resource this is. Value: the fixed 3775 // string "content#ordersShipLineItemsResponse". 3776 Kind string `json:"kind,omitempty"` 3777 3778 // ServerResponse contains the HTTP response code and headers from the 3779 // server. 3780 googleapi.ServerResponse `json:"-"` 3781 3782 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 3783 // unconditionally include in API requests. By default, fields with 3784 // empty values are omitted from API requests. However, any non-pointer, 3785 // non-interface field appearing in ForceSendFields will be sent to the 3786 // server regardless of whether the field is empty or not. This may be 3787 // used to include empty fields in Patch requests. 3788 ForceSendFields []string `json:"-"` 3789 3790 // NullFields is a list of field names (e.g. "ExecutionStatus") to 3791 // include in API requests with the JSON null value. By default, fields 3792 // with empty values are omitted from API requests. However, any field 3793 // with an empty value appearing in NullFields will be sent to the 3794 // server as null. It is an error if a field in this list has a 3795 // non-empty value. This may be used to include null fields in Patch 3796 // requests. 3797 NullFields []string `json:"-"` 3798} 3799 3800func (s *OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) { 3801 type NoMethod OrdersShipLineItemsResponse 3802 raw := NoMethod(*s) 3803 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3804} 3805 3806type OrdersUpdateLineItemShippingDetailsRequest struct { 3807 // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not 3808 // specified only ship by date is updated. 3809 DeliverByDate string `json:"deliverByDate,omitempty"` 3810 3811 // LineItemId: The ID of the line item to set metadata. Either 3812 // lineItemId or productId is required. 3813 LineItemId string `json:"lineItemId,omitempty"` 3814 3815 // OperationId: The ID of the operation. Unique across all operations 3816 // for a given order. 3817 OperationId string `json:"operationId,omitempty"` 3818 3819 // ProductId: The ID of the product to set metadata. This is the REST ID 3820 // used in the products service. Either lineItemId or productId is 3821 // required. 3822 ProductId string `json:"productId,omitempty"` 3823 3824 // ShipByDate: Updated ship by date, in ISO 8601 format. If not 3825 // specified only deliver by date is updated. 3826 ShipByDate string `json:"shipByDate,omitempty"` 3827 3828 // ForceSendFields is a list of field names (e.g. "DeliverByDate") to 3829 // unconditionally include in API requests. By default, fields with 3830 // empty values are omitted from API requests. However, any non-pointer, 3831 // non-interface field appearing in ForceSendFields will be sent to the 3832 // server regardless of whether the field is empty or not. This may be 3833 // used to include empty fields in Patch requests. 3834 ForceSendFields []string `json:"-"` 3835 3836 // NullFields is a list of field names (e.g. "DeliverByDate") to include 3837 // in API requests with the JSON null value. By default, fields with 3838 // empty values are omitted from API requests. However, any field with 3839 // an empty value appearing in NullFields will be sent to the server as 3840 // null. It is an error if a field in this list has a non-empty value. 3841 // This may be used to include null fields in Patch requests. 3842 NullFields []string `json:"-"` 3843} 3844 3845func (s *OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) { 3846 type NoMethod OrdersUpdateLineItemShippingDetailsRequest 3847 raw := NoMethod(*s) 3848 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3849} 3850 3851type OrdersUpdateLineItemShippingDetailsResponse struct { 3852 // ExecutionStatus: The status of the execution. 3853 ExecutionStatus string `json:"executionStatus,omitempty"` 3854 3855 // Kind: Identifies what kind of resource this is. Value: the fixed 3856 // string "content#ordersUpdateLineItemShippingDetailsResponse". 3857 Kind string `json:"kind,omitempty"` 3858 3859 // ServerResponse contains the HTTP response code and headers from the 3860 // server. 3861 googleapi.ServerResponse `json:"-"` 3862 3863 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 3864 // unconditionally include in API requests. By default, fields with 3865 // empty values are omitted from API requests. However, any non-pointer, 3866 // non-interface field appearing in ForceSendFields will be sent to the 3867 // server regardless of whether the field is empty or not. This may be 3868 // used to include empty fields in Patch requests. 3869 ForceSendFields []string `json:"-"` 3870 3871 // NullFields is a list of field names (e.g. "ExecutionStatus") to 3872 // include in API requests with the JSON null value. By default, fields 3873 // with empty values are omitted from API requests. However, any field 3874 // with an empty value appearing in NullFields will be sent to the 3875 // server as null. It is an error if a field in this list has a 3876 // non-empty value. This may be used to include null fields in Patch 3877 // requests. 3878 NullFields []string `json:"-"` 3879} 3880 3881func (s *OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) { 3882 type NoMethod OrdersUpdateLineItemShippingDetailsResponse 3883 raw := NoMethod(*s) 3884 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3885} 3886 3887type OrdersUpdateMerchantOrderIdRequest struct { 3888 // MerchantOrderId: The merchant order id to be assigned to the order. 3889 // Must be unique per merchant. 3890 MerchantOrderId string `json:"merchantOrderId,omitempty"` 3891 3892 // OperationId: The ID of the operation. Unique across all operations 3893 // for a given order. 3894 OperationId string `json:"operationId,omitempty"` 3895 3896 // ForceSendFields is a list of field names (e.g. "MerchantOrderId") to 3897 // unconditionally include in API requests. By default, fields with 3898 // empty values are omitted from API requests. However, any non-pointer, 3899 // non-interface field appearing in ForceSendFields will be sent to the 3900 // server regardless of whether the field is empty or not. This may be 3901 // used to include empty fields in Patch requests. 3902 ForceSendFields []string `json:"-"` 3903 3904 // NullFields is a list of field names (e.g. "MerchantOrderId") to 3905 // include in API requests with the JSON null value. By default, fields 3906 // with empty values are omitted from API requests. However, any field 3907 // with an empty value appearing in NullFields will be sent to the 3908 // server as null. It is an error if a field in this list has a 3909 // non-empty value. This may be used to include null fields in Patch 3910 // requests. 3911 NullFields []string `json:"-"` 3912} 3913 3914func (s *OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) { 3915 type NoMethod OrdersUpdateMerchantOrderIdRequest 3916 raw := NoMethod(*s) 3917 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3918} 3919 3920type OrdersUpdateMerchantOrderIdResponse struct { 3921 // ExecutionStatus: The status of the execution. 3922 ExecutionStatus string `json:"executionStatus,omitempty"` 3923 3924 // Kind: Identifies what kind of resource this is. Value: the fixed 3925 // string "content#ordersUpdateMerchantOrderIdResponse". 3926 Kind string `json:"kind,omitempty"` 3927 3928 // ServerResponse contains the HTTP response code and headers from the 3929 // server. 3930 googleapi.ServerResponse `json:"-"` 3931 3932 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 3933 // unconditionally include in API requests. By default, fields with 3934 // empty values are omitted from API requests. However, any non-pointer, 3935 // non-interface field appearing in ForceSendFields will be sent to the 3936 // server regardless of whether the field is empty or not. This may be 3937 // used to include empty fields in Patch requests. 3938 ForceSendFields []string `json:"-"` 3939 3940 // NullFields is a list of field names (e.g. "ExecutionStatus") to 3941 // include in API requests with the JSON null value. By default, fields 3942 // with empty values are omitted from API requests. However, any field 3943 // with an empty value appearing in NullFields will be sent to the 3944 // server as null. It is an error if a field in this list has a 3945 // non-empty value. This may be used to include null fields in Patch 3946 // requests. 3947 NullFields []string `json:"-"` 3948} 3949 3950func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { 3951 type NoMethod OrdersUpdateMerchantOrderIdResponse 3952 raw := NoMethod(*s) 3953 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3954} 3955 3956type OrdersUpdateShipmentRequest struct { 3957 // Carrier: The carrier handling the shipment. Not updated if missing. 3958 // See shipments[].carrier in the Orders resource representation for a 3959 // list of acceptable values. 3960 Carrier string `json:"carrier,omitempty"` 3961 3962 // DeliveryDate: Date on which the shipment has been delivered, in ISO 3963 // 8601 format. Optional and can be provided only if status is 3964 // delivered. 3965 DeliveryDate string `json:"deliveryDate,omitempty"` 3966 3967 // OperationId: The ID of the operation. Unique across all operations 3968 // for a given order. 3969 OperationId string `json:"operationId,omitempty"` 3970 3971 // ShipmentId: The ID of the shipment. 3972 ShipmentId string `json:"shipmentId,omitempty"` 3973 3974 // Status: New status for the shipment. Not updated if missing. 3975 Status string `json:"status,omitempty"` 3976 3977 // TrackingId: The tracking id for the shipment. Not updated if missing. 3978 TrackingId string `json:"trackingId,omitempty"` 3979 3980 // ForceSendFields is a list of field names (e.g. "Carrier") to 3981 // unconditionally include in API requests. By default, fields with 3982 // empty values are omitted from API requests. However, any non-pointer, 3983 // non-interface field appearing in ForceSendFields will be sent to the 3984 // server regardless of whether the field is empty or not. This may be 3985 // used to include empty fields in Patch requests. 3986 ForceSendFields []string `json:"-"` 3987 3988 // NullFields is a list of field names (e.g. "Carrier") to include in 3989 // API requests with the JSON null value. By default, fields with empty 3990 // values are omitted from API requests. However, any field with an 3991 // empty value appearing in NullFields will be sent to the server as 3992 // null. It is an error if a field in this list has a non-empty value. 3993 // This may be used to include null fields in Patch requests. 3994 NullFields []string `json:"-"` 3995} 3996 3997func (s *OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) { 3998 type NoMethod OrdersUpdateShipmentRequest 3999 raw := NoMethod(*s) 4000 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4001} 4002 4003type OrdersUpdateShipmentResponse struct { 4004 // ExecutionStatus: The status of the execution. 4005 ExecutionStatus string `json:"executionStatus,omitempty"` 4006 4007 // Kind: Identifies what kind of resource this is. Value: the fixed 4008 // string "content#ordersUpdateShipmentResponse". 4009 Kind string `json:"kind,omitempty"` 4010 4011 // ServerResponse contains the HTTP response code and headers from the 4012 // server. 4013 googleapi.ServerResponse `json:"-"` 4014 4015 // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to 4016 // unconditionally include in API requests. By default, fields with 4017 // empty values are omitted from API requests. However, any non-pointer, 4018 // non-interface field appearing in ForceSendFields will be sent to the 4019 // server regardless of whether the field is empty or not. This may be 4020 // used to include empty fields in Patch requests. 4021 ForceSendFields []string `json:"-"` 4022 4023 // NullFields is a list of field names (e.g. "ExecutionStatus") to 4024 // include in API requests with the JSON null value. By default, fields 4025 // with empty values are omitted from API requests. However, any field 4026 // with an empty value appearing in NullFields will be sent to the 4027 // server as null. It is an error if a field in this list has a 4028 // non-empty value. This may be used to include null fields in Patch 4029 // requests. 4030 NullFields []string `json:"-"` 4031} 4032 4033func (s *OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) { 4034 type NoMethod OrdersUpdateShipmentResponse 4035 raw := NoMethod(*s) 4036 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4037} 4038 4039type Price struct { 4040 // Currency: The currency of the price. 4041 Currency string `json:"currency,omitempty"` 4042 4043 // Value: The price represented as a number. 4044 Value string `json:"value,omitempty"` 4045 4046 // ForceSendFields is a list of field names (e.g. "Currency") to 4047 // unconditionally include in API requests. By default, fields with 4048 // empty values are omitted from API requests. However, any non-pointer, 4049 // non-interface field appearing in ForceSendFields will be sent to the 4050 // server regardless of whether the field is empty or not. This may be 4051 // used to include empty fields in Patch requests. 4052 ForceSendFields []string `json:"-"` 4053 4054 // NullFields is a list of field names (e.g. "Currency") to include in 4055 // API requests with the JSON null value. By default, fields with empty 4056 // values are omitted from API requests. However, any field with an 4057 // empty value appearing in NullFields will be sent to the server as 4058 // null. It is an error if a field in this list has a non-empty value. 4059 // This may be used to include null fields in Patch requests. 4060 NullFields []string `json:"-"` 4061} 4062 4063func (s *Price) MarshalJSON() ([]byte, error) { 4064 type NoMethod Price 4065 raw := NoMethod(*s) 4066 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4067} 4068 4069type Promotion struct { 4070 // PromotionAmount: [required] Amount of the promotion. The values here 4071 // are the promotion applied to the unit price pretax and to the total 4072 // of the tax amounts. 4073 PromotionAmount *Amount `json:"promotionAmount,omitempty"` 4074 4075 // PromotionId: [required] ID of the promotion. 4076 PromotionId string `json:"promotionId,omitempty"` 4077 4078 // ForceSendFields is a list of field names (e.g. "PromotionAmount") to 4079 // unconditionally include in API requests. By default, fields with 4080 // empty values are omitted from API requests. However, any non-pointer, 4081 // non-interface field appearing in ForceSendFields will be sent to the 4082 // server regardless of whether the field is empty or not. This may be 4083 // used to include empty fields in Patch requests. 4084 ForceSendFields []string `json:"-"` 4085 4086 // NullFields is a list of field names (e.g. "PromotionAmount") to 4087 // include in API requests with the JSON null value. By default, fields 4088 // with empty values are omitted from API requests. However, any field 4089 // with an empty value appearing in NullFields will be sent to the 4090 // server as null. It is an error if a field in this list has a 4091 // non-empty value. This may be used to include null fields in Patch 4092 // requests. 4093 NullFields []string `json:"-"` 4094} 4095 4096func (s *Promotion) MarshalJSON() ([]byte, error) { 4097 type NoMethod Promotion 4098 raw := NoMethod(*s) 4099 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4100} 4101 4102type RefundReason struct { 4103 Description string `json:"description,omitempty"` 4104 4105 ReasonCode string `json:"reasonCode,omitempty"` 4106 4107 // ForceSendFields is a list of field names (e.g. "Description") to 4108 // unconditionally include in API requests. By default, fields with 4109 // empty values are omitted from API requests. However, any non-pointer, 4110 // non-interface field appearing in ForceSendFields will be sent to the 4111 // server regardless of whether the field is empty or not. This may be 4112 // used to include empty fields in Patch requests. 4113 ForceSendFields []string `json:"-"` 4114 4115 // NullFields is a list of field names (e.g. "Description") to include 4116 // in API requests with the JSON null value. By default, fields with 4117 // empty values are omitted from API requests. However, any field with 4118 // an empty value appearing in NullFields will be sent to the server as 4119 // null. It is an error if a field in this list has a non-empty value. 4120 // This may be used to include null fields in Patch requests. 4121 NullFields []string `json:"-"` 4122} 4123 4124func (s *RefundReason) MarshalJSON() ([]byte, error) { 4125 type NoMethod RefundReason 4126 raw := NoMethod(*s) 4127 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4128} 4129 4130type ReturnShipment struct { 4131 CreationDate string `json:"creationDate,omitempty"` 4132 4133 ReturnMethodType string `json:"returnMethodType,omitempty"` 4134 4135 ShipmentId string `json:"shipmentId,omitempty"` 4136 4137 ShipmentTrackingInfos []*ShipmentTrackingInfo `json:"shipmentTrackingInfos,omitempty"` 4138 4139 // ForceSendFields is a list of field names (e.g. "CreationDate") to 4140 // unconditionally include in API requests. By default, fields with 4141 // empty values are omitted from API requests. However, any non-pointer, 4142 // non-interface field appearing in ForceSendFields will be sent to the 4143 // server regardless of whether the field is empty or not. This may be 4144 // used to include empty fields in Patch requests. 4145 ForceSendFields []string `json:"-"` 4146 4147 // NullFields is a list of field names (e.g. "CreationDate") to include 4148 // in API requests with the JSON null value. By default, fields with 4149 // empty values are omitted from API requests. However, any field with 4150 // an empty value appearing in NullFields will be sent to the server as 4151 // null. It is an error if a field in this list has a non-empty value. 4152 // This may be used to include null fields in Patch requests. 4153 NullFields []string `json:"-"` 4154} 4155 4156func (s *ReturnShipment) MarshalJSON() ([]byte, error) { 4157 type NoMethod ReturnShipment 4158 raw := NoMethod(*s) 4159 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4160} 4161 4162type ShipmentInvoice struct { 4163 // InvoiceSummary: [required] Invoice summary. 4164 InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` 4165 4166 // LineItemInvoices: [required] Invoice details per line item. 4167 LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` 4168 4169 // ShipmentGroupId: [required] ID of the shipment group. 4170 ShipmentGroupId string `json:"shipmentGroupId,omitempty"` 4171 4172 // ForceSendFields is a list of field names (e.g. "InvoiceSummary") to 4173 // unconditionally include in API requests. By default, fields with 4174 // empty values are omitted from API requests. However, any non-pointer, 4175 // non-interface field appearing in ForceSendFields will be sent to the 4176 // server regardless of whether the field is empty or not. This may be 4177 // used to include empty fields in Patch requests. 4178 ForceSendFields []string `json:"-"` 4179 4180 // NullFields is a list of field names (e.g. "InvoiceSummary") to 4181 // include in API requests with the JSON null value. By default, fields 4182 // with empty values are omitted from API requests. However, any field 4183 // with an empty value appearing in NullFields will be sent to the 4184 // server as null. It is an error if a field in this list has a 4185 // non-empty value. This may be used to include null fields in Patch 4186 // requests. 4187 NullFields []string `json:"-"` 4188} 4189 4190func (s *ShipmentInvoice) MarshalJSON() ([]byte, error) { 4191 type NoMethod ShipmentInvoice 4192 raw := NoMethod(*s) 4193 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4194} 4195 4196type ShipmentInvoiceLineItemInvoice struct { 4197 // LineItemId: ID of the line item. Either lineItemId or productId must 4198 // be set. 4199 LineItemId string `json:"lineItemId,omitempty"` 4200 4201 // ProductId: ID of the product. This is the REST ID used in the 4202 // products service. Either lineItemId or productId must be set. 4203 ProductId string `json:"productId,omitempty"` 4204 4205 // ShipmentUnitIds: [required] Unit IDs to define specific units within 4206 // the line item. 4207 ShipmentUnitIds []string `json:"shipmentUnitIds,omitempty"` 4208 4209 // UnitInvoice: [required] Invoice details for a single unit. 4210 UnitInvoice *UnitInvoice `json:"unitInvoice,omitempty"` 4211 4212 // ForceSendFields is a list of field names (e.g. "LineItemId") to 4213 // unconditionally include in API requests. By default, fields with 4214 // empty values are omitted from API requests. However, any non-pointer, 4215 // non-interface field appearing in ForceSendFields will be sent to the 4216 // server regardless of whether the field is empty or not. This may be 4217 // used to include empty fields in Patch requests. 4218 ForceSendFields []string `json:"-"` 4219 4220 // NullFields is a list of field names (e.g. "LineItemId") to include in 4221 // API requests with the JSON null value. By default, fields with empty 4222 // values are omitted from API requests. However, any field with an 4223 // empty value appearing in NullFields will be sent to the server as 4224 // null. It is an error if a field in this list has a non-empty value. 4225 // This may be used to include null fields in Patch requests. 4226 NullFields []string `json:"-"` 4227} 4228 4229func (s *ShipmentInvoiceLineItemInvoice) MarshalJSON() ([]byte, error) { 4230 type NoMethod ShipmentInvoiceLineItemInvoice 4231 raw := NoMethod(*s) 4232 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4233} 4234 4235type ShipmentTrackingInfo struct { 4236 Carrier string `json:"carrier,omitempty"` 4237 4238 TrackingNumber string `json:"trackingNumber,omitempty"` 4239 4240 // ForceSendFields is a list of field names (e.g. "Carrier") to 4241 // unconditionally include in API requests. By default, fields with 4242 // empty values are omitted from API requests. However, any non-pointer, 4243 // non-interface field appearing in ForceSendFields will be sent to the 4244 // server regardless of whether the field is empty or not. This may be 4245 // used to include empty fields in Patch requests. 4246 ForceSendFields []string `json:"-"` 4247 4248 // NullFields is a list of field names (e.g. "Carrier") to include in 4249 // API requests with the JSON null value. By default, fields with empty 4250 // values are omitted from API requests. However, any field with an 4251 // empty value appearing in NullFields will be sent to the server as 4252 // null. It is an error if a field in this list has a non-empty value. 4253 // This may be used to include null fields in Patch requests. 4254 NullFields []string `json:"-"` 4255} 4256 4257func (s *ShipmentTrackingInfo) MarshalJSON() ([]byte, error) { 4258 type NoMethod ShipmentTrackingInfo 4259 raw := NoMethod(*s) 4260 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4261} 4262 4263type TestOrder struct { 4264 // Customer: The details of the customer who placed the order. 4265 Customer *TestOrderCustomer `json:"customer,omitempty"` 4266 4267 // EnableOrderinvoices: Whether the orderinvoices service should support 4268 // this order. 4269 EnableOrderinvoices bool `json:"enableOrderinvoices,omitempty"` 4270 4271 // Kind: Identifies what kind of resource this is. Value: the fixed 4272 // string "content#testOrder". 4273 Kind string `json:"kind,omitempty"` 4274 4275 // LineItems: Line items that are ordered. At least one line item must 4276 // be provided. 4277 LineItems []*TestOrderLineItem `json:"lineItems,omitempty"` 4278 4279 // NotificationMode: Determines if test order must be pulled by merchant 4280 // or pushed to merchant via push integration. 4281 NotificationMode string `json:"notificationMode,omitempty"` 4282 4283 // PaymentMethod: The details of the payment method. 4284 PaymentMethod *TestOrderPaymentMethod `json:"paymentMethod,omitempty"` 4285 4286 // PredefinedDeliveryAddress: Identifier of one of the predefined 4287 // delivery addresses for the delivery. 4288 PredefinedDeliveryAddress string `json:"predefinedDeliveryAddress,omitempty"` 4289 4290 // Promotions: Deprecated. The details of the merchant provided 4291 // promotions applied to the order. More details about the program are 4292 // here. 4293 Promotions []*OrderLegacyPromotion `json:"promotions,omitempty"` 4294 4295 // ShippingCost: The total cost of shipping for all items. 4296 ShippingCost *Price `json:"shippingCost,omitempty"` 4297 4298 // ShippingCostTax: The tax for the total shipping cost. 4299 ShippingCostTax *Price `json:"shippingCostTax,omitempty"` 4300 4301 // ShippingOption: The requested shipping option. 4302 ShippingOption string `json:"shippingOption,omitempty"` 4303 4304 // ForceSendFields is a list of field names (e.g. "Customer") to 4305 // unconditionally include in API requests. By default, fields with 4306 // empty values are omitted from API requests. However, any non-pointer, 4307 // non-interface field appearing in ForceSendFields will be sent to the 4308 // server regardless of whether the field is empty or not. This may be 4309 // used to include empty fields in Patch requests. 4310 ForceSendFields []string `json:"-"` 4311 4312 // NullFields is a list of field names (e.g. "Customer") to include in 4313 // API requests with the JSON null value. By default, fields with empty 4314 // values are omitted from API requests. However, any field with an 4315 // empty value appearing in NullFields will be sent to the server as 4316 // null. It is an error if a field in this list has a non-empty value. 4317 // This may be used to include null fields in Patch requests. 4318 NullFields []string `json:"-"` 4319} 4320 4321func (s *TestOrder) MarshalJSON() ([]byte, error) { 4322 type NoMethod TestOrder 4323 raw := NoMethod(*s) 4324 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4325} 4326 4327type TestOrderCustomer struct { 4328 // Email: Deprecated. 4329 Email string `json:"email,omitempty"` 4330 4331 // ExplicitMarketingPreference: Deprecated. Please use 4332 // marketingRightsInfo instead. 4333 ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"` 4334 4335 // FullName: Full name of the customer. 4336 FullName string `json:"fullName,omitempty"` 4337 4338 // MarketingRightsInfo: Customer's marketing preferences. 4339 MarketingRightsInfo *TestOrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` 4340 4341 // ForceSendFields is a list of field names (e.g. "Email") to 4342 // unconditionally include in API requests. By default, fields with 4343 // empty values are omitted from API requests. However, any non-pointer, 4344 // non-interface field appearing in ForceSendFields will be sent to the 4345 // server regardless of whether the field is empty or not. This may be 4346 // used to include empty fields in Patch requests. 4347 ForceSendFields []string `json:"-"` 4348 4349 // NullFields is a list of field names (e.g. "Email") to include in API 4350 // requests with the JSON null value. By default, fields with empty 4351 // values are omitted from API requests. However, any field with an 4352 // empty value appearing in NullFields will be sent to the server as 4353 // null. It is an error if a field in this list has a non-empty value. 4354 // This may be used to include null fields in Patch requests. 4355 NullFields []string `json:"-"` 4356} 4357 4358func (s *TestOrderCustomer) MarshalJSON() ([]byte, error) { 4359 type NoMethod TestOrderCustomer 4360 raw := NoMethod(*s) 4361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4362} 4363 4364type TestOrderCustomerMarketingRightsInfo struct { 4365 // ExplicitMarketingPreference: Last know user use selection regards 4366 // marketing preferences. In certain cases selection might not be known, 4367 // so this field would be empty. 4368 ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` 4369 4370 // LastUpdatedTimestamp: Timestamp when last time marketing preference 4371 // was updated. Could be empty, if user wasn't offered a selection yet. 4372 LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` 4373 4374 // ForceSendFields is a list of field names (e.g. 4375 // "ExplicitMarketingPreference") to unconditionally include in API 4376 // requests. By default, fields with empty values are omitted from API 4377 // requests. However, any non-pointer, non-interface field appearing in 4378 // ForceSendFields will be sent to the server regardless of whether the 4379 // field is empty or not. This may be used to include empty fields in 4380 // Patch requests. 4381 ForceSendFields []string `json:"-"` 4382 4383 // NullFields is a list of field names (e.g. 4384 // "ExplicitMarketingPreference") to include in API requests with the 4385 // JSON null value. By default, fields with empty values are omitted 4386 // from API requests. However, any field with an empty value appearing 4387 // in NullFields will be sent to the server as null. It is an error if a 4388 // field in this list has a non-empty value. This may be used to include 4389 // null fields in Patch requests. 4390 NullFields []string `json:"-"` 4391} 4392 4393func (s *TestOrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { 4394 type NoMethod TestOrderCustomerMarketingRightsInfo 4395 raw := NoMethod(*s) 4396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4397} 4398 4399type TestOrderLineItem struct { 4400 // Product: Product data from the time of the order placement. 4401 Product *TestOrderLineItemProduct `json:"product,omitempty"` 4402 4403 // QuantityOrdered: Number of items ordered. 4404 QuantityOrdered int64 `json:"quantityOrdered,omitempty"` 4405 4406 // ReturnInfo: Details of the return policy for the line item. 4407 ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` 4408 4409 // ShippingDetails: Details of the requested shipping for the line item. 4410 ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` 4411 4412 // UnitTax: Unit tax for the line item. 4413 UnitTax *Price `json:"unitTax,omitempty"` 4414 4415 // ForceSendFields is a list of field names (e.g. "Product") to 4416 // unconditionally include in API requests. By default, fields with 4417 // empty values are omitted from API requests. However, any non-pointer, 4418 // non-interface field appearing in ForceSendFields will be sent to the 4419 // server regardless of whether the field is empty or not. This may be 4420 // used to include empty fields in Patch requests. 4421 ForceSendFields []string `json:"-"` 4422 4423 // NullFields is a list of field names (e.g. "Product") to include in 4424 // API requests with the JSON null value. By default, fields with empty 4425 // values are omitted from API requests. However, any field with an 4426 // empty value appearing in NullFields will be sent to the server as 4427 // null. It is an error if a field in this list has a non-empty value. 4428 // This may be used to include null fields in Patch requests. 4429 NullFields []string `json:"-"` 4430} 4431 4432func (s *TestOrderLineItem) MarshalJSON() ([]byte, error) { 4433 type NoMethod TestOrderLineItem 4434 raw := NoMethod(*s) 4435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4436} 4437 4438type TestOrderLineItemProduct struct { 4439 // Brand: Brand of the item. 4440 Brand string `json:"brand,omitempty"` 4441 4442 // Channel: The item's channel. 4443 Channel string `json:"channel,omitempty"` 4444 4445 // Condition: Condition or state of the item. 4446 Condition string `json:"condition,omitempty"` 4447 4448 // ContentLanguage: The two-letter ISO 639-1 language code for the item. 4449 ContentLanguage string `json:"contentLanguage,omitempty"` 4450 4451 // Gtin: Global Trade Item Number (GTIN) of the item. Optional. 4452 Gtin string `json:"gtin,omitempty"` 4453 4454 // ImageLink: URL of an image of the item. 4455 ImageLink string `json:"imageLink,omitempty"` 4456 4457 // ItemGroupId: Shared identifier for all variants of the same product. 4458 // Optional. 4459 ItemGroupId string `json:"itemGroupId,omitempty"` 4460 4461 // Mpn: Manufacturer Part Number (MPN) of the item. Optional. 4462 Mpn string `json:"mpn,omitempty"` 4463 4464 // OfferId: An identifier of the item. 4465 OfferId string `json:"offerId,omitempty"` 4466 4467 // Price: The price for the product. 4468 Price *Price `json:"price,omitempty"` 4469 4470 // TargetCountry: The CLDR territory code of the target country of the 4471 // product. 4472 TargetCountry string `json:"targetCountry,omitempty"` 4473 4474 // Title: The title of the product. 4475 Title string `json:"title,omitempty"` 4476 4477 // VariantAttributes: Variant attributes for the item. Optional. 4478 VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` 4479 4480 // ForceSendFields is a list of field names (e.g. "Brand") to 4481 // unconditionally include in API requests. By default, fields with 4482 // empty values are omitted from API requests. However, any non-pointer, 4483 // non-interface field appearing in ForceSendFields will be sent to the 4484 // server regardless of whether the field is empty or not. This may be 4485 // used to include empty fields in Patch requests. 4486 ForceSendFields []string `json:"-"` 4487 4488 // NullFields is a list of field names (e.g. "Brand") to include in API 4489 // requests with the JSON null value. By default, fields with empty 4490 // values are omitted from API requests. However, any field with an 4491 // empty value appearing in NullFields will be sent to the server as 4492 // null. It is an error if a field in this list has a non-empty value. 4493 // This may be used to include null fields in Patch requests. 4494 NullFields []string `json:"-"` 4495} 4496 4497func (s *TestOrderLineItemProduct) MarshalJSON() ([]byte, error) { 4498 type NoMethod TestOrderLineItemProduct 4499 raw := NoMethod(*s) 4500 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4501} 4502 4503type TestOrderPaymentMethod struct { 4504 // ExpirationMonth: The card expiration month (January = 1, February = 2 4505 // etc.). 4506 ExpirationMonth int64 `json:"expirationMonth,omitempty"` 4507 4508 // ExpirationYear: The card expiration year (4-digit, e.g. 2015). 4509 ExpirationYear int64 `json:"expirationYear,omitempty"` 4510 4511 // LastFourDigits: The last four digits of the card number. 4512 LastFourDigits string `json:"lastFourDigits,omitempty"` 4513 4514 // PredefinedBillingAddress: The billing address. 4515 PredefinedBillingAddress string `json:"predefinedBillingAddress,omitempty"` 4516 4517 // Type: The type of instrument. Note that real orders might have 4518 // different values than the four values accepted by createTestOrder. 4519 Type string `json:"type,omitempty"` 4520 4521 // ForceSendFields is a list of field names (e.g. "ExpirationMonth") to 4522 // unconditionally include in API requests. By default, fields with 4523 // empty values are omitted from API requests. However, any non-pointer, 4524 // non-interface field appearing in ForceSendFields will be sent to the 4525 // server regardless of whether the field is empty or not. This may be 4526 // used to include empty fields in Patch requests. 4527 ForceSendFields []string `json:"-"` 4528 4529 // NullFields is a list of field names (e.g. "ExpirationMonth") to 4530 // include in API requests with the JSON null value. By default, fields 4531 // with empty values are omitted from API requests. However, any field 4532 // with an empty value appearing in NullFields will be sent to the 4533 // server as null. It is an error if a field in this list has a 4534 // non-empty value. This may be used to include null fields in Patch 4535 // requests. 4536 NullFields []string `json:"-"` 4537} 4538 4539func (s *TestOrderPaymentMethod) MarshalJSON() ([]byte, error) { 4540 type NoMethod TestOrderPaymentMethod 4541 raw := NoMethod(*s) 4542 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4543} 4544 4545type UnitInvoice struct { 4546 // AdditionalCharges: Additional charges for a unit, e.g. shipping 4547 // costs. 4548 AdditionalCharges []*UnitInvoiceAdditionalCharge `json:"additionalCharges,omitempty"` 4549 4550 // Promotions: Promotions applied to a unit. 4551 Promotions []*Promotion `json:"promotions,omitempty"` 4552 4553 // UnitPricePretax: [required] Price of the unit, before applying taxes. 4554 UnitPricePretax *Price `json:"unitPricePretax,omitempty"` 4555 4556 // UnitPriceTaxes: Tax amounts to apply to the unit price. 4557 UnitPriceTaxes []*UnitInvoiceTaxLine `json:"unitPriceTaxes,omitempty"` 4558 4559 // ForceSendFields is a list of field names (e.g. "AdditionalCharges") 4560 // to unconditionally include in API requests. By default, fields with 4561 // empty values are omitted from API requests. However, any non-pointer, 4562 // non-interface field appearing in ForceSendFields will be sent to the 4563 // server regardless of whether the field is empty or not. This may be 4564 // used to include empty fields in Patch requests. 4565 ForceSendFields []string `json:"-"` 4566 4567 // NullFields is a list of field names (e.g. "AdditionalCharges") to 4568 // include in API requests with the JSON null value. By default, fields 4569 // with empty values are omitted from API requests. However, any field 4570 // with an empty value appearing in NullFields will be sent to the 4571 // server as null. It is an error if a field in this list has a 4572 // non-empty value. This may be used to include null fields in Patch 4573 // requests. 4574 NullFields []string `json:"-"` 4575} 4576 4577func (s *UnitInvoice) MarshalJSON() ([]byte, error) { 4578 type NoMethod UnitInvoice 4579 raw := NoMethod(*s) 4580 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4581} 4582 4583type UnitInvoiceAdditionalCharge struct { 4584 // AdditionalChargeAmount: [required] Amount of the additional charge. 4585 AdditionalChargeAmount *Amount `json:"additionalChargeAmount,omitempty"` 4586 4587 // AdditionalChargePromotions: Promotions applied to the additional 4588 // charge. 4589 AdditionalChargePromotions []*Promotion `json:"additionalChargePromotions,omitempty"` 4590 4591 // Type: [required] Type of the additional charge. 4592 Type string `json:"type,omitempty"` 4593 4594 // ForceSendFields is a list of field names (e.g. 4595 // "AdditionalChargeAmount") to unconditionally include in API requests. 4596 // By default, fields with empty values are omitted from API requests. 4597 // However, any non-pointer, non-interface field appearing in 4598 // ForceSendFields will be sent to the server regardless of whether the 4599 // field is empty or not. This may be used to include empty fields in 4600 // Patch requests. 4601 ForceSendFields []string `json:"-"` 4602 4603 // NullFields is a list of field names (e.g. "AdditionalChargeAmount") 4604 // to include in API requests with the JSON null value. By default, 4605 // fields with empty values are omitted from API requests. However, any 4606 // field with an empty value appearing in NullFields will be sent to the 4607 // server as null. It is an error if a field in this list has a 4608 // non-empty value. This may be used to include null fields in Patch 4609 // requests. 4610 NullFields []string `json:"-"` 4611} 4612 4613func (s *UnitInvoiceAdditionalCharge) MarshalJSON() ([]byte, error) { 4614 type NoMethod UnitInvoiceAdditionalCharge 4615 raw := NoMethod(*s) 4616 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4617} 4618 4619type UnitInvoiceTaxLine struct { 4620 // TaxAmount: [required] Tax amount for the tax type. 4621 TaxAmount *Price `json:"taxAmount,omitempty"` 4622 4623 // TaxName: Optional name of the tax type. This should only be provided 4624 // if taxType is otherFeeTax. 4625 TaxName string `json:"taxName,omitempty"` 4626 4627 // TaxType: [required] Type of the tax. 4628 TaxType string `json:"taxType,omitempty"` 4629 4630 // ForceSendFields is a list of field names (e.g. "TaxAmount") to 4631 // unconditionally include in API requests. By default, fields with 4632 // empty values are omitted from API requests. However, any non-pointer, 4633 // non-interface field appearing in ForceSendFields will be sent to the 4634 // server regardless of whether the field is empty or not. This may be 4635 // used to include empty fields in Patch requests. 4636 ForceSendFields []string `json:"-"` 4637 4638 // NullFields is a list of field names (e.g. "TaxAmount") to include in 4639 // API requests with the JSON null value. By default, fields with empty 4640 // values are omitted from API requests. However, any field with an 4641 // empty value appearing in NullFields will be sent to the server as 4642 // null. It is an error if a field in this list has a non-empty value. 4643 // This may be used to include null fields in Patch requests. 4644 NullFields []string `json:"-"` 4645} 4646 4647func (s *UnitInvoiceTaxLine) MarshalJSON() ([]byte, error) { 4648 type NoMethod UnitInvoiceTaxLine 4649 raw := NoMethod(*s) 4650 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4651} 4652 4653// method id "content.orderinvoices.createchargeinvoice": 4654 4655type OrderinvoicesCreatechargeinvoiceCall struct { 4656 s *APIService 4657 merchantId uint64 4658 orderId string 4659 orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest 4660 urlParams_ gensupport.URLParams 4661 ctx_ context.Context 4662 header_ http.Header 4663} 4664 4665// Createchargeinvoice: Creates a charge invoice for a shipment group, 4666// and triggers a charge capture for non-facilitated payment orders. 4667func (r *OrderinvoicesService) Createchargeinvoice(merchantId uint64, orderId string, orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest) *OrderinvoicesCreatechargeinvoiceCall { 4668 c := &OrderinvoicesCreatechargeinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4669 c.merchantId = merchantId 4670 c.orderId = orderId 4671 c.orderinvoicescreatechargeinvoicerequest = orderinvoicescreatechargeinvoicerequest 4672 return c 4673} 4674 4675// Fields allows partial responses to be retrieved. See 4676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4677// for more information. 4678func (c *OrderinvoicesCreatechargeinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreatechargeinvoiceCall { 4679 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4680 return c 4681} 4682 4683// Context sets the context to be used in this call's Do method. Any 4684// pending HTTP request will be aborted if the provided context is 4685// canceled. 4686func (c *OrderinvoicesCreatechargeinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreatechargeinvoiceCall { 4687 c.ctx_ = ctx 4688 return c 4689} 4690 4691// Header returns an http.Header that can be modified by the caller to 4692// add HTTP headers to the request. 4693func (c *OrderinvoicesCreatechargeinvoiceCall) Header() http.Header { 4694 if c.header_ == nil { 4695 c.header_ = make(http.Header) 4696 } 4697 return c.header_ 4698} 4699 4700func (c *OrderinvoicesCreatechargeinvoiceCall) doRequest(alt string) (*http.Response, error) { 4701 reqHeaders := make(http.Header) 4702 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 4703 for k, v := range c.header_ { 4704 reqHeaders[k] = v 4705 } 4706 reqHeaders.Set("User-Agent", c.s.userAgent()) 4707 var body io.Reader = nil 4708 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreatechargeinvoicerequest) 4709 if err != nil { 4710 return nil, err 4711 } 4712 reqHeaders.Set("Content-Type", "application/json") 4713 c.urlParams_.Set("alt", alt) 4714 c.urlParams_.Set("prettyPrint", "false") 4715 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createChargeInvoice") 4716 urls += "?" + c.urlParams_.Encode() 4717 req, err := http.NewRequest("POST", urls, body) 4718 if err != nil { 4719 return nil, err 4720 } 4721 req.Header = reqHeaders 4722 googleapi.Expand(req.URL, map[string]string{ 4723 "merchantId": strconv.FormatUint(c.merchantId, 10), 4724 "orderId": c.orderId, 4725 }) 4726 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4727} 4728 4729// Do executes the "content.orderinvoices.createchargeinvoice" call. 4730// Exactly one of *OrderinvoicesCreateChargeInvoiceResponse or error 4731// will be non-nil. Any non-2xx status code is an error. Response 4732// headers are in either 4733// *OrderinvoicesCreateChargeInvoiceResponse.ServerResponse.Header or 4734// (if a response was returned at all) in 4735// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4736// whether the returned error was because http.StatusNotModified was 4737// returned. 4738func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateChargeInvoiceResponse, error) { 4739 gensupport.SetOptions(c.urlParams_, opts...) 4740 res, err := c.doRequest("json") 4741 if res != nil && res.StatusCode == http.StatusNotModified { 4742 if res.Body != nil { 4743 res.Body.Close() 4744 } 4745 return nil, &googleapi.Error{ 4746 Code: res.StatusCode, 4747 Header: res.Header, 4748 } 4749 } 4750 if err != nil { 4751 return nil, err 4752 } 4753 defer googleapi.CloseBody(res) 4754 if err := googleapi.CheckResponse(res); err != nil { 4755 return nil, err 4756 } 4757 ret := &OrderinvoicesCreateChargeInvoiceResponse{ 4758 ServerResponse: googleapi.ServerResponse{ 4759 Header: res.Header, 4760 HTTPStatusCode: res.StatusCode, 4761 }, 4762 } 4763 target := &ret 4764 if err := gensupport.DecodeResponse(target, res); err != nil { 4765 return nil, err 4766 } 4767 return ret, nil 4768 // { 4769 // "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for non-facilitated payment orders.", 4770 // "httpMethod": "POST", 4771 // "id": "content.orderinvoices.createchargeinvoice", 4772 // "parameterOrder": [ 4773 // "merchantId", 4774 // "orderId" 4775 // ], 4776 // "parameters": { 4777 // "merchantId": { 4778 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 4779 // "format": "uint64", 4780 // "location": "path", 4781 // "required": true, 4782 // "type": "string" 4783 // }, 4784 // "orderId": { 4785 // "description": "The ID of the order.", 4786 // "location": "path", 4787 // "required": true, 4788 // "type": "string" 4789 // } 4790 // }, 4791 // "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", 4792 // "request": { 4793 // "$ref": "OrderinvoicesCreateChargeInvoiceRequest" 4794 // }, 4795 // "response": { 4796 // "$ref": "OrderinvoicesCreateChargeInvoiceResponse" 4797 // }, 4798 // "scopes": [ 4799 // "https://www.googleapis.com/auth/content" 4800 // ] 4801 // } 4802 4803} 4804 4805// method id "content.orderinvoices.createrefundinvoice": 4806 4807type OrderinvoicesCreaterefundinvoiceCall struct { 4808 s *APIService 4809 merchantId uint64 4810 orderId string 4811 orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest 4812 urlParams_ gensupport.URLParams 4813 ctx_ context.Context 4814 header_ http.Header 4815} 4816 4817// Createrefundinvoice: Creates a refund invoice for one or more 4818// shipment groups, and triggers a refund for non-facilitated payment 4819// orders. This can only be used for line items that have previously 4820// been charged using createChargeInvoice. All amounts (except for the 4821// summary) are incremental with respect to the previous invoice. 4822func (r *OrderinvoicesService) Createrefundinvoice(merchantId uint64, orderId string, orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest) *OrderinvoicesCreaterefundinvoiceCall { 4823 c := &OrderinvoicesCreaterefundinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4824 c.merchantId = merchantId 4825 c.orderId = orderId 4826 c.orderinvoicescreaterefundinvoicerequest = orderinvoicescreaterefundinvoicerequest 4827 return c 4828} 4829 4830// Fields allows partial responses to be retrieved. See 4831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4832// for more information. 4833func (c *OrderinvoicesCreaterefundinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreaterefundinvoiceCall { 4834 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4835 return c 4836} 4837 4838// Context sets the context to be used in this call's Do method. Any 4839// pending HTTP request will be aborted if the provided context is 4840// canceled. 4841func (c *OrderinvoicesCreaterefundinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreaterefundinvoiceCall { 4842 c.ctx_ = ctx 4843 return c 4844} 4845 4846// Header returns an http.Header that can be modified by the caller to 4847// add HTTP headers to the request. 4848func (c *OrderinvoicesCreaterefundinvoiceCall) Header() http.Header { 4849 if c.header_ == nil { 4850 c.header_ = make(http.Header) 4851 } 4852 return c.header_ 4853} 4854 4855func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Response, error) { 4856 reqHeaders := make(http.Header) 4857 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 4858 for k, v := range c.header_ { 4859 reqHeaders[k] = v 4860 } 4861 reqHeaders.Set("User-Agent", c.s.userAgent()) 4862 var body io.Reader = nil 4863 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreaterefundinvoicerequest) 4864 if err != nil { 4865 return nil, err 4866 } 4867 reqHeaders.Set("Content-Type", "application/json") 4868 c.urlParams_.Set("alt", alt) 4869 c.urlParams_.Set("prettyPrint", "false") 4870 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createRefundInvoice") 4871 urls += "?" + c.urlParams_.Encode() 4872 req, err := http.NewRequest("POST", urls, body) 4873 if err != nil { 4874 return nil, err 4875 } 4876 req.Header = reqHeaders 4877 googleapi.Expand(req.URL, map[string]string{ 4878 "merchantId": strconv.FormatUint(c.merchantId, 10), 4879 "orderId": c.orderId, 4880 }) 4881 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4882} 4883 4884// Do executes the "content.orderinvoices.createrefundinvoice" call. 4885// Exactly one of *OrderinvoicesCreateRefundInvoiceResponse or error 4886// will be non-nil. Any non-2xx status code is an error. Response 4887// headers are in either 4888// *OrderinvoicesCreateRefundInvoiceResponse.ServerResponse.Header or 4889// (if a response was returned at all) in 4890// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4891// whether the returned error was because http.StatusNotModified was 4892// returned. 4893func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateRefundInvoiceResponse, error) { 4894 gensupport.SetOptions(c.urlParams_, opts...) 4895 res, err := c.doRequest("json") 4896 if res != nil && res.StatusCode == http.StatusNotModified { 4897 if res.Body != nil { 4898 res.Body.Close() 4899 } 4900 return nil, &googleapi.Error{ 4901 Code: res.StatusCode, 4902 Header: res.Header, 4903 } 4904 } 4905 if err != nil { 4906 return nil, err 4907 } 4908 defer googleapi.CloseBody(res) 4909 if err := googleapi.CheckResponse(res); err != nil { 4910 return nil, err 4911 } 4912 ret := &OrderinvoicesCreateRefundInvoiceResponse{ 4913 ServerResponse: googleapi.ServerResponse{ 4914 Header: res.Header, 4915 HTTPStatusCode: res.StatusCode, 4916 }, 4917 } 4918 target := &ret 4919 if err := gensupport.DecodeResponse(target, res); err != nil { 4920 return nil, err 4921 } 4922 return ret, nil 4923 // { 4924 // "description": "Creates a refund invoice for one or more shipment groups, and triggers a refund for non-facilitated payment 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.", 4925 // "httpMethod": "POST", 4926 // "id": "content.orderinvoices.createrefundinvoice", 4927 // "parameterOrder": [ 4928 // "merchantId", 4929 // "orderId" 4930 // ], 4931 // "parameters": { 4932 // "merchantId": { 4933 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 4934 // "format": "uint64", 4935 // "location": "path", 4936 // "required": true, 4937 // "type": "string" 4938 // }, 4939 // "orderId": { 4940 // "description": "The ID of the order.", 4941 // "location": "path", 4942 // "required": true, 4943 // "type": "string" 4944 // } 4945 // }, 4946 // "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", 4947 // "request": { 4948 // "$ref": "OrderinvoicesCreateRefundInvoiceRequest" 4949 // }, 4950 // "response": { 4951 // "$ref": "OrderinvoicesCreateRefundInvoiceResponse" 4952 // }, 4953 // "scopes": [ 4954 // "https://www.googleapis.com/auth/content" 4955 // ] 4956 // } 4957 4958} 4959 4960// method id "content.orderpayments.notifyauthapproved": 4961 4962type OrderpaymentsNotifyauthapprovedCall struct { 4963 s *APIService 4964 merchantId uint64 4965 orderId string 4966 orderpaymentsnotifyauthapprovedrequest *OrderpaymentsNotifyAuthApprovedRequest 4967 urlParams_ gensupport.URLParams 4968 ctx_ context.Context 4969 header_ http.Header 4970} 4971 4972// Notifyauthapproved: Notify about successfully authorizing user's 4973// payment method for a given amount. 4974func (r *OrderpaymentsService) Notifyauthapproved(merchantId uint64, orderId string, orderpaymentsnotifyauthapprovedrequest *OrderpaymentsNotifyAuthApprovedRequest) *OrderpaymentsNotifyauthapprovedCall { 4975 c := &OrderpaymentsNotifyauthapprovedCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4976 c.merchantId = merchantId 4977 c.orderId = orderId 4978 c.orderpaymentsnotifyauthapprovedrequest = orderpaymentsnotifyauthapprovedrequest 4979 return c 4980} 4981 4982// Fields allows partial responses to be retrieved. See 4983// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4984// for more information. 4985func (c *OrderpaymentsNotifyauthapprovedCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifyauthapprovedCall { 4986 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4987 return c 4988} 4989 4990// Context sets the context to be used in this call's Do method. Any 4991// pending HTTP request will be aborted if the provided context is 4992// canceled. 4993func (c *OrderpaymentsNotifyauthapprovedCall) Context(ctx context.Context) *OrderpaymentsNotifyauthapprovedCall { 4994 c.ctx_ = ctx 4995 return c 4996} 4997 4998// Header returns an http.Header that can be modified by the caller to 4999// add HTTP headers to the request. 5000func (c *OrderpaymentsNotifyauthapprovedCall) Header() http.Header { 5001 if c.header_ == nil { 5002 c.header_ = make(http.Header) 5003 } 5004 return c.header_ 5005} 5006 5007func (c *OrderpaymentsNotifyauthapprovedCall) doRequest(alt string) (*http.Response, error) { 5008 reqHeaders := make(http.Header) 5009 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 5010 for k, v := range c.header_ { 5011 reqHeaders[k] = v 5012 } 5013 reqHeaders.Set("User-Agent", c.s.userAgent()) 5014 var body io.Reader = nil 5015 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifyauthapprovedrequest) 5016 if err != nil { 5017 return nil, err 5018 } 5019 reqHeaders.Set("Content-Type", "application/json") 5020 c.urlParams_.Set("alt", alt) 5021 c.urlParams_.Set("prettyPrint", "false") 5022 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyAuthApproved") 5023 urls += "?" + c.urlParams_.Encode() 5024 req, err := http.NewRequest("POST", urls, body) 5025 if err != nil { 5026 return nil, err 5027 } 5028 req.Header = reqHeaders 5029 googleapi.Expand(req.URL, map[string]string{ 5030 "merchantId": strconv.FormatUint(c.merchantId, 10), 5031 "orderId": c.orderId, 5032 }) 5033 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5034} 5035 5036// Do executes the "content.orderpayments.notifyauthapproved" call. 5037// Exactly one of *OrderpaymentsNotifyAuthApprovedResponse or error will 5038// be non-nil. Any non-2xx status code is an error. Response headers are 5039// in either 5040// *OrderpaymentsNotifyAuthApprovedResponse.ServerResponse.Header or (if 5041// a response was returned at all) in error.(*googleapi.Error).Header. 5042// Use googleapi.IsNotModified to check whether the returned error was 5043// because http.StatusNotModified was returned. 5044func (c *OrderpaymentsNotifyauthapprovedCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyAuthApprovedResponse, error) { 5045 gensupport.SetOptions(c.urlParams_, opts...) 5046 res, err := c.doRequest("json") 5047 if res != nil && res.StatusCode == http.StatusNotModified { 5048 if res.Body != nil { 5049 res.Body.Close() 5050 } 5051 return nil, &googleapi.Error{ 5052 Code: res.StatusCode, 5053 Header: res.Header, 5054 } 5055 } 5056 if err != nil { 5057 return nil, err 5058 } 5059 defer googleapi.CloseBody(res) 5060 if err := googleapi.CheckResponse(res); err != nil { 5061 return nil, err 5062 } 5063 ret := &OrderpaymentsNotifyAuthApprovedResponse{ 5064 ServerResponse: googleapi.ServerResponse{ 5065 Header: res.Header, 5066 HTTPStatusCode: res.StatusCode, 5067 }, 5068 } 5069 target := &ret 5070 if err := gensupport.DecodeResponse(target, res); err != nil { 5071 return nil, err 5072 } 5073 return ret, nil 5074 // { 5075 // "description": "Notify about successfully authorizing user's payment method for a given amount.", 5076 // "httpMethod": "POST", 5077 // "id": "content.orderpayments.notifyauthapproved", 5078 // "parameterOrder": [ 5079 // "merchantId", 5080 // "orderId" 5081 // ], 5082 // "parameters": { 5083 // "merchantId": { 5084 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 5085 // "format": "uint64", 5086 // "location": "path", 5087 // "required": true, 5088 // "type": "string" 5089 // }, 5090 // "orderId": { 5091 // "description": "The ID of the order for for which payment authorization is happening.", 5092 // "location": "path", 5093 // "required": true, 5094 // "type": "string" 5095 // } 5096 // }, 5097 // "path": "{merchantId}/orderpayments/{orderId}/notifyAuthApproved", 5098 // "request": { 5099 // "$ref": "OrderpaymentsNotifyAuthApprovedRequest" 5100 // }, 5101 // "response": { 5102 // "$ref": "OrderpaymentsNotifyAuthApprovedResponse" 5103 // }, 5104 // "scopes": [ 5105 // "https://www.googleapis.com/auth/content" 5106 // ] 5107 // } 5108 5109} 5110 5111// method id "content.orderpayments.notifyauthdeclined": 5112 5113type OrderpaymentsNotifyauthdeclinedCall struct { 5114 s *APIService 5115 merchantId uint64 5116 orderId string 5117 orderpaymentsnotifyauthdeclinedrequest *OrderpaymentsNotifyAuthDeclinedRequest 5118 urlParams_ gensupport.URLParams 5119 ctx_ context.Context 5120 header_ http.Header 5121} 5122 5123// Notifyauthdeclined: Notify about failure to authorize user's payment 5124// method. 5125func (r *OrderpaymentsService) Notifyauthdeclined(merchantId uint64, orderId string, orderpaymentsnotifyauthdeclinedrequest *OrderpaymentsNotifyAuthDeclinedRequest) *OrderpaymentsNotifyauthdeclinedCall { 5126 c := &OrderpaymentsNotifyauthdeclinedCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5127 c.merchantId = merchantId 5128 c.orderId = orderId 5129 c.orderpaymentsnotifyauthdeclinedrequest = orderpaymentsnotifyauthdeclinedrequest 5130 return c 5131} 5132 5133// Fields allows partial responses to be retrieved. See 5134// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5135// for more information. 5136func (c *OrderpaymentsNotifyauthdeclinedCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifyauthdeclinedCall { 5137 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5138 return c 5139} 5140 5141// Context sets the context to be used in this call's Do method. Any 5142// pending HTTP request will be aborted if the provided context is 5143// canceled. 5144func (c *OrderpaymentsNotifyauthdeclinedCall) Context(ctx context.Context) *OrderpaymentsNotifyauthdeclinedCall { 5145 c.ctx_ = ctx 5146 return c 5147} 5148 5149// Header returns an http.Header that can be modified by the caller to 5150// add HTTP headers to the request. 5151func (c *OrderpaymentsNotifyauthdeclinedCall) Header() http.Header { 5152 if c.header_ == nil { 5153 c.header_ = make(http.Header) 5154 } 5155 return c.header_ 5156} 5157 5158func (c *OrderpaymentsNotifyauthdeclinedCall) doRequest(alt string) (*http.Response, error) { 5159 reqHeaders := make(http.Header) 5160 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 5161 for k, v := range c.header_ { 5162 reqHeaders[k] = v 5163 } 5164 reqHeaders.Set("User-Agent", c.s.userAgent()) 5165 var body io.Reader = nil 5166 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifyauthdeclinedrequest) 5167 if err != nil { 5168 return nil, err 5169 } 5170 reqHeaders.Set("Content-Type", "application/json") 5171 c.urlParams_.Set("alt", alt) 5172 c.urlParams_.Set("prettyPrint", "false") 5173 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyAuthDeclined") 5174 urls += "?" + c.urlParams_.Encode() 5175 req, err := http.NewRequest("POST", urls, body) 5176 if err != nil { 5177 return nil, err 5178 } 5179 req.Header = reqHeaders 5180 googleapi.Expand(req.URL, map[string]string{ 5181 "merchantId": strconv.FormatUint(c.merchantId, 10), 5182 "orderId": c.orderId, 5183 }) 5184 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5185} 5186 5187// Do executes the "content.orderpayments.notifyauthdeclined" call. 5188// Exactly one of *OrderpaymentsNotifyAuthDeclinedResponse or error will 5189// be non-nil. Any non-2xx status code is an error. Response headers are 5190// in either 5191// *OrderpaymentsNotifyAuthDeclinedResponse.ServerResponse.Header or (if 5192// a response was returned at all) in error.(*googleapi.Error).Header. 5193// Use googleapi.IsNotModified to check whether the returned error was 5194// because http.StatusNotModified was returned. 5195func (c *OrderpaymentsNotifyauthdeclinedCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyAuthDeclinedResponse, error) { 5196 gensupport.SetOptions(c.urlParams_, opts...) 5197 res, err := c.doRequest("json") 5198 if res != nil && res.StatusCode == http.StatusNotModified { 5199 if res.Body != nil { 5200 res.Body.Close() 5201 } 5202 return nil, &googleapi.Error{ 5203 Code: res.StatusCode, 5204 Header: res.Header, 5205 } 5206 } 5207 if err != nil { 5208 return nil, err 5209 } 5210 defer googleapi.CloseBody(res) 5211 if err := googleapi.CheckResponse(res); err != nil { 5212 return nil, err 5213 } 5214 ret := &OrderpaymentsNotifyAuthDeclinedResponse{ 5215 ServerResponse: googleapi.ServerResponse{ 5216 Header: res.Header, 5217 HTTPStatusCode: res.StatusCode, 5218 }, 5219 } 5220 target := &ret 5221 if err := gensupport.DecodeResponse(target, res); err != nil { 5222 return nil, err 5223 } 5224 return ret, nil 5225 // { 5226 // "description": "Notify about failure to authorize user's payment method.", 5227 // "httpMethod": "POST", 5228 // "id": "content.orderpayments.notifyauthdeclined", 5229 // "parameterOrder": [ 5230 // "merchantId", 5231 // "orderId" 5232 // ], 5233 // "parameters": { 5234 // "merchantId": { 5235 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 5236 // "format": "uint64", 5237 // "location": "path", 5238 // "required": true, 5239 // "type": "string" 5240 // }, 5241 // "orderId": { 5242 // "description": "The ID of the order for which payment authorization was declined.", 5243 // "location": "path", 5244 // "required": true, 5245 // "type": "string" 5246 // } 5247 // }, 5248 // "path": "{merchantId}/orderpayments/{orderId}/notifyAuthDeclined", 5249 // "request": { 5250 // "$ref": "OrderpaymentsNotifyAuthDeclinedRequest" 5251 // }, 5252 // "response": { 5253 // "$ref": "OrderpaymentsNotifyAuthDeclinedResponse" 5254 // }, 5255 // "scopes": [ 5256 // "https://www.googleapis.com/auth/content" 5257 // ] 5258 // } 5259 5260} 5261 5262// method id "content.orderpayments.notifycharge": 5263 5264type OrderpaymentsNotifychargeCall struct { 5265 s *APIService 5266 merchantId uint64 5267 orderId string 5268 orderpaymentsnotifychargerequest *OrderpaymentsNotifyChargeRequest 5269 urlParams_ gensupport.URLParams 5270 ctx_ context.Context 5271 header_ http.Header 5272} 5273 5274// Notifycharge: Notify about charge on user's selected payments method. 5275func (r *OrderpaymentsService) Notifycharge(merchantId uint64, orderId string, orderpaymentsnotifychargerequest *OrderpaymentsNotifyChargeRequest) *OrderpaymentsNotifychargeCall { 5276 c := &OrderpaymentsNotifychargeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5277 c.merchantId = merchantId 5278 c.orderId = orderId 5279 c.orderpaymentsnotifychargerequest = orderpaymentsnotifychargerequest 5280 return c 5281} 5282 5283// Fields allows partial responses to be retrieved. See 5284// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5285// for more information. 5286func (c *OrderpaymentsNotifychargeCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifychargeCall { 5287 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5288 return c 5289} 5290 5291// Context sets the context to be used in this call's Do method. Any 5292// pending HTTP request will be aborted if the provided context is 5293// canceled. 5294func (c *OrderpaymentsNotifychargeCall) Context(ctx context.Context) *OrderpaymentsNotifychargeCall { 5295 c.ctx_ = ctx 5296 return c 5297} 5298 5299// Header returns an http.Header that can be modified by the caller to 5300// add HTTP headers to the request. 5301func (c *OrderpaymentsNotifychargeCall) Header() http.Header { 5302 if c.header_ == nil { 5303 c.header_ = make(http.Header) 5304 } 5305 return c.header_ 5306} 5307 5308func (c *OrderpaymentsNotifychargeCall) doRequest(alt string) (*http.Response, error) { 5309 reqHeaders := make(http.Header) 5310 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 5311 for k, v := range c.header_ { 5312 reqHeaders[k] = v 5313 } 5314 reqHeaders.Set("User-Agent", c.s.userAgent()) 5315 var body io.Reader = nil 5316 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifychargerequest) 5317 if err != nil { 5318 return nil, err 5319 } 5320 reqHeaders.Set("Content-Type", "application/json") 5321 c.urlParams_.Set("alt", alt) 5322 c.urlParams_.Set("prettyPrint", "false") 5323 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyCharge") 5324 urls += "?" + c.urlParams_.Encode() 5325 req, err := http.NewRequest("POST", urls, body) 5326 if err != nil { 5327 return nil, err 5328 } 5329 req.Header = reqHeaders 5330 googleapi.Expand(req.URL, map[string]string{ 5331 "merchantId": strconv.FormatUint(c.merchantId, 10), 5332 "orderId": c.orderId, 5333 }) 5334 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5335} 5336 5337// Do executes the "content.orderpayments.notifycharge" call. 5338// Exactly one of *OrderpaymentsNotifyChargeResponse or error will be 5339// non-nil. Any non-2xx status code is an error. Response headers are in 5340// either *OrderpaymentsNotifyChargeResponse.ServerResponse.Header or 5341// (if a response was returned at all) in 5342// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5343// whether the returned error was because http.StatusNotModified was 5344// returned. 5345func (c *OrderpaymentsNotifychargeCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyChargeResponse, error) { 5346 gensupport.SetOptions(c.urlParams_, opts...) 5347 res, err := c.doRequest("json") 5348 if res != nil && res.StatusCode == http.StatusNotModified { 5349 if res.Body != nil { 5350 res.Body.Close() 5351 } 5352 return nil, &googleapi.Error{ 5353 Code: res.StatusCode, 5354 Header: res.Header, 5355 } 5356 } 5357 if err != nil { 5358 return nil, err 5359 } 5360 defer googleapi.CloseBody(res) 5361 if err := googleapi.CheckResponse(res); err != nil { 5362 return nil, err 5363 } 5364 ret := &OrderpaymentsNotifyChargeResponse{ 5365 ServerResponse: googleapi.ServerResponse{ 5366 Header: res.Header, 5367 HTTPStatusCode: res.StatusCode, 5368 }, 5369 } 5370 target := &ret 5371 if err := gensupport.DecodeResponse(target, res); err != nil { 5372 return nil, err 5373 } 5374 return ret, nil 5375 // { 5376 // "description": "Notify about charge on user's selected payments method.", 5377 // "httpMethod": "POST", 5378 // "id": "content.orderpayments.notifycharge", 5379 // "parameterOrder": [ 5380 // "merchantId", 5381 // "orderId" 5382 // ], 5383 // "parameters": { 5384 // "merchantId": { 5385 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 5386 // "format": "uint64", 5387 // "location": "path", 5388 // "required": true, 5389 // "type": "string" 5390 // }, 5391 // "orderId": { 5392 // "description": "The ID of the order for which charge is happening.", 5393 // "location": "path", 5394 // "required": true, 5395 // "type": "string" 5396 // } 5397 // }, 5398 // "path": "{merchantId}/orderpayments/{orderId}/notifyCharge", 5399 // "request": { 5400 // "$ref": "OrderpaymentsNotifyChargeRequest" 5401 // }, 5402 // "response": { 5403 // "$ref": "OrderpaymentsNotifyChargeResponse" 5404 // }, 5405 // "scopes": [ 5406 // "https://www.googleapis.com/auth/content" 5407 // ] 5408 // } 5409 5410} 5411 5412// method id "content.orderpayments.notifyrefund": 5413 5414type OrderpaymentsNotifyrefundCall struct { 5415 s *APIService 5416 merchantId uint64 5417 orderId string 5418 orderpaymentsnotifyrefundrequest *OrderpaymentsNotifyRefundRequest 5419 urlParams_ gensupport.URLParams 5420 ctx_ context.Context 5421 header_ http.Header 5422} 5423 5424// Notifyrefund: Notify about refund on user's selected payments method. 5425func (r *OrderpaymentsService) Notifyrefund(merchantId uint64, orderId string, orderpaymentsnotifyrefundrequest *OrderpaymentsNotifyRefundRequest) *OrderpaymentsNotifyrefundCall { 5426 c := &OrderpaymentsNotifyrefundCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5427 c.merchantId = merchantId 5428 c.orderId = orderId 5429 c.orderpaymentsnotifyrefundrequest = orderpaymentsnotifyrefundrequest 5430 return c 5431} 5432 5433// Fields allows partial responses to be retrieved. See 5434// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5435// for more information. 5436func (c *OrderpaymentsNotifyrefundCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifyrefundCall { 5437 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5438 return c 5439} 5440 5441// Context sets the context to be used in this call's Do method. Any 5442// pending HTTP request will be aborted if the provided context is 5443// canceled. 5444func (c *OrderpaymentsNotifyrefundCall) Context(ctx context.Context) *OrderpaymentsNotifyrefundCall { 5445 c.ctx_ = ctx 5446 return c 5447} 5448 5449// Header returns an http.Header that can be modified by the caller to 5450// add HTTP headers to the request. 5451func (c *OrderpaymentsNotifyrefundCall) Header() http.Header { 5452 if c.header_ == nil { 5453 c.header_ = make(http.Header) 5454 } 5455 return c.header_ 5456} 5457 5458func (c *OrderpaymentsNotifyrefundCall) doRequest(alt string) (*http.Response, error) { 5459 reqHeaders := make(http.Header) 5460 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 5461 for k, v := range c.header_ { 5462 reqHeaders[k] = v 5463 } 5464 reqHeaders.Set("User-Agent", c.s.userAgent()) 5465 var body io.Reader = nil 5466 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifyrefundrequest) 5467 if err != nil { 5468 return nil, err 5469 } 5470 reqHeaders.Set("Content-Type", "application/json") 5471 c.urlParams_.Set("alt", alt) 5472 c.urlParams_.Set("prettyPrint", "false") 5473 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyRefund") 5474 urls += "?" + c.urlParams_.Encode() 5475 req, err := http.NewRequest("POST", urls, body) 5476 if err != nil { 5477 return nil, err 5478 } 5479 req.Header = reqHeaders 5480 googleapi.Expand(req.URL, map[string]string{ 5481 "merchantId": strconv.FormatUint(c.merchantId, 10), 5482 "orderId": c.orderId, 5483 }) 5484 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5485} 5486 5487// Do executes the "content.orderpayments.notifyrefund" call. 5488// Exactly one of *OrderpaymentsNotifyRefundResponse or error will be 5489// non-nil. Any non-2xx status code is an error. Response headers are in 5490// either *OrderpaymentsNotifyRefundResponse.ServerResponse.Header or 5491// (if a response was returned at all) in 5492// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5493// whether the returned error was because http.StatusNotModified was 5494// returned. 5495func (c *OrderpaymentsNotifyrefundCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyRefundResponse, error) { 5496 gensupport.SetOptions(c.urlParams_, opts...) 5497 res, err := c.doRequest("json") 5498 if res != nil && res.StatusCode == http.StatusNotModified { 5499 if res.Body != nil { 5500 res.Body.Close() 5501 } 5502 return nil, &googleapi.Error{ 5503 Code: res.StatusCode, 5504 Header: res.Header, 5505 } 5506 } 5507 if err != nil { 5508 return nil, err 5509 } 5510 defer googleapi.CloseBody(res) 5511 if err := googleapi.CheckResponse(res); err != nil { 5512 return nil, err 5513 } 5514 ret := &OrderpaymentsNotifyRefundResponse{ 5515 ServerResponse: googleapi.ServerResponse{ 5516 Header: res.Header, 5517 HTTPStatusCode: res.StatusCode, 5518 }, 5519 } 5520 target := &ret 5521 if err := gensupport.DecodeResponse(target, res); err != nil { 5522 return nil, err 5523 } 5524 return ret, nil 5525 // { 5526 // "description": "Notify about refund on user's selected payments method.", 5527 // "httpMethod": "POST", 5528 // "id": "content.orderpayments.notifyrefund", 5529 // "parameterOrder": [ 5530 // "merchantId", 5531 // "orderId" 5532 // ], 5533 // "parameters": { 5534 // "merchantId": { 5535 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 5536 // "format": "uint64", 5537 // "location": "path", 5538 // "required": true, 5539 // "type": "string" 5540 // }, 5541 // "orderId": { 5542 // "description": "The ID of the order for which charge is happening.", 5543 // "location": "path", 5544 // "required": true, 5545 // "type": "string" 5546 // } 5547 // }, 5548 // "path": "{merchantId}/orderpayments/{orderId}/notifyRefund", 5549 // "request": { 5550 // "$ref": "OrderpaymentsNotifyRefundRequest" 5551 // }, 5552 // "response": { 5553 // "$ref": "OrderpaymentsNotifyRefundResponse" 5554 // }, 5555 // "scopes": [ 5556 // "https://www.googleapis.com/auth/content" 5557 // ] 5558 // } 5559 5560} 5561 5562// method id "content.orderreturns.get": 5563 5564type OrderreturnsGetCall struct { 5565 s *APIService 5566 merchantId uint64 5567 returnId string 5568 urlParams_ gensupport.URLParams 5569 ifNoneMatch_ string 5570 ctx_ context.Context 5571 header_ http.Header 5572} 5573 5574// Get: Retrieves an order return from your Merchant Center account. 5575func (r *OrderreturnsService) Get(merchantId uint64, returnId string) *OrderreturnsGetCall { 5576 c := &OrderreturnsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5577 c.merchantId = merchantId 5578 c.returnId = returnId 5579 return c 5580} 5581 5582// Fields allows partial responses to be retrieved. See 5583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5584// for more information. 5585func (c *OrderreturnsGetCall) Fields(s ...googleapi.Field) *OrderreturnsGetCall { 5586 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5587 return c 5588} 5589 5590// IfNoneMatch sets the optional parameter which makes the operation 5591// fail if the object's ETag matches the given value. This is useful for 5592// getting updates only after the object has changed since the last 5593// request. Use googleapi.IsNotModified to check whether the response 5594// error from Do is the result of In-None-Match. 5595func (c *OrderreturnsGetCall) IfNoneMatch(entityTag string) *OrderreturnsGetCall { 5596 c.ifNoneMatch_ = entityTag 5597 return c 5598} 5599 5600// Context sets the context to be used in this call's Do method. Any 5601// pending HTTP request will be aborted if the provided context is 5602// canceled. 5603func (c *OrderreturnsGetCall) Context(ctx context.Context) *OrderreturnsGetCall { 5604 c.ctx_ = ctx 5605 return c 5606} 5607 5608// Header returns an http.Header that can be modified by the caller to 5609// add HTTP headers to the request. 5610func (c *OrderreturnsGetCall) Header() http.Header { 5611 if c.header_ == nil { 5612 c.header_ = make(http.Header) 5613 } 5614 return c.header_ 5615} 5616 5617func (c *OrderreturnsGetCall) doRequest(alt string) (*http.Response, error) { 5618 reqHeaders := make(http.Header) 5619 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 5620 for k, v := range c.header_ { 5621 reqHeaders[k] = v 5622 } 5623 reqHeaders.Set("User-Agent", c.s.userAgent()) 5624 if c.ifNoneMatch_ != "" { 5625 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5626 } 5627 var body io.Reader = nil 5628 c.urlParams_.Set("alt", alt) 5629 c.urlParams_.Set("prettyPrint", "false") 5630 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}") 5631 urls += "?" + c.urlParams_.Encode() 5632 req, err := http.NewRequest("GET", urls, body) 5633 if err != nil { 5634 return nil, err 5635 } 5636 req.Header = reqHeaders 5637 googleapi.Expand(req.URL, map[string]string{ 5638 "merchantId": strconv.FormatUint(c.merchantId, 10), 5639 "returnId": c.returnId, 5640 }) 5641 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5642} 5643 5644// Do executes the "content.orderreturns.get" call. 5645// Exactly one of *MerchantOrderReturn or error will be non-nil. Any 5646// non-2xx status code is an error. Response headers are in either 5647// *MerchantOrderReturn.ServerResponse.Header or (if a response was 5648// returned at all) in error.(*googleapi.Error).Header. Use 5649// googleapi.IsNotModified to check whether the returned error was 5650// because http.StatusNotModified was returned. 5651func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderReturn, error) { 5652 gensupport.SetOptions(c.urlParams_, opts...) 5653 res, err := c.doRequest("json") 5654 if res != nil && res.StatusCode == http.StatusNotModified { 5655 if res.Body != nil { 5656 res.Body.Close() 5657 } 5658 return nil, &googleapi.Error{ 5659 Code: res.StatusCode, 5660 Header: res.Header, 5661 } 5662 } 5663 if err != nil { 5664 return nil, err 5665 } 5666 defer googleapi.CloseBody(res) 5667 if err := googleapi.CheckResponse(res); err != nil { 5668 return nil, err 5669 } 5670 ret := &MerchantOrderReturn{ 5671 ServerResponse: googleapi.ServerResponse{ 5672 Header: res.Header, 5673 HTTPStatusCode: res.StatusCode, 5674 }, 5675 } 5676 target := &ret 5677 if err := gensupport.DecodeResponse(target, res); err != nil { 5678 return nil, err 5679 } 5680 return ret, nil 5681 // { 5682 // "description": "Retrieves an order return from your Merchant Center account.", 5683 // "httpMethod": "GET", 5684 // "id": "content.orderreturns.get", 5685 // "parameterOrder": [ 5686 // "merchantId", 5687 // "returnId" 5688 // ], 5689 // "parameters": { 5690 // "merchantId": { 5691 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 5692 // "format": "uint64", 5693 // "location": "path", 5694 // "required": true, 5695 // "type": "string" 5696 // }, 5697 // "returnId": { 5698 // "description": "Merchant order return ID generated by Google.", 5699 // "location": "path", 5700 // "required": true, 5701 // "type": "string" 5702 // } 5703 // }, 5704 // "path": "{merchantId}/orderreturns/{returnId}", 5705 // "response": { 5706 // "$ref": "MerchantOrderReturn" 5707 // }, 5708 // "scopes": [ 5709 // "https://www.googleapis.com/auth/content" 5710 // ] 5711 // } 5712 5713} 5714 5715// method id "content.orderreturns.list": 5716 5717type OrderreturnsListCall struct { 5718 s *APIService 5719 merchantId uint64 5720 urlParams_ gensupport.URLParams 5721 ifNoneMatch_ string 5722 ctx_ context.Context 5723 header_ http.Header 5724} 5725 5726// List: Lists order returns in your Merchant Center account. 5727func (r *OrderreturnsService) List(merchantId uint64) *OrderreturnsListCall { 5728 c := &OrderreturnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5729 c.merchantId = merchantId 5730 return c 5731} 5732 5733// CreatedEndDate sets the optional parameter "createdEndDate": Obtains 5734// order returns created before this date (inclusively), in ISO 8601 5735// format. 5736func (c *OrderreturnsListCall) CreatedEndDate(createdEndDate string) *OrderreturnsListCall { 5737 c.urlParams_.Set("createdEndDate", createdEndDate) 5738 return c 5739} 5740 5741// CreatedStartDate sets the optional parameter "createdStartDate": 5742// Obtains order returns created after this date (inclusively), in ISO 5743// 8601 format. 5744func (c *OrderreturnsListCall) CreatedStartDate(createdStartDate string) *OrderreturnsListCall { 5745 c.urlParams_.Set("createdStartDate", createdStartDate) 5746 return c 5747} 5748 5749// MaxResults sets the optional parameter "maxResults": The maximum 5750// number of order returns to return in the response, used for paging. 5751// The default value is 25 returns per page, and the maximum allowed 5752// value is 250 returns per page. 5753func (c *OrderreturnsListCall) MaxResults(maxResults int64) *OrderreturnsListCall { 5754 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 5755 return c 5756} 5757 5758// OrderBy sets the optional parameter "orderBy": Return the results in 5759// the specified order. 5760// 5761// Possible values: 5762// "returnCreationTimeAsc" 5763// "returnCreationTimeDesc" 5764func (c *OrderreturnsListCall) OrderBy(orderBy string) *OrderreturnsListCall { 5765 c.urlParams_.Set("orderBy", orderBy) 5766 return c 5767} 5768 5769// PageToken sets the optional parameter "pageToken": The token returned 5770// by the previous request. 5771func (c *OrderreturnsListCall) PageToken(pageToken string) *OrderreturnsListCall { 5772 c.urlParams_.Set("pageToken", pageToken) 5773 return c 5774} 5775 5776// Fields allows partial responses to be retrieved. See 5777// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5778// for more information. 5779func (c *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCall { 5780 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5781 return c 5782} 5783 5784// IfNoneMatch sets the optional parameter which makes the operation 5785// fail if the object's ETag matches the given value. This is useful for 5786// getting updates only after the object has changed since the last 5787// request. Use googleapi.IsNotModified to check whether the response 5788// error from Do is the result of In-None-Match. 5789func (c *OrderreturnsListCall) IfNoneMatch(entityTag string) *OrderreturnsListCall { 5790 c.ifNoneMatch_ = entityTag 5791 return c 5792} 5793 5794// Context sets the context to be used in this call's Do method. Any 5795// pending HTTP request will be aborted if the provided context is 5796// canceled. 5797func (c *OrderreturnsListCall) Context(ctx context.Context) *OrderreturnsListCall { 5798 c.ctx_ = ctx 5799 return c 5800} 5801 5802// Header returns an http.Header that can be modified by the caller to 5803// add HTTP headers to the request. 5804func (c *OrderreturnsListCall) Header() http.Header { 5805 if c.header_ == nil { 5806 c.header_ = make(http.Header) 5807 } 5808 return c.header_ 5809} 5810 5811func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { 5812 reqHeaders := make(http.Header) 5813 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 5814 for k, v := range c.header_ { 5815 reqHeaders[k] = v 5816 } 5817 reqHeaders.Set("User-Agent", c.s.userAgent()) 5818 if c.ifNoneMatch_ != "" { 5819 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5820 } 5821 var body io.Reader = nil 5822 c.urlParams_.Set("alt", alt) 5823 c.urlParams_.Set("prettyPrint", "false") 5824 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns") 5825 urls += "?" + c.urlParams_.Encode() 5826 req, err := http.NewRequest("GET", urls, body) 5827 if err != nil { 5828 return nil, err 5829 } 5830 req.Header = reqHeaders 5831 googleapi.Expand(req.URL, map[string]string{ 5832 "merchantId": strconv.FormatUint(c.merchantId, 10), 5833 }) 5834 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5835} 5836 5837// Do executes the "content.orderreturns.list" call. 5838// Exactly one of *OrderreturnsListResponse or error will be non-nil. 5839// Any non-2xx status code is an error. Response headers are in either 5840// *OrderreturnsListResponse.ServerResponse.Header or (if a response was 5841// returned at all) in error.(*googleapi.Error).Header. Use 5842// googleapi.IsNotModified to check whether the returned error was 5843// because http.StatusNotModified was returned. 5844func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsListResponse, error) { 5845 gensupport.SetOptions(c.urlParams_, opts...) 5846 res, err := c.doRequest("json") 5847 if res != nil && res.StatusCode == http.StatusNotModified { 5848 if res.Body != nil { 5849 res.Body.Close() 5850 } 5851 return nil, &googleapi.Error{ 5852 Code: res.StatusCode, 5853 Header: res.Header, 5854 } 5855 } 5856 if err != nil { 5857 return nil, err 5858 } 5859 defer googleapi.CloseBody(res) 5860 if err := googleapi.CheckResponse(res); err != nil { 5861 return nil, err 5862 } 5863 ret := &OrderreturnsListResponse{ 5864 ServerResponse: googleapi.ServerResponse{ 5865 Header: res.Header, 5866 HTTPStatusCode: res.StatusCode, 5867 }, 5868 } 5869 target := &ret 5870 if err := gensupport.DecodeResponse(target, res); err != nil { 5871 return nil, err 5872 } 5873 return ret, nil 5874 // { 5875 // "description": "Lists order returns in your Merchant Center account.", 5876 // "httpMethod": "GET", 5877 // "id": "content.orderreturns.list", 5878 // "parameterOrder": [ 5879 // "merchantId" 5880 // ], 5881 // "parameters": { 5882 // "createdEndDate": { 5883 // "description": "Obtains order returns created before this date (inclusively), in ISO 8601 format.", 5884 // "location": "query", 5885 // "type": "string" 5886 // }, 5887 // "createdStartDate": { 5888 // "description": "Obtains order returns created after this date (inclusively), in ISO 8601 format.", 5889 // "location": "query", 5890 // "type": "string" 5891 // }, 5892 // "maxResults": { 5893 // "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.", 5894 // "format": "uint32", 5895 // "location": "query", 5896 // "type": "integer" 5897 // }, 5898 // "merchantId": { 5899 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 5900 // "format": "uint64", 5901 // "location": "path", 5902 // "required": true, 5903 // "type": "string" 5904 // }, 5905 // "orderBy": { 5906 // "description": "Return the results in the specified order.", 5907 // "enum": [ 5908 // "returnCreationTimeAsc", 5909 // "returnCreationTimeDesc" 5910 // ], 5911 // "enumDescriptions": [ 5912 // "", 5913 // "" 5914 // ], 5915 // "location": "query", 5916 // "type": "string" 5917 // }, 5918 // "pageToken": { 5919 // "description": "The token returned by the previous request.", 5920 // "location": "query", 5921 // "type": "string" 5922 // } 5923 // }, 5924 // "path": "{merchantId}/orderreturns", 5925 // "response": { 5926 // "$ref": "OrderreturnsListResponse" 5927 // }, 5928 // "scopes": [ 5929 // "https://www.googleapis.com/auth/content" 5930 // ] 5931 // } 5932 5933} 5934 5935// Pages invokes f for each page of results. 5936// A non-nil error returned from f will halt the iteration. 5937// The provided context supersedes any context provided to the Context method. 5938func (c *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsListResponse) error) error { 5939 c.ctx_ = ctx 5940 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5941 for { 5942 x, err := c.Do() 5943 if err != nil { 5944 return err 5945 } 5946 if err := f(x); err != nil { 5947 return err 5948 } 5949 if x.NextPageToken == "" { 5950 return nil 5951 } 5952 c.PageToken(x.NextPageToken) 5953 } 5954} 5955 5956// method id "content.orders.acknowledge": 5957 5958type OrdersAcknowledgeCall struct { 5959 s *APIService 5960 merchantId uint64 5961 orderId string 5962 ordersacknowledgerequest *OrdersAcknowledgeRequest 5963 urlParams_ gensupport.URLParams 5964 ctx_ context.Context 5965 header_ http.Header 5966} 5967 5968// Acknowledge: Marks an order as acknowledged. 5969func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall { 5970 c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5971 c.merchantId = merchantId 5972 c.orderId = orderId 5973 c.ordersacknowledgerequest = ordersacknowledgerequest 5974 return c 5975} 5976 5977// Fields allows partial responses to be retrieved. See 5978// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5979// for more information. 5980func (c *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall { 5981 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5982 return c 5983} 5984 5985// Context sets the context to be used in this call's Do method. Any 5986// pending HTTP request will be aborted if the provided context is 5987// canceled. 5988func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall { 5989 c.ctx_ = ctx 5990 return c 5991} 5992 5993// Header returns an http.Header that can be modified by the caller to 5994// add HTTP headers to the request. 5995func (c *OrdersAcknowledgeCall) Header() http.Header { 5996 if c.header_ == nil { 5997 c.header_ = make(http.Header) 5998 } 5999 return c.header_ 6000} 6001 6002func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) { 6003 reqHeaders := make(http.Header) 6004 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 6005 for k, v := range c.header_ { 6006 reqHeaders[k] = v 6007 } 6008 reqHeaders.Set("User-Agent", c.s.userAgent()) 6009 var body io.Reader = nil 6010 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest) 6011 if err != nil { 6012 return nil, err 6013 } 6014 reqHeaders.Set("Content-Type", "application/json") 6015 c.urlParams_.Set("alt", alt) 6016 c.urlParams_.Set("prettyPrint", "false") 6017 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge") 6018 urls += "?" + c.urlParams_.Encode() 6019 req, err := http.NewRequest("POST", urls, body) 6020 if err != nil { 6021 return nil, err 6022 } 6023 req.Header = reqHeaders 6024 googleapi.Expand(req.URL, map[string]string{ 6025 "merchantId": strconv.FormatUint(c.merchantId, 10), 6026 "orderId": c.orderId, 6027 }) 6028 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6029} 6030 6031// Do executes the "content.orders.acknowledge" call. 6032// Exactly one of *OrdersAcknowledgeResponse or error will be non-nil. 6033// Any non-2xx status code is an error. Response headers are in either 6034// *OrdersAcknowledgeResponse.ServerResponse.Header or (if a response 6035// was returned at all) in error.(*googleapi.Error).Header. Use 6036// googleapi.IsNotModified to check whether the returned error was 6037// because http.StatusNotModified was returned. 6038func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) { 6039 gensupport.SetOptions(c.urlParams_, opts...) 6040 res, err := c.doRequest("json") 6041 if res != nil && res.StatusCode == http.StatusNotModified { 6042 if res.Body != nil { 6043 res.Body.Close() 6044 } 6045 return nil, &googleapi.Error{ 6046 Code: res.StatusCode, 6047 Header: res.Header, 6048 } 6049 } 6050 if err != nil { 6051 return nil, err 6052 } 6053 defer googleapi.CloseBody(res) 6054 if err := googleapi.CheckResponse(res); err != nil { 6055 return nil, err 6056 } 6057 ret := &OrdersAcknowledgeResponse{ 6058 ServerResponse: googleapi.ServerResponse{ 6059 Header: res.Header, 6060 HTTPStatusCode: res.StatusCode, 6061 }, 6062 } 6063 target := &ret 6064 if err := gensupport.DecodeResponse(target, res); err != nil { 6065 return nil, err 6066 } 6067 return ret, nil 6068 // { 6069 // "description": "Marks an order as acknowledged.", 6070 // "httpMethod": "POST", 6071 // "id": "content.orders.acknowledge", 6072 // "parameterOrder": [ 6073 // "merchantId", 6074 // "orderId" 6075 // ], 6076 // "parameters": { 6077 // "merchantId": { 6078 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 6079 // "format": "uint64", 6080 // "location": "path", 6081 // "required": true, 6082 // "type": "string" 6083 // }, 6084 // "orderId": { 6085 // "description": "The ID of the order.", 6086 // "location": "path", 6087 // "required": true, 6088 // "type": "string" 6089 // } 6090 // }, 6091 // "path": "{merchantId}/orders/{orderId}/acknowledge", 6092 // "request": { 6093 // "$ref": "OrdersAcknowledgeRequest" 6094 // }, 6095 // "response": { 6096 // "$ref": "OrdersAcknowledgeResponse" 6097 // }, 6098 // "scopes": [ 6099 // "https://www.googleapis.com/auth/content" 6100 // ] 6101 // } 6102 6103} 6104 6105// method id "content.orders.advancetestorder": 6106 6107type OrdersAdvancetestorderCall struct { 6108 s *APIService 6109 merchantId uint64 6110 orderId string 6111 urlParams_ gensupport.URLParams 6112 ctx_ context.Context 6113 header_ http.Header 6114} 6115 6116// Advancetestorder: Sandbox only. Moves a test order from state 6117// "inProgress" to state "pendingShipment". 6118func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall { 6119 c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6120 c.merchantId = merchantId 6121 c.orderId = orderId 6122 return c 6123} 6124 6125// Fields allows partial responses to be retrieved. See 6126// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6127// for more information. 6128func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall { 6129 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6130 return c 6131} 6132 6133// Context sets the context to be used in this call's Do method. Any 6134// pending HTTP request will be aborted if the provided context is 6135// canceled. 6136func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall { 6137 c.ctx_ = ctx 6138 return c 6139} 6140 6141// Header returns an http.Header that can be modified by the caller to 6142// add HTTP headers to the request. 6143func (c *OrdersAdvancetestorderCall) Header() http.Header { 6144 if c.header_ == nil { 6145 c.header_ = make(http.Header) 6146 } 6147 return c.header_ 6148} 6149 6150func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) { 6151 reqHeaders := make(http.Header) 6152 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 6153 for k, v := range c.header_ { 6154 reqHeaders[k] = v 6155 } 6156 reqHeaders.Set("User-Agent", c.s.userAgent()) 6157 var body io.Reader = nil 6158 c.urlParams_.Set("alt", alt) 6159 c.urlParams_.Set("prettyPrint", "false") 6160 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance") 6161 urls += "?" + c.urlParams_.Encode() 6162 req, err := http.NewRequest("POST", urls, body) 6163 if err != nil { 6164 return nil, err 6165 } 6166 req.Header = reqHeaders 6167 googleapi.Expand(req.URL, map[string]string{ 6168 "merchantId": strconv.FormatUint(c.merchantId, 10), 6169 "orderId": c.orderId, 6170 }) 6171 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6172} 6173 6174// Do executes the "content.orders.advancetestorder" call. 6175// Exactly one of *OrdersAdvanceTestOrderResponse or error will be 6176// non-nil. Any non-2xx status code is an error. Response headers are in 6177// either *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a 6178// response was returned at all) in error.(*googleapi.Error).Header. Use 6179// googleapi.IsNotModified to check whether the returned error was 6180// because http.StatusNotModified was returned. 6181func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) { 6182 gensupport.SetOptions(c.urlParams_, opts...) 6183 res, err := c.doRequest("json") 6184 if res != nil && res.StatusCode == http.StatusNotModified { 6185 if res.Body != nil { 6186 res.Body.Close() 6187 } 6188 return nil, &googleapi.Error{ 6189 Code: res.StatusCode, 6190 Header: res.Header, 6191 } 6192 } 6193 if err != nil { 6194 return nil, err 6195 } 6196 defer googleapi.CloseBody(res) 6197 if err := googleapi.CheckResponse(res); err != nil { 6198 return nil, err 6199 } 6200 ret := &OrdersAdvanceTestOrderResponse{ 6201 ServerResponse: googleapi.ServerResponse{ 6202 Header: res.Header, 6203 HTTPStatusCode: res.StatusCode, 6204 }, 6205 } 6206 target := &ret 6207 if err := gensupport.DecodeResponse(target, res); err != nil { 6208 return nil, err 6209 } 6210 return ret, nil 6211 // { 6212 // "description": "Sandbox only. Moves a test order from state \"inProgress\" to state \"pendingShipment\".", 6213 // "httpMethod": "POST", 6214 // "id": "content.orders.advancetestorder", 6215 // "parameterOrder": [ 6216 // "merchantId", 6217 // "orderId" 6218 // ], 6219 // "parameters": { 6220 // "merchantId": { 6221 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 6222 // "format": "uint64", 6223 // "location": "path", 6224 // "required": true, 6225 // "type": "string" 6226 // }, 6227 // "orderId": { 6228 // "description": "The ID of the test order to modify.", 6229 // "location": "path", 6230 // "required": true, 6231 // "type": "string" 6232 // } 6233 // }, 6234 // "path": "{merchantId}/testorders/{orderId}/advance", 6235 // "response": { 6236 // "$ref": "OrdersAdvanceTestOrderResponse" 6237 // }, 6238 // "scopes": [ 6239 // "https://www.googleapis.com/auth/content" 6240 // ] 6241 // } 6242 6243} 6244 6245// method id "content.orders.cancel": 6246 6247type OrdersCancelCall struct { 6248 s *APIService 6249 merchantId uint64 6250 orderId string 6251 orderscancelrequest *OrdersCancelRequest 6252 urlParams_ gensupport.URLParams 6253 ctx_ context.Context 6254 header_ http.Header 6255} 6256 6257// Cancel: Cancels all line items in an order, making a full refund. 6258func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall { 6259 c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6260 c.merchantId = merchantId 6261 c.orderId = orderId 6262 c.orderscancelrequest = orderscancelrequest 6263 return c 6264} 6265 6266// Fields allows partial responses to be retrieved. See 6267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6268// for more information. 6269func (c *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall { 6270 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6271 return c 6272} 6273 6274// Context sets the context to be used in this call's Do method. Any 6275// pending HTTP request will be aborted if the provided context is 6276// canceled. 6277func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall { 6278 c.ctx_ = ctx 6279 return c 6280} 6281 6282// Header returns an http.Header that can be modified by the caller to 6283// add HTTP headers to the request. 6284func (c *OrdersCancelCall) Header() http.Header { 6285 if c.header_ == nil { 6286 c.header_ = make(http.Header) 6287 } 6288 return c.header_ 6289} 6290 6291func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) { 6292 reqHeaders := make(http.Header) 6293 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 6294 for k, v := range c.header_ { 6295 reqHeaders[k] = v 6296 } 6297 reqHeaders.Set("User-Agent", c.s.userAgent()) 6298 var body io.Reader = nil 6299 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest) 6300 if err != nil { 6301 return nil, err 6302 } 6303 reqHeaders.Set("Content-Type", "application/json") 6304 c.urlParams_.Set("alt", alt) 6305 c.urlParams_.Set("prettyPrint", "false") 6306 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel") 6307 urls += "?" + c.urlParams_.Encode() 6308 req, err := http.NewRequest("POST", urls, body) 6309 if err != nil { 6310 return nil, err 6311 } 6312 req.Header = reqHeaders 6313 googleapi.Expand(req.URL, map[string]string{ 6314 "merchantId": strconv.FormatUint(c.merchantId, 10), 6315 "orderId": c.orderId, 6316 }) 6317 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6318} 6319 6320// Do executes the "content.orders.cancel" call. 6321// Exactly one of *OrdersCancelResponse or error will be non-nil. Any 6322// non-2xx status code is an error. Response headers are in either 6323// *OrdersCancelResponse.ServerResponse.Header or (if a response was 6324// returned at all) in error.(*googleapi.Error).Header. Use 6325// googleapi.IsNotModified to check whether the returned error was 6326// because http.StatusNotModified was returned. 6327func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) { 6328 gensupport.SetOptions(c.urlParams_, opts...) 6329 res, err := c.doRequest("json") 6330 if res != nil && res.StatusCode == http.StatusNotModified { 6331 if res.Body != nil { 6332 res.Body.Close() 6333 } 6334 return nil, &googleapi.Error{ 6335 Code: res.StatusCode, 6336 Header: res.Header, 6337 } 6338 } 6339 if err != nil { 6340 return nil, err 6341 } 6342 defer googleapi.CloseBody(res) 6343 if err := googleapi.CheckResponse(res); err != nil { 6344 return nil, err 6345 } 6346 ret := &OrdersCancelResponse{ 6347 ServerResponse: googleapi.ServerResponse{ 6348 Header: res.Header, 6349 HTTPStatusCode: res.StatusCode, 6350 }, 6351 } 6352 target := &ret 6353 if err := gensupport.DecodeResponse(target, res); err != nil { 6354 return nil, err 6355 } 6356 return ret, nil 6357 // { 6358 // "description": "Cancels all line items in an order, making a full refund.", 6359 // "httpMethod": "POST", 6360 // "id": "content.orders.cancel", 6361 // "parameterOrder": [ 6362 // "merchantId", 6363 // "orderId" 6364 // ], 6365 // "parameters": { 6366 // "merchantId": { 6367 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 6368 // "format": "uint64", 6369 // "location": "path", 6370 // "required": true, 6371 // "type": "string" 6372 // }, 6373 // "orderId": { 6374 // "description": "The ID of the order to cancel.", 6375 // "location": "path", 6376 // "required": true, 6377 // "type": "string" 6378 // } 6379 // }, 6380 // "path": "{merchantId}/orders/{orderId}/cancel", 6381 // "request": { 6382 // "$ref": "OrdersCancelRequest" 6383 // }, 6384 // "response": { 6385 // "$ref": "OrdersCancelResponse" 6386 // }, 6387 // "scopes": [ 6388 // "https://www.googleapis.com/auth/content" 6389 // ] 6390 // } 6391 6392} 6393 6394// method id "content.orders.cancellineitem": 6395 6396type OrdersCancellineitemCall struct { 6397 s *APIService 6398 merchantId uint64 6399 orderId string 6400 orderscancellineitemrequest *OrdersCancelLineItemRequest 6401 urlParams_ gensupport.URLParams 6402 ctx_ context.Context 6403 header_ http.Header 6404} 6405 6406// Cancellineitem: Cancels a line item, making a full refund. 6407func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall { 6408 c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6409 c.merchantId = merchantId 6410 c.orderId = orderId 6411 c.orderscancellineitemrequest = orderscancellineitemrequest 6412 return c 6413} 6414 6415// Fields allows partial responses to be retrieved. See 6416// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6417// for more information. 6418func (c *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall { 6419 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6420 return c 6421} 6422 6423// Context sets the context to be used in this call's Do method. Any 6424// pending HTTP request will be aborted if the provided context is 6425// canceled. 6426func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall { 6427 c.ctx_ = ctx 6428 return c 6429} 6430 6431// Header returns an http.Header that can be modified by the caller to 6432// add HTTP headers to the request. 6433func (c *OrdersCancellineitemCall) Header() http.Header { 6434 if c.header_ == nil { 6435 c.header_ = make(http.Header) 6436 } 6437 return c.header_ 6438} 6439 6440func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) { 6441 reqHeaders := make(http.Header) 6442 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 6443 for k, v := range c.header_ { 6444 reqHeaders[k] = v 6445 } 6446 reqHeaders.Set("User-Agent", c.s.userAgent()) 6447 var body io.Reader = nil 6448 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest) 6449 if err != nil { 6450 return nil, err 6451 } 6452 reqHeaders.Set("Content-Type", "application/json") 6453 c.urlParams_.Set("alt", alt) 6454 c.urlParams_.Set("prettyPrint", "false") 6455 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem") 6456 urls += "?" + c.urlParams_.Encode() 6457 req, err := http.NewRequest("POST", urls, body) 6458 if err != nil { 6459 return nil, err 6460 } 6461 req.Header = reqHeaders 6462 googleapi.Expand(req.URL, map[string]string{ 6463 "merchantId": strconv.FormatUint(c.merchantId, 10), 6464 "orderId": c.orderId, 6465 }) 6466 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6467} 6468 6469// Do executes the "content.orders.cancellineitem" call. 6470// Exactly one of *OrdersCancelLineItemResponse or error will be 6471// non-nil. Any non-2xx status code is an error. Response headers are in 6472// either *OrdersCancelLineItemResponse.ServerResponse.Header or (if a 6473// response was returned at all) in error.(*googleapi.Error).Header. Use 6474// googleapi.IsNotModified to check whether the returned error was 6475// because http.StatusNotModified was returned. 6476func (c *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) { 6477 gensupport.SetOptions(c.urlParams_, opts...) 6478 res, err := c.doRequest("json") 6479 if res != nil && res.StatusCode == http.StatusNotModified { 6480 if res.Body != nil { 6481 res.Body.Close() 6482 } 6483 return nil, &googleapi.Error{ 6484 Code: res.StatusCode, 6485 Header: res.Header, 6486 } 6487 } 6488 if err != nil { 6489 return nil, err 6490 } 6491 defer googleapi.CloseBody(res) 6492 if err := googleapi.CheckResponse(res); err != nil { 6493 return nil, err 6494 } 6495 ret := &OrdersCancelLineItemResponse{ 6496 ServerResponse: googleapi.ServerResponse{ 6497 Header: res.Header, 6498 HTTPStatusCode: res.StatusCode, 6499 }, 6500 } 6501 target := &ret 6502 if err := gensupport.DecodeResponse(target, res); err != nil { 6503 return nil, err 6504 } 6505 return ret, nil 6506 // { 6507 // "description": "Cancels a line item, making a full refund.", 6508 // "httpMethod": "POST", 6509 // "id": "content.orders.cancellineitem", 6510 // "parameterOrder": [ 6511 // "merchantId", 6512 // "orderId" 6513 // ], 6514 // "parameters": { 6515 // "merchantId": { 6516 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 6517 // "format": "uint64", 6518 // "location": "path", 6519 // "required": true, 6520 // "type": "string" 6521 // }, 6522 // "orderId": { 6523 // "description": "The ID of the order.", 6524 // "location": "path", 6525 // "required": true, 6526 // "type": "string" 6527 // } 6528 // }, 6529 // "path": "{merchantId}/orders/{orderId}/cancelLineItem", 6530 // "request": { 6531 // "$ref": "OrdersCancelLineItemRequest" 6532 // }, 6533 // "response": { 6534 // "$ref": "OrdersCancelLineItemResponse" 6535 // }, 6536 // "scopes": [ 6537 // "https://www.googleapis.com/auth/content" 6538 // ] 6539 // } 6540 6541} 6542 6543// method id "content.orders.canceltestorderbycustomer": 6544 6545type OrdersCanceltestorderbycustomerCall struct { 6546 s *APIService 6547 merchantId uint64 6548 orderId string 6549 orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest 6550 urlParams_ gensupport.URLParams 6551 ctx_ context.Context 6552 header_ http.Header 6553} 6554 6555// Canceltestorderbycustomer: Sandbox only. Cancels a test order for 6556// customer-initiated cancellation. 6557func (r *OrdersService) Canceltestorderbycustomer(merchantId uint64, orderId string, orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest) *OrdersCanceltestorderbycustomerCall { 6558 c := &OrdersCanceltestorderbycustomerCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6559 c.merchantId = merchantId 6560 c.orderId = orderId 6561 c.orderscanceltestorderbycustomerrequest = orderscanceltestorderbycustomerrequest 6562 return c 6563} 6564 6565// Fields allows partial responses to be retrieved. See 6566// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6567// for more information. 6568func (c *OrdersCanceltestorderbycustomerCall) Fields(s ...googleapi.Field) *OrdersCanceltestorderbycustomerCall { 6569 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6570 return c 6571} 6572 6573// Context sets the context to be used in this call's Do method. Any 6574// pending HTTP request will be aborted if the provided context is 6575// canceled. 6576func (c *OrdersCanceltestorderbycustomerCall) Context(ctx context.Context) *OrdersCanceltestorderbycustomerCall { 6577 c.ctx_ = ctx 6578 return c 6579} 6580 6581// Header returns an http.Header that can be modified by the caller to 6582// add HTTP headers to the request. 6583func (c *OrdersCanceltestorderbycustomerCall) Header() http.Header { 6584 if c.header_ == nil { 6585 c.header_ = make(http.Header) 6586 } 6587 return c.header_ 6588} 6589 6590func (c *OrdersCanceltestorderbycustomerCall) doRequest(alt string) (*http.Response, error) { 6591 reqHeaders := make(http.Header) 6592 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 6593 for k, v := range c.header_ { 6594 reqHeaders[k] = v 6595 } 6596 reqHeaders.Set("User-Agent", c.s.userAgent()) 6597 var body io.Reader = nil 6598 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscanceltestorderbycustomerrequest) 6599 if err != nil { 6600 return nil, err 6601 } 6602 reqHeaders.Set("Content-Type", "application/json") 6603 c.urlParams_.Set("alt", alt) 6604 c.urlParams_.Set("prettyPrint", "false") 6605 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/cancelByCustomer") 6606 urls += "?" + c.urlParams_.Encode() 6607 req, err := http.NewRequest("POST", urls, body) 6608 if err != nil { 6609 return nil, err 6610 } 6611 req.Header = reqHeaders 6612 googleapi.Expand(req.URL, map[string]string{ 6613 "merchantId": strconv.FormatUint(c.merchantId, 10), 6614 "orderId": c.orderId, 6615 }) 6616 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6617} 6618 6619// Do executes the "content.orders.canceltestorderbycustomer" call. 6620// Exactly one of *OrdersCancelTestOrderByCustomerResponse or error will 6621// be non-nil. Any non-2xx status code is an error. Response headers are 6622// in either 6623// *OrdersCancelTestOrderByCustomerResponse.ServerResponse.Header or (if 6624// a response was returned at all) in error.(*googleapi.Error).Header. 6625// Use googleapi.IsNotModified to check whether the returned error was 6626// because http.StatusNotModified was returned. 6627func (c *OrdersCanceltestorderbycustomerCall) Do(opts ...googleapi.CallOption) (*OrdersCancelTestOrderByCustomerResponse, error) { 6628 gensupport.SetOptions(c.urlParams_, opts...) 6629 res, err := c.doRequest("json") 6630 if res != nil && res.StatusCode == http.StatusNotModified { 6631 if res.Body != nil { 6632 res.Body.Close() 6633 } 6634 return nil, &googleapi.Error{ 6635 Code: res.StatusCode, 6636 Header: res.Header, 6637 } 6638 } 6639 if err != nil { 6640 return nil, err 6641 } 6642 defer googleapi.CloseBody(res) 6643 if err := googleapi.CheckResponse(res); err != nil { 6644 return nil, err 6645 } 6646 ret := &OrdersCancelTestOrderByCustomerResponse{ 6647 ServerResponse: googleapi.ServerResponse{ 6648 Header: res.Header, 6649 HTTPStatusCode: res.StatusCode, 6650 }, 6651 } 6652 target := &ret 6653 if err := gensupport.DecodeResponse(target, res); err != nil { 6654 return nil, err 6655 } 6656 return ret, nil 6657 // { 6658 // "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.", 6659 // "httpMethod": "POST", 6660 // "id": "content.orders.canceltestorderbycustomer", 6661 // "parameterOrder": [ 6662 // "merchantId", 6663 // "orderId" 6664 // ], 6665 // "parameters": { 6666 // "merchantId": { 6667 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 6668 // "format": "uint64", 6669 // "location": "path", 6670 // "required": true, 6671 // "type": "string" 6672 // }, 6673 // "orderId": { 6674 // "description": "The ID of the test order to cancel.", 6675 // "location": "path", 6676 // "required": true, 6677 // "type": "string" 6678 // } 6679 // }, 6680 // "path": "{merchantId}/testorders/{orderId}/cancelByCustomer", 6681 // "request": { 6682 // "$ref": "OrdersCancelTestOrderByCustomerRequest" 6683 // }, 6684 // "response": { 6685 // "$ref": "OrdersCancelTestOrderByCustomerResponse" 6686 // }, 6687 // "scopes": [ 6688 // "https://www.googleapis.com/auth/content" 6689 // ] 6690 // } 6691 6692} 6693 6694// method id "content.orders.createtestorder": 6695 6696type OrdersCreatetestorderCall struct { 6697 s *APIService 6698 merchantId uint64 6699 orderscreatetestorderrequest *OrdersCreateTestOrderRequest 6700 urlParams_ gensupport.URLParams 6701 ctx_ context.Context 6702 header_ http.Header 6703} 6704 6705// Createtestorder: Sandbox only. Creates a test order. 6706func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall { 6707 c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6708 c.merchantId = merchantId 6709 c.orderscreatetestorderrequest = orderscreatetestorderrequest 6710 return c 6711} 6712 6713// Fields allows partial responses to be retrieved. See 6714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6715// for more information. 6716func (c *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall { 6717 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6718 return c 6719} 6720 6721// Context sets the context to be used in this call's Do method. Any 6722// pending HTTP request will be aborted if the provided context is 6723// canceled. 6724func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall { 6725 c.ctx_ = ctx 6726 return c 6727} 6728 6729// Header returns an http.Header that can be modified by the caller to 6730// add HTTP headers to the request. 6731func (c *OrdersCreatetestorderCall) Header() http.Header { 6732 if c.header_ == nil { 6733 c.header_ = make(http.Header) 6734 } 6735 return c.header_ 6736} 6737 6738func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) { 6739 reqHeaders := make(http.Header) 6740 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 6741 for k, v := range c.header_ { 6742 reqHeaders[k] = v 6743 } 6744 reqHeaders.Set("User-Agent", c.s.userAgent()) 6745 var body io.Reader = nil 6746 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest) 6747 if err != nil { 6748 return nil, err 6749 } 6750 reqHeaders.Set("Content-Type", "application/json") 6751 c.urlParams_.Set("alt", alt) 6752 c.urlParams_.Set("prettyPrint", "false") 6753 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders") 6754 urls += "?" + c.urlParams_.Encode() 6755 req, err := http.NewRequest("POST", urls, body) 6756 if err != nil { 6757 return nil, err 6758 } 6759 req.Header = reqHeaders 6760 googleapi.Expand(req.URL, map[string]string{ 6761 "merchantId": strconv.FormatUint(c.merchantId, 10), 6762 }) 6763 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6764} 6765 6766// Do executes the "content.orders.createtestorder" call. 6767// Exactly one of *OrdersCreateTestOrderResponse or error will be 6768// non-nil. Any non-2xx status code is an error. Response headers are in 6769// either *OrdersCreateTestOrderResponse.ServerResponse.Header or (if a 6770// response was returned at all) in error.(*googleapi.Error).Header. Use 6771// googleapi.IsNotModified to check whether the returned error was 6772// because http.StatusNotModified was returned. 6773func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) { 6774 gensupport.SetOptions(c.urlParams_, opts...) 6775 res, err := c.doRequest("json") 6776 if res != nil && res.StatusCode == http.StatusNotModified { 6777 if res.Body != nil { 6778 res.Body.Close() 6779 } 6780 return nil, &googleapi.Error{ 6781 Code: res.StatusCode, 6782 Header: res.Header, 6783 } 6784 } 6785 if err != nil { 6786 return nil, err 6787 } 6788 defer googleapi.CloseBody(res) 6789 if err := googleapi.CheckResponse(res); err != nil { 6790 return nil, err 6791 } 6792 ret := &OrdersCreateTestOrderResponse{ 6793 ServerResponse: googleapi.ServerResponse{ 6794 Header: res.Header, 6795 HTTPStatusCode: res.StatusCode, 6796 }, 6797 } 6798 target := &ret 6799 if err := gensupport.DecodeResponse(target, res); err != nil { 6800 return nil, err 6801 } 6802 return ret, nil 6803 // { 6804 // "description": "Sandbox only. Creates a test order.", 6805 // "httpMethod": "POST", 6806 // "id": "content.orders.createtestorder", 6807 // "parameterOrder": [ 6808 // "merchantId" 6809 // ], 6810 // "parameters": { 6811 // "merchantId": { 6812 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 6813 // "format": "uint64", 6814 // "location": "path", 6815 // "required": true, 6816 // "type": "string" 6817 // } 6818 // }, 6819 // "path": "{merchantId}/testorders", 6820 // "request": { 6821 // "$ref": "OrdersCreateTestOrderRequest" 6822 // }, 6823 // "response": { 6824 // "$ref": "OrdersCreateTestOrderResponse" 6825 // }, 6826 // "scopes": [ 6827 // "https://www.googleapis.com/auth/content" 6828 // ] 6829 // } 6830 6831} 6832 6833// method id "content.orders.createtestreturn": 6834 6835type OrdersCreatetestreturnCall struct { 6836 s *APIService 6837 merchantId uint64 6838 orderId string 6839 orderscreatetestreturnrequest *OrdersCreateTestReturnRequest 6840 urlParams_ gensupport.URLParams 6841 ctx_ context.Context 6842 header_ http.Header 6843} 6844 6845// Createtestreturn: Sandbox only. Creates a test return. 6846func (r *OrdersService) Createtestreturn(merchantId uint64, orderId string, orderscreatetestreturnrequest *OrdersCreateTestReturnRequest) *OrdersCreatetestreturnCall { 6847 c := &OrdersCreatetestreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6848 c.merchantId = merchantId 6849 c.orderId = orderId 6850 c.orderscreatetestreturnrequest = orderscreatetestreturnrequest 6851 return c 6852} 6853 6854// Fields allows partial responses to be retrieved. See 6855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6856// for more information. 6857func (c *OrdersCreatetestreturnCall) Fields(s ...googleapi.Field) *OrdersCreatetestreturnCall { 6858 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6859 return c 6860} 6861 6862// Context sets the context to be used in this call's Do method. Any 6863// pending HTTP request will be aborted if the provided context is 6864// canceled. 6865func (c *OrdersCreatetestreturnCall) Context(ctx context.Context) *OrdersCreatetestreturnCall { 6866 c.ctx_ = ctx 6867 return c 6868} 6869 6870// Header returns an http.Header that can be modified by the caller to 6871// add HTTP headers to the request. 6872func (c *OrdersCreatetestreturnCall) Header() http.Header { 6873 if c.header_ == nil { 6874 c.header_ = make(http.Header) 6875 } 6876 return c.header_ 6877} 6878 6879func (c *OrdersCreatetestreturnCall) doRequest(alt string) (*http.Response, error) { 6880 reqHeaders := make(http.Header) 6881 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 6882 for k, v := range c.header_ { 6883 reqHeaders[k] = v 6884 } 6885 reqHeaders.Set("User-Agent", c.s.userAgent()) 6886 var body io.Reader = nil 6887 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestreturnrequest) 6888 if err != nil { 6889 return nil, err 6890 } 6891 reqHeaders.Set("Content-Type", "application/json") 6892 c.urlParams_.Set("alt", alt) 6893 c.urlParams_.Set("prettyPrint", "false") 6894 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/testreturn") 6895 urls += "?" + c.urlParams_.Encode() 6896 req, err := http.NewRequest("POST", urls, body) 6897 if err != nil { 6898 return nil, err 6899 } 6900 req.Header = reqHeaders 6901 googleapi.Expand(req.URL, map[string]string{ 6902 "merchantId": strconv.FormatUint(c.merchantId, 10), 6903 "orderId": c.orderId, 6904 }) 6905 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6906} 6907 6908// Do executes the "content.orders.createtestreturn" call. 6909// Exactly one of *OrdersCreateTestReturnResponse or error will be 6910// non-nil. Any non-2xx status code is an error. Response headers are in 6911// either *OrdersCreateTestReturnResponse.ServerResponse.Header or (if a 6912// response was returned at all) in error.(*googleapi.Error).Header. Use 6913// googleapi.IsNotModified to check whether the returned error was 6914// because http.StatusNotModified was returned. 6915func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestReturnResponse, error) { 6916 gensupport.SetOptions(c.urlParams_, opts...) 6917 res, err := c.doRequest("json") 6918 if res != nil && res.StatusCode == http.StatusNotModified { 6919 if res.Body != nil { 6920 res.Body.Close() 6921 } 6922 return nil, &googleapi.Error{ 6923 Code: res.StatusCode, 6924 Header: res.Header, 6925 } 6926 } 6927 if err != nil { 6928 return nil, err 6929 } 6930 defer googleapi.CloseBody(res) 6931 if err := googleapi.CheckResponse(res); err != nil { 6932 return nil, err 6933 } 6934 ret := &OrdersCreateTestReturnResponse{ 6935 ServerResponse: googleapi.ServerResponse{ 6936 Header: res.Header, 6937 HTTPStatusCode: res.StatusCode, 6938 }, 6939 } 6940 target := &ret 6941 if err := gensupport.DecodeResponse(target, res); err != nil { 6942 return nil, err 6943 } 6944 return ret, nil 6945 // { 6946 // "description": "Sandbox only. Creates a test return.", 6947 // "httpMethod": "POST", 6948 // "id": "content.orders.createtestreturn", 6949 // "parameterOrder": [ 6950 // "merchantId", 6951 // "orderId" 6952 // ], 6953 // "parameters": { 6954 // "merchantId": { 6955 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 6956 // "format": "uint64", 6957 // "location": "path", 6958 // "required": true, 6959 // "type": "string" 6960 // }, 6961 // "orderId": { 6962 // "description": "The ID of the order.", 6963 // "location": "path", 6964 // "required": true, 6965 // "type": "string" 6966 // } 6967 // }, 6968 // "path": "{merchantId}/orders/{orderId}/testreturn", 6969 // "request": { 6970 // "$ref": "OrdersCreateTestReturnRequest" 6971 // }, 6972 // "response": { 6973 // "$ref": "OrdersCreateTestReturnResponse" 6974 // }, 6975 // "scopes": [ 6976 // "https://www.googleapis.com/auth/content" 6977 // ] 6978 // } 6979 6980} 6981 6982// method id "content.orders.custombatch": 6983 6984type OrdersCustombatchCall struct { 6985 s *APIService 6986 orderscustombatchrequest *OrdersCustomBatchRequest 6987 urlParams_ gensupport.URLParams 6988 ctx_ context.Context 6989 header_ http.Header 6990} 6991 6992// Custombatch: Retrieves or modifies multiple orders in a single 6993// request. 6994func (r *OrdersService) Custombatch(orderscustombatchrequest *OrdersCustomBatchRequest) *OrdersCustombatchCall { 6995 c := &OrdersCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6996 c.orderscustombatchrequest = orderscustombatchrequest 6997 return c 6998} 6999 7000// Fields allows partial responses to be retrieved. See 7001// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7002// for more information. 7003func (c *OrdersCustombatchCall) Fields(s ...googleapi.Field) *OrdersCustombatchCall { 7004 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7005 return c 7006} 7007 7008// Context sets the context to be used in this call's Do method. Any 7009// pending HTTP request will be aborted if the provided context is 7010// canceled. 7011func (c *OrdersCustombatchCall) Context(ctx context.Context) *OrdersCustombatchCall { 7012 c.ctx_ = ctx 7013 return c 7014} 7015 7016// Header returns an http.Header that can be modified by the caller to 7017// add HTTP headers to the request. 7018func (c *OrdersCustombatchCall) Header() http.Header { 7019 if c.header_ == nil { 7020 c.header_ = make(http.Header) 7021 } 7022 return c.header_ 7023} 7024 7025func (c *OrdersCustombatchCall) doRequest(alt string) (*http.Response, error) { 7026 reqHeaders := make(http.Header) 7027 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 7028 for k, v := range c.header_ { 7029 reqHeaders[k] = v 7030 } 7031 reqHeaders.Set("User-Agent", c.s.userAgent()) 7032 var body io.Reader = nil 7033 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscustombatchrequest) 7034 if err != nil { 7035 return nil, err 7036 } 7037 reqHeaders.Set("Content-Type", "application/json") 7038 c.urlParams_.Set("alt", alt) 7039 c.urlParams_.Set("prettyPrint", "false") 7040 urls := googleapi.ResolveRelative(c.s.BasePath, "orders/batch") 7041 urls += "?" + c.urlParams_.Encode() 7042 req, err := http.NewRequest("POST", urls, body) 7043 if err != nil { 7044 return nil, err 7045 } 7046 req.Header = reqHeaders 7047 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7048} 7049 7050// Do executes the "content.orders.custombatch" call. 7051// Exactly one of *OrdersCustomBatchResponse or error will be non-nil. 7052// Any non-2xx status code is an error. Response headers are in either 7053// *OrdersCustomBatchResponse.ServerResponse.Header or (if a response 7054// was returned at all) in error.(*googleapi.Error).Header. Use 7055// googleapi.IsNotModified to check whether the returned error was 7056// because http.StatusNotModified was returned. 7057func (c *OrdersCustombatchCall) Do(opts ...googleapi.CallOption) (*OrdersCustomBatchResponse, error) { 7058 gensupport.SetOptions(c.urlParams_, opts...) 7059 res, err := c.doRequest("json") 7060 if res != nil && res.StatusCode == http.StatusNotModified { 7061 if res.Body != nil { 7062 res.Body.Close() 7063 } 7064 return nil, &googleapi.Error{ 7065 Code: res.StatusCode, 7066 Header: res.Header, 7067 } 7068 } 7069 if err != nil { 7070 return nil, err 7071 } 7072 defer googleapi.CloseBody(res) 7073 if err := googleapi.CheckResponse(res); err != nil { 7074 return nil, err 7075 } 7076 ret := &OrdersCustomBatchResponse{ 7077 ServerResponse: googleapi.ServerResponse{ 7078 Header: res.Header, 7079 HTTPStatusCode: res.StatusCode, 7080 }, 7081 } 7082 target := &ret 7083 if err := gensupport.DecodeResponse(target, res); err != nil { 7084 return nil, err 7085 } 7086 return ret, nil 7087 // { 7088 // "description": "Retrieves or modifies multiple orders in a single request.", 7089 // "httpMethod": "POST", 7090 // "id": "content.orders.custombatch", 7091 // "path": "orders/batch", 7092 // "request": { 7093 // "$ref": "OrdersCustomBatchRequest" 7094 // }, 7095 // "response": { 7096 // "$ref": "OrdersCustomBatchResponse" 7097 // }, 7098 // "scopes": [ 7099 // "https://www.googleapis.com/auth/content" 7100 // ] 7101 // } 7102 7103} 7104 7105// method id "content.orders.get": 7106 7107type OrdersGetCall struct { 7108 s *APIService 7109 merchantId uint64 7110 orderId string 7111 urlParams_ gensupport.URLParams 7112 ifNoneMatch_ string 7113 ctx_ context.Context 7114 header_ http.Header 7115} 7116 7117// Get: Retrieves an order from your Merchant Center account. 7118func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall { 7119 c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7120 c.merchantId = merchantId 7121 c.orderId = orderId 7122 return c 7123} 7124 7125// Fields allows partial responses to be retrieved. See 7126// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7127// for more information. 7128func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall { 7129 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7130 return c 7131} 7132 7133// IfNoneMatch sets the optional parameter which makes the operation 7134// fail if the object's ETag matches the given value. This is useful for 7135// getting updates only after the object has changed since the last 7136// request. Use googleapi.IsNotModified to check whether the response 7137// error from Do is the result of In-None-Match. 7138func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall { 7139 c.ifNoneMatch_ = entityTag 7140 return c 7141} 7142 7143// Context sets the context to be used in this call's Do method. Any 7144// pending HTTP request will be aborted if the provided context is 7145// canceled. 7146func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall { 7147 c.ctx_ = ctx 7148 return c 7149} 7150 7151// Header returns an http.Header that can be modified by the caller to 7152// add HTTP headers to the request. 7153func (c *OrdersGetCall) Header() http.Header { 7154 if c.header_ == nil { 7155 c.header_ = make(http.Header) 7156 } 7157 return c.header_ 7158} 7159 7160func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { 7161 reqHeaders := make(http.Header) 7162 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 7163 for k, v := range c.header_ { 7164 reqHeaders[k] = v 7165 } 7166 reqHeaders.Set("User-Agent", c.s.userAgent()) 7167 if c.ifNoneMatch_ != "" { 7168 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7169 } 7170 var body io.Reader = nil 7171 c.urlParams_.Set("alt", alt) 7172 c.urlParams_.Set("prettyPrint", "false") 7173 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}") 7174 urls += "?" + c.urlParams_.Encode() 7175 req, err := http.NewRequest("GET", urls, body) 7176 if err != nil { 7177 return nil, err 7178 } 7179 req.Header = reqHeaders 7180 googleapi.Expand(req.URL, map[string]string{ 7181 "merchantId": strconv.FormatUint(c.merchantId, 10), 7182 "orderId": c.orderId, 7183 }) 7184 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7185} 7186 7187// Do executes the "content.orders.get" call. 7188// Exactly one of *Order or error will be non-nil. Any non-2xx status 7189// code is an error. Response headers are in either 7190// *Order.ServerResponse.Header or (if a response was returned at all) 7191// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7192// check whether the returned error was because http.StatusNotModified 7193// was returned. 7194func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { 7195 gensupport.SetOptions(c.urlParams_, opts...) 7196 res, err := c.doRequest("json") 7197 if res != nil && res.StatusCode == http.StatusNotModified { 7198 if res.Body != nil { 7199 res.Body.Close() 7200 } 7201 return nil, &googleapi.Error{ 7202 Code: res.StatusCode, 7203 Header: res.Header, 7204 } 7205 } 7206 if err != nil { 7207 return nil, err 7208 } 7209 defer googleapi.CloseBody(res) 7210 if err := googleapi.CheckResponse(res); err != nil { 7211 return nil, err 7212 } 7213 ret := &Order{ 7214 ServerResponse: googleapi.ServerResponse{ 7215 Header: res.Header, 7216 HTTPStatusCode: res.StatusCode, 7217 }, 7218 } 7219 target := &ret 7220 if err := gensupport.DecodeResponse(target, res); err != nil { 7221 return nil, err 7222 } 7223 return ret, nil 7224 // { 7225 // "description": "Retrieves an order from your Merchant Center account.", 7226 // "httpMethod": "GET", 7227 // "id": "content.orders.get", 7228 // "parameterOrder": [ 7229 // "merchantId", 7230 // "orderId" 7231 // ], 7232 // "parameters": { 7233 // "merchantId": { 7234 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 7235 // "format": "uint64", 7236 // "location": "path", 7237 // "required": true, 7238 // "type": "string" 7239 // }, 7240 // "orderId": { 7241 // "description": "The ID of the order.", 7242 // "location": "path", 7243 // "required": true, 7244 // "type": "string" 7245 // } 7246 // }, 7247 // "path": "{merchantId}/orders/{orderId}", 7248 // "response": { 7249 // "$ref": "Order" 7250 // }, 7251 // "scopes": [ 7252 // "https://www.googleapis.com/auth/content" 7253 // ] 7254 // } 7255 7256} 7257 7258// method id "content.orders.getbymerchantorderid": 7259 7260type OrdersGetbymerchantorderidCall struct { 7261 s *APIService 7262 merchantId uint64 7263 merchantOrderId string 7264 urlParams_ gensupport.URLParams 7265 ifNoneMatch_ string 7266 ctx_ context.Context 7267 header_ http.Header 7268} 7269 7270// Getbymerchantorderid: Retrieves an order using merchant order id. 7271func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall { 7272 c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7273 c.merchantId = merchantId 7274 c.merchantOrderId = merchantOrderId 7275 return c 7276} 7277 7278// Fields allows partial responses to be retrieved. See 7279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7280// for more information. 7281func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall { 7282 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7283 return c 7284} 7285 7286// IfNoneMatch sets the optional parameter which makes the operation 7287// fail if the object's ETag matches the given value. This is useful for 7288// getting updates only after the object has changed since the last 7289// request. Use googleapi.IsNotModified to check whether the response 7290// error from Do is the result of In-None-Match. 7291func (c *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall { 7292 c.ifNoneMatch_ = entityTag 7293 return c 7294} 7295 7296// Context sets the context to be used in this call's Do method. Any 7297// pending HTTP request will be aborted if the provided context is 7298// canceled. 7299func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall { 7300 c.ctx_ = ctx 7301 return c 7302} 7303 7304// Header returns an http.Header that can be modified by the caller to 7305// add HTTP headers to the request. 7306func (c *OrdersGetbymerchantorderidCall) Header() http.Header { 7307 if c.header_ == nil { 7308 c.header_ = make(http.Header) 7309 } 7310 return c.header_ 7311} 7312 7313func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) { 7314 reqHeaders := make(http.Header) 7315 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 7316 for k, v := range c.header_ { 7317 reqHeaders[k] = v 7318 } 7319 reqHeaders.Set("User-Agent", c.s.userAgent()) 7320 if c.ifNoneMatch_ != "" { 7321 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7322 } 7323 var body io.Reader = nil 7324 c.urlParams_.Set("alt", alt) 7325 c.urlParams_.Set("prettyPrint", "false") 7326 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}") 7327 urls += "?" + c.urlParams_.Encode() 7328 req, err := http.NewRequest("GET", urls, body) 7329 if err != nil { 7330 return nil, err 7331 } 7332 req.Header = reqHeaders 7333 googleapi.Expand(req.URL, map[string]string{ 7334 "merchantId": strconv.FormatUint(c.merchantId, 10), 7335 "merchantOrderId": c.merchantOrderId, 7336 }) 7337 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7338} 7339 7340// Do executes the "content.orders.getbymerchantorderid" call. 7341// Exactly one of *OrdersGetByMerchantOrderIdResponse or error will be 7342// non-nil. Any non-2xx status code is an error. Response headers are in 7343// either *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or 7344// (if a response was returned at all) in 7345// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7346// whether the returned error was because http.StatusNotModified was 7347// returned. 7348func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) { 7349 gensupport.SetOptions(c.urlParams_, opts...) 7350 res, err := c.doRequest("json") 7351 if res != nil && res.StatusCode == http.StatusNotModified { 7352 if res.Body != nil { 7353 res.Body.Close() 7354 } 7355 return nil, &googleapi.Error{ 7356 Code: res.StatusCode, 7357 Header: res.Header, 7358 } 7359 } 7360 if err != nil { 7361 return nil, err 7362 } 7363 defer googleapi.CloseBody(res) 7364 if err := googleapi.CheckResponse(res); err != nil { 7365 return nil, err 7366 } 7367 ret := &OrdersGetByMerchantOrderIdResponse{ 7368 ServerResponse: googleapi.ServerResponse{ 7369 Header: res.Header, 7370 HTTPStatusCode: res.StatusCode, 7371 }, 7372 } 7373 target := &ret 7374 if err := gensupport.DecodeResponse(target, res); err != nil { 7375 return nil, err 7376 } 7377 return ret, nil 7378 // { 7379 // "description": "Retrieves an order using merchant order id.", 7380 // "httpMethod": "GET", 7381 // "id": "content.orders.getbymerchantorderid", 7382 // "parameterOrder": [ 7383 // "merchantId", 7384 // "merchantOrderId" 7385 // ], 7386 // "parameters": { 7387 // "merchantId": { 7388 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 7389 // "format": "uint64", 7390 // "location": "path", 7391 // "required": true, 7392 // "type": "string" 7393 // }, 7394 // "merchantOrderId": { 7395 // "description": "The merchant order id to be looked for.", 7396 // "location": "path", 7397 // "required": true, 7398 // "type": "string" 7399 // } 7400 // }, 7401 // "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}", 7402 // "response": { 7403 // "$ref": "OrdersGetByMerchantOrderIdResponse" 7404 // }, 7405 // "scopes": [ 7406 // "https://www.googleapis.com/auth/content" 7407 // ] 7408 // } 7409 7410} 7411 7412// method id "content.orders.gettestordertemplate": 7413 7414type OrdersGettestordertemplateCall struct { 7415 s *APIService 7416 merchantId uint64 7417 templateName string 7418 urlParams_ gensupport.URLParams 7419 ifNoneMatch_ string 7420 ctx_ context.Context 7421 header_ http.Header 7422} 7423 7424// Gettestordertemplate: Sandbox only. Retrieves an order template that 7425// can be used to quickly create a new order in sandbox. 7426func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall { 7427 c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7428 c.merchantId = merchantId 7429 c.templateName = templateName 7430 return c 7431} 7432 7433// Country sets the optional parameter "country": The country of the 7434// template to retrieve. Defaults to US. 7435func (c *OrdersGettestordertemplateCall) Country(country string) *OrdersGettestordertemplateCall { 7436 c.urlParams_.Set("country", country) 7437 return c 7438} 7439 7440// Fields allows partial responses to be retrieved. See 7441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7442// for more information. 7443func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall { 7444 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7445 return c 7446} 7447 7448// IfNoneMatch sets the optional parameter which makes the operation 7449// fail if the object's ETag matches the given value. This is useful for 7450// getting updates only after the object has changed since the last 7451// request. Use googleapi.IsNotModified to check whether the response 7452// error from Do is the result of In-None-Match. 7453func (c *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall { 7454 c.ifNoneMatch_ = entityTag 7455 return c 7456} 7457 7458// Context sets the context to be used in this call's Do method. Any 7459// pending HTTP request will be aborted if the provided context is 7460// canceled. 7461func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall { 7462 c.ctx_ = ctx 7463 return c 7464} 7465 7466// Header returns an http.Header that can be modified by the caller to 7467// add HTTP headers to the request. 7468func (c *OrdersGettestordertemplateCall) Header() http.Header { 7469 if c.header_ == nil { 7470 c.header_ = make(http.Header) 7471 } 7472 return c.header_ 7473} 7474 7475func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) { 7476 reqHeaders := make(http.Header) 7477 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 7478 for k, v := range c.header_ { 7479 reqHeaders[k] = v 7480 } 7481 reqHeaders.Set("User-Agent", c.s.userAgent()) 7482 if c.ifNoneMatch_ != "" { 7483 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7484 } 7485 var body io.Reader = nil 7486 c.urlParams_.Set("alt", alt) 7487 c.urlParams_.Set("prettyPrint", "false") 7488 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}") 7489 urls += "?" + c.urlParams_.Encode() 7490 req, err := http.NewRequest("GET", urls, body) 7491 if err != nil { 7492 return nil, err 7493 } 7494 req.Header = reqHeaders 7495 googleapi.Expand(req.URL, map[string]string{ 7496 "merchantId": strconv.FormatUint(c.merchantId, 10), 7497 "templateName": c.templateName, 7498 }) 7499 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7500} 7501 7502// Do executes the "content.orders.gettestordertemplate" call. 7503// Exactly one of *OrdersGetTestOrderTemplateResponse or error will be 7504// non-nil. Any non-2xx status code is an error. Response headers are in 7505// either *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or 7506// (if a response was returned at all) in 7507// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7508// whether the returned error was because http.StatusNotModified was 7509// returned. 7510func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) { 7511 gensupport.SetOptions(c.urlParams_, opts...) 7512 res, err := c.doRequest("json") 7513 if res != nil && res.StatusCode == http.StatusNotModified { 7514 if res.Body != nil { 7515 res.Body.Close() 7516 } 7517 return nil, &googleapi.Error{ 7518 Code: res.StatusCode, 7519 Header: res.Header, 7520 } 7521 } 7522 if err != nil { 7523 return nil, err 7524 } 7525 defer googleapi.CloseBody(res) 7526 if err := googleapi.CheckResponse(res); err != nil { 7527 return nil, err 7528 } 7529 ret := &OrdersGetTestOrderTemplateResponse{ 7530 ServerResponse: googleapi.ServerResponse{ 7531 Header: res.Header, 7532 HTTPStatusCode: res.StatusCode, 7533 }, 7534 } 7535 target := &ret 7536 if err := gensupport.DecodeResponse(target, res); err != nil { 7537 return nil, err 7538 } 7539 return ret, nil 7540 // { 7541 // "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.", 7542 // "httpMethod": "GET", 7543 // "id": "content.orders.gettestordertemplate", 7544 // "parameterOrder": [ 7545 // "merchantId", 7546 // "templateName" 7547 // ], 7548 // "parameters": { 7549 // "country": { 7550 // "description": "The country of the template to retrieve. Defaults to US.", 7551 // "location": "query", 7552 // "type": "string" 7553 // }, 7554 // "merchantId": { 7555 // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", 7556 // "format": "uint64", 7557 // "location": "path", 7558 // "required": true, 7559 // "type": "string" 7560 // }, 7561 // "templateName": { 7562 // "description": "The name of the template to retrieve.", 7563 // "enum": [ 7564 // "template1", 7565 // "template1a", 7566 // "template1b", 7567 // "template2" 7568 // ], 7569 // "enumDescriptions": [ 7570 // "", 7571 // "", 7572 // "", 7573 // "" 7574 // ], 7575 // "location": "path", 7576 // "required": true, 7577 // "type": "string" 7578 // } 7579 // }, 7580 // "path": "{merchantId}/testordertemplates/{templateName}", 7581 // "response": { 7582 // "$ref": "OrdersGetTestOrderTemplateResponse" 7583 // }, 7584 // "scopes": [ 7585 // "https://www.googleapis.com/auth/content" 7586 // ] 7587 // } 7588 7589} 7590 7591// method id "content.orders.instorerefundlineitem": 7592 7593type OrdersInstorerefundlineitemCall struct { 7594 s *APIService 7595 merchantId uint64 7596 orderId string 7597 ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest 7598 urlParams_ gensupport.URLParams 7599 ctx_ context.Context 7600 header_ http.Header 7601} 7602 7603// Instorerefundlineitem: Notifies that item return and refund was 7604// handled directly by merchant outside of Google payments processing 7605// (e.g. cash refund done in store). 7606func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall { 7607 c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7608 c.merchantId = merchantId 7609 c.orderId = orderId 7610 c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest 7611 return c 7612} 7613 7614// Fields allows partial responses to be retrieved. See 7615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7616// for more information. 7617func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall { 7618 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7619 return c 7620} 7621 7622// Context sets the context to be used in this call's Do method. Any 7623// pending HTTP request will be aborted if the provided context is 7624// canceled. 7625func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall { 7626 c.ctx_ = ctx 7627 return c 7628} 7629 7630// Header returns an http.Header that can be modified by the caller to 7631// add HTTP headers to the request. 7632func (c *OrdersInstorerefundlineitemCall) Header() http.Header { 7633 if c.header_ == nil { 7634 c.header_ = make(http.Header) 7635 } 7636 return c.header_ 7637} 7638 7639func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) { 7640 reqHeaders := make(http.Header) 7641 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 7642 for k, v := range c.header_ { 7643 reqHeaders[k] = v 7644 } 7645 reqHeaders.Set("User-Agent", c.s.userAgent()) 7646 var body io.Reader = nil 7647 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest) 7648 if err != nil { 7649 return nil, err 7650 } 7651 reqHeaders.Set("Content-Type", "application/json") 7652 c.urlParams_.Set("alt", alt) 7653 c.urlParams_.Set("prettyPrint", "false") 7654 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem") 7655 urls += "?" + c.urlParams_.Encode() 7656 req, err := http.NewRequest("POST", urls, body) 7657 if err != nil { 7658 return nil, err 7659 } 7660 req.Header = reqHeaders 7661 googleapi.Expand(req.URL, map[string]string{ 7662 "merchantId": strconv.FormatUint(c.merchantId, 10), 7663 "orderId": c.orderId, 7664 }) 7665 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7666} 7667 7668// Do executes the "content.orders.instorerefundlineitem" call. 7669// Exactly one of *OrdersInStoreRefundLineItemResponse or error will be 7670// non-nil. Any non-2xx status code is an error. Response headers are in 7671// either *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or 7672// (if a response was returned at all) in 7673// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7674// whether the returned error was because http.StatusNotModified was 7675// returned. 7676func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) { 7677 gensupport.SetOptions(c.urlParams_, opts...) 7678 res, err := c.doRequest("json") 7679 if res != nil && res.StatusCode == http.StatusNotModified { 7680 if res.Body != nil { 7681 res.Body.Close() 7682 } 7683 return nil, &googleapi.Error{ 7684 Code: res.StatusCode, 7685 Header: res.Header, 7686 } 7687 } 7688 if err != nil { 7689 return nil, err 7690 } 7691 defer googleapi.CloseBody(res) 7692 if err := googleapi.CheckResponse(res); err != nil { 7693 return nil, err 7694 } 7695 ret := &OrdersInStoreRefundLineItemResponse{ 7696 ServerResponse: googleapi.ServerResponse{ 7697 Header: res.Header, 7698 HTTPStatusCode: res.StatusCode, 7699 }, 7700 } 7701 target := &ret 7702 if err := gensupport.DecodeResponse(target, res); err != nil { 7703 return nil, err 7704 } 7705 return ret, nil 7706 // { 7707 // "description": "Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store).", 7708 // "httpMethod": "POST", 7709 // "id": "content.orders.instorerefundlineitem", 7710 // "parameterOrder": [ 7711 // "merchantId", 7712 // "orderId" 7713 // ], 7714 // "parameters": { 7715 // "merchantId": { 7716 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 7717 // "format": "uint64", 7718 // "location": "path", 7719 // "required": true, 7720 // "type": "string" 7721 // }, 7722 // "orderId": { 7723 // "description": "The ID of the order.", 7724 // "location": "path", 7725 // "required": true, 7726 // "type": "string" 7727 // } 7728 // }, 7729 // "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", 7730 // "request": { 7731 // "$ref": "OrdersInStoreRefundLineItemRequest" 7732 // }, 7733 // "response": { 7734 // "$ref": "OrdersInStoreRefundLineItemResponse" 7735 // }, 7736 // "scopes": [ 7737 // "https://www.googleapis.com/auth/content" 7738 // ] 7739 // } 7740 7741} 7742 7743// method id "content.orders.list": 7744 7745type OrdersListCall struct { 7746 s *APIService 7747 merchantId uint64 7748 urlParams_ gensupport.URLParams 7749 ifNoneMatch_ string 7750 ctx_ context.Context 7751 header_ http.Header 7752} 7753 7754// List: Lists the orders in your Merchant Center account. 7755func (r *OrdersService) List(merchantId uint64) *OrdersListCall { 7756 c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7757 c.merchantId = merchantId 7758 return c 7759} 7760 7761// Acknowledged sets the optional parameter "acknowledged": Obtains 7762// orders that match the acknowledgement status. When set to true, 7763// obtains orders that have been acknowledged. When false, obtains 7764// orders that have not been acknowledged. 7765// We recommend using this filter set to false, in conjunction with the 7766// acknowledge call, such that only un-acknowledged orders are returned. 7767func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall { 7768 c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged)) 7769 return c 7770} 7771 7772// MaxResults sets the optional parameter "maxResults": The maximum 7773// number of orders to return in the response, used for paging. The 7774// default value is 25 orders per page, and the maximum allowed value is 7775// 250 orders per page. 7776// Known issue: All List calls will return all Orders without limit 7777// regardless of the value of this field. 7778func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall { 7779 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 7780 return c 7781} 7782 7783// OrderBy sets the optional parameter "orderBy": The ordering of the 7784// returned list. The only supported value are placedDate desc and 7785// placedDate asc for now, which returns orders sorted by placement 7786// date. "placedDate desc" stands for listing orders by placement date, 7787// from oldest to most recent. "placedDate asc" stands for listing 7788// orders by placement date, from most recent to oldest. In future 7789// releases we'll support other sorting criteria. 7790// 7791// Possible values: 7792// "placedDate asc" 7793// "placedDate desc" 7794func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall { 7795 c.urlParams_.Set("orderBy", orderBy) 7796 return c 7797} 7798 7799// PageToken sets the optional parameter "pageToken": The token returned 7800// by the previous request. 7801func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall { 7802 c.urlParams_.Set("pageToken", pageToken) 7803 return c 7804} 7805 7806// PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains 7807// orders placed before this date (exclusively), in ISO 8601 format. 7808func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall { 7809 c.urlParams_.Set("placedDateEnd", placedDateEnd) 7810 return c 7811} 7812 7813// PlacedDateStart sets the optional parameter "placedDateStart": 7814// Obtains orders placed after this date (inclusively), in ISO 8601 7815// format. 7816func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall { 7817 c.urlParams_.Set("placedDateStart", placedDateStart) 7818 return c 7819} 7820 7821// Statuses sets the optional parameter "statuses": Obtains orders that 7822// match any of the specified statuses. Multiple values can be specified 7823// with comma separation. Additionally, please note that active is a 7824// shortcut for pendingShipment and partiallyShipped, and completed is a 7825// shortcut for shipped , partiallyDelivered, delivered, 7826// partiallyReturned, returned, and canceled. 7827// 7828// Possible values: 7829// "active" 7830// "canceled" 7831// "completed" 7832// "delivered" 7833// "inProgress" 7834// "partiallyDelivered" 7835// "partiallyReturned" 7836// "partiallyShipped" 7837// "pendingShipment" 7838// "returned" 7839// "shipped" 7840func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall { 7841 c.urlParams_.SetMulti("statuses", append([]string{}, statuses...)) 7842 return c 7843} 7844 7845// Fields allows partial responses to be retrieved. See 7846// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7847// for more information. 7848func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall { 7849 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7850 return c 7851} 7852 7853// IfNoneMatch sets the optional parameter which makes the operation 7854// fail if the object's ETag matches the given value. This is useful for 7855// getting updates only after the object has changed since the last 7856// request. Use googleapi.IsNotModified to check whether the response 7857// error from Do is the result of In-None-Match. 7858func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall { 7859 c.ifNoneMatch_ = entityTag 7860 return c 7861} 7862 7863// Context sets the context to be used in this call's Do method. Any 7864// pending HTTP request will be aborted if the provided context is 7865// canceled. 7866func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall { 7867 c.ctx_ = ctx 7868 return c 7869} 7870 7871// Header returns an http.Header that can be modified by the caller to 7872// add HTTP headers to the request. 7873func (c *OrdersListCall) Header() http.Header { 7874 if c.header_ == nil { 7875 c.header_ = make(http.Header) 7876 } 7877 return c.header_ 7878} 7879 7880func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) { 7881 reqHeaders := make(http.Header) 7882 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 7883 for k, v := range c.header_ { 7884 reqHeaders[k] = v 7885 } 7886 reqHeaders.Set("User-Agent", c.s.userAgent()) 7887 if c.ifNoneMatch_ != "" { 7888 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7889 } 7890 var body io.Reader = nil 7891 c.urlParams_.Set("alt", alt) 7892 c.urlParams_.Set("prettyPrint", "false") 7893 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders") 7894 urls += "?" + c.urlParams_.Encode() 7895 req, err := http.NewRequest("GET", urls, body) 7896 if err != nil { 7897 return nil, err 7898 } 7899 req.Header = reqHeaders 7900 googleapi.Expand(req.URL, map[string]string{ 7901 "merchantId": strconv.FormatUint(c.merchantId, 10), 7902 }) 7903 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7904} 7905 7906// Do executes the "content.orders.list" call. 7907// Exactly one of *OrdersListResponse or error will be non-nil. Any 7908// non-2xx status code is an error. Response headers are in either 7909// *OrdersListResponse.ServerResponse.Header or (if a response was 7910// returned at all) in error.(*googleapi.Error).Header. Use 7911// googleapi.IsNotModified to check whether the returned error was 7912// because http.StatusNotModified was returned. 7913func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) { 7914 gensupport.SetOptions(c.urlParams_, opts...) 7915 res, err := c.doRequest("json") 7916 if res != nil && res.StatusCode == http.StatusNotModified { 7917 if res.Body != nil { 7918 res.Body.Close() 7919 } 7920 return nil, &googleapi.Error{ 7921 Code: res.StatusCode, 7922 Header: res.Header, 7923 } 7924 } 7925 if err != nil { 7926 return nil, err 7927 } 7928 defer googleapi.CloseBody(res) 7929 if err := googleapi.CheckResponse(res); err != nil { 7930 return nil, err 7931 } 7932 ret := &OrdersListResponse{ 7933 ServerResponse: googleapi.ServerResponse{ 7934 Header: res.Header, 7935 HTTPStatusCode: res.StatusCode, 7936 }, 7937 } 7938 target := &ret 7939 if err := gensupport.DecodeResponse(target, res); err != nil { 7940 return nil, err 7941 } 7942 return ret, nil 7943 // { 7944 // "description": "Lists the orders in your Merchant Center account.", 7945 // "httpMethod": "GET", 7946 // "id": "content.orders.list", 7947 // "parameterOrder": [ 7948 // "merchantId" 7949 // ], 7950 // "parameters": { 7951 // "acknowledged": { 7952 // "description": "Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged.\nWe recommend using this filter set to false, in conjunction with the acknowledge call, such that only un-acknowledged orders are returned.", 7953 // "location": "query", 7954 // "type": "boolean" 7955 // }, 7956 // "maxResults": { 7957 // "description": "The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page.\nKnown issue: All List calls will return all Orders without limit regardless of the value of this field.", 7958 // "format": "uint32", 7959 // "location": "query", 7960 // "type": "integer" 7961 // }, 7962 // "merchantId": { 7963 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 7964 // "format": "uint64", 7965 // "location": "path", 7966 // "required": true, 7967 // "type": "string" 7968 // }, 7969 // "orderBy": { 7970 // "description": "The ordering of the returned list. The only supported value are placedDate desc and placedDate asc for now, which returns orders sorted by placement date. \"placedDate desc\" stands for listing orders by placement date, from oldest to most recent. \"placedDate asc\" stands for listing orders by placement date, from most recent to oldest. In future releases we'll support other sorting criteria.", 7971 // "enum": [ 7972 // "placedDate asc", 7973 // "placedDate desc" 7974 // ], 7975 // "enumDescriptions": [ 7976 // "", 7977 // "" 7978 // ], 7979 // "location": "query", 7980 // "type": "string" 7981 // }, 7982 // "pageToken": { 7983 // "description": "The token returned by the previous request.", 7984 // "location": "query", 7985 // "type": "string" 7986 // }, 7987 // "placedDateEnd": { 7988 // "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.", 7989 // "location": "query", 7990 // "type": "string" 7991 // }, 7992 // "placedDateStart": { 7993 // "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.", 7994 // "location": "query", 7995 // "type": "string" 7996 // }, 7997 // "statuses": { 7998 // "description": "Obtains orders that match any of the specified statuses. Multiple values can be specified with comma separation. Additionally, please note that active is a shortcut for pendingShipment and partiallyShipped, and completed is a shortcut for shipped , partiallyDelivered, delivered, partiallyReturned, returned, and canceled.", 7999 // "enum": [ 8000 // "active", 8001 // "canceled", 8002 // "completed", 8003 // "delivered", 8004 // "inProgress", 8005 // "partiallyDelivered", 8006 // "partiallyReturned", 8007 // "partiallyShipped", 8008 // "pendingShipment", 8009 // "returned", 8010 // "shipped" 8011 // ], 8012 // "enumDescriptions": [ 8013 // "", 8014 // "", 8015 // "", 8016 // "", 8017 // "", 8018 // "", 8019 // "", 8020 // "", 8021 // "", 8022 // "", 8023 // "" 8024 // ], 8025 // "location": "query", 8026 // "repeated": true, 8027 // "type": "string" 8028 // } 8029 // }, 8030 // "path": "{merchantId}/orders", 8031 // "response": { 8032 // "$ref": "OrdersListResponse" 8033 // }, 8034 // "scopes": [ 8035 // "https://www.googleapis.com/auth/content" 8036 // ] 8037 // } 8038 8039} 8040 8041// Pages invokes f for each page of results. 8042// A non-nil error returned from f will halt the iteration. 8043// The provided context supersedes any context provided to the Context method. 8044func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error { 8045 c.ctx_ = ctx 8046 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8047 for { 8048 x, err := c.Do() 8049 if err != nil { 8050 return err 8051 } 8052 if err := f(x); err != nil { 8053 return err 8054 } 8055 if x.NextPageToken == "" { 8056 return nil 8057 } 8058 c.PageToken(x.NextPageToken) 8059 } 8060} 8061 8062// method id "content.orders.refund": 8063 8064type OrdersRefundCall struct { 8065 s *APIService 8066 merchantId uint64 8067 orderId string 8068 ordersrefundrequest *OrdersRefundRequest 8069 urlParams_ gensupport.URLParams 8070 ctx_ context.Context 8071 header_ http.Header 8072} 8073 8074// Refund: Deprecated, please use returnRefundLineItem instead. 8075func (r *OrdersService) Refund(merchantId uint64, orderId string, ordersrefundrequest *OrdersRefundRequest) *OrdersRefundCall { 8076 c := &OrdersRefundCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8077 c.merchantId = merchantId 8078 c.orderId = orderId 8079 c.ordersrefundrequest = ordersrefundrequest 8080 return c 8081} 8082 8083// Fields allows partial responses to be retrieved. See 8084// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8085// for more information. 8086func (c *OrdersRefundCall) Fields(s ...googleapi.Field) *OrdersRefundCall { 8087 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8088 return c 8089} 8090 8091// Context sets the context to be used in this call's Do method. Any 8092// pending HTTP request will be aborted if the provided context is 8093// canceled. 8094func (c *OrdersRefundCall) Context(ctx context.Context) *OrdersRefundCall { 8095 c.ctx_ = ctx 8096 return c 8097} 8098 8099// Header returns an http.Header that can be modified by the caller to 8100// add HTTP headers to the request. 8101func (c *OrdersRefundCall) Header() http.Header { 8102 if c.header_ == nil { 8103 c.header_ = make(http.Header) 8104 } 8105 return c.header_ 8106} 8107 8108func (c *OrdersRefundCall) doRequest(alt string) (*http.Response, error) { 8109 reqHeaders := make(http.Header) 8110 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 8111 for k, v := range c.header_ { 8112 reqHeaders[k] = v 8113 } 8114 reqHeaders.Set("User-Agent", c.s.userAgent()) 8115 var body io.Reader = nil 8116 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundrequest) 8117 if err != nil { 8118 return nil, err 8119 } 8120 reqHeaders.Set("Content-Type", "application/json") 8121 c.urlParams_.Set("alt", alt) 8122 c.urlParams_.Set("prettyPrint", "false") 8123 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refund") 8124 urls += "?" + c.urlParams_.Encode() 8125 req, err := http.NewRequest("POST", urls, body) 8126 if err != nil { 8127 return nil, err 8128 } 8129 req.Header = reqHeaders 8130 googleapi.Expand(req.URL, map[string]string{ 8131 "merchantId": strconv.FormatUint(c.merchantId, 10), 8132 "orderId": c.orderId, 8133 }) 8134 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8135} 8136 8137// Do executes the "content.orders.refund" call. 8138// Exactly one of *OrdersRefundResponse or error will be non-nil. Any 8139// non-2xx status code is an error. Response headers are in either 8140// *OrdersRefundResponse.ServerResponse.Header or (if a response was 8141// returned at all) in error.(*googleapi.Error).Header. Use 8142// googleapi.IsNotModified to check whether the returned error was 8143// because http.StatusNotModified was returned. 8144func (c *OrdersRefundCall) Do(opts ...googleapi.CallOption) (*OrdersRefundResponse, error) { 8145 gensupport.SetOptions(c.urlParams_, opts...) 8146 res, err := c.doRequest("json") 8147 if res != nil && res.StatusCode == http.StatusNotModified { 8148 if res.Body != nil { 8149 res.Body.Close() 8150 } 8151 return nil, &googleapi.Error{ 8152 Code: res.StatusCode, 8153 Header: res.Header, 8154 } 8155 } 8156 if err != nil { 8157 return nil, err 8158 } 8159 defer googleapi.CloseBody(res) 8160 if err := googleapi.CheckResponse(res); err != nil { 8161 return nil, err 8162 } 8163 ret := &OrdersRefundResponse{ 8164 ServerResponse: googleapi.ServerResponse{ 8165 Header: res.Header, 8166 HTTPStatusCode: res.StatusCode, 8167 }, 8168 } 8169 target := &ret 8170 if err := gensupport.DecodeResponse(target, res); err != nil { 8171 return nil, err 8172 } 8173 return ret, nil 8174 // { 8175 // "description": "Deprecated, please use returnRefundLineItem instead.", 8176 // "httpMethod": "POST", 8177 // "id": "content.orders.refund", 8178 // "parameterOrder": [ 8179 // "merchantId", 8180 // "orderId" 8181 // ], 8182 // "parameters": { 8183 // "merchantId": { 8184 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 8185 // "format": "uint64", 8186 // "location": "path", 8187 // "required": true, 8188 // "type": "string" 8189 // }, 8190 // "orderId": { 8191 // "description": "The ID of the order to refund.", 8192 // "location": "path", 8193 // "required": true, 8194 // "type": "string" 8195 // } 8196 // }, 8197 // "path": "{merchantId}/orders/{orderId}/refund", 8198 // "request": { 8199 // "$ref": "OrdersRefundRequest" 8200 // }, 8201 // "response": { 8202 // "$ref": "OrdersRefundResponse" 8203 // }, 8204 // "scopes": [ 8205 // "https://www.googleapis.com/auth/content" 8206 // ] 8207 // } 8208 8209} 8210 8211// method id "content.orders.rejectreturnlineitem": 8212 8213type OrdersRejectreturnlineitemCall struct { 8214 s *APIService 8215 merchantId uint64 8216 orderId string 8217 ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest 8218 urlParams_ gensupport.URLParams 8219 ctx_ context.Context 8220 header_ http.Header 8221} 8222 8223// Rejectreturnlineitem: Rejects return on an line item. 8224func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall { 8225 c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8226 c.merchantId = merchantId 8227 c.orderId = orderId 8228 c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest 8229 return c 8230} 8231 8232// Fields allows partial responses to be retrieved. See 8233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8234// for more information. 8235func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall { 8236 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8237 return c 8238} 8239 8240// Context sets the context to be used in this call's Do method. Any 8241// pending HTTP request will be aborted if the provided context is 8242// canceled. 8243func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall { 8244 c.ctx_ = ctx 8245 return c 8246} 8247 8248// Header returns an http.Header that can be modified by the caller to 8249// add HTTP headers to the request. 8250func (c *OrdersRejectreturnlineitemCall) Header() http.Header { 8251 if c.header_ == nil { 8252 c.header_ = make(http.Header) 8253 } 8254 return c.header_ 8255} 8256 8257func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) { 8258 reqHeaders := make(http.Header) 8259 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 8260 for k, v := range c.header_ { 8261 reqHeaders[k] = v 8262 } 8263 reqHeaders.Set("User-Agent", c.s.userAgent()) 8264 var body io.Reader = nil 8265 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest) 8266 if err != nil { 8267 return nil, err 8268 } 8269 reqHeaders.Set("Content-Type", "application/json") 8270 c.urlParams_.Set("alt", alt) 8271 c.urlParams_.Set("prettyPrint", "false") 8272 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem") 8273 urls += "?" + c.urlParams_.Encode() 8274 req, err := http.NewRequest("POST", urls, body) 8275 if err != nil { 8276 return nil, err 8277 } 8278 req.Header = reqHeaders 8279 googleapi.Expand(req.URL, map[string]string{ 8280 "merchantId": strconv.FormatUint(c.merchantId, 10), 8281 "orderId": c.orderId, 8282 }) 8283 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8284} 8285 8286// Do executes the "content.orders.rejectreturnlineitem" call. 8287// Exactly one of *OrdersRejectReturnLineItemResponse or error will be 8288// non-nil. Any non-2xx status code is an error. Response headers are in 8289// either *OrdersRejectReturnLineItemResponse.ServerResponse.Header or 8290// (if a response was returned at all) in 8291// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8292// whether the returned error was because http.StatusNotModified was 8293// returned. 8294func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) { 8295 gensupport.SetOptions(c.urlParams_, opts...) 8296 res, err := c.doRequest("json") 8297 if res != nil && res.StatusCode == http.StatusNotModified { 8298 if res.Body != nil { 8299 res.Body.Close() 8300 } 8301 return nil, &googleapi.Error{ 8302 Code: res.StatusCode, 8303 Header: res.Header, 8304 } 8305 } 8306 if err != nil { 8307 return nil, err 8308 } 8309 defer googleapi.CloseBody(res) 8310 if err := googleapi.CheckResponse(res); err != nil { 8311 return nil, err 8312 } 8313 ret := &OrdersRejectReturnLineItemResponse{ 8314 ServerResponse: googleapi.ServerResponse{ 8315 Header: res.Header, 8316 HTTPStatusCode: res.StatusCode, 8317 }, 8318 } 8319 target := &ret 8320 if err := gensupport.DecodeResponse(target, res); err != nil { 8321 return nil, err 8322 } 8323 return ret, nil 8324 // { 8325 // "description": "Rejects return on an line item.", 8326 // "httpMethod": "POST", 8327 // "id": "content.orders.rejectreturnlineitem", 8328 // "parameterOrder": [ 8329 // "merchantId", 8330 // "orderId" 8331 // ], 8332 // "parameters": { 8333 // "merchantId": { 8334 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 8335 // "format": "uint64", 8336 // "location": "path", 8337 // "required": true, 8338 // "type": "string" 8339 // }, 8340 // "orderId": { 8341 // "description": "The ID of the order.", 8342 // "location": "path", 8343 // "required": true, 8344 // "type": "string" 8345 // } 8346 // }, 8347 // "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem", 8348 // "request": { 8349 // "$ref": "OrdersRejectReturnLineItemRequest" 8350 // }, 8351 // "response": { 8352 // "$ref": "OrdersRejectReturnLineItemResponse" 8353 // }, 8354 // "scopes": [ 8355 // "https://www.googleapis.com/auth/content" 8356 // ] 8357 // } 8358 8359} 8360 8361// method id "content.orders.returnlineitem": 8362 8363type OrdersReturnlineitemCall struct { 8364 s *APIService 8365 merchantId uint64 8366 orderId string 8367 ordersreturnlineitemrequest *OrdersReturnLineItemRequest 8368 urlParams_ gensupport.URLParams 8369 ctx_ context.Context 8370 header_ http.Header 8371} 8372 8373// Returnlineitem: Returns a line item. 8374func (r *OrdersService) Returnlineitem(merchantId uint64, orderId string, ordersreturnlineitemrequest *OrdersReturnLineItemRequest) *OrdersReturnlineitemCall { 8375 c := &OrdersReturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8376 c.merchantId = merchantId 8377 c.orderId = orderId 8378 c.ordersreturnlineitemrequest = ordersreturnlineitemrequest 8379 return c 8380} 8381 8382// Fields allows partial responses to be retrieved. See 8383// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8384// for more information. 8385func (c *OrdersReturnlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnlineitemCall { 8386 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8387 return c 8388} 8389 8390// Context sets the context to be used in this call's Do method. Any 8391// pending HTTP request will be aborted if the provided context is 8392// canceled. 8393func (c *OrdersReturnlineitemCall) Context(ctx context.Context) *OrdersReturnlineitemCall { 8394 c.ctx_ = ctx 8395 return c 8396} 8397 8398// Header returns an http.Header that can be modified by the caller to 8399// add HTTP headers to the request. 8400func (c *OrdersReturnlineitemCall) Header() http.Header { 8401 if c.header_ == nil { 8402 c.header_ = make(http.Header) 8403 } 8404 return c.header_ 8405} 8406 8407func (c *OrdersReturnlineitemCall) doRequest(alt string) (*http.Response, error) { 8408 reqHeaders := make(http.Header) 8409 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 8410 for k, v := range c.header_ { 8411 reqHeaders[k] = v 8412 } 8413 reqHeaders.Set("User-Agent", c.s.userAgent()) 8414 var body io.Reader = nil 8415 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnlineitemrequest) 8416 if err != nil { 8417 return nil, err 8418 } 8419 reqHeaders.Set("Content-Type", "application/json") 8420 c.urlParams_.Set("alt", alt) 8421 c.urlParams_.Set("prettyPrint", "false") 8422 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnLineItem") 8423 urls += "?" + c.urlParams_.Encode() 8424 req, err := http.NewRequest("POST", urls, body) 8425 if err != nil { 8426 return nil, err 8427 } 8428 req.Header = reqHeaders 8429 googleapi.Expand(req.URL, map[string]string{ 8430 "merchantId": strconv.FormatUint(c.merchantId, 10), 8431 "orderId": c.orderId, 8432 }) 8433 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8434} 8435 8436// Do executes the "content.orders.returnlineitem" call. 8437// Exactly one of *OrdersReturnLineItemResponse or error will be 8438// non-nil. Any non-2xx status code is an error. Response headers are in 8439// either *OrdersReturnLineItemResponse.ServerResponse.Header or (if a 8440// response was returned at all) in error.(*googleapi.Error).Header. Use 8441// googleapi.IsNotModified to check whether the returned error was 8442// because http.StatusNotModified was returned. 8443func (c *OrdersReturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnLineItemResponse, error) { 8444 gensupport.SetOptions(c.urlParams_, opts...) 8445 res, err := c.doRequest("json") 8446 if res != nil && res.StatusCode == http.StatusNotModified { 8447 if res.Body != nil { 8448 res.Body.Close() 8449 } 8450 return nil, &googleapi.Error{ 8451 Code: res.StatusCode, 8452 Header: res.Header, 8453 } 8454 } 8455 if err != nil { 8456 return nil, err 8457 } 8458 defer googleapi.CloseBody(res) 8459 if err := googleapi.CheckResponse(res); err != nil { 8460 return nil, err 8461 } 8462 ret := &OrdersReturnLineItemResponse{ 8463 ServerResponse: googleapi.ServerResponse{ 8464 Header: res.Header, 8465 HTTPStatusCode: res.StatusCode, 8466 }, 8467 } 8468 target := &ret 8469 if err := gensupport.DecodeResponse(target, res); err != nil { 8470 return nil, err 8471 } 8472 return ret, nil 8473 // { 8474 // "description": "Returns a line item.", 8475 // "httpMethod": "POST", 8476 // "id": "content.orders.returnlineitem", 8477 // "parameterOrder": [ 8478 // "merchantId", 8479 // "orderId" 8480 // ], 8481 // "parameters": { 8482 // "merchantId": { 8483 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 8484 // "format": "uint64", 8485 // "location": "path", 8486 // "required": true, 8487 // "type": "string" 8488 // }, 8489 // "orderId": { 8490 // "description": "The ID of the order.", 8491 // "location": "path", 8492 // "required": true, 8493 // "type": "string" 8494 // } 8495 // }, 8496 // "path": "{merchantId}/orders/{orderId}/returnLineItem", 8497 // "request": { 8498 // "$ref": "OrdersReturnLineItemRequest" 8499 // }, 8500 // "response": { 8501 // "$ref": "OrdersReturnLineItemResponse" 8502 // }, 8503 // "scopes": [ 8504 // "https://www.googleapis.com/auth/content" 8505 // ] 8506 // } 8507 8508} 8509 8510// method id "content.orders.returnrefundlineitem": 8511 8512type OrdersReturnrefundlineitemCall struct { 8513 s *APIService 8514 merchantId uint64 8515 orderId string 8516 ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest 8517 urlParams_ gensupport.URLParams 8518 ctx_ context.Context 8519 header_ http.Header 8520} 8521 8522// Returnrefundlineitem: Returns and refunds a line item. Note that this 8523// method can only be called on fully shipped orders. 8524func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall { 8525 c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8526 c.merchantId = merchantId 8527 c.orderId = orderId 8528 c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest 8529 return c 8530} 8531 8532// Fields allows partial responses to be retrieved. See 8533// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8534// for more information. 8535func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall { 8536 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8537 return c 8538} 8539 8540// Context sets the context to be used in this call's Do method. Any 8541// pending HTTP request will be aborted if the provided context is 8542// canceled. 8543func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall { 8544 c.ctx_ = ctx 8545 return c 8546} 8547 8548// Header returns an http.Header that can be modified by the caller to 8549// add HTTP headers to the request. 8550func (c *OrdersReturnrefundlineitemCall) Header() http.Header { 8551 if c.header_ == nil { 8552 c.header_ = make(http.Header) 8553 } 8554 return c.header_ 8555} 8556 8557func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) { 8558 reqHeaders := make(http.Header) 8559 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 8560 for k, v := range c.header_ { 8561 reqHeaders[k] = v 8562 } 8563 reqHeaders.Set("User-Agent", c.s.userAgent()) 8564 var body io.Reader = nil 8565 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest) 8566 if err != nil { 8567 return nil, err 8568 } 8569 reqHeaders.Set("Content-Type", "application/json") 8570 c.urlParams_.Set("alt", alt) 8571 c.urlParams_.Set("prettyPrint", "false") 8572 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem") 8573 urls += "?" + c.urlParams_.Encode() 8574 req, err := http.NewRequest("POST", urls, body) 8575 if err != nil { 8576 return nil, err 8577 } 8578 req.Header = reqHeaders 8579 googleapi.Expand(req.URL, map[string]string{ 8580 "merchantId": strconv.FormatUint(c.merchantId, 10), 8581 "orderId": c.orderId, 8582 }) 8583 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8584} 8585 8586// Do executes the "content.orders.returnrefundlineitem" call. 8587// Exactly one of *OrdersReturnRefundLineItemResponse or error will be 8588// non-nil. Any non-2xx status code is an error. Response headers are in 8589// either *OrdersReturnRefundLineItemResponse.ServerResponse.Header or 8590// (if a response was returned at all) in 8591// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8592// whether the returned error was because http.StatusNotModified was 8593// returned. 8594func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) { 8595 gensupport.SetOptions(c.urlParams_, opts...) 8596 res, err := c.doRequest("json") 8597 if res != nil && res.StatusCode == http.StatusNotModified { 8598 if res.Body != nil { 8599 res.Body.Close() 8600 } 8601 return nil, &googleapi.Error{ 8602 Code: res.StatusCode, 8603 Header: res.Header, 8604 } 8605 } 8606 if err != nil { 8607 return nil, err 8608 } 8609 defer googleapi.CloseBody(res) 8610 if err := googleapi.CheckResponse(res); err != nil { 8611 return nil, err 8612 } 8613 ret := &OrdersReturnRefundLineItemResponse{ 8614 ServerResponse: googleapi.ServerResponse{ 8615 Header: res.Header, 8616 HTTPStatusCode: res.StatusCode, 8617 }, 8618 } 8619 target := &ret 8620 if err := gensupport.DecodeResponse(target, res); err != nil { 8621 return nil, err 8622 } 8623 return ret, nil 8624 // { 8625 // "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders.", 8626 // "httpMethod": "POST", 8627 // "id": "content.orders.returnrefundlineitem", 8628 // "parameterOrder": [ 8629 // "merchantId", 8630 // "orderId" 8631 // ], 8632 // "parameters": { 8633 // "merchantId": { 8634 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 8635 // "format": "uint64", 8636 // "location": "path", 8637 // "required": true, 8638 // "type": "string" 8639 // }, 8640 // "orderId": { 8641 // "description": "The ID of the order.", 8642 // "location": "path", 8643 // "required": true, 8644 // "type": "string" 8645 // } 8646 // }, 8647 // "path": "{merchantId}/orders/{orderId}/returnRefundLineItem", 8648 // "request": { 8649 // "$ref": "OrdersReturnRefundLineItemRequest" 8650 // }, 8651 // "response": { 8652 // "$ref": "OrdersReturnRefundLineItemResponse" 8653 // }, 8654 // "scopes": [ 8655 // "https://www.googleapis.com/auth/content" 8656 // ] 8657 // } 8658 8659} 8660 8661// method id "content.orders.setlineitemmetadata": 8662 8663type OrdersSetlineitemmetadataCall struct { 8664 s *APIService 8665 merchantId uint64 8666 orderId string 8667 orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest 8668 urlParams_ gensupport.URLParams 8669 ctx_ context.Context 8670 header_ http.Header 8671} 8672 8673// Setlineitemmetadata: Sets (overrides) merchant provided annotations 8674// on the line item. 8675func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall { 8676 c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8677 c.merchantId = merchantId 8678 c.orderId = orderId 8679 c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest 8680 return c 8681} 8682 8683// Fields allows partial responses to be retrieved. See 8684// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8685// for more information. 8686func (c *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall { 8687 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8688 return c 8689} 8690 8691// Context sets the context to be used in this call's Do method. Any 8692// pending HTTP request will be aborted if the provided context is 8693// canceled. 8694func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall { 8695 c.ctx_ = ctx 8696 return c 8697} 8698 8699// Header returns an http.Header that can be modified by the caller to 8700// add HTTP headers to the request. 8701func (c *OrdersSetlineitemmetadataCall) Header() http.Header { 8702 if c.header_ == nil { 8703 c.header_ = make(http.Header) 8704 } 8705 return c.header_ 8706} 8707 8708func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) { 8709 reqHeaders := make(http.Header) 8710 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 8711 for k, v := range c.header_ { 8712 reqHeaders[k] = v 8713 } 8714 reqHeaders.Set("User-Agent", c.s.userAgent()) 8715 var body io.Reader = nil 8716 body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest) 8717 if err != nil { 8718 return nil, err 8719 } 8720 reqHeaders.Set("Content-Type", "application/json") 8721 c.urlParams_.Set("alt", alt) 8722 c.urlParams_.Set("prettyPrint", "false") 8723 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata") 8724 urls += "?" + c.urlParams_.Encode() 8725 req, err := http.NewRequest("POST", urls, body) 8726 if err != nil { 8727 return nil, err 8728 } 8729 req.Header = reqHeaders 8730 googleapi.Expand(req.URL, map[string]string{ 8731 "merchantId": strconv.FormatUint(c.merchantId, 10), 8732 "orderId": c.orderId, 8733 }) 8734 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8735} 8736 8737// Do executes the "content.orders.setlineitemmetadata" call. 8738// Exactly one of *OrdersSetLineItemMetadataResponse or error will be 8739// non-nil. Any non-2xx status code is an error. Response headers are in 8740// either *OrdersSetLineItemMetadataResponse.ServerResponse.Header or 8741// (if a response was returned at all) in 8742// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8743// whether the returned error was because http.StatusNotModified was 8744// returned. 8745func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) { 8746 gensupport.SetOptions(c.urlParams_, opts...) 8747 res, err := c.doRequest("json") 8748 if res != nil && res.StatusCode == http.StatusNotModified { 8749 if res.Body != nil { 8750 res.Body.Close() 8751 } 8752 return nil, &googleapi.Error{ 8753 Code: res.StatusCode, 8754 Header: res.Header, 8755 } 8756 } 8757 if err != nil { 8758 return nil, err 8759 } 8760 defer googleapi.CloseBody(res) 8761 if err := googleapi.CheckResponse(res); err != nil { 8762 return nil, err 8763 } 8764 ret := &OrdersSetLineItemMetadataResponse{ 8765 ServerResponse: googleapi.ServerResponse{ 8766 Header: res.Header, 8767 HTTPStatusCode: res.StatusCode, 8768 }, 8769 } 8770 target := &ret 8771 if err := gensupport.DecodeResponse(target, res); err != nil { 8772 return nil, err 8773 } 8774 return ret, nil 8775 // { 8776 // "description": "Sets (overrides) merchant provided annotations on the line item.", 8777 // "httpMethod": "POST", 8778 // "id": "content.orders.setlineitemmetadata", 8779 // "parameterOrder": [ 8780 // "merchantId", 8781 // "orderId" 8782 // ], 8783 // "parameters": { 8784 // "merchantId": { 8785 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 8786 // "format": "uint64", 8787 // "location": "path", 8788 // "required": true, 8789 // "type": "string" 8790 // }, 8791 // "orderId": { 8792 // "description": "The ID of the order.", 8793 // "location": "path", 8794 // "required": true, 8795 // "type": "string" 8796 // } 8797 // }, 8798 // "path": "{merchantId}/orders/{orderId}/setLineItemMetadata", 8799 // "request": { 8800 // "$ref": "OrdersSetLineItemMetadataRequest" 8801 // }, 8802 // "response": { 8803 // "$ref": "OrdersSetLineItemMetadataResponse" 8804 // }, 8805 // "scopes": [ 8806 // "https://www.googleapis.com/auth/content" 8807 // ] 8808 // } 8809 8810} 8811 8812// method id "content.orders.shiplineitems": 8813 8814type OrdersShiplineitemsCall struct { 8815 s *APIService 8816 merchantId uint64 8817 orderId string 8818 ordersshiplineitemsrequest *OrdersShipLineItemsRequest 8819 urlParams_ gensupport.URLParams 8820 ctx_ context.Context 8821 header_ http.Header 8822} 8823 8824// Shiplineitems: Marks line item(s) as shipped. 8825func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall { 8826 c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8827 c.merchantId = merchantId 8828 c.orderId = orderId 8829 c.ordersshiplineitemsrequest = ordersshiplineitemsrequest 8830 return c 8831} 8832 8833// Fields allows partial responses to be retrieved. See 8834// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8835// for more information. 8836func (c *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall { 8837 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8838 return c 8839} 8840 8841// Context sets the context to be used in this call's Do method. Any 8842// pending HTTP request will be aborted if the provided context is 8843// canceled. 8844func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall { 8845 c.ctx_ = ctx 8846 return c 8847} 8848 8849// Header returns an http.Header that can be modified by the caller to 8850// add HTTP headers to the request. 8851func (c *OrdersShiplineitemsCall) Header() http.Header { 8852 if c.header_ == nil { 8853 c.header_ = make(http.Header) 8854 } 8855 return c.header_ 8856} 8857 8858func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) { 8859 reqHeaders := make(http.Header) 8860 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 8861 for k, v := range c.header_ { 8862 reqHeaders[k] = v 8863 } 8864 reqHeaders.Set("User-Agent", c.s.userAgent()) 8865 var body io.Reader = nil 8866 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest) 8867 if err != nil { 8868 return nil, err 8869 } 8870 reqHeaders.Set("Content-Type", "application/json") 8871 c.urlParams_.Set("alt", alt) 8872 c.urlParams_.Set("prettyPrint", "false") 8873 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems") 8874 urls += "?" + c.urlParams_.Encode() 8875 req, err := http.NewRequest("POST", urls, body) 8876 if err != nil { 8877 return nil, err 8878 } 8879 req.Header = reqHeaders 8880 googleapi.Expand(req.URL, map[string]string{ 8881 "merchantId": strconv.FormatUint(c.merchantId, 10), 8882 "orderId": c.orderId, 8883 }) 8884 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8885} 8886 8887// Do executes the "content.orders.shiplineitems" call. 8888// Exactly one of *OrdersShipLineItemsResponse or error will be non-nil. 8889// Any non-2xx status code is an error. Response headers are in either 8890// *OrdersShipLineItemsResponse.ServerResponse.Header or (if a response 8891// was returned at all) in error.(*googleapi.Error).Header. Use 8892// googleapi.IsNotModified to check whether the returned error was 8893// because http.StatusNotModified was returned. 8894func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) { 8895 gensupport.SetOptions(c.urlParams_, opts...) 8896 res, err := c.doRequest("json") 8897 if res != nil && res.StatusCode == http.StatusNotModified { 8898 if res.Body != nil { 8899 res.Body.Close() 8900 } 8901 return nil, &googleapi.Error{ 8902 Code: res.StatusCode, 8903 Header: res.Header, 8904 } 8905 } 8906 if err != nil { 8907 return nil, err 8908 } 8909 defer googleapi.CloseBody(res) 8910 if err := googleapi.CheckResponse(res); err != nil { 8911 return nil, err 8912 } 8913 ret := &OrdersShipLineItemsResponse{ 8914 ServerResponse: googleapi.ServerResponse{ 8915 Header: res.Header, 8916 HTTPStatusCode: res.StatusCode, 8917 }, 8918 } 8919 target := &ret 8920 if err := gensupport.DecodeResponse(target, res); err != nil { 8921 return nil, err 8922 } 8923 return ret, nil 8924 // { 8925 // "description": "Marks line item(s) as shipped.", 8926 // "httpMethod": "POST", 8927 // "id": "content.orders.shiplineitems", 8928 // "parameterOrder": [ 8929 // "merchantId", 8930 // "orderId" 8931 // ], 8932 // "parameters": { 8933 // "merchantId": { 8934 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 8935 // "format": "uint64", 8936 // "location": "path", 8937 // "required": true, 8938 // "type": "string" 8939 // }, 8940 // "orderId": { 8941 // "description": "The ID of the order.", 8942 // "location": "path", 8943 // "required": true, 8944 // "type": "string" 8945 // } 8946 // }, 8947 // "path": "{merchantId}/orders/{orderId}/shipLineItems", 8948 // "request": { 8949 // "$ref": "OrdersShipLineItemsRequest" 8950 // }, 8951 // "response": { 8952 // "$ref": "OrdersShipLineItemsResponse" 8953 // }, 8954 // "scopes": [ 8955 // "https://www.googleapis.com/auth/content" 8956 // ] 8957 // } 8958 8959} 8960 8961// method id "content.orders.updatelineitemshippingdetails": 8962 8963type OrdersUpdatelineitemshippingdetailsCall struct { 8964 s *APIService 8965 merchantId uint64 8966 orderId string 8967 ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest 8968 urlParams_ gensupport.URLParams 8969 ctx_ context.Context 8970 header_ http.Header 8971} 8972 8973// Updatelineitemshippingdetails: Updates ship by and delivery by dates 8974// for a line item. 8975func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall { 8976 c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8977 c.merchantId = merchantId 8978 c.orderId = orderId 8979 c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest 8980 return c 8981} 8982 8983// Fields allows partial responses to be retrieved. See 8984// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8985// for more information. 8986func (c *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall { 8987 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8988 return c 8989} 8990 8991// Context sets the context to be used in this call's Do method. Any 8992// pending HTTP request will be aborted if the provided context is 8993// canceled. 8994func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall { 8995 c.ctx_ = ctx 8996 return c 8997} 8998 8999// Header returns an http.Header that can be modified by the caller to 9000// add HTTP headers to the request. 9001func (c *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header { 9002 if c.header_ == nil { 9003 c.header_ = make(http.Header) 9004 } 9005 return c.header_ 9006} 9007 9008func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) { 9009 reqHeaders := make(http.Header) 9010 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 9011 for k, v := range c.header_ { 9012 reqHeaders[k] = v 9013 } 9014 reqHeaders.Set("User-Agent", c.s.userAgent()) 9015 var body io.Reader = nil 9016 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatelineitemshippingdetailsrequest) 9017 if err != nil { 9018 return nil, err 9019 } 9020 reqHeaders.Set("Content-Type", "application/json") 9021 c.urlParams_.Set("alt", alt) 9022 c.urlParams_.Set("prettyPrint", "false") 9023 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails") 9024 urls += "?" + c.urlParams_.Encode() 9025 req, err := http.NewRequest("POST", urls, body) 9026 if err != nil { 9027 return nil, err 9028 } 9029 req.Header = reqHeaders 9030 googleapi.Expand(req.URL, map[string]string{ 9031 "merchantId": strconv.FormatUint(c.merchantId, 10), 9032 "orderId": c.orderId, 9033 }) 9034 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9035} 9036 9037// Do executes the "content.orders.updatelineitemshippingdetails" call. 9038// Exactly one of *OrdersUpdateLineItemShippingDetailsResponse or error 9039// will be non-nil. Any non-2xx status code is an error. Response 9040// headers are in either 9041// *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or 9042// (if a response was returned at all) in 9043// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9044// whether the returned error was because http.StatusNotModified was 9045// returned. 9046func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) { 9047 gensupport.SetOptions(c.urlParams_, opts...) 9048 res, err := c.doRequest("json") 9049 if res != nil && res.StatusCode == http.StatusNotModified { 9050 if res.Body != nil { 9051 res.Body.Close() 9052 } 9053 return nil, &googleapi.Error{ 9054 Code: res.StatusCode, 9055 Header: res.Header, 9056 } 9057 } 9058 if err != nil { 9059 return nil, err 9060 } 9061 defer googleapi.CloseBody(res) 9062 if err := googleapi.CheckResponse(res); err != nil { 9063 return nil, err 9064 } 9065 ret := &OrdersUpdateLineItemShippingDetailsResponse{ 9066 ServerResponse: googleapi.ServerResponse{ 9067 Header: res.Header, 9068 HTTPStatusCode: res.StatusCode, 9069 }, 9070 } 9071 target := &ret 9072 if err := gensupport.DecodeResponse(target, res); err != nil { 9073 return nil, err 9074 } 9075 return ret, nil 9076 // { 9077 // "description": "Updates ship by and delivery by dates for a line item.", 9078 // "httpMethod": "POST", 9079 // "id": "content.orders.updatelineitemshippingdetails", 9080 // "parameterOrder": [ 9081 // "merchantId", 9082 // "orderId" 9083 // ], 9084 // "parameters": { 9085 // "merchantId": { 9086 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 9087 // "format": "uint64", 9088 // "location": "path", 9089 // "required": true, 9090 // "type": "string" 9091 // }, 9092 // "orderId": { 9093 // "description": "The ID of the order.", 9094 // "location": "path", 9095 // "required": true, 9096 // "type": "string" 9097 // } 9098 // }, 9099 // "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", 9100 // "request": { 9101 // "$ref": "OrdersUpdateLineItemShippingDetailsRequest" 9102 // }, 9103 // "response": { 9104 // "$ref": "OrdersUpdateLineItemShippingDetailsResponse" 9105 // }, 9106 // "scopes": [ 9107 // "https://www.googleapis.com/auth/content" 9108 // ] 9109 // } 9110 9111} 9112 9113// method id "content.orders.updatemerchantorderid": 9114 9115type OrdersUpdatemerchantorderidCall struct { 9116 s *APIService 9117 merchantId uint64 9118 orderId string 9119 ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest 9120 urlParams_ gensupport.URLParams 9121 ctx_ context.Context 9122 header_ http.Header 9123} 9124 9125// Updatemerchantorderid: Updates the merchant order ID for a given 9126// order. 9127func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall { 9128 c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9129 c.merchantId = merchantId 9130 c.orderId = orderId 9131 c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest 9132 return c 9133} 9134 9135// Fields allows partial responses to be retrieved. See 9136// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9137// for more information. 9138func (c *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall { 9139 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9140 return c 9141} 9142 9143// Context sets the context to be used in this call's Do method. Any 9144// pending HTTP request will be aborted if the provided context is 9145// canceled. 9146func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall { 9147 c.ctx_ = ctx 9148 return c 9149} 9150 9151// Header returns an http.Header that can be modified by the caller to 9152// add HTTP headers to the request. 9153func (c *OrdersUpdatemerchantorderidCall) Header() http.Header { 9154 if c.header_ == nil { 9155 c.header_ = make(http.Header) 9156 } 9157 return c.header_ 9158} 9159 9160func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) { 9161 reqHeaders := make(http.Header) 9162 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 9163 for k, v := range c.header_ { 9164 reqHeaders[k] = v 9165 } 9166 reqHeaders.Set("User-Agent", c.s.userAgent()) 9167 var body io.Reader = nil 9168 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest) 9169 if err != nil { 9170 return nil, err 9171 } 9172 reqHeaders.Set("Content-Type", "application/json") 9173 c.urlParams_.Set("alt", alt) 9174 c.urlParams_.Set("prettyPrint", "false") 9175 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId") 9176 urls += "?" + c.urlParams_.Encode() 9177 req, err := http.NewRequest("POST", urls, body) 9178 if err != nil { 9179 return nil, err 9180 } 9181 req.Header = reqHeaders 9182 googleapi.Expand(req.URL, map[string]string{ 9183 "merchantId": strconv.FormatUint(c.merchantId, 10), 9184 "orderId": c.orderId, 9185 }) 9186 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9187} 9188 9189// Do executes the "content.orders.updatemerchantorderid" call. 9190// Exactly one of *OrdersUpdateMerchantOrderIdResponse or error will be 9191// non-nil. Any non-2xx status code is an error. Response headers are in 9192// either *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or 9193// (if a response was returned at all) in 9194// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9195// whether the returned error was because http.StatusNotModified was 9196// returned. 9197func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) { 9198 gensupport.SetOptions(c.urlParams_, opts...) 9199 res, err := c.doRequest("json") 9200 if res != nil && res.StatusCode == http.StatusNotModified { 9201 if res.Body != nil { 9202 res.Body.Close() 9203 } 9204 return nil, &googleapi.Error{ 9205 Code: res.StatusCode, 9206 Header: res.Header, 9207 } 9208 } 9209 if err != nil { 9210 return nil, err 9211 } 9212 defer googleapi.CloseBody(res) 9213 if err := googleapi.CheckResponse(res); err != nil { 9214 return nil, err 9215 } 9216 ret := &OrdersUpdateMerchantOrderIdResponse{ 9217 ServerResponse: googleapi.ServerResponse{ 9218 Header: res.Header, 9219 HTTPStatusCode: res.StatusCode, 9220 }, 9221 } 9222 target := &ret 9223 if err := gensupport.DecodeResponse(target, res); err != nil { 9224 return nil, err 9225 } 9226 return ret, nil 9227 // { 9228 // "description": "Updates the merchant order ID for a given order.", 9229 // "httpMethod": "POST", 9230 // "id": "content.orders.updatemerchantorderid", 9231 // "parameterOrder": [ 9232 // "merchantId", 9233 // "orderId" 9234 // ], 9235 // "parameters": { 9236 // "merchantId": { 9237 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 9238 // "format": "uint64", 9239 // "location": "path", 9240 // "required": true, 9241 // "type": "string" 9242 // }, 9243 // "orderId": { 9244 // "description": "The ID of the order.", 9245 // "location": "path", 9246 // "required": true, 9247 // "type": "string" 9248 // } 9249 // }, 9250 // "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId", 9251 // "request": { 9252 // "$ref": "OrdersUpdateMerchantOrderIdRequest" 9253 // }, 9254 // "response": { 9255 // "$ref": "OrdersUpdateMerchantOrderIdResponse" 9256 // }, 9257 // "scopes": [ 9258 // "https://www.googleapis.com/auth/content" 9259 // ] 9260 // } 9261 9262} 9263 9264// method id "content.orders.updateshipment": 9265 9266type OrdersUpdateshipmentCall struct { 9267 s *APIService 9268 merchantId uint64 9269 orderId string 9270 ordersupdateshipmentrequest *OrdersUpdateShipmentRequest 9271 urlParams_ gensupport.URLParams 9272 ctx_ context.Context 9273 header_ http.Header 9274} 9275 9276// Updateshipment: Updates a shipment's status, carrier, and/or tracking 9277// ID. 9278func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall { 9279 c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9280 c.merchantId = merchantId 9281 c.orderId = orderId 9282 c.ordersupdateshipmentrequest = ordersupdateshipmentrequest 9283 return c 9284} 9285 9286// Fields allows partial responses to be retrieved. See 9287// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9288// for more information. 9289func (c *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall { 9290 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9291 return c 9292} 9293 9294// Context sets the context to be used in this call's Do method. Any 9295// pending HTTP request will be aborted if the provided context is 9296// canceled. 9297func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall { 9298 c.ctx_ = ctx 9299 return c 9300} 9301 9302// Header returns an http.Header that can be modified by the caller to 9303// add HTTP headers to the request. 9304func (c *OrdersUpdateshipmentCall) Header() http.Header { 9305 if c.header_ == nil { 9306 c.header_ = make(http.Header) 9307 } 9308 return c.header_ 9309} 9310 9311func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) { 9312 reqHeaders := make(http.Header) 9313 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203") 9314 for k, v := range c.header_ { 9315 reqHeaders[k] = v 9316 } 9317 reqHeaders.Set("User-Agent", c.s.userAgent()) 9318 var body io.Reader = nil 9319 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest) 9320 if err != nil { 9321 return nil, err 9322 } 9323 reqHeaders.Set("Content-Type", "application/json") 9324 c.urlParams_.Set("alt", alt) 9325 c.urlParams_.Set("prettyPrint", "false") 9326 urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment") 9327 urls += "?" + c.urlParams_.Encode() 9328 req, err := http.NewRequest("POST", urls, body) 9329 if err != nil { 9330 return nil, err 9331 } 9332 req.Header = reqHeaders 9333 googleapi.Expand(req.URL, map[string]string{ 9334 "merchantId": strconv.FormatUint(c.merchantId, 10), 9335 "orderId": c.orderId, 9336 }) 9337 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9338} 9339 9340// Do executes the "content.orders.updateshipment" call. 9341// Exactly one of *OrdersUpdateShipmentResponse or error will be 9342// non-nil. Any non-2xx status code is an error. Response headers are in 9343// either *OrdersUpdateShipmentResponse.ServerResponse.Header or (if a 9344// response was returned at all) in error.(*googleapi.Error).Header. Use 9345// googleapi.IsNotModified to check whether the returned error was 9346// because http.StatusNotModified was returned. 9347func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) { 9348 gensupport.SetOptions(c.urlParams_, opts...) 9349 res, err := c.doRequest("json") 9350 if res != nil && res.StatusCode == http.StatusNotModified { 9351 if res.Body != nil { 9352 res.Body.Close() 9353 } 9354 return nil, &googleapi.Error{ 9355 Code: res.StatusCode, 9356 Header: res.Header, 9357 } 9358 } 9359 if err != nil { 9360 return nil, err 9361 } 9362 defer googleapi.CloseBody(res) 9363 if err := googleapi.CheckResponse(res); err != nil { 9364 return nil, err 9365 } 9366 ret := &OrdersUpdateShipmentResponse{ 9367 ServerResponse: googleapi.ServerResponse{ 9368 Header: res.Header, 9369 HTTPStatusCode: res.StatusCode, 9370 }, 9371 } 9372 target := &ret 9373 if err := gensupport.DecodeResponse(target, res); err != nil { 9374 return nil, err 9375 } 9376 return ret, nil 9377 // { 9378 // "description": "Updates a shipment's status, carrier, and/or tracking ID.", 9379 // "httpMethod": "POST", 9380 // "id": "content.orders.updateshipment", 9381 // "parameterOrder": [ 9382 // "merchantId", 9383 // "orderId" 9384 // ], 9385 // "parameters": { 9386 // "merchantId": { 9387 // "description": "The ID of the account that manages the order. This cannot be a multi-client account.", 9388 // "format": "uint64", 9389 // "location": "path", 9390 // "required": true, 9391 // "type": "string" 9392 // }, 9393 // "orderId": { 9394 // "description": "The ID of the order.", 9395 // "location": "path", 9396 // "required": true, 9397 // "type": "string" 9398 // } 9399 // }, 9400 // "path": "{merchantId}/orders/{orderId}/updateShipment", 9401 // "request": { 9402 // "$ref": "OrdersUpdateShipmentRequest" 9403 // }, 9404 // "response": { 9405 // "$ref": "OrdersUpdateShipmentResponse" 9406 // }, 9407 // "scopes": [ 9408 // "https://www.googleapis.com/auth/content" 9409 // ] 9410 // } 9411 9412} 9413