...

Source file src/google.golang.org/api/content/v2sandbox/content-gen.go

Documentation: google.golang.org/api/content/v2sandbox

     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.
    38  package content // import "google.golang.org/api/content/v2sandbox"
    39  
    40  import (
    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.
    60  var _ = bytes.NewBuffer
    61  var _ = strconv.Itoa
    62  var _ = fmt.Sprintf
    63  var _ = json.NewDecoder
    64  var _ = io.Copy
    65  var _ = url.Parse
    66  var _ = gensupport.MarshalJSON
    67  var _ = googleapi.Version
    68  var _ = errors.New
    69  var _ = strings.Replace
    70  var _ = context.Canceled
    71  
    72  const apiId = "content:v2sandbox"
    73  const apiName = "content"
    74  const apiVersion = "v2sandbox"
    75  const basePath = "https://www.googleapis.com/content/v2sandbox/"
    76  
    77  // OAuth2 scopes used by this API.
    78  const (
    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.
    84  func 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.
   109  func 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  
   121  type 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  
   135  func (s *APIService) userAgent() string {
   136  	if s.UserAgent == "" {
   137  		return googleapi.UserAgent
   138  	}
   139  	return googleapi.UserAgent + " " + s.UserAgent
   140  }
   141  
   142  func NewOrderinvoicesService(s *APIService) *OrderinvoicesService {
   143  	rs := &OrderinvoicesService{s: s}
   144  	return rs
   145  }
   146  
   147  type OrderinvoicesService struct {
   148  	s *APIService
   149  }
   150  
   151  func NewOrderpaymentsService(s *APIService) *OrderpaymentsService {
   152  	rs := &OrderpaymentsService{s: s}
   153  	return rs
   154  }
   155  
   156  type OrderpaymentsService struct {
   157  	s *APIService
   158  }
   159  
   160  func NewOrderreturnsService(s *APIService) *OrderreturnsService {
   161  	rs := &OrderreturnsService{s: s}
   162  	return rs
   163  }
   164  
   165  type OrderreturnsService struct {
   166  	s *APIService
   167  }
   168  
   169  func NewOrdersService(s *APIService) *OrdersService {
   170  	rs := &OrdersService{s: s}
   171  	return rs
   172  }
   173  
   174  type OrdersService struct {
   175  	s *APIService
   176  }
   177  
   178  type 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  
   202  func (s *Amount) MarshalJSON() ([]byte, error) {
   203  	type NoMethod Amount
   204  	raw := NoMethod(*s)
   205  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   206  }
   207  
   208  type 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  
   230  func (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.
   237  type 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  
   264  func (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.
   271  type 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  
   298  func (s *Errors) MarshalJSON() ([]byte, error) {
   299  	type NoMethod Errors
   300  	raw := NoMethod(*s)
   301  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   302  }
   303  
   304  type 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  
   356  func (s *InvoiceSummary) MarshalJSON() ([]byte, error) {
   357  	type NoMethod InvoiceSummary
   358  	raw := NoMethod(*s)
   359  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   360  }
   361  
   362  type 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  
   386  func (s *InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) {
   387  	type NoMethod InvoiceSummaryAdditionalChargeSummary
   388  	raw := NoMethod(*s)
   389  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   390  }
   391  
   392  type 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  
   426  func (s *MerchantOrderReturn) MarshalJSON() ([]byte, error) {
   427  	type NoMethod MerchantOrderReturn
   428  	raw := NoMethod(*s)
   429  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   430  }
   431  
   432  type 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  
   464  func (s *MerchantOrderReturnItem) MarshalJSON() ([]byte, error) {
   465  	type NoMethod MerchantOrderReturnItem
   466  	raw := NoMethod(*s)
   467  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   468  }
   469  
   470  type 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  
   557  func (s *Order) MarshalJSON() ([]byte, error) {
   558  	type NoMethod Order
   559  	raw := NoMethod(*s)
   560  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   561  }
   562  
   563  type 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  
   613  func (s *OrderAddress) MarshalJSON() ([]byte, error) {
   614  	type NoMethod OrderAddress
   615  	raw := NoMethod(*s)
   616  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   617  }
   618  
   619  type 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  
   656  func (s *OrderCancellation) MarshalJSON() ([]byte, error) {
   657  	type NoMethod OrderCancellation
   658  	raw := NoMethod(*s)
   659  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   660  }
   661  
   662  type 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  
   693  func (s *OrderCustomer) MarshalJSON() ([]byte, error) {
   694  	type NoMethod OrderCustomer
   695  	raw := NoMethod(*s)
   696  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   697  }
   698  
   699  type 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  
   733  func (s *OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) {
   734  	type NoMethod OrderCustomerMarketingRightsInfo
   735  	raw := NoMethod(*s)
   736  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   737  }
   738  
   739  type 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  
   763  func (s *OrderDeliveryDetails) MarshalJSON() ([]byte, error) {
   764  	type NoMethod OrderDeliveryDetails
   765  	raw := NoMethod(*s)
   766  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   767  }
   768  
   769  type 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  
   816  func (s *OrderLegacyPromotion) MarshalJSON() ([]byte, error) {
   817  	type NoMethod OrderLegacyPromotion
   818  	raw := NoMethod(*s)
   819  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   820  }
   821  
   822  type 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  
   860  func (s *OrderLegacyPromotionBenefit) MarshalJSON() ([]byte, error) {
   861  	type NoMethod OrderLegacyPromotionBenefit
   862  	raw := NoMethod(*s)
   863  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   864  }
   865  
   866  type 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  
   932  func (s *OrderLineItem) MarshalJSON() ([]byte, error) {
   933  	type NoMethod OrderLineItem
   934  	raw := NoMethod(*s)
   935  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   936  }
   937  
   938  type 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  
  1006  func (s *OrderLineItemProduct) MarshalJSON() ([]byte, error) {
  1007  	type NoMethod OrderLineItemProduct
  1008  	raw := NoMethod(*s)
  1009  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1010  }
  1011  
  1012  type 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  
  1036  func (s *OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) {
  1037  	type NoMethod OrderLineItemProductVariantAttribute
  1038  	raw := NoMethod(*s)
  1039  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1040  }
  1041  
  1042  type 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  
  1069  func (s *OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) {
  1070  	type NoMethod OrderLineItemReturnInfo
  1071  	raw := NoMethod(*s)
  1072  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1073  }
  1074  
  1075  type 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  
  1102  func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) {
  1103  	type NoMethod OrderLineItemShippingDetails
  1104  	raw := NoMethod(*s)
  1105  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1106  }
  1107  
  1108  type 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  
  1139  func (s *OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) {
  1140  	type NoMethod OrderLineItemShippingDetailsMethod
  1141  	raw := NoMethod(*s)
  1142  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1143  }
  1144  
  1145  type 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  
  1171  func (s *OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) {
  1172  	type NoMethod OrderMerchantProvidedAnnotation
  1173  	raw := NoMethod(*s)
  1174  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1175  }
  1176  
  1177  type 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  
  1224  func (s *OrderPaymentMethod) MarshalJSON() ([]byte, error) {
  1225  	type NoMethod OrderPaymentMethod
  1226  	raw := NoMethod(*s)
  1227  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1228  }
  1229  
  1230  type 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  
  1264  func (s *OrderRefund) MarshalJSON() ([]byte, error) {
  1265  	type NoMethod OrderRefund
  1266  	raw := NoMethod(*s)
  1267  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1268  }
  1269  
  1270  type 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  
  1304  func (s *OrderReturn) MarshalJSON() ([]byte, error) {
  1305  	type NoMethod OrderReturn
  1306  	raw := NoMethod(*s)
  1307  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1308  }
  1309  
  1310  type 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  
  1369  func (s *OrderShipment) MarshalJSON() ([]byte, error) {
  1370  	type NoMethod OrderShipment
  1371  	raw := NoMethod(*s)
  1372  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1373  }
  1374  
  1375  type 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  
  1404  func (s *OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) {
  1405  	type NoMethod OrderShipmentLineItemShipment
  1406  	raw := NoMethod(*s)
  1407  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1408  }
  1409  
  1410  type 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  
  1444  func (s *OrderinvoicesCreateChargeInvoiceRequest) MarshalJSON() ([]byte, error) {
  1445  	type NoMethod OrderinvoicesCreateChargeInvoiceRequest
  1446  	raw := NoMethod(*s)
  1447  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1448  }
  1449  
  1450  type 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  
  1480  func (s *OrderinvoicesCreateChargeInvoiceResponse) MarshalJSON() ([]byte, error) {
  1481  	type NoMethod OrderinvoicesCreateChargeInvoiceResponse
  1482  	raw := NoMethod(*s)
  1483  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1484  }
  1485  
  1486  type 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  
  1523  func (s *OrderinvoicesCreateRefundInvoiceRequest) MarshalJSON() ([]byte, error) {
  1524  	type NoMethod OrderinvoicesCreateRefundInvoiceRequest
  1525  	raw := NoMethod(*s)
  1526  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1527  }
  1528  
  1529  type 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  
  1559  func (s *OrderinvoicesCreateRefundInvoiceResponse) MarshalJSON() ([]byte, error) {
  1560  	type NoMethod OrderinvoicesCreateRefundInvoiceResponse
  1561  	raw := NoMethod(*s)
  1562  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1563  }
  1564  
  1565  type 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  
  1589  func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption) MarshalJSON() ([]byte, error) {
  1590  	type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption
  1591  	raw := NoMethod(*s)
  1592  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1593  }
  1594  
  1595  type 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  
  1619  func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption) MarshalJSON() ([]byte, error) {
  1620  	type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption
  1621  	raw := NoMethod(*s)
  1622  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1623  }
  1624  
  1625  type 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  
  1648  func (s *OrderpaymentsNotifyAuthApprovedRequest) MarshalJSON() ([]byte, error) {
  1649  	type NoMethod OrderpaymentsNotifyAuthApprovedRequest
  1650  	raw := NoMethod(*s)
  1651  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1652  }
  1653  
  1654  type 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  
  1684  func (s *OrderpaymentsNotifyAuthApprovedResponse) MarshalJSON() ([]byte, error) {
  1685  	type NoMethod OrderpaymentsNotifyAuthApprovedResponse
  1686  	raw := NoMethod(*s)
  1687  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1688  }
  1689  
  1690  type 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  
  1711  func (s *OrderpaymentsNotifyAuthDeclinedRequest) MarshalJSON() ([]byte, error) {
  1712  	type NoMethod OrderpaymentsNotifyAuthDeclinedRequest
  1713  	raw := NoMethod(*s)
  1714  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1715  }
  1716  
  1717  type 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  
  1747  func (s *OrderpaymentsNotifyAuthDeclinedResponse) MarshalJSON() ([]byte, error) {
  1748  	type NoMethod OrderpaymentsNotifyAuthDeclinedResponse
  1749  	raw := NoMethod(*s)
  1750  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1751  }
  1752  
  1753  type 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  
  1781  func (s *OrderpaymentsNotifyChargeRequest) MarshalJSON() ([]byte, error) {
  1782  	type NoMethod OrderpaymentsNotifyChargeRequest
  1783  	raw := NoMethod(*s)
  1784  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1785  }
  1786  
  1787  type 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  
  1817  func (s *OrderpaymentsNotifyChargeResponse) MarshalJSON() ([]byte, error) {
  1818  	type NoMethod OrderpaymentsNotifyChargeResponse
  1819  	raw := NoMethod(*s)
  1820  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1821  }
  1822  
  1823  type 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  
  1851  func (s *OrderpaymentsNotifyRefundRequest) MarshalJSON() ([]byte, error) {
  1852  	type NoMethod OrderpaymentsNotifyRefundRequest
  1853  	raw := NoMethod(*s)
  1854  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1855  }
  1856  
  1857  type 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  
  1887  func (s *OrderpaymentsNotifyRefundResponse) MarshalJSON() ([]byte, error) {
  1888  	type NoMethod OrderpaymentsNotifyRefundResponse
  1889  	raw := NoMethod(*s)
  1890  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1891  }
  1892  
  1893  type 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  
  1925  func (s *OrderreturnsListResponse) MarshalJSON() ([]byte, error) {
  1926  	type NoMethod OrderreturnsListResponse
  1927  	raw := NoMethod(*s)
  1928  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1929  }
  1930  
  1931  type 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  
  1953  func (s *OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) {
  1954  	type NoMethod OrdersAcknowledgeRequest
  1955  	raw := NoMethod(*s)
  1956  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1957  }
  1958  
  1959  type 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  
  1989  func (s *OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) {
  1990  	type NoMethod OrdersAcknowledgeResponse
  1991  	raw := NoMethod(*s)
  1992  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1993  }
  1994  
  1995  type 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  
  2021  func (s *OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) {
  2022  	type NoMethod OrdersAdvanceTestOrderResponse
  2023  	raw := NoMethod(*s)
  2024  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2025  }
  2026  
  2027  type 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  
  2079  func (s *OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) {
  2080  	type NoMethod OrdersCancelLineItemRequest
  2081  	raw := NoMethod(*s)
  2082  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2083  }
  2084  
  2085  type 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  
  2115  func (s *OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) {
  2116  	type NoMethod OrdersCancelLineItemResponse
  2117  	raw := NoMethod(*s)
  2118  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2119  }
  2120  
  2121  type 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  
  2149  func (s *OrdersCancelRequest) MarshalJSON() ([]byte, error) {
  2150  	type NoMethod OrdersCancelRequest
  2151  	raw := NoMethod(*s)
  2152  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2153  }
  2154  
  2155  type 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  
  2185  func (s *OrdersCancelResponse) MarshalJSON() ([]byte, error) {
  2186  	type NoMethod OrdersCancelResponse
  2187  	raw := NoMethod(*s)
  2188  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2189  }
  2190  
  2191  type 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  
  2212  func (s *OrdersCancelTestOrderByCustomerRequest) MarshalJSON() ([]byte, error) {
  2213  	type NoMethod OrdersCancelTestOrderByCustomerRequest
  2214  	raw := NoMethod(*s)
  2215  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2216  }
  2217  
  2218  type 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  
  2244  func (s *OrdersCancelTestOrderByCustomerResponse) MarshalJSON() ([]byte, error) {
  2245  	type NoMethod OrdersCancelTestOrderByCustomerResponse
  2246  	raw := NoMethod(*s)
  2247  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2248  }
  2249  
  2250  type 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  
  2286  func (s *OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) {
  2287  	type NoMethod OrdersCreateTestOrderRequest
  2288  	raw := NoMethod(*s)
  2289  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2290  }
  2291  
  2292  type 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  
  2321  func (s *OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) {
  2322  	type NoMethod OrdersCreateTestOrderResponse
  2323  	raw := NoMethod(*s)
  2324  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2325  }
  2326  
  2327  type 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  
  2348  func (s *OrdersCreateTestReturnRequest) MarshalJSON() ([]byte, error) {
  2349  	type NoMethod OrdersCreateTestReturnRequest
  2350  	raw := NoMethod(*s)
  2351  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2352  }
  2353  
  2354  type 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  
  2383  func (s *OrdersCreateTestReturnResponse) MarshalJSON() ([]byte, error) {
  2384  	type NoMethod OrdersCreateTestReturnResponse
  2385  	raw := NoMethod(*s)
  2386  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2387  }
  2388  
  2389  type 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  
  2410  func (s *OrdersCustomBatchRequest) MarshalJSON() ([]byte, error) {
  2411  	type NoMethod OrdersCustomBatchRequest
  2412  	raw := NoMethod(*s)
  2413  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2414  }
  2415  
  2416  type 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  
  2490  func (s *OrdersCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  2491  	type NoMethod OrdersCustomBatchRequestEntry
  2492  	raw := NoMethod(*s)
  2493  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2494  }
  2495  
  2496  type 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  
  2520  func (s *OrdersCustomBatchRequestEntryCancel) MarshalJSON() ([]byte, error) {
  2521  	type NoMethod OrdersCustomBatchRequestEntryCancel
  2522  	raw := NoMethod(*s)
  2523  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2524  }
  2525  
  2526  type 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  
  2574  func (s *OrdersCustomBatchRequestEntryCancelLineItem) MarshalJSON() ([]byte, error) {
  2575  	type NoMethod OrdersCustomBatchRequestEntryCancelLineItem
  2576  	raw := NoMethod(*s)
  2577  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2578  }
  2579  
  2580  type 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  
  2604  func (s *OrdersCustomBatchRequestEntryCreateTestReturnReturnItem) MarshalJSON() ([]byte, error) {
  2605  	type NoMethod OrdersCustomBatchRequestEntryCreateTestReturnReturnItem
  2606  	raw := NoMethod(*s)
  2607  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2608  }
  2609  
  2610  type 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  
  2652  func (s *OrdersCustomBatchRequestEntryInStoreRefundLineItem) MarshalJSON() ([]byte, error) {
  2653  	type NoMethod OrdersCustomBatchRequestEntryInStoreRefundLineItem
  2654  	raw := NoMethod(*s)
  2655  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2656  }
  2657  
  2658  type 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  
  2693  func (s *OrdersCustomBatchRequestEntryRefund) MarshalJSON() ([]byte, error) {
  2694  	type NoMethod OrdersCustomBatchRequestEntryRefund
  2695  	raw := NoMethod(*s)
  2696  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2697  }
  2698  
  2699  type 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  
  2734  func (s *OrdersCustomBatchRequestEntryRejectReturnLineItem) MarshalJSON() ([]byte, error) {
  2735  	type NoMethod OrdersCustomBatchRequestEntryRejectReturnLineItem
  2736  	raw := NoMethod(*s)
  2737  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2738  }
  2739  
  2740  type 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  
  2775  func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, error) {
  2776  	type NoMethod OrdersCustomBatchRequestEntryReturnLineItem
  2777  	raw := NoMethod(*s)
  2778  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2779  }
  2780  
  2781  type 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  
  2825  func (s *OrdersCustomBatchRequestEntryReturnRefundLineItem) MarshalJSON() ([]byte, error) {
  2826  	type NoMethod OrdersCustomBatchRequestEntryReturnRefundLineItem
  2827  	raw := NoMethod(*s)
  2828  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2829  }
  2830  
  2831  type 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  
  2860  func (s *OrdersCustomBatchRequestEntrySetLineItemMetadata) MarshalJSON() ([]byte, error) {
  2861  	type NoMethod OrdersCustomBatchRequestEntrySetLineItemMetadata
  2862  	raw := NoMethod(*s)
  2863  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2864  }
  2865  
  2866  type 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  
  2909  func (s *OrdersCustomBatchRequestEntryShipLineItems) MarshalJSON() ([]byte, error) {
  2910  	type NoMethod OrdersCustomBatchRequestEntryShipLineItems
  2911  	raw := NoMethod(*s)
  2912  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2913  }
  2914  
  2915  type 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  
  2944  func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) {
  2945  	type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo
  2946  	raw := NoMethod(*s)
  2947  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2948  }
  2949  
  2950  type 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  
  2985  func (s *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails) MarshalJSON() ([]byte, error) {
  2986  	type NoMethod OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails
  2987  	raw := NoMethod(*s)
  2988  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2989  }
  2990  
  2991  type 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  
  3028  func (s *OrdersCustomBatchRequestEntryUpdateShipment) MarshalJSON() ([]byte, error) {
  3029  	type NoMethod OrdersCustomBatchRequestEntryUpdateShipment
  3030  	raw := NoMethod(*s)
  3031  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3032  }
  3033  
  3034  type 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  
  3063  func (s *OrdersCustomBatchResponse) MarshalJSON() ([]byte, error) {
  3064  	type NoMethod OrdersCustomBatchResponse
  3065  	raw := NoMethod(*s)
  3066  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3067  }
  3068  
  3069  type 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  
  3107  func (s *OrdersCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  3108  	type NoMethod OrdersCustomBatchResponseEntry
  3109  	raw := NoMethod(*s)
  3110  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3111  }
  3112  
  3113  type 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  
  3142  func (s *OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) {
  3143  	type NoMethod OrdersGetByMerchantOrderIdResponse
  3144  	raw := NoMethod(*s)
  3145  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3146  }
  3147  
  3148  type 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  
  3177  func (s *OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) {
  3178  	type NoMethod OrdersGetTestOrderTemplateResponse
  3179  	raw := NoMethod(*s)
  3180  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3181  }
  3182  
  3183  type 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  
  3229  func (s *OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) {
  3230  	type NoMethod OrdersInStoreRefundLineItemRequest
  3231  	raw := NoMethod(*s)
  3232  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3233  }
  3234  
  3235  type 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  
  3265  func (s *OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) {
  3266  	type NoMethod OrdersInStoreRefundLineItemResponse
  3267  	raw := NoMethod(*s)
  3268  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3269  }
  3270  
  3271  type 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  
  3303  func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
  3304  	type NoMethod OrdersListResponse
  3305  	raw := NoMethod(*s)
  3306  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3307  }
  3308  
  3309  type 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  
  3348  func (s *OrdersRefundRequest) MarshalJSON() ([]byte, error) {
  3349  	type NoMethod OrdersRefundRequest
  3350  	raw := NoMethod(*s)
  3351  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3352  }
  3353  
  3354  type 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  
  3384  func (s *OrdersRefundResponse) MarshalJSON() ([]byte, error) {
  3385  	type NoMethod OrdersRefundResponse
  3386  	raw := NoMethod(*s)
  3387  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3388  }
  3389  
  3390  type 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  
  3429  func (s *OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) {
  3430  	type NoMethod OrdersRejectReturnLineItemRequest
  3431  	raw := NoMethod(*s)
  3432  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3433  }
  3434  
  3435  type 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  
  3465  func (s *OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) {
  3466  	type NoMethod OrdersRejectReturnLineItemResponse
  3467  	raw := NoMethod(*s)
  3468  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3469  }
  3470  
  3471  type 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  
  3510  func (s *OrdersReturnLineItemRequest) MarshalJSON() ([]byte, error) {
  3511  	type NoMethod OrdersReturnLineItemRequest
  3512  	raw := NoMethod(*s)
  3513  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3514  }
  3515  
  3516  type 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  
  3546  func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) {
  3547  	type NoMethod OrdersReturnLineItemResponse
  3548  	raw := NoMethod(*s)
  3549  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3550  }
  3551  
  3552  type 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  
  3600  func (s *OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) {
  3601  	type NoMethod OrdersReturnRefundLineItemRequest
  3602  	raw := NoMethod(*s)
  3603  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3604  }
  3605  
  3606  type 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  
  3636  func (s *OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) {
  3637  	type NoMethod OrdersReturnRefundLineItemResponse
  3638  	raw := NoMethod(*s)
  3639  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3640  }
  3641  
  3642  type 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  
  3675  func (s *OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) {
  3676  	type NoMethod OrdersSetLineItemMetadataRequest
  3677  	raw := NoMethod(*s)
  3678  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3679  }
  3680  
  3681  type 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  
  3711  func (s *OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) {
  3712  	type NoMethod OrdersSetLineItemMetadataResponse
  3713  	raw := NoMethod(*s)
  3714  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3715  }
  3716  
  3717  type 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  
  3764  func (s *OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) {
  3765  	type NoMethod OrdersShipLineItemsRequest
  3766  	raw := NoMethod(*s)
  3767  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3768  }
  3769  
  3770  type 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  
  3800  func (s *OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) {
  3801  	type NoMethod OrdersShipLineItemsResponse
  3802  	raw := NoMethod(*s)
  3803  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3804  }
  3805  
  3806  type 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  
  3845  func (s *OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) {
  3846  	type NoMethod OrdersUpdateLineItemShippingDetailsRequest
  3847  	raw := NoMethod(*s)
  3848  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3849  }
  3850  
  3851  type 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  
  3881  func (s *OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) {
  3882  	type NoMethod OrdersUpdateLineItemShippingDetailsResponse
  3883  	raw := NoMethod(*s)
  3884  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3885  }
  3886  
  3887  type 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  
  3914  func (s *OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) {
  3915  	type NoMethod OrdersUpdateMerchantOrderIdRequest
  3916  	raw := NoMethod(*s)
  3917  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3918  }
  3919  
  3920  type 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  
  3950  func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) {
  3951  	type NoMethod OrdersUpdateMerchantOrderIdResponse
  3952  	raw := NoMethod(*s)
  3953  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3954  }
  3955  
  3956  type 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  
  3997  func (s *OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) {
  3998  	type NoMethod OrdersUpdateShipmentRequest
  3999  	raw := NoMethod(*s)
  4000  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4001  }
  4002  
  4003  type 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  
  4033  func (s *OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) {
  4034  	type NoMethod OrdersUpdateShipmentResponse
  4035  	raw := NoMethod(*s)
  4036  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4037  }
  4038  
  4039  type 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  
  4063  func (s *Price) MarshalJSON() ([]byte, error) {
  4064  	type NoMethod Price
  4065  	raw := NoMethod(*s)
  4066  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4067  }
  4068  
  4069  type 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  
  4096  func (s *Promotion) MarshalJSON() ([]byte, error) {
  4097  	type NoMethod Promotion
  4098  	raw := NoMethod(*s)
  4099  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4100  }
  4101  
  4102  type 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  
  4124  func (s *RefundReason) MarshalJSON() ([]byte, error) {
  4125  	type NoMethod RefundReason
  4126  	raw := NoMethod(*s)
  4127  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4128  }
  4129  
  4130  type 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  
  4156  func (s *ReturnShipment) MarshalJSON() ([]byte, error) {
  4157  	type NoMethod ReturnShipment
  4158  	raw := NoMethod(*s)
  4159  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4160  }
  4161  
  4162  type 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  
  4190  func (s *ShipmentInvoice) MarshalJSON() ([]byte, error) {
  4191  	type NoMethod ShipmentInvoice
  4192  	raw := NoMethod(*s)
  4193  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4194  }
  4195  
  4196  type 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  
  4229  func (s *ShipmentInvoiceLineItemInvoice) MarshalJSON() ([]byte, error) {
  4230  	type NoMethod ShipmentInvoiceLineItemInvoice
  4231  	raw := NoMethod(*s)
  4232  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4233  }
  4234  
  4235  type 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  
  4257  func (s *ShipmentTrackingInfo) MarshalJSON() ([]byte, error) {
  4258  	type NoMethod ShipmentTrackingInfo
  4259  	raw := NoMethod(*s)
  4260  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4261  }
  4262  
  4263  type 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  
  4321  func (s *TestOrder) MarshalJSON() ([]byte, error) {
  4322  	type NoMethod TestOrder
  4323  	raw := NoMethod(*s)
  4324  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4325  }
  4326  
  4327  type 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  
  4358  func (s *TestOrderCustomer) MarshalJSON() ([]byte, error) {
  4359  	type NoMethod TestOrderCustomer
  4360  	raw := NoMethod(*s)
  4361  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4362  }
  4363  
  4364  type 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  
  4393  func (s *TestOrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) {
  4394  	type NoMethod TestOrderCustomerMarketingRightsInfo
  4395  	raw := NoMethod(*s)
  4396  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4397  }
  4398  
  4399  type 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  
  4432  func (s *TestOrderLineItem) MarshalJSON() ([]byte, error) {
  4433  	type NoMethod TestOrderLineItem
  4434  	raw := NoMethod(*s)
  4435  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4436  }
  4437  
  4438  type 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  
  4497  func (s *TestOrderLineItemProduct) MarshalJSON() ([]byte, error) {
  4498  	type NoMethod TestOrderLineItemProduct
  4499  	raw := NoMethod(*s)
  4500  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4501  }
  4502  
  4503  type 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  
  4539  func (s *TestOrderPaymentMethod) MarshalJSON() ([]byte, error) {
  4540  	type NoMethod TestOrderPaymentMethod
  4541  	raw := NoMethod(*s)
  4542  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4543  }
  4544  
  4545  type 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  
  4577  func (s *UnitInvoice) MarshalJSON() ([]byte, error) {
  4578  	type NoMethod UnitInvoice
  4579  	raw := NoMethod(*s)
  4580  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4581  }
  4582  
  4583  type 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  
  4613  func (s *UnitInvoiceAdditionalCharge) MarshalJSON() ([]byte, error) {
  4614  	type NoMethod UnitInvoiceAdditionalCharge
  4615  	raw := NoMethod(*s)
  4616  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4617  }
  4618  
  4619  type 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  
  4647  func (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  
  4655  type 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.
  4667  func (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.
  4678  func (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.
  4686  func (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.
  4693  func (c *OrderinvoicesCreatechargeinvoiceCall) Header() http.Header {
  4694  	if c.header_ == nil {
  4695  		c.header_ = make(http.Header)
  4696  	}
  4697  	return c.header_
  4698  }
  4699  
  4700  func (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.
  4738  func (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  
  4807  type 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.
  4822  func (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.
  4833  func (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.
  4841  func (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.
  4848  func (c *OrderinvoicesCreaterefundinvoiceCall) Header() http.Header {
  4849  	if c.header_ == nil {
  4850  		c.header_ = make(http.Header)
  4851  	}
  4852  	return c.header_
  4853  }
  4854  
  4855  func (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.
  4893  func (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  
  4962  type 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.
  4974  func (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.
  4985  func (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.
  4993  func (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.
  5000  func (c *OrderpaymentsNotifyauthapprovedCall) Header() http.Header {
  5001  	if c.header_ == nil {
  5002  		c.header_ = make(http.Header)
  5003  	}
  5004  	return c.header_
  5005  }
  5006  
  5007  func (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.
  5044  func (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  
  5113  type 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.
  5125  func (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.
  5136  func (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.
  5144  func (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.
  5151  func (c *OrderpaymentsNotifyauthdeclinedCall) Header() http.Header {
  5152  	if c.header_ == nil {
  5153  		c.header_ = make(http.Header)
  5154  	}
  5155  	return c.header_
  5156  }
  5157  
  5158  func (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.
  5195  func (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  
  5264  type 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.
  5275  func (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.
  5286  func (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.
  5294  func (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.
  5301  func (c *OrderpaymentsNotifychargeCall) Header() http.Header {
  5302  	if c.header_ == nil {
  5303  		c.header_ = make(http.Header)
  5304  	}
  5305  	return c.header_
  5306  }
  5307  
  5308  func (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.
  5345  func (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  
  5414  type 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.
  5425  func (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.
  5436  func (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.
  5444  func (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.
  5451  func (c *OrderpaymentsNotifyrefundCall) Header() http.Header {
  5452  	if c.header_ == nil {
  5453  		c.header_ = make(http.Header)
  5454  	}
  5455  	return c.header_
  5456  }
  5457  
  5458  func (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.
  5495  func (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  
  5564  type 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.
  5575  func (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.
  5585  func (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.
  5595  func (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.
  5603  func (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.
  5610  func (c *OrderreturnsGetCall) Header() http.Header {
  5611  	if c.header_ == nil {
  5612  		c.header_ = make(http.Header)
  5613  	}
  5614  	return c.header_
  5615  }
  5616  
  5617  func (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.
  5651  func (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  
  5717  type 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.
  5727  func (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.
  5736  func (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.
  5744  func (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.
  5753  func (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  //
  5763  //	"returnCreationTimeAsc"
  5764  //	"returnCreationTimeDesc"
  5765  func (c *OrderreturnsListCall) OrderBy(orderBy string) *OrderreturnsListCall {
  5766  	c.urlParams_.Set("orderBy", orderBy)
  5767  	return c
  5768  }
  5769  
  5770  // PageToken sets the optional parameter "pageToken": The token returned
  5771  // by the previous request.
  5772  func (c *OrderreturnsListCall) PageToken(pageToken string) *OrderreturnsListCall {
  5773  	c.urlParams_.Set("pageToken", pageToken)
  5774  	return c
  5775  }
  5776  
  5777  // Fields allows partial responses to be retrieved. See
  5778  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5779  // for more information.
  5780  func (c *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCall {
  5781  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5782  	return c
  5783  }
  5784  
  5785  // IfNoneMatch sets the optional parameter which makes the operation
  5786  // fail if the object's ETag matches the given value. This is useful for
  5787  // getting updates only after the object has changed since the last
  5788  // request. Use googleapi.IsNotModified to check whether the response
  5789  // error from Do is the result of In-None-Match.
  5790  func (c *OrderreturnsListCall) IfNoneMatch(entityTag string) *OrderreturnsListCall {
  5791  	c.ifNoneMatch_ = entityTag
  5792  	return c
  5793  }
  5794  
  5795  // Context sets the context to be used in this call's Do method. Any
  5796  // pending HTTP request will be aborted if the provided context is
  5797  // canceled.
  5798  func (c *OrderreturnsListCall) Context(ctx context.Context) *OrderreturnsListCall {
  5799  	c.ctx_ = ctx
  5800  	return c
  5801  }
  5802  
  5803  // Header returns an http.Header that can be modified by the caller to
  5804  // add HTTP headers to the request.
  5805  func (c *OrderreturnsListCall) Header() http.Header {
  5806  	if c.header_ == nil {
  5807  		c.header_ = make(http.Header)
  5808  	}
  5809  	return c.header_
  5810  }
  5811  
  5812  func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) {
  5813  	reqHeaders := make(http.Header)
  5814  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5815  	for k, v := range c.header_ {
  5816  		reqHeaders[k] = v
  5817  	}
  5818  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5819  	if c.ifNoneMatch_ != "" {
  5820  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5821  	}
  5822  	var body io.Reader = nil
  5823  	c.urlParams_.Set("alt", alt)
  5824  	c.urlParams_.Set("prettyPrint", "false")
  5825  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns")
  5826  	urls += "?" + c.urlParams_.Encode()
  5827  	req, err := http.NewRequest("GET", urls, body)
  5828  	if err != nil {
  5829  		return nil, err
  5830  	}
  5831  	req.Header = reqHeaders
  5832  	googleapi.Expand(req.URL, map[string]string{
  5833  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  5834  	})
  5835  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5836  }
  5837  
  5838  // Do executes the "content.orderreturns.list" call.
  5839  // Exactly one of *OrderreturnsListResponse or error will be non-nil.
  5840  // Any non-2xx status code is an error. Response headers are in either
  5841  // *OrderreturnsListResponse.ServerResponse.Header or (if a response was
  5842  // returned at all) in error.(*googleapi.Error).Header. Use
  5843  // googleapi.IsNotModified to check whether the returned error was
  5844  // because http.StatusNotModified was returned.
  5845  func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsListResponse, error) {
  5846  	gensupport.SetOptions(c.urlParams_, opts...)
  5847  	res, err := c.doRequest("json")
  5848  	if res != nil && res.StatusCode == http.StatusNotModified {
  5849  		if res.Body != nil {
  5850  			res.Body.Close()
  5851  		}
  5852  		return nil, &googleapi.Error{
  5853  			Code:   res.StatusCode,
  5854  			Header: res.Header,
  5855  		}
  5856  	}
  5857  	if err != nil {
  5858  		return nil, err
  5859  	}
  5860  	defer googleapi.CloseBody(res)
  5861  	if err := googleapi.CheckResponse(res); err != nil {
  5862  		return nil, err
  5863  	}
  5864  	ret := &OrderreturnsListResponse{
  5865  		ServerResponse: googleapi.ServerResponse{
  5866  			Header:         res.Header,
  5867  			HTTPStatusCode: res.StatusCode,
  5868  		},
  5869  	}
  5870  	target := &ret
  5871  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5872  		return nil, err
  5873  	}
  5874  	return ret, nil
  5875  	// {
  5876  	//   "description": "Lists order returns in your Merchant Center account.",
  5877  	//   "httpMethod": "GET",
  5878  	//   "id": "content.orderreturns.list",
  5879  	//   "parameterOrder": [
  5880  	//     "merchantId"
  5881  	//   ],
  5882  	//   "parameters": {
  5883  	//     "createdEndDate": {
  5884  	//       "description": "Obtains order returns created before this date (inclusively), in ISO 8601 format.",
  5885  	//       "location": "query",
  5886  	//       "type": "string"
  5887  	//     },
  5888  	//     "createdStartDate": {
  5889  	//       "description": "Obtains order returns created after this date (inclusively), in ISO 8601 format.",
  5890  	//       "location": "query",
  5891  	//       "type": "string"
  5892  	//     },
  5893  	//     "maxResults": {
  5894  	//       "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.",
  5895  	//       "format": "uint32",
  5896  	//       "location": "query",
  5897  	//       "type": "integer"
  5898  	//     },
  5899  	//     "merchantId": {
  5900  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  5901  	//       "format": "uint64",
  5902  	//       "location": "path",
  5903  	//       "required": true,
  5904  	//       "type": "string"
  5905  	//     },
  5906  	//     "orderBy": {
  5907  	//       "description": "Return the results in the specified order.",
  5908  	//       "enum": [
  5909  	//         "returnCreationTimeAsc",
  5910  	//         "returnCreationTimeDesc"
  5911  	//       ],
  5912  	//       "enumDescriptions": [
  5913  	//         "",
  5914  	//         ""
  5915  	//       ],
  5916  	//       "location": "query",
  5917  	//       "type": "string"
  5918  	//     },
  5919  	//     "pageToken": {
  5920  	//       "description": "The token returned by the previous request.",
  5921  	//       "location": "query",
  5922  	//       "type": "string"
  5923  	//     }
  5924  	//   },
  5925  	//   "path": "{merchantId}/orderreturns",
  5926  	//   "response": {
  5927  	//     "$ref": "OrderreturnsListResponse"
  5928  	//   },
  5929  	//   "scopes": [
  5930  	//     "https://www.googleapis.com/auth/content"
  5931  	//   ]
  5932  	// }
  5933  
  5934  }
  5935  
  5936  // Pages invokes f for each page of results.
  5937  // A non-nil error returned from f will halt the iteration.
  5938  // The provided context supersedes any context provided to the Context method.
  5939  func (c *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsListResponse) error) error {
  5940  	c.ctx_ = ctx
  5941  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5942  	for {
  5943  		x, err := c.Do()
  5944  		if err != nil {
  5945  			return err
  5946  		}
  5947  		if err := f(x); err != nil {
  5948  			return err
  5949  		}
  5950  		if x.NextPageToken == "" {
  5951  			return nil
  5952  		}
  5953  		c.PageToken(x.NextPageToken)
  5954  	}
  5955  }
  5956  
  5957  // method id "content.orders.acknowledge":
  5958  
  5959  type OrdersAcknowledgeCall struct {
  5960  	s                        *APIService
  5961  	merchantId               uint64
  5962  	orderId                  string
  5963  	ordersacknowledgerequest *OrdersAcknowledgeRequest
  5964  	urlParams_               gensupport.URLParams
  5965  	ctx_                     context.Context
  5966  	header_                  http.Header
  5967  }
  5968  
  5969  // Acknowledge: Marks an order as acknowledged.
  5970  func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall {
  5971  	c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5972  	c.merchantId = merchantId
  5973  	c.orderId = orderId
  5974  	c.ordersacknowledgerequest = ordersacknowledgerequest
  5975  	return c
  5976  }
  5977  
  5978  // Fields allows partial responses to be retrieved. See
  5979  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5980  // for more information.
  5981  func (c *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall {
  5982  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5983  	return c
  5984  }
  5985  
  5986  // Context sets the context to be used in this call's Do method. Any
  5987  // pending HTTP request will be aborted if the provided context is
  5988  // canceled.
  5989  func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall {
  5990  	c.ctx_ = ctx
  5991  	return c
  5992  }
  5993  
  5994  // Header returns an http.Header that can be modified by the caller to
  5995  // add HTTP headers to the request.
  5996  func (c *OrdersAcknowledgeCall) Header() http.Header {
  5997  	if c.header_ == nil {
  5998  		c.header_ = make(http.Header)
  5999  	}
  6000  	return c.header_
  6001  }
  6002  
  6003  func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
  6004  	reqHeaders := make(http.Header)
  6005  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6006  	for k, v := range c.header_ {
  6007  		reqHeaders[k] = v
  6008  	}
  6009  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6010  	var body io.Reader = nil
  6011  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest)
  6012  	if err != nil {
  6013  		return nil, err
  6014  	}
  6015  	reqHeaders.Set("Content-Type", "application/json")
  6016  	c.urlParams_.Set("alt", alt)
  6017  	c.urlParams_.Set("prettyPrint", "false")
  6018  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge")
  6019  	urls += "?" + c.urlParams_.Encode()
  6020  	req, err := http.NewRequest("POST", urls, body)
  6021  	if err != nil {
  6022  		return nil, err
  6023  	}
  6024  	req.Header = reqHeaders
  6025  	googleapi.Expand(req.URL, map[string]string{
  6026  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  6027  		"orderId":    c.orderId,
  6028  	})
  6029  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6030  }
  6031  
  6032  // Do executes the "content.orders.acknowledge" call.
  6033  // Exactly one of *OrdersAcknowledgeResponse or error will be non-nil.
  6034  // Any non-2xx status code is an error. Response headers are in either
  6035  // *OrdersAcknowledgeResponse.ServerResponse.Header or (if a response
  6036  // was returned at all) in error.(*googleapi.Error).Header. Use
  6037  // googleapi.IsNotModified to check whether the returned error was
  6038  // because http.StatusNotModified was returned.
  6039  func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) {
  6040  	gensupport.SetOptions(c.urlParams_, opts...)
  6041  	res, err := c.doRequest("json")
  6042  	if res != nil && res.StatusCode == http.StatusNotModified {
  6043  		if res.Body != nil {
  6044  			res.Body.Close()
  6045  		}
  6046  		return nil, &googleapi.Error{
  6047  			Code:   res.StatusCode,
  6048  			Header: res.Header,
  6049  		}
  6050  	}
  6051  	if err != nil {
  6052  		return nil, err
  6053  	}
  6054  	defer googleapi.CloseBody(res)
  6055  	if err := googleapi.CheckResponse(res); err != nil {
  6056  		return nil, err
  6057  	}
  6058  	ret := &OrdersAcknowledgeResponse{
  6059  		ServerResponse: googleapi.ServerResponse{
  6060  			Header:         res.Header,
  6061  			HTTPStatusCode: res.StatusCode,
  6062  		},
  6063  	}
  6064  	target := &ret
  6065  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6066  		return nil, err
  6067  	}
  6068  	return ret, nil
  6069  	// {
  6070  	//   "description": "Marks an order as acknowledged.",
  6071  	//   "httpMethod": "POST",
  6072  	//   "id": "content.orders.acknowledge",
  6073  	//   "parameterOrder": [
  6074  	//     "merchantId",
  6075  	//     "orderId"
  6076  	//   ],
  6077  	//   "parameters": {
  6078  	//     "merchantId": {
  6079  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  6080  	//       "format": "uint64",
  6081  	//       "location": "path",
  6082  	//       "required": true,
  6083  	//       "type": "string"
  6084  	//     },
  6085  	//     "orderId": {
  6086  	//       "description": "The ID of the order.",
  6087  	//       "location": "path",
  6088  	//       "required": true,
  6089  	//       "type": "string"
  6090  	//     }
  6091  	//   },
  6092  	//   "path": "{merchantId}/orders/{orderId}/acknowledge",
  6093  	//   "request": {
  6094  	//     "$ref": "OrdersAcknowledgeRequest"
  6095  	//   },
  6096  	//   "response": {
  6097  	//     "$ref": "OrdersAcknowledgeResponse"
  6098  	//   },
  6099  	//   "scopes": [
  6100  	//     "https://www.googleapis.com/auth/content"
  6101  	//   ]
  6102  	// }
  6103  
  6104  }
  6105  
  6106  // method id "content.orders.advancetestorder":
  6107  
  6108  type OrdersAdvancetestorderCall struct {
  6109  	s          *APIService
  6110  	merchantId uint64
  6111  	orderId    string
  6112  	urlParams_ gensupport.URLParams
  6113  	ctx_       context.Context
  6114  	header_    http.Header
  6115  }
  6116  
  6117  // Advancetestorder: Sandbox only. Moves a test order from state
  6118  // "inProgress" to state "pendingShipment".
  6119  func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall {
  6120  	c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6121  	c.merchantId = merchantId
  6122  	c.orderId = orderId
  6123  	return c
  6124  }
  6125  
  6126  // Fields allows partial responses to be retrieved. See
  6127  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6128  // for more information.
  6129  func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall {
  6130  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6131  	return c
  6132  }
  6133  
  6134  // Context sets the context to be used in this call's Do method. Any
  6135  // pending HTTP request will be aborted if the provided context is
  6136  // canceled.
  6137  func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall {
  6138  	c.ctx_ = ctx
  6139  	return c
  6140  }
  6141  
  6142  // Header returns an http.Header that can be modified by the caller to
  6143  // add HTTP headers to the request.
  6144  func (c *OrdersAdvancetestorderCall) Header() http.Header {
  6145  	if c.header_ == nil {
  6146  		c.header_ = make(http.Header)
  6147  	}
  6148  	return c.header_
  6149  }
  6150  
  6151  func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) {
  6152  	reqHeaders := make(http.Header)
  6153  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6154  	for k, v := range c.header_ {
  6155  		reqHeaders[k] = v
  6156  	}
  6157  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6158  	var body io.Reader = nil
  6159  	c.urlParams_.Set("alt", alt)
  6160  	c.urlParams_.Set("prettyPrint", "false")
  6161  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance")
  6162  	urls += "?" + c.urlParams_.Encode()
  6163  	req, err := http.NewRequest("POST", urls, body)
  6164  	if err != nil {
  6165  		return nil, err
  6166  	}
  6167  	req.Header = reqHeaders
  6168  	googleapi.Expand(req.URL, map[string]string{
  6169  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  6170  		"orderId":    c.orderId,
  6171  	})
  6172  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6173  }
  6174  
  6175  // Do executes the "content.orders.advancetestorder" call.
  6176  // Exactly one of *OrdersAdvanceTestOrderResponse or error will be
  6177  // non-nil. Any non-2xx status code is an error. Response headers are in
  6178  // either *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a
  6179  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6180  // googleapi.IsNotModified to check whether the returned error was
  6181  // because http.StatusNotModified was returned.
  6182  func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) {
  6183  	gensupport.SetOptions(c.urlParams_, opts...)
  6184  	res, err := c.doRequest("json")
  6185  	if res != nil && res.StatusCode == http.StatusNotModified {
  6186  		if res.Body != nil {
  6187  			res.Body.Close()
  6188  		}
  6189  		return nil, &googleapi.Error{
  6190  			Code:   res.StatusCode,
  6191  			Header: res.Header,
  6192  		}
  6193  	}
  6194  	if err != nil {
  6195  		return nil, err
  6196  	}
  6197  	defer googleapi.CloseBody(res)
  6198  	if err := googleapi.CheckResponse(res); err != nil {
  6199  		return nil, err
  6200  	}
  6201  	ret := &OrdersAdvanceTestOrderResponse{
  6202  		ServerResponse: googleapi.ServerResponse{
  6203  			Header:         res.Header,
  6204  			HTTPStatusCode: res.StatusCode,
  6205  		},
  6206  	}
  6207  	target := &ret
  6208  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6209  		return nil, err
  6210  	}
  6211  	return ret, nil
  6212  	// {
  6213  	//   "description": "Sandbox only. Moves a test order from state \"inProgress\" to state \"pendingShipment\".",
  6214  	//   "httpMethod": "POST",
  6215  	//   "id": "content.orders.advancetestorder",
  6216  	//   "parameterOrder": [
  6217  	//     "merchantId",
  6218  	//     "orderId"
  6219  	//   ],
  6220  	//   "parameters": {
  6221  	//     "merchantId": {
  6222  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  6223  	//       "format": "uint64",
  6224  	//       "location": "path",
  6225  	//       "required": true,
  6226  	//       "type": "string"
  6227  	//     },
  6228  	//     "orderId": {
  6229  	//       "description": "The ID of the test order to modify.",
  6230  	//       "location": "path",
  6231  	//       "required": true,
  6232  	//       "type": "string"
  6233  	//     }
  6234  	//   },
  6235  	//   "path": "{merchantId}/testorders/{orderId}/advance",
  6236  	//   "response": {
  6237  	//     "$ref": "OrdersAdvanceTestOrderResponse"
  6238  	//   },
  6239  	//   "scopes": [
  6240  	//     "https://www.googleapis.com/auth/content"
  6241  	//   ]
  6242  	// }
  6243  
  6244  }
  6245  
  6246  // method id "content.orders.cancel":
  6247  
  6248  type OrdersCancelCall struct {
  6249  	s                   *APIService
  6250  	merchantId          uint64
  6251  	orderId             string
  6252  	orderscancelrequest *OrdersCancelRequest
  6253  	urlParams_          gensupport.URLParams
  6254  	ctx_                context.Context
  6255  	header_             http.Header
  6256  }
  6257  
  6258  // Cancel: Cancels all line items in an order, making a full refund.
  6259  func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall {
  6260  	c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6261  	c.merchantId = merchantId
  6262  	c.orderId = orderId
  6263  	c.orderscancelrequest = orderscancelrequest
  6264  	return c
  6265  }
  6266  
  6267  // Fields allows partial responses to be retrieved. See
  6268  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6269  // for more information.
  6270  func (c *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall {
  6271  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6272  	return c
  6273  }
  6274  
  6275  // Context sets the context to be used in this call's Do method. Any
  6276  // pending HTTP request will be aborted if the provided context is
  6277  // canceled.
  6278  func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall {
  6279  	c.ctx_ = ctx
  6280  	return c
  6281  }
  6282  
  6283  // Header returns an http.Header that can be modified by the caller to
  6284  // add HTTP headers to the request.
  6285  func (c *OrdersCancelCall) Header() http.Header {
  6286  	if c.header_ == nil {
  6287  		c.header_ = make(http.Header)
  6288  	}
  6289  	return c.header_
  6290  }
  6291  
  6292  func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) {
  6293  	reqHeaders := make(http.Header)
  6294  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6295  	for k, v := range c.header_ {
  6296  		reqHeaders[k] = v
  6297  	}
  6298  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6299  	var body io.Reader = nil
  6300  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest)
  6301  	if err != nil {
  6302  		return nil, err
  6303  	}
  6304  	reqHeaders.Set("Content-Type", "application/json")
  6305  	c.urlParams_.Set("alt", alt)
  6306  	c.urlParams_.Set("prettyPrint", "false")
  6307  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel")
  6308  	urls += "?" + c.urlParams_.Encode()
  6309  	req, err := http.NewRequest("POST", urls, body)
  6310  	if err != nil {
  6311  		return nil, err
  6312  	}
  6313  	req.Header = reqHeaders
  6314  	googleapi.Expand(req.URL, map[string]string{
  6315  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  6316  		"orderId":    c.orderId,
  6317  	})
  6318  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6319  }
  6320  
  6321  // Do executes the "content.orders.cancel" call.
  6322  // Exactly one of *OrdersCancelResponse or error will be non-nil. Any
  6323  // non-2xx status code is an error. Response headers are in either
  6324  // *OrdersCancelResponse.ServerResponse.Header or (if a response was
  6325  // returned at all) in error.(*googleapi.Error).Header. Use
  6326  // googleapi.IsNotModified to check whether the returned error was
  6327  // because http.StatusNotModified was returned.
  6328  func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) {
  6329  	gensupport.SetOptions(c.urlParams_, opts...)
  6330  	res, err := c.doRequest("json")
  6331  	if res != nil && res.StatusCode == http.StatusNotModified {
  6332  		if res.Body != nil {
  6333  			res.Body.Close()
  6334  		}
  6335  		return nil, &googleapi.Error{
  6336  			Code:   res.StatusCode,
  6337  			Header: res.Header,
  6338  		}
  6339  	}
  6340  	if err != nil {
  6341  		return nil, err
  6342  	}
  6343  	defer googleapi.CloseBody(res)
  6344  	if err := googleapi.CheckResponse(res); err != nil {
  6345  		return nil, err
  6346  	}
  6347  	ret := &OrdersCancelResponse{
  6348  		ServerResponse: googleapi.ServerResponse{
  6349  			Header:         res.Header,
  6350  			HTTPStatusCode: res.StatusCode,
  6351  		},
  6352  	}
  6353  	target := &ret
  6354  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6355  		return nil, err
  6356  	}
  6357  	return ret, nil
  6358  	// {
  6359  	//   "description": "Cancels all line items in an order, making a full refund.",
  6360  	//   "httpMethod": "POST",
  6361  	//   "id": "content.orders.cancel",
  6362  	//   "parameterOrder": [
  6363  	//     "merchantId",
  6364  	//     "orderId"
  6365  	//   ],
  6366  	//   "parameters": {
  6367  	//     "merchantId": {
  6368  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  6369  	//       "format": "uint64",
  6370  	//       "location": "path",
  6371  	//       "required": true,
  6372  	//       "type": "string"
  6373  	//     },
  6374  	//     "orderId": {
  6375  	//       "description": "The ID of the order to cancel.",
  6376  	//       "location": "path",
  6377  	//       "required": true,
  6378  	//       "type": "string"
  6379  	//     }
  6380  	//   },
  6381  	//   "path": "{merchantId}/orders/{orderId}/cancel",
  6382  	//   "request": {
  6383  	//     "$ref": "OrdersCancelRequest"
  6384  	//   },
  6385  	//   "response": {
  6386  	//     "$ref": "OrdersCancelResponse"
  6387  	//   },
  6388  	//   "scopes": [
  6389  	//     "https://www.googleapis.com/auth/content"
  6390  	//   ]
  6391  	// }
  6392  
  6393  }
  6394  
  6395  // method id "content.orders.cancellineitem":
  6396  
  6397  type OrdersCancellineitemCall struct {
  6398  	s                           *APIService
  6399  	merchantId                  uint64
  6400  	orderId                     string
  6401  	orderscancellineitemrequest *OrdersCancelLineItemRequest
  6402  	urlParams_                  gensupport.URLParams
  6403  	ctx_                        context.Context
  6404  	header_                     http.Header
  6405  }
  6406  
  6407  // Cancellineitem: Cancels a line item, making a full refund.
  6408  func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall {
  6409  	c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6410  	c.merchantId = merchantId
  6411  	c.orderId = orderId
  6412  	c.orderscancellineitemrequest = orderscancellineitemrequest
  6413  	return c
  6414  }
  6415  
  6416  // Fields allows partial responses to be retrieved. See
  6417  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6418  // for more information.
  6419  func (c *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall {
  6420  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6421  	return c
  6422  }
  6423  
  6424  // Context sets the context to be used in this call's Do method. Any
  6425  // pending HTTP request will be aborted if the provided context is
  6426  // canceled.
  6427  func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall {
  6428  	c.ctx_ = ctx
  6429  	return c
  6430  }
  6431  
  6432  // Header returns an http.Header that can be modified by the caller to
  6433  // add HTTP headers to the request.
  6434  func (c *OrdersCancellineitemCall) Header() http.Header {
  6435  	if c.header_ == nil {
  6436  		c.header_ = make(http.Header)
  6437  	}
  6438  	return c.header_
  6439  }
  6440  
  6441  func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) {
  6442  	reqHeaders := make(http.Header)
  6443  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6444  	for k, v := range c.header_ {
  6445  		reqHeaders[k] = v
  6446  	}
  6447  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6448  	var body io.Reader = nil
  6449  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest)
  6450  	if err != nil {
  6451  		return nil, err
  6452  	}
  6453  	reqHeaders.Set("Content-Type", "application/json")
  6454  	c.urlParams_.Set("alt", alt)
  6455  	c.urlParams_.Set("prettyPrint", "false")
  6456  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem")
  6457  	urls += "?" + c.urlParams_.Encode()
  6458  	req, err := http.NewRequest("POST", urls, body)
  6459  	if err != nil {
  6460  		return nil, err
  6461  	}
  6462  	req.Header = reqHeaders
  6463  	googleapi.Expand(req.URL, map[string]string{
  6464  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  6465  		"orderId":    c.orderId,
  6466  	})
  6467  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6468  }
  6469  
  6470  // Do executes the "content.orders.cancellineitem" call.
  6471  // Exactly one of *OrdersCancelLineItemResponse or error will be
  6472  // non-nil. Any non-2xx status code is an error. Response headers are in
  6473  // either *OrdersCancelLineItemResponse.ServerResponse.Header or (if a
  6474  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6475  // googleapi.IsNotModified to check whether the returned error was
  6476  // because http.StatusNotModified was returned.
  6477  func (c *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) {
  6478  	gensupport.SetOptions(c.urlParams_, opts...)
  6479  	res, err := c.doRequest("json")
  6480  	if res != nil && res.StatusCode == http.StatusNotModified {
  6481  		if res.Body != nil {
  6482  			res.Body.Close()
  6483  		}
  6484  		return nil, &googleapi.Error{
  6485  			Code:   res.StatusCode,
  6486  			Header: res.Header,
  6487  		}
  6488  	}
  6489  	if err != nil {
  6490  		return nil, err
  6491  	}
  6492  	defer googleapi.CloseBody(res)
  6493  	if err := googleapi.CheckResponse(res); err != nil {
  6494  		return nil, err
  6495  	}
  6496  	ret := &OrdersCancelLineItemResponse{
  6497  		ServerResponse: googleapi.ServerResponse{
  6498  			Header:         res.Header,
  6499  			HTTPStatusCode: res.StatusCode,
  6500  		},
  6501  	}
  6502  	target := &ret
  6503  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6504  		return nil, err
  6505  	}
  6506  	return ret, nil
  6507  	// {
  6508  	//   "description": "Cancels a line item, making a full refund.",
  6509  	//   "httpMethod": "POST",
  6510  	//   "id": "content.orders.cancellineitem",
  6511  	//   "parameterOrder": [
  6512  	//     "merchantId",
  6513  	//     "orderId"
  6514  	//   ],
  6515  	//   "parameters": {
  6516  	//     "merchantId": {
  6517  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  6518  	//       "format": "uint64",
  6519  	//       "location": "path",
  6520  	//       "required": true,
  6521  	//       "type": "string"
  6522  	//     },
  6523  	//     "orderId": {
  6524  	//       "description": "The ID of the order.",
  6525  	//       "location": "path",
  6526  	//       "required": true,
  6527  	//       "type": "string"
  6528  	//     }
  6529  	//   },
  6530  	//   "path": "{merchantId}/orders/{orderId}/cancelLineItem",
  6531  	//   "request": {
  6532  	//     "$ref": "OrdersCancelLineItemRequest"
  6533  	//   },
  6534  	//   "response": {
  6535  	//     "$ref": "OrdersCancelLineItemResponse"
  6536  	//   },
  6537  	//   "scopes": [
  6538  	//     "https://www.googleapis.com/auth/content"
  6539  	//   ]
  6540  	// }
  6541  
  6542  }
  6543  
  6544  // method id "content.orders.canceltestorderbycustomer":
  6545  
  6546  type OrdersCanceltestorderbycustomerCall struct {
  6547  	s                                      *APIService
  6548  	merchantId                             uint64
  6549  	orderId                                string
  6550  	orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest
  6551  	urlParams_                             gensupport.URLParams
  6552  	ctx_                                   context.Context
  6553  	header_                                http.Header
  6554  }
  6555  
  6556  // Canceltestorderbycustomer: Sandbox only. Cancels a test order for
  6557  // customer-initiated cancellation.
  6558  func (r *OrdersService) Canceltestorderbycustomer(merchantId uint64, orderId string, orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest) *OrdersCanceltestorderbycustomerCall {
  6559  	c := &OrdersCanceltestorderbycustomerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6560  	c.merchantId = merchantId
  6561  	c.orderId = orderId
  6562  	c.orderscanceltestorderbycustomerrequest = orderscanceltestorderbycustomerrequest
  6563  	return c
  6564  }
  6565  
  6566  // Fields allows partial responses to be retrieved. See
  6567  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6568  // for more information.
  6569  func (c *OrdersCanceltestorderbycustomerCall) Fields(s ...googleapi.Field) *OrdersCanceltestorderbycustomerCall {
  6570  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6571  	return c
  6572  }
  6573  
  6574  // Context sets the context to be used in this call's Do method. Any
  6575  // pending HTTP request will be aborted if the provided context is
  6576  // canceled.
  6577  func (c *OrdersCanceltestorderbycustomerCall) Context(ctx context.Context) *OrdersCanceltestorderbycustomerCall {
  6578  	c.ctx_ = ctx
  6579  	return c
  6580  }
  6581  
  6582  // Header returns an http.Header that can be modified by the caller to
  6583  // add HTTP headers to the request.
  6584  func (c *OrdersCanceltestorderbycustomerCall) Header() http.Header {
  6585  	if c.header_ == nil {
  6586  		c.header_ = make(http.Header)
  6587  	}
  6588  	return c.header_
  6589  }
  6590  
  6591  func (c *OrdersCanceltestorderbycustomerCall) doRequest(alt string) (*http.Response, error) {
  6592  	reqHeaders := make(http.Header)
  6593  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6594  	for k, v := range c.header_ {
  6595  		reqHeaders[k] = v
  6596  	}
  6597  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6598  	var body io.Reader = nil
  6599  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscanceltestorderbycustomerrequest)
  6600  	if err != nil {
  6601  		return nil, err
  6602  	}
  6603  	reqHeaders.Set("Content-Type", "application/json")
  6604  	c.urlParams_.Set("alt", alt)
  6605  	c.urlParams_.Set("prettyPrint", "false")
  6606  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/cancelByCustomer")
  6607  	urls += "?" + c.urlParams_.Encode()
  6608  	req, err := http.NewRequest("POST", urls, body)
  6609  	if err != nil {
  6610  		return nil, err
  6611  	}
  6612  	req.Header = reqHeaders
  6613  	googleapi.Expand(req.URL, map[string]string{
  6614  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  6615  		"orderId":    c.orderId,
  6616  	})
  6617  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6618  }
  6619  
  6620  // Do executes the "content.orders.canceltestorderbycustomer" call.
  6621  // Exactly one of *OrdersCancelTestOrderByCustomerResponse or error will
  6622  // be non-nil. Any non-2xx status code is an error. Response headers are
  6623  // in either
  6624  // *OrdersCancelTestOrderByCustomerResponse.ServerResponse.Header or (if
  6625  // a response was returned at all) in error.(*googleapi.Error).Header.
  6626  // Use googleapi.IsNotModified to check whether the returned error was
  6627  // because http.StatusNotModified was returned.
  6628  func (c *OrdersCanceltestorderbycustomerCall) Do(opts ...googleapi.CallOption) (*OrdersCancelTestOrderByCustomerResponse, error) {
  6629  	gensupport.SetOptions(c.urlParams_, opts...)
  6630  	res, err := c.doRequest("json")
  6631  	if res != nil && res.StatusCode == http.StatusNotModified {
  6632  		if res.Body != nil {
  6633  			res.Body.Close()
  6634  		}
  6635  		return nil, &googleapi.Error{
  6636  			Code:   res.StatusCode,
  6637  			Header: res.Header,
  6638  		}
  6639  	}
  6640  	if err != nil {
  6641  		return nil, err
  6642  	}
  6643  	defer googleapi.CloseBody(res)
  6644  	if err := googleapi.CheckResponse(res); err != nil {
  6645  		return nil, err
  6646  	}
  6647  	ret := &OrdersCancelTestOrderByCustomerResponse{
  6648  		ServerResponse: googleapi.ServerResponse{
  6649  			Header:         res.Header,
  6650  			HTTPStatusCode: res.StatusCode,
  6651  		},
  6652  	}
  6653  	target := &ret
  6654  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6655  		return nil, err
  6656  	}
  6657  	return ret, nil
  6658  	// {
  6659  	//   "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.",
  6660  	//   "httpMethod": "POST",
  6661  	//   "id": "content.orders.canceltestorderbycustomer",
  6662  	//   "parameterOrder": [
  6663  	//     "merchantId",
  6664  	//     "orderId"
  6665  	//   ],
  6666  	//   "parameters": {
  6667  	//     "merchantId": {
  6668  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  6669  	//       "format": "uint64",
  6670  	//       "location": "path",
  6671  	//       "required": true,
  6672  	//       "type": "string"
  6673  	//     },
  6674  	//     "orderId": {
  6675  	//       "description": "The ID of the test order to cancel.",
  6676  	//       "location": "path",
  6677  	//       "required": true,
  6678  	//       "type": "string"
  6679  	//     }
  6680  	//   },
  6681  	//   "path": "{merchantId}/testorders/{orderId}/cancelByCustomer",
  6682  	//   "request": {
  6683  	//     "$ref": "OrdersCancelTestOrderByCustomerRequest"
  6684  	//   },
  6685  	//   "response": {
  6686  	//     "$ref": "OrdersCancelTestOrderByCustomerResponse"
  6687  	//   },
  6688  	//   "scopes": [
  6689  	//     "https://www.googleapis.com/auth/content"
  6690  	//   ]
  6691  	// }
  6692  
  6693  }
  6694  
  6695  // method id "content.orders.createtestorder":
  6696  
  6697  type OrdersCreatetestorderCall struct {
  6698  	s                            *APIService
  6699  	merchantId                   uint64
  6700  	orderscreatetestorderrequest *OrdersCreateTestOrderRequest
  6701  	urlParams_                   gensupport.URLParams
  6702  	ctx_                         context.Context
  6703  	header_                      http.Header
  6704  }
  6705  
  6706  // Createtestorder: Sandbox only. Creates a test order.
  6707  func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall {
  6708  	c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6709  	c.merchantId = merchantId
  6710  	c.orderscreatetestorderrequest = orderscreatetestorderrequest
  6711  	return c
  6712  }
  6713  
  6714  // Fields allows partial responses to be retrieved. See
  6715  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6716  // for more information.
  6717  func (c *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall {
  6718  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6719  	return c
  6720  }
  6721  
  6722  // Context sets the context to be used in this call's Do method. Any
  6723  // pending HTTP request will be aborted if the provided context is
  6724  // canceled.
  6725  func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall {
  6726  	c.ctx_ = ctx
  6727  	return c
  6728  }
  6729  
  6730  // Header returns an http.Header that can be modified by the caller to
  6731  // add HTTP headers to the request.
  6732  func (c *OrdersCreatetestorderCall) Header() http.Header {
  6733  	if c.header_ == nil {
  6734  		c.header_ = make(http.Header)
  6735  	}
  6736  	return c.header_
  6737  }
  6738  
  6739  func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) {
  6740  	reqHeaders := make(http.Header)
  6741  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6742  	for k, v := range c.header_ {
  6743  		reqHeaders[k] = v
  6744  	}
  6745  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6746  	var body io.Reader = nil
  6747  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest)
  6748  	if err != nil {
  6749  		return nil, err
  6750  	}
  6751  	reqHeaders.Set("Content-Type", "application/json")
  6752  	c.urlParams_.Set("alt", alt)
  6753  	c.urlParams_.Set("prettyPrint", "false")
  6754  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders")
  6755  	urls += "?" + c.urlParams_.Encode()
  6756  	req, err := http.NewRequest("POST", urls, body)
  6757  	if err != nil {
  6758  		return nil, err
  6759  	}
  6760  	req.Header = reqHeaders
  6761  	googleapi.Expand(req.URL, map[string]string{
  6762  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  6763  	})
  6764  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6765  }
  6766  
  6767  // Do executes the "content.orders.createtestorder" call.
  6768  // Exactly one of *OrdersCreateTestOrderResponse or error will be
  6769  // non-nil. Any non-2xx status code is an error. Response headers are in
  6770  // either *OrdersCreateTestOrderResponse.ServerResponse.Header or (if a
  6771  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6772  // googleapi.IsNotModified to check whether the returned error was
  6773  // because http.StatusNotModified was returned.
  6774  func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) {
  6775  	gensupport.SetOptions(c.urlParams_, opts...)
  6776  	res, err := c.doRequest("json")
  6777  	if res != nil && res.StatusCode == http.StatusNotModified {
  6778  		if res.Body != nil {
  6779  			res.Body.Close()
  6780  		}
  6781  		return nil, &googleapi.Error{
  6782  			Code:   res.StatusCode,
  6783  			Header: res.Header,
  6784  		}
  6785  	}
  6786  	if err != nil {
  6787  		return nil, err
  6788  	}
  6789  	defer googleapi.CloseBody(res)
  6790  	if err := googleapi.CheckResponse(res); err != nil {
  6791  		return nil, err
  6792  	}
  6793  	ret := &OrdersCreateTestOrderResponse{
  6794  		ServerResponse: googleapi.ServerResponse{
  6795  			Header:         res.Header,
  6796  			HTTPStatusCode: res.StatusCode,
  6797  		},
  6798  	}
  6799  	target := &ret
  6800  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6801  		return nil, err
  6802  	}
  6803  	return ret, nil
  6804  	// {
  6805  	//   "description": "Sandbox only. Creates a test order.",
  6806  	//   "httpMethod": "POST",
  6807  	//   "id": "content.orders.createtestorder",
  6808  	//   "parameterOrder": [
  6809  	//     "merchantId"
  6810  	//   ],
  6811  	//   "parameters": {
  6812  	//     "merchantId": {
  6813  	//       "description": "The ID of the account that should manage the order. This cannot be a multi-client account.",
  6814  	//       "format": "uint64",
  6815  	//       "location": "path",
  6816  	//       "required": true,
  6817  	//       "type": "string"
  6818  	//     }
  6819  	//   },
  6820  	//   "path": "{merchantId}/testorders",
  6821  	//   "request": {
  6822  	//     "$ref": "OrdersCreateTestOrderRequest"
  6823  	//   },
  6824  	//   "response": {
  6825  	//     "$ref": "OrdersCreateTestOrderResponse"
  6826  	//   },
  6827  	//   "scopes": [
  6828  	//     "https://www.googleapis.com/auth/content"
  6829  	//   ]
  6830  	// }
  6831  
  6832  }
  6833  
  6834  // method id "content.orders.createtestreturn":
  6835  
  6836  type OrdersCreatetestreturnCall struct {
  6837  	s                             *APIService
  6838  	merchantId                    uint64
  6839  	orderId                       string
  6840  	orderscreatetestreturnrequest *OrdersCreateTestReturnRequest
  6841  	urlParams_                    gensupport.URLParams
  6842  	ctx_                          context.Context
  6843  	header_                       http.Header
  6844  }
  6845  
  6846  // Createtestreturn: Sandbox only. Creates a test return.
  6847  func (r *OrdersService) Createtestreturn(merchantId uint64, orderId string, orderscreatetestreturnrequest *OrdersCreateTestReturnRequest) *OrdersCreatetestreturnCall {
  6848  	c := &OrdersCreatetestreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6849  	c.merchantId = merchantId
  6850  	c.orderId = orderId
  6851  	c.orderscreatetestreturnrequest = orderscreatetestreturnrequest
  6852  	return c
  6853  }
  6854  
  6855  // Fields allows partial responses to be retrieved. See
  6856  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6857  // for more information.
  6858  func (c *OrdersCreatetestreturnCall) Fields(s ...googleapi.Field) *OrdersCreatetestreturnCall {
  6859  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6860  	return c
  6861  }
  6862  
  6863  // Context sets the context to be used in this call's Do method. Any
  6864  // pending HTTP request will be aborted if the provided context is
  6865  // canceled.
  6866  func (c *OrdersCreatetestreturnCall) Context(ctx context.Context) *OrdersCreatetestreturnCall {
  6867  	c.ctx_ = ctx
  6868  	return c
  6869  }
  6870  
  6871  // Header returns an http.Header that can be modified by the caller to
  6872  // add HTTP headers to the request.
  6873  func (c *OrdersCreatetestreturnCall) Header() http.Header {
  6874  	if c.header_ == nil {
  6875  		c.header_ = make(http.Header)
  6876  	}
  6877  	return c.header_
  6878  }
  6879  
  6880  func (c *OrdersCreatetestreturnCall) doRequest(alt string) (*http.Response, error) {
  6881  	reqHeaders := make(http.Header)
  6882  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6883  	for k, v := range c.header_ {
  6884  		reqHeaders[k] = v
  6885  	}
  6886  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6887  	var body io.Reader = nil
  6888  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestreturnrequest)
  6889  	if err != nil {
  6890  		return nil, err
  6891  	}
  6892  	reqHeaders.Set("Content-Type", "application/json")
  6893  	c.urlParams_.Set("alt", alt)
  6894  	c.urlParams_.Set("prettyPrint", "false")
  6895  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/testreturn")
  6896  	urls += "?" + c.urlParams_.Encode()
  6897  	req, err := http.NewRequest("POST", urls, body)
  6898  	if err != nil {
  6899  		return nil, err
  6900  	}
  6901  	req.Header = reqHeaders
  6902  	googleapi.Expand(req.URL, map[string]string{
  6903  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  6904  		"orderId":    c.orderId,
  6905  	})
  6906  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6907  }
  6908  
  6909  // Do executes the "content.orders.createtestreturn" call.
  6910  // Exactly one of *OrdersCreateTestReturnResponse or error will be
  6911  // non-nil. Any non-2xx status code is an error. Response headers are in
  6912  // either *OrdersCreateTestReturnResponse.ServerResponse.Header or (if a
  6913  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6914  // googleapi.IsNotModified to check whether the returned error was
  6915  // because http.StatusNotModified was returned.
  6916  func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestReturnResponse, error) {
  6917  	gensupport.SetOptions(c.urlParams_, opts...)
  6918  	res, err := c.doRequest("json")
  6919  	if res != nil && res.StatusCode == http.StatusNotModified {
  6920  		if res.Body != nil {
  6921  			res.Body.Close()
  6922  		}
  6923  		return nil, &googleapi.Error{
  6924  			Code:   res.StatusCode,
  6925  			Header: res.Header,
  6926  		}
  6927  	}
  6928  	if err != nil {
  6929  		return nil, err
  6930  	}
  6931  	defer googleapi.CloseBody(res)
  6932  	if err := googleapi.CheckResponse(res); err != nil {
  6933  		return nil, err
  6934  	}
  6935  	ret := &OrdersCreateTestReturnResponse{
  6936  		ServerResponse: googleapi.ServerResponse{
  6937  			Header:         res.Header,
  6938  			HTTPStatusCode: res.StatusCode,
  6939  		},
  6940  	}
  6941  	target := &ret
  6942  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6943  		return nil, err
  6944  	}
  6945  	return ret, nil
  6946  	// {
  6947  	//   "description": "Sandbox only. Creates a test return.",
  6948  	//   "httpMethod": "POST",
  6949  	//   "id": "content.orders.createtestreturn",
  6950  	//   "parameterOrder": [
  6951  	//     "merchantId",
  6952  	//     "orderId"
  6953  	//   ],
  6954  	//   "parameters": {
  6955  	//     "merchantId": {
  6956  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  6957  	//       "format": "uint64",
  6958  	//       "location": "path",
  6959  	//       "required": true,
  6960  	//       "type": "string"
  6961  	//     },
  6962  	//     "orderId": {
  6963  	//       "description": "The ID of the order.",
  6964  	//       "location": "path",
  6965  	//       "required": true,
  6966  	//       "type": "string"
  6967  	//     }
  6968  	//   },
  6969  	//   "path": "{merchantId}/orders/{orderId}/testreturn",
  6970  	//   "request": {
  6971  	//     "$ref": "OrdersCreateTestReturnRequest"
  6972  	//   },
  6973  	//   "response": {
  6974  	//     "$ref": "OrdersCreateTestReturnResponse"
  6975  	//   },
  6976  	//   "scopes": [
  6977  	//     "https://www.googleapis.com/auth/content"
  6978  	//   ]
  6979  	// }
  6980  
  6981  }
  6982  
  6983  // method id "content.orders.custombatch":
  6984  
  6985  type OrdersCustombatchCall struct {
  6986  	s                        *APIService
  6987  	orderscustombatchrequest *OrdersCustomBatchRequest
  6988  	urlParams_               gensupport.URLParams
  6989  	ctx_                     context.Context
  6990  	header_                  http.Header
  6991  }
  6992  
  6993  // Custombatch: Retrieves or modifies multiple orders in a single
  6994  // request.
  6995  func (r *OrdersService) Custombatch(orderscustombatchrequest *OrdersCustomBatchRequest) *OrdersCustombatchCall {
  6996  	c := &OrdersCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6997  	c.orderscustombatchrequest = orderscustombatchrequest
  6998  	return c
  6999  }
  7000  
  7001  // Fields allows partial responses to be retrieved. See
  7002  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7003  // for more information.
  7004  func (c *OrdersCustombatchCall) Fields(s ...googleapi.Field) *OrdersCustombatchCall {
  7005  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7006  	return c
  7007  }
  7008  
  7009  // Context sets the context to be used in this call's Do method. Any
  7010  // pending HTTP request will be aborted if the provided context is
  7011  // canceled.
  7012  func (c *OrdersCustombatchCall) Context(ctx context.Context) *OrdersCustombatchCall {
  7013  	c.ctx_ = ctx
  7014  	return c
  7015  }
  7016  
  7017  // Header returns an http.Header that can be modified by the caller to
  7018  // add HTTP headers to the request.
  7019  func (c *OrdersCustombatchCall) Header() http.Header {
  7020  	if c.header_ == nil {
  7021  		c.header_ = make(http.Header)
  7022  	}
  7023  	return c.header_
  7024  }
  7025  
  7026  func (c *OrdersCustombatchCall) doRequest(alt string) (*http.Response, error) {
  7027  	reqHeaders := make(http.Header)
  7028  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  7029  	for k, v := range c.header_ {
  7030  		reqHeaders[k] = v
  7031  	}
  7032  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7033  	var body io.Reader = nil
  7034  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscustombatchrequest)
  7035  	if err != nil {
  7036  		return nil, err
  7037  	}
  7038  	reqHeaders.Set("Content-Type", "application/json")
  7039  	c.urlParams_.Set("alt", alt)
  7040  	c.urlParams_.Set("prettyPrint", "false")
  7041  	urls := googleapi.ResolveRelative(c.s.BasePath, "orders/batch")
  7042  	urls += "?" + c.urlParams_.Encode()
  7043  	req, err := http.NewRequest("POST", urls, body)
  7044  	if err != nil {
  7045  		return nil, err
  7046  	}
  7047  	req.Header = reqHeaders
  7048  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7049  }
  7050  
  7051  // Do executes the "content.orders.custombatch" call.
  7052  // Exactly one of *OrdersCustomBatchResponse or error will be non-nil.
  7053  // Any non-2xx status code is an error. Response headers are in either
  7054  // *OrdersCustomBatchResponse.ServerResponse.Header or (if a response
  7055  // was returned at all) in error.(*googleapi.Error).Header. Use
  7056  // googleapi.IsNotModified to check whether the returned error was
  7057  // because http.StatusNotModified was returned.
  7058  func (c *OrdersCustombatchCall) Do(opts ...googleapi.CallOption) (*OrdersCustomBatchResponse, error) {
  7059  	gensupport.SetOptions(c.urlParams_, opts...)
  7060  	res, err := c.doRequest("json")
  7061  	if res != nil && res.StatusCode == http.StatusNotModified {
  7062  		if res.Body != nil {
  7063  			res.Body.Close()
  7064  		}
  7065  		return nil, &googleapi.Error{
  7066  			Code:   res.StatusCode,
  7067  			Header: res.Header,
  7068  		}
  7069  	}
  7070  	if err != nil {
  7071  		return nil, err
  7072  	}
  7073  	defer googleapi.CloseBody(res)
  7074  	if err := googleapi.CheckResponse(res); err != nil {
  7075  		return nil, err
  7076  	}
  7077  	ret := &OrdersCustomBatchResponse{
  7078  		ServerResponse: googleapi.ServerResponse{
  7079  			Header:         res.Header,
  7080  			HTTPStatusCode: res.StatusCode,
  7081  		},
  7082  	}
  7083  	target := &ret
  7084  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7085  		return nil, err
  7086  	}
  7087  	return ret, nil
  7088  	// {
  7089  	//   "description": "Retrieves or modifies multiple orders in a single request.",
  7090  	//   "httpMethod": "POST",
  7091  	//   "id": "content.orders.custombatch",
  7092  	//   "path": "orders/batch",
  7093  	//   "request": {
  7094  	//     "$ref": "OrdersCustomBatchRequest"
  7095  	//   },
  7096  	//   "response": {
  7097  	//     "$ref": "OrdersCustomBatchResponse"
  7098  	//   },
  7099  	//   "scopes": [
  7100  	//     "https://www.googleapis.com/auth/content"
  7101  	//   ]
  7102  	// }
  7103  
  7104  }
  7105  
  7106  // method id "content.orders.get":
  7107  
  7108  type OrdersGetCall struct {
  7109  	s            *APIService
  7110  	merchantId   uint64
  7111  	orderId      string
  7112  	urlParams_   gensupport.URLParams
  7113  	ifNoneMatch_ string
  7114  	ctx_         context.Context
  7115  	header_      http.Header
  7116  }
  7117  
  7118  // Get: Retrieves an order from your Merchant Center account.
  7119  func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall {
  7120  	c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7121  	c.merchantId = merchantId
  7122  	c.orderId = orderId
  7123  	return c
  7124  }
  7125  
  7126  // Fields allows partial responses to be retrieved. See
  7127  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7128  // for more information.
  7129  func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
  7130  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7131  	return c
  7132  }
  7133  
  7134  // IfNoneMatch sets the optional parameter which makes the operation
  7135  // fail if the object's ETag matches the given value. This is useful for
  7136  // getting updates only after the object has changed since the last
  7137  // request. Use googleapi.IsNotModified to check whether the response
  7138  // error from Do is the result of In-None-Match.
  7139  func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
  7140  	c.ifNoneMatch_ = entityTag
  7141  	return c
  7142  }
  7143  
  7144  // Context sets the context to be used in this call's Do method. Any
  7145  // pending HTTP request will be aborted if the provided context is
  7146  // canceled.
  7147  func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
  7148  	c.ctx_ = ctx
  7149  	return c
  7150  }
  7151  
  7152  // Header returns an http.Header that can be modified by the caller to
  7153  // add HTTP headers to the request.
  7154  func (c *OrdersGetCall) Header() http.Header {
  7155  	if c.header_ == nil {
  7156  		c.header_ = make(http.Header)
  7157  	}
  7158  	return c.header_
  7159  }
  7160  
  7161  func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
  7162  	reqHeaders := make(http.Header)
  7163  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  7164  	for k, v := range c.header_ {
  7165  		reqHeaders[k] = v
  7166  	}
  7167  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7168  	if c.ifNoneMatch_ != "" {
  7169  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7170  	}
  7171  	var body io.Reader = nil
  7172  	c.urlParams_.Set("alt", alt)
  7173  	c.urlParams_.Set("prettyPrint", "false")
  7174  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}")
  7175  	urls += "?" + c.urlParams_.Encode()
  7176  	req, err := http.NewRequest("GET", urls, body)
  7177  	if err != nil {
  7178  		return nil, err
  7179  	}
  7180  	req.Header = reqHeaders
  7181  	googleapi.Expand(req.URL, map[string]string{
  7182  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  7183  		"orderId":    c.orderId,
  7184  	})
  7185  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7186  }
  7187  
  7188  // Do executes the "content.orders.get" call.
  7189  // Exactly one of *Order or error will be non-nil. Any non-2xx status
  7190  // code is an error. Response headers are in either
  7191  // *Order.ServerResponse.Header or (if a response was returned at all)
  7192  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7193  // check whether the returned error was because http.StatusNotModified
  7194  // was returned.
  7195  func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
  7196  	gensupport.SetOptions(c.urlParams_, opts...)
  7197  	res, err := c.doRequest("json")
  7198  	if res != nil && res.StatusCode == http.StatusNotModified {
  7199  		if res.Body != nil {
  7200  			res.Body.Close()
  7201  		}
  7202  		return nil, &googleapi.Error{
  7203  			Code:   res.StatusCode,
  7204  			Header: res.Header,
  7205  		}
  7206  	}
  7207  	if err != nil {
  7208  		return nil, err
  7209  	}
  7210  	defer googleapi.CloseBody(res)
  7211  	if err := googleapi.CheckResponse(res); err != nil {
  7212  		return nil, err
  7213  	}
  7214  	ret := &Order{
  7215  		ServerResponse: googleapi.ServerResponse{
  7216  			Header:         res.Header,
  7217  			HTTPStatusCode: res.StatusCode,
  7218  		},
  7219  	}
  7220  	target := &ret
  7221  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7222  		return nil, err
  7223  	}
  7224  	return ret, nil
  7225  	// {
  7226  	//   "description": "Retrieves an order from your Merchant Center account.",
  7227  	//   "httpMethod": "GET",
  7228  	//   "id": "content.orders.get",
  7229  	//   "parameterOrder": [
  7230  	//     "merchantId",
  7231  	//     "orderId"
  7232  	//   ],
  7233  	//   "parameters": {
  7234  	//     "merchantId": {
  7235  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  7236  	//       "format": "uint64",
  7237  	//       "location": "path",
  7238  	//       "required": true,
  7239  	//       "type": "string"
  7240  	//     },
  7241  	//     "orderId": {
  7242  	//       "description": "The ID of the order.",
  7243  	//       "location": "path",
  7244  	//       "required": true,
  7245  	//       "type": "string"
  7246  	//     }
  7247  	//   },
  7248  	//   "path": "{merchantId}/orders/{orderId}",
  7249  	//   "response": {
  7250  	//     "$ref": "Order"
  7251  	//   },
  7252  	//   "scopes": [
  7253  	//     "https://www.googleapis.com/auth/content"
  7254  	//   ]
  7255  	// }
  7256  
  7257  }
  7258  
  7259  // method id "content.orders.getbymerchantorderid":
  7260  
  7261  type OrdersGetbymerchantorderidCall struct {
  7262  	s               *APIService
  7263  	merchantId      uint64
  7264  	merchantOrderId string
  7265  	urlParams_      gensupport.URLParams
  7266  	ifNoneMatch_    string
  7267  	ctx_            context.Context
  7268  	header_         http.Header
  7269  }
  7270  
  7271  // Getbymerchantorderid: Retrieves an order using merchant order id.
  7272  func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall {
  7273  	c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7274  	c.merchantId = merchantId
  7275  	c.merchantOrderId = merchantOrderId
  7276  	return c
  7277  }
  7278  
  7279  // Fields allows partial responses to be retrieved. See
  7280  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7281  // for more information.
  7282  func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall {
  7283  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7284  	return c
  7285  }
  7286  
  7287  // IfNoneMatch sets the optional parameter which makes the operation
  7288  // fail if the object's ETag matches the given value. This is useful for
  7289  // getting updates only after the object has changed since the last
  7290  // request. Use googleapi.IsNotModified to check whether the response
  7291  // error from Do is the result of In-None-Match.
  7292  func (c *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall {
  7293  	c.ifNoneMatch_ = entityTag
  7294  	return c
  7295  }
  7296  
  7297  // Context sets the context to be used in this call's Do method. Any
  7298  // pending HTTP request will be aborted if the provided context is
  7299  // canceled.
  7300  func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall {
  7301  	c.ctx_ = ctx
  7302  	return c
  7303  }
  7304  
  7305  // Header returns an http.Header that can be modified by the caller to
  7306  // add HTTP headers to the request.
  7307  func (c *OrdersGetbymerchantorderidCall) Header() http.Header {
  7308  	if c.header_ == nil {
  7309  		c.header_ = make(http.Header)
  7310  	}
  7311  	return c.header_
  7312  }
  7313  
  7314  func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) {
  7315  	reqHeaders := make(http.Header)
  7316  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  7317  	for k, v := range c.header_ {
  7318  		reqHeaders[k] = v
  7319  	}
  7320  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7321  	if c.ifNoneMatch_ != "" {
  7322  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7323  	}
  7324  	var body io.Reader = nil
  7325  	c.urlParams_.Set("alt", alt)
  7326  	c.urlParams_.Set("prettyPrint", "false")
  7327  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}")
  7328  	urls += "?" + c.urlParams_.Encode()
  7329  	req, err := http.NewRequest("GET", urls, body)
  7330  	if err != nil {
  7331  		return nil, err
  7332  	}
  7333  	req.Header = reqHeaders
  7334  	googleapi.Expand(req.URL, map[string]string{
  7335  		"merchantId":      strconv.FormatUint(c.merchantId, 10),
  7336  		"merchantOrderId": c.merchantOrderId,
  7337  	})
  7338  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7339  }
  7340  
  7341  // Do executes the "content.orders.getbymerchantorderid" call.
  7342  // Exactly one of *OrdersGetByMerchantOrderIdResponse or error will be
  7343  // non-nil. Any non-2xx status code is an error. Response headers are in
  7344  // either *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or
  7345  // (if a response was returned at all) in
  7346  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7347  // whether the returned error was because http.StatusNotModified was
  7348  // returned.
  7349  func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) {
  7350  	gensupport.SetOptions(c.urlParams_, opts...)
  7351  	res, err := c.doRequest("json")
  7352  	if res != nil && res.StatusCode == http.StatusNotModified {
  7353  		if res.Body != nil {
  7354  			res.Body.Close()
  7355  		}
  7356  		return nil, &googleapi.Error{
  7357  			Code:   res.StatusCode,
  7358  			Header: res.Header,
  7359  		}
  7360  	}
  7361  	if err != nil {
  7362  		return nil, err
  7363  	}
  7364  	defer googleapi.CloseBody(res)
  7365  	if err := googleapi.CheckResponse(res); err != nil {
  7366  		return nil, err
  7367  	}
  7368  	ret := &OrdersGetByMerchantOrderIdResponse{
  7369  		ServerResponse: googleapi.ServerResponse{
  7370  			Header:         res.Header,
  7371  			HTTPStatusCode: res.StatusCode,
  7372  		},
  7373  	}
  7374  	target := &ret
  7375  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7376  		return nil, err
  7377  	}
  7378  	return ret, nil
  7379  	// {
  7380  	//   "description": "Retrieves an order using merchant order id.",
  7381  	//   "httpMethod": "GET",
  7382  	//   "id": "content.orders.getbymerchantorderid",
  7383  	//   "parameterOrder": [
  7384  	//     "merchantId",
  7385  	//     "merchantOrderId"
  7386  	//   ],
  7387  	//   "parameters": {
  7388  	//     "merchantId": {
  7389  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  7390  	//       "format": "uint64",
  7391  	//       "location": "path",
  7392  	//       "required": true,
  7393  	//       "type": "string"
  7394  	//     },
  7395  	//     "merchantOrderId": {
  7396  	//       "description": "The merchant order id to be looked for.",
  7397  	//       "location": "path",
  7398  	//       "required": true,
  7399  	//       "type": "string"
  7400  	//     }
  7401  	//   },
  7402  	//   "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}",
  7403  	//   "response": {
  7404  	//     "$ref": "OrdersGetByMerchantOrderIdResponse"
  7405  	//   },
  7406  	//   "scopes": [
  7407  	//     "https://www.googleapis.com/auth/content"
  7408  	//   ]
  7409  	// }
  7410  
  7411  }
  7412  
  7413  // method id "content.orders.gettestordertemplate":
  7414  
  7415  type OrdersGettestordertemplateCall struct {
  7416  	s            *APIService
  7417  	merchantId   uint64
  7418  	templateName string
  7419  	urlParams_   gensupport.URLParams
  7420  	ifNoneMatch_ string
  7421  	ctx_         context.Context
  7422  	header_      http.Header
  7423  }
  7424  
  7425  // Gettestordertemplate: Sandbox only. Retrieves an order template that
  7426  // can be used to quickly create a new order in sandbox.
  7427  func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall {
  7428  	c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7429  	c.merchantId = merchantId
  7430  	c.templateName = templateName
  7431  	return c
  7432  }
  7433  
  7434  // Country sets the optional parameter "country": The country of the
  7435  // template to retrieve. Defaults to US.
  7436  func (c *OrdersGettestordertemplateCall) Country(country string) *OrdersGettestordertemplateCall {
  7437  	c.urlParams_.Set("country", country)
  7438  	return c
  7439  }
  7440  
  7441  // Fields allows partial responses to be retrieved. See
  7442  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7443  // for more information.
  7444  func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall {
  7445  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7446  	return c
  7447  }
  7448  
  7449  // IfNoneMatch sets the optional parameter which makes the operation
  7450  // fail if the object's ETag matches the given value. This is useful for
  7451  // getting updates only after the object has changed since the last
  7452  // request. Use googleapi.IsNotModified to check whether the response
  7453  // error from Do is the result of In-None-Match.
  7454  func (c *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall {
  7455  	c.ifNoneMatch_ = entityTag
  7456  	return c
  7457  }
  7458  
  7459  // Context sets the context to be used in this call's Do method. Any
  7460  // pending HTTP request will be aborted if the provided context is
  7461  // canceled.
  7462  func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall {
  7463  	c.ctx_ = ctx
  7464  	return c
  7465  }
  7466  
  7467  // Header returns an http.Header that can be modified by the caller to
  7468  // add HTTP headers to the request.
  7469  func (c *OrdersGettestordertemplateCall) Header() http.Header {
  7470  	if c.header_ == nil {
  7471  		c.header_ = make(http.Header)
  7472  	}
  7473  	return c.header_
  7474  }
  7475  
  7476  func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) {
  7477  	reqHeaders := make(http.Header)
  7478  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  7479  	for k, v := range c.header_ {
  7480  		reqHeaders[k] = v
  7481  	}
  7482  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7483  	if c.ifNoneMatch_ != "" {
  7484  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7485  	}
  7486  	var body io.Reader = nil
  7487  	c.urlParams_.Set("alt", alt)
  7488  	c.urlParams_.Set("prettyPrint", "false")
  7489  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}")
  7490  	urls += "?" + c.urlParams_.Encode()
  7491  	req, err := http.NewRequest("GET", urls, body)
  7492  	if err != nil {
  7493  		return nil, err
  7494  	}
  7495  	req.Header = reqHeaders
  7496  	googleapi.Expand(req.URL, map[string]string{
  7497  		"merchantId":   strconv.FormatUint(c.merchantId, 10),
  7498  		"templateName": c.templateName,
  7499  	})
  7500  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7501  }
  7502  
  7503  // Do executes the "content.orders.gettestordertemplate" call.
  7504  // Exactly one of *OrdersGetTestOrderTemplateResponse or error will be
  7505  // non-nil. Any non-2xx status code is an error. Response headers are in
  7506  // either *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or
  7507  // (if a response was returned at all) in
  7508  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7509  // whether the returned error was because http.StatusNotModified was
  7510  // returned.
  7511  func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) {
  7512  	gensupport.SetOptions(c.urlParams_, opts...)
  7513  	res, err := c.doRequest("json")
  7514  	if res != nil && res.StatusCode == http.StatusNotModified {
  7515  		if res.Body != nil {
  7516  			res.Body.Close()
  7517  		}
  7518  		return nil, &googleapi.Error{
  7519  			Code:   res.StatusCode,
  7520  			Header: res.Header,
  7521  		}
  7522  	}
  7523  	if err != nil {
  7524  		return nil, err
  7525  	}
  7526  	defer googleapi.CloseBody(res)
  7527  	if err := googleapi.CheckResponse(res); err != nil {
  7528  		return nil, err
  7529  	}
  7530  	ret := &OrdersGetTestOrderTemplateResponse{
  7531  		ServerResponse: googleapi.ServerResponse{
  7532  			Header:         res.Header,
  7533  			HTTPStatusCode: res.StatusCode,
  7534  		},
  7535  	}
  7536  	target := &ret
  7537  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7538  		return nil, err
  7539  	}
  7540  	return ret, nil
  7541  	// {
  7542  	//   "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.",
  7543  	//   "httpMethod": "GET",
  7544  	//   "id": "content.orders.gettestordertemplate",
  7545  	//   "parameterOrder": [
  7546  	//     "merchantId",
  7547  	//     "templateName"
  7548  	//   ],
  7549  	//   "parameters": {
  7550  	//     "country": {
  7551  	//       "description": "The country of the template to retrieve. Defaults to US.",
  7552  	//       "location": "query",
  7553  	//       "type": "string"
  7554  	//     },
  7555  	//     "merchantId": {
  7556  	//       "description": "The ID of the account that should manage the order. This cannot be a multi-client account.",
  7557  	//       "format": "uint64",
  7558  	//       "location": "path",
  7559  	//       "required": true,
  7560  	//       "type": "string"
  7561  	//     },
  7562  	//     "templateName": {
  7563  	//       "description": "The name of the template to retrieve.",
  7564  	//       "enum": [
  7565  	//         "template1",
  7566  	//         "template1a",
  7567  	//         "template1b",
  7568  	//         "template2"
  7569  	//       ],
  7570  	//       "enumDescriptions": [
  7571  	//         "",
  7572  	//         "",
  7573  	//         "",
  7574  	//         ""
  7575  	//       ],
  7576  	//       "location": "path",
  7577  	//       "required": true,
  7578  	//       "type": "string"
  7579  	//     }
  7580  	//   },
  7581  	//   "path": "{merchantId}/testordertemplates/{templateName}",
  7582  	//   "response": {
  7583  	//     "$ref": "OrdersGetTestOrderTemplateResponse"
  7584  	//   },
  7585  	//   "scopes": [
  7586  	//     "https://www.googleapis.com/auth/content"
  7587  	//   ]
  7588  	// }
  7589  
  7590  }
  7591  
  7592  // method id "content.orders.instorerefundlineitem":
  7593  
  7594  type OrdersInstorerefundlineitemCall struct {
  7595  	s                                  *APIService
  7596  	merchantId                         uint64
  7597  	orderId                            string
  7598  	ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest
  7599  	urlParams_                         gensupport.URLParams
  7600  	ctx_                               context.Context
  7601  	header_                            http.Header
  7602  }
  7603  
  7604  // Instorerefundlineitem: Notifies that item return and refund was
  7605  // handled directly by merchant outside of Google payments processing
  7606  // (e.g. cash refund done in store).
  7607  func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall {
  7608  	c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7609  	c.merchantId = merchantId
  7610  	c.orderId = orderId
  7611  	c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest
  7612  	return c
  7613  }
  7614  
  7615  // Fields allows partial responses to be retrieved. See
  7616  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7617  // for more information.
  7618  func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall {
  7619  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7620  	return c
  7621  }
  7622  
  7623  // Context sets the context to be used in this call's Do method. Any
  7624  // pending HTTP request will be aborted if the provided context is
  7625  // canceled.
  7626  func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall {
  7627  	c.ctx_ = ctx
  7628  	return c
  7629  }
  7630  
  7631  // Header returns an http.Header that can be modified by the caller to
  7632  // add HTTP headers to the request.
  7633  func (c *OrdersInstorerefundlineitemCall) Header() http.Header {
  7634  	if c.header_ == nil {
  7635  		c.header_ = make(http.Header)
  7636  	}
  7637  	return c.header_
  7638  }
  7639  
  7640  func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) {
  7641  	reqHeaders := make(http.Header)
  7642  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  7643  	for k, v := range c.header_ {
  7644  		reqHeaders[k] = v
  7645  	}
  7646  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7647  	var body io.Reader = nil
  7648  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest)
  7649  	if err != nil {
  7650  		return nil, err
  7651  	}
  7652  	reqHeaders.Set("Content-Type", "application/json")
  7653  	c.urlParams_.Set("alt", alt)
  7654  	c.urlParams_.Set("prettyPrint", "false")
  7655  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem")
  7656  	urls += "?" + c.urlParams_.Encode()
  7657  	req, err := http.NewRequest("POST", urls, body)
  7658  	if err != nil {
  7659  		return nil, err
  7660  	}
  7661  	req.Header = reqHeaders
  7662  	googleapi.Expand(req.URL, map[string]string{
  7663  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  7664  		"orderId":    c.orderId,
  7665  	})
  7666  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7667  }
  7668  
  7669  // Do executes the "content.orders.instorerefundlineitem" call.
  7670  // Exactly one of *OrdersInStoreRefundLineItemResponse or error will be
  7671  // non-nil. Any non-2xx status code is an error. Response headers are in
  7672  // either *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or
  7673  // (if a response was returned at all) in
  7674  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7675  // whether the returned error was because http.StatusNotModified was
  7676  // returned.
  7677  func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) {
  7678  	gensupport.SetOptions(c.urlParams_, opts...)
  7679  	res, err := c.doRequest("json")
  7680  	if res != nil && res.StatusCode == http.StatusNotModified {
  7681  		if res.Body != nil {
  7682  			res.Body.Close()
  7683  		}
  7684  		return nil, &googleapi.Error{
  7685  			Code:   res.StatusCode,
  7686  			Header: res.Header,
  7687  		}
  7688  	}
  7689  	if err != nil {
  7690  		return nil, err
  7691  	}
  7692  	defer googleapi.CloseBody(res)
  7693  	if err := googleapi.CheckResponse(res); err != nil {
  7694  		return nil, err
  7695  	}
  7696  	ret := &OrdersInStoreRefundLineItemResponse{
  7697  		ServerResponse: googleapi.ServerResponse{
  7698  			Header:         res.Header,
  7699  			HTTPStatusCode: res.StatusCode,
  7700  		},
  7701  	}
  7702  	target := &ret
  7703  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7704  		return nil, err
  7705  	}
  7706  	return ret, nil
  7707  	// {
  7708  	//   "description": "Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store).",
  7709  	//   "httpMethod": "POST",
  7710  	//   "id": "content.orders.instorerefundlineitem",
  7711  	//   "parameterOrder": [
  7712  	//     "merchantId",
  7713  	//     "orderId"
  7714  	//   ],
  7715  	//   "parameters": {
  7716  	//     "merchantId": {
  7717  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  7718  	//       "format": "uint64",
  7719  	//       "location": "path",
  7720  	//       "required": true,
  7721  	//       "type": "string"
  7722  	//     },
  7723  	//     "orderId": {
  7724  	//       "description": "The ID of the order.",
  7725  	//       "location": "path",
  7726  	//       "required": true,
  7727  	//       "type": "string"
  7728  	//     }
  7729  	//   },
  7730  	//   "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem",
  7731  	//   "request": {
  7732  	//     "$ref": "OrdersInStoreRefundLineItemRequest"
  7733  	//   },
  7734  	//   "response": {
  7735  	//     "$ref": "OrdersInStoreRefundLineItemResponse"
  7736  	//   },
  7737  	//   "scopes": [
  7738  	//     "https://www.googleapis.com/auth/content"
  7739  	//   ]
  7740  	// }
  7741  
  7742  }
  7743  
  7744  // method id "content.orders.list":
  7745  
  7746  type OrdersListCall struct {
  7747  	s            *APIService
  7748  	merchantId   uint64
  7749  	urlParams_   gensupport.URLParams
  7750  	ifNoneMatch_ string
  7751  	ctx_         context.Context
  7752  	header_      http.Header
  7753  }
  7754  
  7755  // List: Lists the orders in your Merchant Center account.
  7756  func (r *OrdersService) List(merchantId uint64) *OrdersListCall {
  7757  	c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7758  	c.merchantId = merchantId
  7759  	return c
  7760  }
  7761  
  7762  // Acknowledged sets the optional parameter "acknowledged": Obtains
  7763  // orders that match the acknowledgement status. When set to true,
  7764  // obtains orders that have been acknowledged. When false, obtains
  7765  // orders that have not been acknowledged.
  7766  // We recommend using this filter set to false, in conjunction with the
  7767  // acknowledge call, such that only un-acknowledged orders are returned.
  7768  func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall {
  7769  	c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged))
  7770  	return c
  7771  }
  7772  
  7773  // MaxResults sets the optional parameter "maxResults": The maximum
  7774  // number of orders to return in the response, used for paging. The
  7775  // default value is 25 orders per page, and the maximum allowed value is
  7776  // 250 orders per page.
  7777  // Known issue: All List calls will return all Orders without limit
  7778  // regardless of the value of this field.
  7779  func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
  7780  	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  7781  	return c
  7782  }
  7783  
  7784  // OrderBy sets the optional parameter "orderBy": The ordering of the
  7785  // returned list. The only supported value are placedDate desc and
  7786  // placedDate asc for now, which returns orders sorted by placement
  7787  // date. "placedDate desc" stands for listing orders by placement date,
  7788  // from oldest to most recent. "placedDate asc" stands for listing
  7789  // orders by placement date, from most recent to oldest. In future
  7790  // releases we'll support other sorting criteria.
  7791  //
  7792  // Possible values:
  7793  //
  7794  //	"placedDate asc"
  7795  //	"placedDate desc"
  7796  func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall {
  7797  	c.urlParams_.Set("orderBy", orderBy)
  7798  	return c
  7799  }
  7800  
  7801  // PageToken sets the optional parameter "pageToken": The token returned
  7802  // by the previous request.
  7803  func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
  7804  	c.urlParams_.Set("pageToken", pageToken)
  7805  	return c
  7806  }
  7807  
  7808  // PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains
  7809  // orders placed before this date (exclusively), in ISO 8601 format.
  7810  func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall {
  7811  	c.urlParams_.Set("placedDateEnd", placedDateEnd)
  7812  	return c
  7813  }
  7814  
  7815  // PlacedDateStart sets the optional parameter "placedDateStart":
  7816  // Obtains orders placed after this date (inclusively), in ISO 8601
  7817  // format.
  7818  func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall {
  7819  	c.urlParams_.Set("placedDateStart", placedDateStart)
  7820  	return c
  7821  }
  7822  
  7823  // Statuses sets the optional parameter "statuses": Obtains orders that
  7824  // match any of the specified statuses. Multiple values can be specified
  7825  // with comma separation. Additionally, please note that active is a
  7826  // shortcut for pendingShipment and partiallyShipped, and completed is a
  7827  // shortcut for shipped , partiallyDelivered, delivered,
  7828  // partiallyReturned, returned, and canceled.
  7829  //
  7830  // Possible values:
  7831  //
  7832  //	"active"
  7833  //	"canceled"
  7834  //	"completed"
  7835  //	"delivered"
  7836  //	"inProgress"
  7837  //	"partiallyDelivered"
  7838  //	"partiallyReturned"
  7839  //	"partiallyShipped"
  7840  //	"pendingShipment"
  7841  //	"returned"
  7842  //	"shipped"
  7843  func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall {
  7844  	c.urlParams_.SetMulti("statuses", append([]string{}, statuses...))
  7845  	return c
  7846  }
  7847  
  7848  // Fields allows partial responses to be retrieved. See
  7849  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7850  // for more information.
  7851  func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
  7852  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7853  	return c
  7854  }
  7855  
  7856  // IfNoneMatch sets the optional parameter which makes the operation
  7857  // fail if the object's ETag matches the given value. This is useful for
  7858  // getting updates only after the object has changed since the last
  7859  // request. Use googleapi.IsNotModified to check whether the response
  7860  // error from Do is the result of In-None-Match.
  7861  func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
  7862  	c.ifNoneMatch_ = entityTag
  7863  	return c
  7864  }
  7865  
  7866  // Context sets the context to be used in this call's Do method. Any
  7867  // pending HTTP request will be aborted if the provided context is
  7868  // canceled.
  7869  func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
  7870  	c.ctx_ = ctx
  7871  	return c
  7872  }
  7873  
  7874  // Header returns an http.Header that can be modified by the caller to
  7875  // add HTTP headers to the request.
  7876  func (c *OrdersListCall) Header() http.Header {
  7877  	if c.header_ == nil {
  7878  		c.header_ = make(http.Header)
  7879  	}
  7880  	return c.header_
  7881  }
  7882  
  7883  func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
  7884  	reqHeaders := make(http.Header)
  7885  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  7886  	for k, v := range c.header_ {
  7887  		reqHeaders[k] = v
  7888  	}
  7889  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7890  	if c.ifNoneMatch_ != "" {
  7891  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7892  	}
  7893  	var body io.Reader = nil
  7894  	c.urlParams_.Set("alt", alt)
  7895  	c.urlParams_.Set("prettyPrint", "false")
  7896  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders")
  7897  	urls += "?" + c.urlParams_.Encode()
  7898  	req, err := http.NewRequest("GET", urls, body)
  7899  	if err != nil {
  7900  		return nil, err
  7901  	}
  7902  	req.Header = reqHeaders
  7903  	googleapi.Expand(req.URL, map[string]string{
  7904  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  7905  	})
  7906  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7907  }
  7908  
  7909  // Do executes the "content.orders.list" call.
  7910  // Exactly one of *OrdersListResponse or error will be non-nil. Any
  7911  // non-2xx status code is an error. Response headers are in either
  7912  // *OrdersListResponse.ServerResponse.Header or (if a response was
  7913  // returned at all) in error.(*googleapi.Error).Header. Use
  7914  // googleapi.IsNotModified to check whether the returned error was
  7915  // because http.StatusNotModified was returned.
  7916  func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
  7917  	gensupport.SetOptions(c.urlParams_, opts...)
  7918  	res, err := c.doRequest("json")
  7919  	if res != nil && res.StatusCode == http.StatusNotModified {
  7920  		if res.Body != nil {
  7921  			res.Body.Close()
  7922  		}
  7923  		return nil, &googleapi.Error{
  7924  			Code:   res.StatusCode,
  7925  			Header: res.Header,
  7926  		}
  7927  	}
  7928  	if err != nil {
  7929  		return nil, err
  7930  	}
  7931  	defer googleapi.CloseBody(res)
  7932  	if err := googleapi.CheckResponse(res); err != nil {
  7933  		return nil, err
  7934  	}
  7935  	ret := &OrdersListResponse{
  7936  		ServerResponse: googleapi.ServerResponse{
  7937  			Header:         res.Header,
  7938  			HTTPStatusCode: res.StatusCode,
  7939  		},
  7940  	}
  7941  	target := &ret
  7942  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7943  		return nil, err
  7944  	}
  7945  	return ret, nil
  7946  	// {
  7947  	//   "description": "Lists the orders in your Merchant Center account.",
  7948  	//   "httpMethod": "GET",
  7949  	//   "id": "content.orders.list",
  7950  	//   "parameterOrder": [
  7951  	//     "merchantId"
  7952  	//   ],
  7953  	//   "parameters": {
  7954  	//     "acknowledged": {
  7955  	//       "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.",
  7956  	//       "location": "query",
  7957  	//       "type": "boolean"
  7958  	//     },
  7959  	//     "maxResults": {
  7960  	//       "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.",
  7961  	//       "format": "uint32",
  7962  	//       "location": "query",
  7963  	//       "type": "integer"
  7964  	//     },
  7965  	//     "merchantId": {
  7966  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  7967  	//       "format": "uint64",
  7968  	//       "location": "path",
  7969  	//       "required": true,
  7970  	//       "type": "string"
  7971  	//     },
  7972  	//     "orderBy": {
  7973  	//       "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.",
  7974  	//       "enum": [
  7975  	//         "placedDate asc",
  7976  	//         "placedDate desc"
  7977  	//       ],
  7978  	//       "enumDescriptions": [
  7979  	//         "",
  7980  	//         ""
  7981  	//       ],
  7982  	//       "location": "query",
  7983  	//       "type": "string"
  7984  	//     },
  7985  	//     "pageToken": {
  7986  	//       "description": "The token returned by the previous request.",
  7987  	//       "location": "query",
  7988  	//       "type": "string"
  7989  	//     },
  7990  	//     "placedDateEnd": {
  7991  	//       "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.",
  7992  	//       "location": "query",
  7993  	//       "type": "string"
  7994  	//     },
  7995  	//     "placedDateStart": {
  7996  	//       "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.",
  7997  	//       "location": "query",
  7998  	//       "type": "string"
  7999  	//     },
  8000  	//     "statuses": {
  8001  	//       "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.",
  8002  	//       "enum": [
  8003  	//         "active",
  8004  	//         "canceled",
  8005  	//         "completed",
  8006  	//         "delivered",
  8007  	//         "inProgress",
  8008  	//         "partiallyDelivered",
  8009  	//         "partiallyReturned",
  8010  	//         "partiallyShipped",
  8011  	//         "pendingShipment",
  8012  	//         "returned",
  8013  	//         "shipped"
  8014  	//       ],
  8015  	//       "enumDescriptions": [
  8016  	//         "",
  8017  	//         "",
  8018  	//         "",
  8019  	//         "",
  8020  	//         "",
  8021  	//         "",
  8022  	//         "",
  8023  	//         "",
  8024  	//         "",
  8025  	//         "",
  8026  	//         ""
  8027  	//       ],
  8028  	//       "location": "query",
  8029  	//       "repeated": true,
  8030  	//       "type": "string"
  8031  	//     }
  8032  	//   },
  8033  	//   "path": "{merchantId}/orders",
  8034  	//   "response": {
  8035  	//     "$ref": "OrdersListResponse"
  8036  	//   },
  8037  	//   "scopes": [
  8038  	//     "https://www.googleapis.com/auth/content"
  8039  	//   ]
  8040  	// }
  8041  
  8042  }
  8043  
  8044  // Pages invokes f for each page of results.
  8045  // A non-nil error returned from f will halt the iteration.
  8046  // The provided context supersedes any context provided to the Context method.
  8047  func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
  8048  	c.ctx_ = ctx
  8049  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8050  	for {
  8051  		x, err := c.Do()
  8052  		if err != nil {
  8053  			return err
  8054  		}
  8055  		if err := f(x); err != nil {
  8056  			return err
  8057  		}
  8058  		if x.NextPageToken == "" {
  8059  			return nil
  8060  		}
  8061  		c.PageToken(x.NextPageToken)
  8062  	}
  8063  }
  8064  
  8065  // method id "content.orders.refund":
  8066  
  8067  type OrdersRefundCall struct {
  8068  	s                   *APIService
  8069  	merchantId          uint64
  8070  	orderId             string
  8071  	ordersrefundrequest *OrdersRefundRequest
  8072  	urlParams_          gensupport.URLParams
  8073  	ctx_                context.Context
  8074  	header_             http.Header
  8075  }
  8076  
  8077  // Refund: Deprecated, please use returnRefundLineItem instead.
  8078  func (r *OrdersService) Refund(merchantId uint64, orderId string, ordersrefundrequest *OrdersRefundRequest) *OrdersRefundCall {
  8079  	c := &OrdersRefundCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8080  	c.merchantId = merchantId
  8081  	c.orderId = orderId
  8082  	c.ordersrefundrequest = ordersrefundrequest
  8083  	return c
  8084  }
  8085  
  8086  // Fields allows partial responses to be retrieved. See
  8087  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8088  // for more information.
  8089  func (c *OrdersRefundCall) Fields(s ...googleapi.Field) *OrdersRefundCall {
  8090  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8091  	return c
  8092  }
  8093  
  8094  // Context sets the context to be used in this call's Do method. Any
  8095  // pending HTTP request will be aborted if the provided context is
  8096  // canceled.
  8097  func (c *OrdersRefundCall) Context(ctx context.Context) *OrdersRefundCall {
  8098  	c.ctx_ = ctx
  8099  	return c
  8100  }
  8101  
  8102  // Header returns an http.Header that can be modified by the caller to
  8103  // add HTTP headers to the request.
  8104  func (c *OrdersRefundCall) Header() http.Header {
  8105  	if c.header_ == nil {
  8106  		c.header_ = make(http.Header)
  8107  	}
  8108  	return c.header_
  8109  }
  8110  
  8111  func (c *OrdersRefundCall) doRequest(alt string) (*http.Response, error) {
  8112  	reqHeaders := make(http.Header)
  8113  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  8114  	for k, v := range c.header_ {
  8115  		reqHeaders[k] = v
  8116  	}
  8117  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8118  	var body io.Reader = nil
  8119  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundrequest)
  8120  	if err != nil {
  8121  		return nil, err
  8122  	}
  8123  	reqHeaders.Set("Content-Type", "application/json")
  8124  	c.urlParams_.Set("alt", alt)
  8125  	c.urlParams_.Set("prettyPrint", "false")
  8126  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refund")
  8127  	urls += "?" + c.urlParams_.Encode()
  8128  	req, err := http.NewRequest("POST", urls, body)
  8129  	if err != nil {
  8130  		return nil, err
  8131  	}
  8132  	req.Header = reqHeaders
  8133  	googleapi.Expand(req.URL, map[string]string{
  8134  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  8135  		"orderId":    c.orderId,
  8136  	})
  8137  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8138  }
  8139  
  8140  // Do executes the "content.orders.refund" call.
  8141  // Exactly one of *OrdersRefundResponse or error will be non-nil. Any
  8142  // non-2xx status code is an error. Response headers are in either
  8143  // *OrdersRefundResponse.ServerResponse.Header or (if a response was
  8144  // returned at all) in error.(*googleapi.Error).Header. Use
  8145  // googleapi.IsNotModified to check whether the returned error was
  8146  // because http.StatusNotModified was returned.
  8147  func (c *OrdersRefundCall) Do(opts ...googleapi.CallOption) (*OrdersRefundResponse, error) {
  8148  	gensupport.SetOptions(c.urlParams_, opts...)
  8149  	res, err := c.doRequest("json")
  8150  	if res != nil && res.StatusCode == http.StatusNotModified {
  8151  		if res.Body != nil {
  8152  			res.Body.Close()
  8153  		}
  8154  		return nil, &googleapi.Error{
  8155  			Code:   res.StatusCode,
  8156  			Header: res.Header,
  8157  		}
  8158  	}
  8159  	if err != nil {
  8160  		return nil, err
  8161  	}
  8162  	defer googleapi.CloseBody(res)
  8163  	if err := googleapi.CheckResponse(res); err != nil {
  8164  		return nil, err
  8165  	}
  8166  	ret := &OrdersRefundResponse{
  8167  		ServerResponse: googleapi.ServerResponse{
  8168  			Header:         res.Header,
  8169  			HTTPStatusCode: res.StatusCode,
  8170  		},
  8171  	}
  8172  	target := &ret
  8173  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8174  		return nil, err
  8175  	}
  8176  	return ret, nil
  8177  	// {
  8178  	//   "description": "Deprecated, please use returnRefundLineItem instead.",
  8179  	//   "httpMethod": "POST",
  8180  	//   "id": "content.orders.refund",
  8181  	//   "parameterOrder": [
  8182  	//     "merchantId",
  8183  	//     "orderId"
  8184  	//   ],
  8185  	//   "parameters": {
  8186  	//     "merchantId": {
  8187  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  8188  	//       "format": "uint64",
  8189  	//       "location": "path",
  8190  	//       "required": true,
  8191  	//       "type": "string"
  8192  	//     },
  8193  	//     "orderId": {
  8194  	//       "description": "The ID of the order to refund.",
  8195  	//       "location": "path",
  8196  	//       "required": true,
  8197  	//       "type": "string"
  8198  	//     }
  8199  	//   },
  8200  	//   "path": "{merchantId}/orders/{orderId}/refund",
  8201  	//   "request": {
  8202  	//     "$ref": "OrdersRefundRequest"
  8203  	//   },
  8204  	//   "response": {
  8205  	//     "$ref": "OrdersRefundResponse"
  8206  	//   },
  8207  	//   "scopes": [
  8208  	//     "https://www.googleapis.com/auth/content"
  8209  	//   ]
  8210  	// }
  8211  
  8212  }
  8213  
  8214  // method id "content.orders.rejectreturnlineitem":
  8215  
  8216  type OrdersRejectreturnlineitemCall struct {
  8217  	s                                 *APIService
  8218  	merchantId                        uint64
  8219  	orderId                           string
  8220  	ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest
  8221  	urlParams_                        gensupport.URLParams
  8222  	ctx_                              context.Context
  8223  	header_                           http.Header
  8224  }
  8225  
  8226  // Rejectreturnlineitem: Rejects return on an line item.
  8227  func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall {
  8228  	c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8229  	c.merchantId = merchantId
  8230  	c.orderId = orderId
  8231  	c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest
  8232  	return c
  8233  }
  8234  
  8235  // Fields allows partial responses to be retrieved. See
  8236  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8237  // for more information.
  8238  func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall {
  8239  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8240  	return c
  8241  }
  8242  
  8243  // Context sets the context to be used in this call's Do method. Any
  8244  // pending HTTP request will be aborted if the provided context is
  8245  // canceled.
  8246  func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall {
  8247  	c.ctx_ = ctx
  8248  	return c
  8249  }
  8250  
  8251  // Header returns an http.Header that can be modified by the caller to
  8252  // add HTTP headers to the request.
  8253  func (c *OrdersRejectreturnlineitemCall) Header() http.Header {
  8254  	if c.header_ == nil {
  8255  		c.header_ = make(http.Header)
  8256  	}
  8257  	return c.header_
  8258  }
  8259  
  8260  func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) {
  8261  	reqHeaders := make(http.Header)
  8262  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  8263  	for k, v := range c.header_ {
  8264  		reqHeaders[k] = v
  8265  	}
  8266  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8267  	var body io.Reader = nil
  8268  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest)
  8269  	if err != nil {
  8270  		return nil, err
  8271  	}
  8272  	reqHeaders.Set("Content-Type", "application/json")
  8273  	c.urlParams_.Set("alt", alt)
  8274  	c.urlParams_.Set("prettyPrint", "false")
  8275  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem")
  8276  	urls += "?" + c.urlParams_.Encode()
  8277  	req, err := http.NewRequest("POST", urls, body)
  8278  	if err != nil {
  8279  		return nil, err
  8280  	}
  8281  	req.Header = reqHeaders
  8282  	googleapi.Expand(req.URL, map[string]string{
  8283  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  8284  		"orderId":    c.orderId,
  8285  	})
  8286  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8287  }
  8288  
  8289  // Do executes the "content.orders.rejectreturnlineitem" call.
  8290  // Exactly one of *OrdersRejectReturnLineItemResponse or error will be
  8291  // non-nil. Any non-2xx status code is an error. Response headers are in
  8292  // either *OrdersRejectReturnLineItemResponse.ServerResponse.Header or
  8293  // (if a response was returned at all) in
  8294  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8295  // whether the returned error was because http.StatusNotModified was
  8296  // returned.
  8297  func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) {
  8298  	gensupport.SetOptions(c.urlParams_, opts...)
  8299  	res, err := c.doRequest("json")
  8300  	if res != nil && res.StatusCode == http.StatusNotModified {
  8301  		if res.Body != nil {
  8302  			res.Body.Close()
  8303  		}
  8304  		return nil, &googleapi.Error{
  8305  			Code:   res.StatusCode,
  8306  			Header: res.Header,
  8307  		}
  8308  	}
  8309  	if err != nil {
  8310  		return nil, err
  8311  	}
  8312  	defer googleapi.CloseBody(res)
  8313  	if err := googleapi.CheckResponse(res); err != nil {
  8314  		return nil, err
  8315  	}
  8316  	ret := &OrdersRejectReturnLineItemResponse{
  8317  		ServerResponse: googleapi.ServerResponse{
  8318  			Header:         res.Header,
  8319  			HTTPStatusCode: res.StatusCode,
  8320  		},
  8321  	}
  8322  	target := &ret
  8323  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8324  		return nil, err
  8325  	}
  8326  	return ret, nil
  8327  	// {
  8328  	//   "description": "Rejects return on an line item.",
  8329  	//   "httpMethod": "POST",
  8330  	//   "id": "content.orders.rejectreturnlineitem",
  8331  	//   "parameterOrder": [
  8332  	//     "merchantId",
  8333  	//     "orderId"
  8334  	//   ],
  8335  	//   "parameters": {
  8336  	//     "merchantId": {
  8337  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  8338  	//       "format": "uint64",
  8339  	//       "location": "path",
  8340  	//       "required": true,
  8341  	//       "type": "string"
  8342  	//     },
  8343  	//     "orderId": {
  8344  	//       "description": "The ID of the order.",
  8345  	//       "location": "path",
  8346  	//       "required": true,
  8347  	//       "type": "string"
  8348  	//     }
  8349  	//   },
  8350  	//   "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem",
  8351  	//   "request": {
  8352  	//     "$ref": "OrdersRejectReturnLineItemRequest"
  8353  	//   },
  8354  	//   "response": {
  8355  	//     "$ref": "OrdersRejectReturnLineItemResponse"
  8356  	//   },
  8357  	//   "scopes": [
  8358  	//     "https://www.googleapis.com/auth/content"
  8359  	//   ]
  8360  	// }
  8361  
  8362  }
  8363  
  8364  // method id "content.orders.returnlineitem":
  8365  
  8366  type OrdersReturnlineitemCall struct {
  8367  	s                           *APIService
  8368  	merchantId                  uint64
  8369  	orderId                     string
  8370  	ordersreturnlineitemrequest *OrdersReturnLineItemRequest
  8371  	urlParams_                  gensupport.URLParams
  8372  	ctx_                        context.Context
  8373  	header_                     http.Header
  8374  }
  8375  
  8376  // Returnlineitem: Returns a line item.
  8377  func (r *OrdersService) Returnlineitem(merchantId uint64, orderId string, ordersreturnlineitemrequest *OrdersReturnLineItemRequest) *OrdersReturnlineitemCall {
  8378  	c := &OrdersReturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8379  	c.merchantId = merchantId
  8380  	c.orderId = orderId
  8381  	c.ordersreturnlineitemrequest = ordersreturnlineitemrequest
  8382  	return c
  8383  }
  8384  
  8385  // Fields allows partial responses to be retrieved. See
  8386  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8387  // for more information.
  8388  func (c *OrdersReturnlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnlineitemCall {
  8389  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8390  	return c
  8391  }
  8392  
  8393  // Context sets the context to be used in this call's Do method. Any
  8394  // pending HTTP request will be aborted if the provided context is
  8395  // canceled.
  8396  func (c *OrdersReturnlineitemCall) Context(ctx context.Context) *OrdersReturnlineitemCall {
  8397  	c.ctx_ = ctx
  8398  	return c
  8399  }
  8400  
  8401  // Header returns an http.Header that can be modified by the caller to
  8402  // add HTTP headers to the request.
  8403  func (c *OrdersReturnlineitemCall) Header() http.Header {
  8404  	if c.header_ == nil {
  8405  		c.header_ = make(http.Header)
  8406  	}
  8407  	return c.header_
  8408  }
  8409  
  8410  func (c *OrdersReturnlineitemCall) doRequest(alt string) (*http.Response, error) {
  8411  	reqHeaders := make(http.Header)
  8412  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  8413  	for k, v := range c.header_ {
  8414  		reqHeaders[k] = v
  8415  	}
  8416  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8417  	var body io.Reader = nil
  8418  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnlineitemrequest)
  8419  	if err != nil {
  8420  		return nil, err
  8421  	}
  8422  	reqHeaders.Set("Content-Type", "application/json")
  8423  	c.urlParams_.Set("alt", alt)
  8424  	c.urlParams_.Set("prettyPrint", "false")
  8425  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnLineItem")
  8426  	urls += "?" + c.urlParams_.Encode()
  8427  	req, err := http.NewRequest("POST", urls, body)
  8428  	if err != nil {
  8429  		return nil, err
  8430  	}
  8431  	req.Header = reqHeaders
  8432  	googleapi.Expand(req.URL, map[string]string{
  8433  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  8434  		"orderId":    c.orderId,
  8435  	})
  8436  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8437  }
  8438  
  8439  // Do executes the "content.orders.returnlineitem" call.
  8440  // Exactly one of *OrdersReturnLineItemResponse or error will be
  8441  // non-nil. Any non-2xx status code is an error. Response headers are in
  8442  // either *OrdersReturnLineItemResponse.ServerResponse.Header or (if a
  8443  // response was returned at all) in error.(*googleapi.Error).Header. Use
  8444  // googleapi.IsNotModified to check whether the returned error was
  8445  // because http.StatusNotModified was returned.
  8446  func (c *OrdersReturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnLineItemResponse, error) {
  8447  	gensupport.SetOptions(c.urlParams_, opts...)
  8448  	res, err := c.doRequest("json")
  8449  	if res != nil && res.StatusCode == http.StatusNotModified {
  8450  		if res.Body != nil {
  8451  			res.Body.Close()
  8452  		}
  8453  		return nil, &googleapi.Error{
  8454  			Code:   res.StatusCode,
  8455  			Header: res.Header,
  8456  		}
  8457  	}
  8458  	if err != nil {
  8459  		return nil, err
  8460  	}
  8461  	defer googleapi.CloseBody(res)
  8462  	if err := googleapi.CheckResponse(res); err != nil {
  8463  		return nil, err
  8464  	}
  8465  	ret := &OrdersReturnLineItemResponse{
  8466  		ServerResponse: googleapi.ServerResponse{
  8467  			Header:         res.Header,
  8468  			HTTPStatusCode: res.StatusCode,
  8469  		},
  8470  	}
  8471  	target := &ret
  8472  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8473  		return nil, err
  8474  	}
  8475  	return ret, nil
  8476  	// {
  8477  	//   "description": "Returns a line item.",
  8478  	//   "httpMethod": "POST",
  8479  	//   "id": "content.orders.returnlineitem",
  8480  	//   "parameterOrder": [
  8481  	//     "merchantId",
  8482  	//     "orderId"
  8483  	//   ],
  8484  	//   "parameters": {
  8485  	//     "merchantId": {
  8486  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  8487  	//       "format": "uint64",
  8488  	//       "location": "path",
  8489  	//       "required": true,
  8490  	//       "type": "string"
  8491  	//     },
  8492  	//     "orderId": {
  8493  	//       "description": "The ID of the order.",
  8494  	//       "location": "path",
  8495  	//       "required": true,
  8496  	//       "type": "string"
  8497  	//     }
  8498  	//   },
  8499  	//   "path": "{merchantId}/orders/{orderId}/returnLineItem",
  8500  	//   "request": {
  8501  	//     "$ref": "OrdersReturnLineItemRequest"
  8502  	//   },
  8503  	//   "response": {
  8504  	//     "$ref": "OrdersReturnLineItemResponse"
  8505  	//   },
  8506  	//   "scopes": [
  8507  	//     "https://www.googleapis.com/auth/content"
  8508  	//   ]
  8509  	// }
  8510  
  8511  }
  8512  
  8513  // method id "content.orders.returnrefundlineitem":
  8514  
  8515  type OrdersReturnrefundlineitemCall struct {
  8516  	s                                 *APIService
  8517  	merchantId                        uint64
  8518  	orderId                           string
  8519  	ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest
  8520  	urlParams_                        gensupport.URLParams
  8521  	ctx_                              context.Context
  8522  	header_                           http.Header
  8523  }
  8524  
  8525  // Returnrefundlineitem: Returns and refunds a line item. Note that this
  8526  // method can only be called on fully shipped orders.
  8527  func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall {
  8528  	c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8529  	c.merchantId = merchantId
  8530  	c.orderId = orderId
  8531  	c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest
  8532  	return c
  8533  }
  8534  
  8535  // Fields allows partial responses to be retrieved. See
  8536  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8537  // for more information.
  8538  func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall {
  8539  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8540  	return c
  8541  }
  8542  
  8543  // Context sets the context to be used in this call's Do method. Any
  8544  // pending HTTP request will be aborted if the provided context is
  8545  // canceled.
  8546  func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall {
  8547  	c.ctx_ = ctx
  8548  	return c
  8549  }
  8550  
  8551  // Header returns an http.Header that can be modified by the caller to
  8552  // add HTTP headers to the request.
  8553  func (c *OrdersReturnrefundlineitemCall) Header() http.Header {
  8554  	if c.header_ == nil {
  8555  		c.header_ = make(http.Header)
  8556  	}
  8557  	return c.header_
  8558  }
  8559  
  8560  func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) {
  8561  	reqHeaders := make(http.Header)
  8562  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  8563  	for k, v := range c.header_ {
  8564  		reqHeaders[k] = v
  8565  	}
  8566  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8567  	var body io.Reader = nil
  8568  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest)
  8569  	if err != nil {
  8570  		return nil, err
  8571  	}
  8572  	reqHeaders.Set("Content-Type", "application/json")
  8573  	c.urlParams_.Set("alt", alt)
  8574  	c.urlParams_.Set("prettyPrint", "false")
  8575  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem")
  8576  	urls += "?" + c.urlParams_.Encode()
  8577  	req, err := http.NewRequest("POST", urls, body)
  8578  	if err != nil {
  8579  		return nil, err
  8580  	}
  8581  	req.Header = reqHeaders
  8582  	googleapi.Expand(req.URL, map[string]string{
  8583  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  8584  		"orderId":    c.orderId,
  8585  	})
  8586  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8587  }
  8588  
  8589  // Do executes the "content.orders.returnrefundlineitem" call.
  8590  // Exactly one of *OrdersReturnRefundLineItemResponse or error will be
  8591  // non-nil. Any non-2xx status code is an error. Response headers are in
  8592  // either *OrdersReturnRefundLineItemResponse.ServerResponse.Header or
  8593  // (if a response was returned at all) in
  8594  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8595  // whether the returned error was because http.StatusNotModified was
  8596  // returned.
  8597  func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) {
  8598  	gensupport.SetOptions(c.urlParams_, opts...)
  8599  	res, err := c.doRequest("json")
  8600  	if res != nil && res.StatusCode == http.StatusNotModified {
  8601  		if res.Body != nil {
  8602  			res.Body.Close()
  8603  		}
  8604  		return nil, &googleapi.Error{
  8605  			Code:   res.StatusCode,
  8606  			Header: res.Header,
  8607  		}
  8608  	}
  8609  	if err != nil {
  8610  		return nil, err
  8611  	}
  8612  	defer googleapi.CloseBody(res)
  8613  	if err := googleapi.CheckResponse(res); err != nil {
  8614  		return nil, err
  8615  	}
  8616  	ret := &OrdersReturnRefundLineItemResponse{
  8617  		ServerResponse: googleapi.ServerResponse{
  8618  			Header:         res.Header,
  8619  			HTTPStatusCode: res.StatusCode,
  8620  		},
  8621  	}
  8622  	target := &ret
  8623  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8624  		return nil, err
  8625  	}
  8626  	return ret, nil
  8627  	// {
  8628  	//   "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders.",
  8629  	//   "httpMethod": "POST",
  8630  	//   "id": "content.orders.returnrefundlineitem",
  8631  	//   "parameterOrder": [
  8632  	//     "merchantId",
  8633  	//     "orderId"
  8634  	//   ],
  8635  	//   "parameters": {
  8636  	//     "merchantId": {
  8637  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  8638  	//       "format": "uint64",
  8639  	//       "location": "path",
  8640  	//       "required": true,
  8641  	//       "type": "string"
  8642  	//     },
  8643  	//     "orderId": {
  8644  	//       "description": "The ID of the order.",
  8645  	//       "location": "path",
  8646  	//       "required": true,
  8647  	//       "type": "string"
  8648  	//     }
  8649  	//   },
  8650  	//   "path": "{merchantId}/orders/{orderId}/returnRefundLineItem",
  8651  	//   "request": {
  8652  	//     "$ref": "OrdersReturnRefundLineItemRequest"
  8653  	//   },
  8654  	//   "response": {
  8655  	//     "$ref": "OrdersReturnRefundLineItemResponse"
  8656  	//   },
  8657  	//   "scopes": [
  8658  	//     "https://www.googleapis.com/auth/content"
  8659  	//   ]
  8660  	// }
  8661  
  8662  }
  8663  
  8664  // method id "content.orders.setlineitemmetadata":
  8665  
  8666  type OrdersSetlineitemmetadataCall struct {
  8667  	s                                *APIService
  8668  	merchantId                       uint64
  8669  	orderId                          string
  8670  	orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest
  8671  	urlParams_                       gensupport.URLParams
  8672  	ctx_                             context.Context
  8673  	header_                          http.Header
  8674  }
  8675  
  8676  // Setlineitemmetadata: Sets (overrides) merchant provided annotations
  8677  // on the line item.
  8678  func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall {
  8679  	c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8680  	c.merchantId = merchantId
  8681  	c.orderId = orderId
  8682  	c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest
  8683  	return c
  8684  }
  8685  
  8686  // Fields allows partial responses to be retrieved. See
  8687  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8688  // for more information.
  8689  func (c *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall {
  8690  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8691  	return c
  8692  }
  8693  
  8694  // Context sets the context to be used in this call's Do method. Any
  8695  // pending HTTP request will be aborted if the provided context is
  8696  // canceled.
  8697  func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall {
  8698  	c.ctx_ = ctx
  8699  	return c
  8700  }
  8701  
  8702  // Header returns an http.Header that can be modified by the caller to
  8703  // add HTTP headers to the request.
  8704  func (c *OrdersSetlineitemmetadataCall) Header() http.Header {
  8705  	if c.header_ == nil {
  8706  		c.header_ = make(http.Header)
  8707  	}
  8708  	return c.header_
  8709  }
  8710  
  8711  func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) {
  8712  	reqHeaders := make(http.Header)
  8713  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  8714  	for k, v := range c.header_ {
  8715  		reqHeaders[k] = v
  8716  	}
  8717  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8718  	var body io.Reader = nil
  8719  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest)
  8720  	if err != nil {
  8721  		return nil, err
  8722  	}
  8723  	reqHeaders.Set("Content-Type", "application/json")
  8724  	c.urlParams_.Set("alt", alt)
  8725  	c.urlParams_.Set("prettyPrint", "false")
  8726  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata")
  8727  	urls += "?" + c.urlParams_.Encode()
  8728  	req, err := http.NewRequest("POST", urls, body)
  8729  	if err != nil {
  8730  		return nil, err
  8731  	}
  8732  	req.Header = reqHeaders
  8733  	googleapi.Expand(req.URL, map[string]string{
  8734  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  8735  		"orderId":    c.orderId,
  8736  	})
  8737  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8738  }
  8739  
  8740  // Do executes the "content.orders.setlineitemmetadata" call.
  8741  // Exactly one of *OrdersSetLineItemMetadataResponse or error will be
  8742  // non-nil. Any non-2xx status code is an error. Response headers are in
  8743  // either *OrdersSetLineItemMetadataResponse.ServerResponse.Header or
  8744  // (if a response was returned at all) in
  8745  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8746  // whether the returned error was because http.StatusNotModified was
  8747  // returned.
  8748  func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) {
  8749  	gensupport.SetOptions(c.urlParams_, opts...)
  8750  	res, err := c.doRequest("json")
  8751  	if res != nil && res.StatusCode == http.StatusNotModified {
  8752  		if res.Body != nil {
  8753  			res.Body.Close()
  8754  		}
  8755  		return nil, &googleapi.Error{
  8756  			Code:   res.StatusCode,
  8757  			Header: res.Header,
  8758  		}
  8759  	}
  8760  	if err != nil {
  8761  		return nil, err
  8762  	}
  8763  	defer googleapi.CloseBody(res)
  8764  	if err := googleapi.CheckResponse(res); err != nil {
  8765  		return nil, err
  8766  	}
  8767  	ret := &OrdersSetLineItemMetadataResponse{
  8768  		ServerResponse: googleapi.ServerResponse{
  8769  			Header:         res.Header,
  8770  			HTTPStatusCode: res.StatusCode,
  8771  		},
  8772  	}
  8773  	target := &ret
  8774  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8775  		return nil, err
  8776  	}
  8777  	return ret, nil
  8778  	// {
  8779  	//   "description": "Sets (overrides) merchant provided annotations on the line item.",
  8780  	//   "httpMethod": "POST",
  8781  	//   "id": "content.orders.setlineitemmetadata",
  8782  	//   "parameterOrder": [
  8783  	//     "merchantId",
  8784  	//     "orderId"
  8785  	//   ],
  8786  	//   "parameters": {
  8787  	//     "merchantId": {
  8788  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  8789  	//       "format": "uint64",
  8790  	//       "location": "path",
  8791  	//       "required": true,
  8792  	//       "type": "string"
  8793  	//     },
  8794  	//     "orderId": {
  8795  	//       "description": "The ID of the order.",
  8796  	//       "location": "path",
  8797  	//       "required": true,
  8798  	//       "type": "string"
  8799  	//     }
  8800  	//   },
  8801  	//   "path": "{merchantId}/orders/{orderId}/setLineItemMetadata",
  8802  	//   "request": {
  8803  	//     "$ref": "OrdersSetLineItemMetadataRequest"
  8804  	//   },
  8805  	//   "response": {
  8806  	//     "$ref": "OrdersSetLineItemMetadataResponse"
  8807  	//   },
  8808  	//   "scopes": [
  8809  	//     "https://www.googleapis.com/auth/content"
  8810  	//   ]
  8811  	// }
  8812  
  8813  }
  8814  
  8815  // method id "content.orders.shiplineitems":
  8816  
  8817  type OrdersShiplineitemsCall struct {
  8818  	s                          *APIService
  8819  	merchantId                 uint64
  8820  	orderId                    string
  8821  	ordersshiplineitemsrequest *OrdersShipLineItemsRequest
  8822  	urlParams_                 gensupport.URLParams
  8823  	ctx_                       context.Context
  8824  	header_                    http.Header
  8825  }
  8826  
  8827  // Shiplineitems: Marks line item(s) as shipped.
  8828  func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall {
  8829  	c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8830  	c.merchantId = merchantId
  8831  	c.orderId = orderId
  8832  	c.ordersshiplineitemsrequest = ordersshiplineitemsrequest
  8833  	return c
  8834  }
  8835  
  8836  // Fields allows partial responses to be retrieved. See
  8837  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8838  // for more information.
  8839  func (c *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall {
  8840  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8841  	return c
  8842  }
  8843  
  8844  // Context sets the context to be used in this call's Do method. Any
  8845  // pending HTTP request will be aborted if the provided context is
  8846  // canceled.
  8847  func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall {
  8848  	c.ctx_ = ctx
  8849  	return c
  8850  }
  8851  
  8852  // Header returns an http.Header that can be modified by the caller to
  8853  // add HTTP headers to the request.
  8854  func (c *OrdersShiplineitemsCall) Header() http.Header {
  8855  	if c.header_ == nil {
  8856  		c.header_ = make(http.Header)
  8857  	}
  8858  	return c.header_
  8859  }
  8860  
  8861  func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) {
  8862  	reqHeaders := make(http.Header)
  8863  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  8864  	for k, v := range c.header_ {
  8865  		reqHeaders[k] = v
  8866  	}
  8867  	reqHeaders.Set("User-Agent", c.s.userAgent())
  8868  	var body io.Reader = nil
  8869  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest)
  8870  	if err != nil {
  8871  		return nil, err
  8872  	}
  8873  	reqHeaders.Set("Content-Type", "application/json")
  8874  	c.urlParams_.Set("alt", alt)
  8875  	c.urlParams_.Set("prettyPrint", "false")
  8876  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems")
  8877  	urls += "?" + c.urlParams_.Encode()
  8878  	req, err := http.NewRequest("POST", urls, body)
  8879  	if err != nil {
  8880  		return nil, err
  8881  	}
  8882  	req.Header = reqHeaders
  8883  	googleapi.Expand(req.URL, map[string]string{
  8884  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  8885  		"orderId":    c.orderId,
  8886  	})
  8887  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8888  }
  8889  
  8890  // Do executes the "content.orders.shiplineitems" call.
  8891  // Exactly one of *OrdersShipLineItemsResponse or error will be non-nil.
  8892  // Any non-2xx status code is an error. Response headers are in either
  8893  // *OrdersShipLineItemsResponse.ServerResponse.Header or (if a response
  8894  // was returned at all) in error.(*googleapi.Error).Header. Use
  8895  // googleapi.IsNotModified to check whether the returned error was
  8896  // because http.StatusNotModified was returned.
  8897  func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) {
  8898  	gensupport.SetOptions(c.urlParams_, opts...)
  8899  	res, err := c.doRequest("json")
  8900  	if res != nil && res.StatusCode == http.StatusNotModified {
  8901  		if res.Body != nil {
  8902  			res.Body.Close()
  8903  		}
  8904  		return nil, &googleapi.Error{
  8905  			Code:   res.StatusCode,
  8906  			Header: res.Header,
  8907  		}
  8908  	}
  8909  	if err != nil {
  8910  		return nil, err
  8911  	}
  8912  	defer googleapi.CloseBody(res)
  8913  	if err := googleapi.CheckResponse(res); err != nil {
  8914  		return nil, err
  8915  	}
  8916  	ret := &OrdersShipLineItemsResponse{
  8917  		ServerResponse: googleapi.ServerResponse{
  8918  			Header:         res.Header,
  8919  			HTTPStatusCode: res.StatusCode,
  8920  		},
  8921  	}
  8922  	target := &ret
  8923  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8924  		return nil, err
  8925  	}
  8926  	return ret, nil
  8927  	// {
  8928  	//   "description": "Marks line item(s) as shipped.",
  8929  	//   "httpMethod": "POST",
  8930  	//   "id": "content.orders.shiplineitems",
  8931  	//   "parameterOrder": [
  8932  	//     "merchantId",
  8933  	//     "orderId"
  8934  	//   ],
  8935  	//   "parameters": {
  8936  	//     "merchantId": {
  8937  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  8938  	//       "format": "uint64",
  8939  	//       "location": "path",
  8940  	//       "required": true,
  8941  	//       "type": "string"
  8942  	//     },
  8943  	//     "orderId": {
  8944  	//       "description": "The ID of the order.",
  8945  	//       "location": "path",
  8946  	//       "required": true,
  8947  	//       "type": "string"
  8948  	//     }
  8949  	//   },
  8950  	//   "path": "{merchantId}/orders/{orderId}/shipLineItems",
  8951  	//   "request": {
  8952  	//     "$ref": "OrdersShipLineItemsRequest"
  8953  	//   },
  8954  	//   "response": {
  8955  	//     "$ref": "OrdersShipLineItemsResponse"
  8956  	//   },
  8957  	//   "scopes": [
  8958  	//     "https://www.googleapis.com/auth/content"
  8959  	//   ]
  8960  	// }
  8961  
  8962  }
  8963  
  8964  // method id "content.orders.updatelineitemshippingdetails":
  8965  
  8966  type OrdersUpdatelineitemshippingdetailsCall struct {
  8967  	s                                          *APIService
  8968  	merchantId                                 uint64
  8969  	orderId                                    string
  8970  	ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest
  8971  	urlParams_                                 gensupport.URLParams
  8972  	ctx_                                       context.Context
  8973  	header_                                    http.Header
  8974  }
  8975  
  8976  // Updatelineitemshippingdetails: Updates ship by and delivery by dates
  8977  // for a line item.
  8978  func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall {
  8979  	c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8980  	c.merchantId = merchantId
  8981  	c.orderId = orderId
  8982  	c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest
  8983  	return c
  8984  }
  8985  
  8986  // Fields allows partial responses to be retrieved. See
  8987  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8988  // for more information.
  8989  func (c *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall {
  8990  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8991  	return c
  8992  }
  8993  
  8994  // Context sets the context to be used in this call's Do method. Any
  8995  // pending HTTP request will be aborted if the provided context is
  8996  // canceled.
  8997  func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall {
  8998  	c.ctx_ = ctx
  8999  	return c
  9000  }
  9001  
  9002  // Header returns an http.Header that can be modified by the caller to
  9003  // add HTTP headers to the request.
  9004  func (c *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header {
  9005  	if c.header_ == nil {
  9006  		c.header_ = make(http.Header)
  9007  	}
  9008  	return c.header_
  9009  }
  9010  
  9011  func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) {
  9012  	reqHeaders := make(http.Header)
  9013  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  9014  	for k, v := range c.header_ {
  9015  		reqHeaders[k] = v
  9016  	}
  9017  	reqHeaders.Set("User-Agent", c.s.userAgent())
  9018  	var body io.Reader = nil
  9019  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatelineitemshippingdetailsrequest)
  9020  	if err != nil {
  9021  		return nil, err
  9022  	}
  9023  	reqHeaders.Set("Content-Type", "application/json")
  9024  	c.urlParams_.Set("alt", alt)
  9025  	c.urlParams_.Set("prettyPrint", "false")
  9026  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails")
  9027  	urls += "?" + c.urlParams_.Encode()
  9028  	req, err := http.NewRequest("POST", urls, body)
  9029  	if err != nil {
  9030  		return nil, err
  9031  	}
  9032  	req.Header = reqHeaders
  9033  	googleapi.Expand(req.URL, map[string]string{
  9034  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  9035  		"orderId":    c.orderId,
  9036  	})
  9037  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9038  }
  9039  
  9040  // Do executes the "content.orders.updatelineitemshippingdetails" call.
  9041  // Exactly one of *OrdersUpdateLineItemShippingDetailsResponse or error
  9042  // will be non-nil. Any non-2xx status code is an error. Response
  9043  // headers are in either
  9044  // *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or
  9045  // (if a response was returned at all) in
  9046  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9047  // whether the returned error was because http.StatusNotModified was
  9048  // returned.
  9049  func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) {
  9050  	gensupport.SetOptions(c.urlParams_, opts...)
  9051  	res, err := c.doRequest("json")
  9052  	if res != nil && res.StatusCode == http.StatusNotModified {
  9053  		if res.Body != nil {
  9054  			res.Body.Close()
  9055  		}
  9056  		return nil, &googleapi.Error{
  9057  			Code:   res.StatusCode,
  9058  			Header: res.Header,
  9059  		}
  9060  	}
  9061  	if err != nil {
  9062  		return nil, err
  9063  	}
  9064  	defer googleapi.CloseBody(res)
  9065  	if err := googleapi.CheckResponse(res); err != nil {
  9066  		return nil, err
  9067  	}
  9068  	ret := &OrdersUpdateLineItemShippingDetailsResponse{
  9069  		ServerResponse: googleapi.ServerResponse{
  9070  			Header:         res.Header,
  9071  			HTTPStatusCode: res.StatusCode,
  9072  		},
  9073  	}
  9074  	target := &ret
  9075  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9076  		return nil, err
  9077  	}
  9078  	return ret, nil
  9079  	// {
  9080  	//   "description": "Updates ship by and delivery by dates for a line item.",
  9081  	//   "httpMethod": "POST",
  9082  	//   "id": "content.orders.updatelineitemshippingdetails",
  9083  	//   "parameterOrder": [
  9084  	//     "merchantId",
  9085  	//     "orderId"
  9086  	//   ],
  9087  	//   "parameters": {
  9088  	//     "merchantId": {
  9089  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  9090  	//       "format": "uint64",
  9091  	//       "location": "path",
  9092  	//       "required": true,
  9093  	//       "type": "string"
  9094  	//     },
  9095  	//     "orderId": {
  9096  	//       "description": "The ID of the order.",
  9097  	//       "location": "path",
  9098  	//       "required": true,
  9099  	//       "type": "string"
  9100  	//     }
  9101  	//   },
  9102  	//   "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails",
  9103  	//   "request": {
  9104  	//     "$ref": "OrdersUpdateLineItemShippingDetailsRequest"
  9105  	//   },
  9106  	//   "response": {
  9107  	//     "$ref": "OrdersUpdateLineItemShippingDetailsResponse"
  9108  	//   },
  9109  	//   "scopes": [
  9110  	//     "https://www.googleapis.com/auth/content"
  9111  	//   ]
  9112  	// }
  9113  
  9114  }
  9115  
  9116  // method id "content.orders.updatemerchantorderid":
  9117  
  9118  type OrdersUpdatemerchantorderidCall struct {
  9119  	s                                  *APIService
  9120  	merchantId                         uint64
  9121  	orderId                            string
  9122  	ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest
  9123  	urlParams_                         gensupport.URLParams
  9124  	ctx_                               context.Context
  9125  	header_                            http.Header
  9126  }
  9127  
  9128  // Updatemerchantorderid: Updates the merchant order ID for a given
  9129  // order.
  9130  func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall {
  9131  	c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9132  	c.merchantId = merchantId
  9133  	c.orderId = orderId
  9134  	c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest
  9135  	return c
  9136  }
  9137  
  9138  // Fields allows partial responses to be retrieved. See
  9139  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9140  // for more information.
  9141  func (c *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall {
  9142  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9143  	return c
  9144  }
  9145  
  9146  // Context sets the context to be used in this call's Do method. Any
  9147  // pending HTTP request will be aborted if the provided context is
  9148  // canceled.
  9149  func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall {
  9150  	c.ctx_ = ctx
  9151  	return c
  9152  }
  9153  
  9154  // Header returns an http.Header that can be modified by the caller to
  9155  // add HTTP headers to the request.
  9156  func (c *OrdersUpdatemerchantorderidCall) Header() http.Header {
  9157  	if c.header_ == nil {
  9158  		c.header_ = make(http.Header)
  9159  	}
  9160  	return c.header_
  9161  }
  9162  
  9163  func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) {
  9164  	reqHeaders := make(http.Header)
  9165  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  9166  	for k, v := range c.header_ {
  9167  		reqHeaders[k] = v
  9168  	}
  9169  	reqHeaders.Set("User-Agent", c.s.userAgent())
  9170  	var body io.Reader = nil
  9171  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest)
  9172  	if err != nil {
  9173  		return nil, err
  9174  	}
  9175  	reqHeaders.Set("Content-Type", "application/json")
  9176  	c.urlParams_.Set("alt", alt)
  9177  	c.urlParams_.Set("prettyPrint", "false")
  9178  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId")
  9179  	urls += "?" + c.urlParams_.Encode()
  9180  	req, err := http.NewRequest("POST", urls, body)
  9181  	if err != nil {
  9182  		return nil, err
  9183  	}
  9184  	req.Header = reqHeaders
  9185  	googleapi.Expand(req.URL, map[string]string{
  9186  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  9187  		"orderId":    c.orderId,
  9188  	})
  9189  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9190  }
  9191  
  9192  // Do executes the "content.orders.updatemerchantorderid" call.
  9193  // Exactly one of *OrdersUpdateMerchantOrderIdResponse or error will be
  9194  // non-nil. Any non-2xx status code is an error. Response headers are in
  9195  // either *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or
  9196  // (if a response was returned at all) in
  9197  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9198  // whether the returned error was because http.StatusNotModified was
  9199  // returned.
  9200  func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) {
  9201  	gensupport.SetOptions(c.urlParams_, opts...)
  9202  	res, err := c.doRequest("json")
  9203  	if res != nil && res.StatusCode == http.StatusNotModified {
  9204  		if res.Body != nil {
  9205  			res.Body.Close()
  9206  		}
  9207  		return nil, &googleapi.Error{
  9208  			Code:   res.StatusCode,
  9209  			Header: res.Header,
  9210  		}
  9211  	}
  9212  	if err != nil {
  9213  		return nil, err
  9214  	}
  9215  	defer googleapi.CloseBody(res)
  9216  	if err := googleapi.CheckResponse(res); err != nil {
  9217  		return nil, err
  9218  	}
  9219  	ret := &OrdersUpdateMerchantOrderIdResponse{
  9220  		ServerResponse: googleapi.ServerResponse{
  9221  			Header:         res.Header,
  9222  			HTTPStatusCode: res.StatusCode,
  9223  		},
  9224  	}
  9225  	target := &ret
  9226  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9227  		return nil, err
  9228  	}
  9229  	return ret, nil
  9230  	// {
  9231  	//   "description": "Updates the merchant order ID for a given order.",
  9232  	//   "httpMethod": "POST",
  9233  	//   "id": "content.orders.updatemerchantorderid",
  9234  	//   "parameterOrder": [
  9235  	//     "merchantId",
  9236  	//     "orderId"
  9237  	//   ],
  9238  	//   "parameters": {
  9239  	//     "merchantId": {
  9240  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  9241  	//       "format": "uint64",
  9242  	//       "location": "path",
  9243  	//       "required": true,
  9244  	//       "type": "string"
  9245  	//     },
  9246  	//     "orderId": {
  9247  	//       "description": "The ID of the order.",
  9248  	//       "location": "path",
  9249  	//       "required": true,
  9250  	//       "type": "string"
  9251  	//     }
  9252  	//   },
  9253  	//   "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId",
  9254  	//   "request": {
  9255  	//     "$ref": "OrdersUpdateMerchantOrderIdRequest"
  9256  	//   },
  9257  	//   "response": {
  9258  	//     "$ref": "OrdersUpdateMerchantOrderIdResponse"
  9259  	//   },
  9260  	//   "scopes": [
  9261  	//     "https://www.googleapis.com/auth/content"
  9262  	//   ]
  9263  	// }
  9264  
  9265  }
  9266  
  9267  // method id "content.orders.updateshipment":
  9268  
  9269  type OrdersUpdateshipmentCall struct {
  9270  	s                           *APIService
  9271  	merchantId                  uint64
  9272  	orderId                     string
  9273  	ordersupdateshipmentrequest *OrdersUpdateShipmentRequest
  9274  	urlParams_                  gensupport.URLParams
  9275  	ctx_                        context.Context
  9276  	header_                     http.Header
  9277  }
  9278  
  9279  // Updateshipment: Updates a shipment's status, carrier, and/or tracking
  9280  // ID.
  9281  func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall {
  9282  	c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9283  	c.merchantId = merchantId
  9284  	c.orderId = orderId
  9285  	c.ordersupdateshipmentrequest = ordersupdateshipmentrequest
  9286  	return c
  9287  }
  9288  
  9289  // Fields allows partial responses to be retrieved. See
  9290  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9291  // for more information.
  9292  func (c *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall {
  9293  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9294  	return c
  9295  }
  9296  
  9297  // Context sets the context to be used in this call's Do method. Any
  9298  // pending HTTP request will be aborted if the provided context is
  9299  // canceled.
  9300  func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall {
  9301  	c.ctx_ = ctx
  9302  	return c
  9303  }
  9304  
  9305  // Header returns an http.Header that can be modified by the caller to
  9306  // add HTTP headers to the request.
  9307  func (c *OrdersUpdateshipmentCall) Header() http.Header {
  9308  	if c.header_ == nil {
  9309  		c.header_ = make(http.Header)
  9310  	}
  9311  	return c.header_
  9312  }
  9313  
  9314  func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) {
  9315  	reqHeaders := make(http.Header)
  9316  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  9317  	for k, v := range c.header_ {
  9318  		reqHeaders[k] = v
  9319  	}
  9320  	reqHeaders.Set("User-Agent", c.s.userAgent())
  9321  	var body io.Reader = nil
  9322  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest)
  9323  	if err != nil {
  9324  		return nil, err
  9325  	}
  9326  	reqHeaders.Set("Content-Type", "application/json")
  9327  	c.urlParams_.Set("alt", alt)
  9328  	c.urlParams_.Set("prettyPrint", "false")
  9329  	urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment")
  9330  	urls += "?" + c.urlParams_.Encode()
  9331  	req, err := http.NewRequest("POST", urls, body)
  9332  	if err != nil {
  9333  		return nil, err
  9334  	}
  9335  	req.Header = reqHeaders
  9336  	googleapi.Expand(req.URL, map[string]string{
  9337  		"merchantId": strconv.FormatUint(c.merchantId, 10),
  9338  		"orderId":    c.orderId,
  9339  	})
  9340  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9341  }
  9342  
  9343  // Do executes the "content.orders.updateshipment" call.
  9344  // Exactly one of *OrdersUpdateShipmentResponse or error will be
  9345  // non-nil. Any non-2xx status code is an error. Response headers are in
  9346  // either *OrdersUpdateShipmentResponse.ServerResponse.Header or (if a
  9347  // response was returned at all) in error.(*googleapi.Error).Header. Use
  9348  // googleapi.IsNotModified to check whether the returned error was
  9349  // because http.StatusNotModified was returned.
  9350  func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) {
  9351  	gensupport.SetOptions(c.urlParams_, opts...)
  9352  	res, err := c.doRequest("json")
  9353  	if res != nil && res.StatusCode == http.StatusNotModified {
  9354  		if res.Body != nil {
  9355  			res.Body.Close()
  9356  		}
  9357  		return nil, &googleapi.Error{
  9358  			Code:   res.StatusCode,
  9359  			Header: res.Header,
  9360  		}
  9361  	}
  9362  	if err != nil {
  9363  		return nil, err
  9364  	}
  9365  	defer googleapi.CloseBody(res)
  9366  	if err := googleapi.CheckResponse(res); err != nil {
  9367  		return nil, err
  9368  	}
  9369  	ret := &OrdersUpdateShipmentResponse{
  9370  		ServerResponse: googleapi.ServerResponse{
  9371  			Header:         res.Header,
  9372  			HTTPStatusCode: res.StatusCode,
  9373  		},
  9374  	}
  9375  	target := &ret
  9376  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9377  		return nil, err
  9378  	}
  9379  	return ret, nil
  9380  	// {
  9381  	//   "description": "Updates a shipment's status, carrier, and/or tracking ID.",
  9382  	//   "httpMethod": "POST",
  9383  	//   "id": "content.orders.updateshipment",
  9384  	//   "parameterOrder": [
  9385  	//     "merchantId",
  9386  	//     "orderId"
  9387  	//   ],
  9388  	//   "parameters": {
  9389  	//     "merchantId": {
  9390  	//       "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  9391  	//       "format": "uint64",
  9392  	//       "location": "path",
  9393  	//       "required": true,
  9394  	//       "type": "string"
  9395  	//     },
  9396  	//     "orderId": {
  9397  	//       "description": "The ID of the order.",
  9398  	//       "location": "path",
  9399  	//       "required": true,
  9400  	//       "type": "string"
  9401  	//     }
  9402  	//   },
  9403  	//   "path": "{merchantId}/orders/{orderId}/updateShipment",
  9404  	//   "request": {
  9405  	//     "$ref": "OrdersUpdateShipmentRequest"
  9406  	//   },
  9407  	//   "response": {
  9408  	//     "$ref": "OrdersUpdateShipmentResponse"
  9409  	//   },
  9410  	//   "scopes": [
  9411  	//     "https://www.googleapis.com/auth/content"
  9412  	//   ]
  9413  	// }
  9414  
  9415  }
  9416  

View as plain text