1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-26 05:03:43 +00:00

vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood
2018-03-19 15:51:38 +00:00
parent 940df88eb2
commit d64789528d
4309 changed files with 1327278 additions and 1001118 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1417,6 +1417,9 @@ type OrdersCustomBatchRequestEntry struct {
// CancelLineItem: Required for cancelLineItem method.
CancelLineItem *OrdersCustomBatchRequestEntryCancelLineItem `json:"cancelLineItem,omitempty"`
// InStoreRefundLineItem: Required for inStoreReturnLineItem method.
InStoreRefundLineItem *OrdersCustomBatchRequestEntryInStoreRefundLineItem `json:"inStoreRefundLineItem,omitempty"`
// MerchantId: The ID of the managing account.
MerchantId uint64 `json:"merchantId,omitempty,string"`
@@ -1439,9 +1442,15 @@ type OrdersCustomBatchRequestEntry struct {
// Refund: Required for refund method.
Refund *OrdersCustomBatchRequestEntryRefund `json:"refund,omitempty"`
// RejectReturnLineItem: Required for rejectReturnLineItem method.
RejectReturnLineItem *OrdersCustomBatchRequestEntryRejectReturnLineItem `json:"rejectReturnLineItem,omitempty"`
// ReturnLineItem: Required for returnLineItem method.
ReturnLineItem *OrdersCustomBatchRequestEntryReturnLineItem `json:"returnLineItem,omitempty"`
// ReturnRefundLineItem: Required for returnRefundLineItem method.
ReturnRefundLineItem *OrdersCustomBatchRequestEntryReturnRefundLineItem `json:"returnRefundLineItem,omitempty"`
// SetLineItemMetadata: Required for setLineItemMetadata method.
SetLineItemMetadata *OrdersCustomBatchRequestEntrySetLineItemMetadata `json:"setLineItemMetadata,omitempty"`
@@ -1565,6 +1574,54 @@ func (s *OrdersCustomBatchRequestEntryCancelLineItem) MarshalJSON() ([]byte, err
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersCustomBatchRequestEntryInStoreRefundLineItem struct {
// AmountPretax: The amount that is refunded. Required.
AmountPretax *Price `json:"amountPretax,omitempty"`
// AmountTax: Tax amount that correspond to refund amount in
// amountPretax. Required.
AmountTax *Price `json:"amountTax,omitempty"`
// LineItemId: The ID of the line item to return. Either lineItemId or
// productId is required.
LineItemId string `json:"lineItemId,omitempty"`
// ProductId: The ID of the product to return. This is the REST ID used
// in the products service. Either lineItemId or productId is required.
ProductId string `json:"productId,omitempty"`
// Quantity: The quantity to return and refund.
Quantity int64 `json:"quantity,omitempty"`
// Reason: The reason for the return.
Reason string `json:"reason,omitempty"`
// ReasonText: The explanation of the reason.
ReasonText string `json:"reasonText,omitempty"`
// ForceSendFields is a list of field names (e.g. "AmountPretax") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AmountPretax") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OrdersCustomBatchRequestEntryInStoreRefundLineItem) MarshalJSON() ([]byte, error) {
type NoMethod OrdersCustomBatchRequestEntryInStoreRefundLineItem
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersCustomBatchRequestEntryRefund struct {
// Amount: The amount that is refunded.
Amount *Price `json:"amount,omitempty"`
@@ -1606,6 +1663,47 @@ func (s *OrdersCustomBatchRequestEntryRefund) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersCustomBatchRequestEntryRejectReturnLineItem struct {
// LineItemId: The ID of the line item to return. Either lineItemId or
// productId is required.
LineItemId string `json:"lineItemId,omitempty"`
// ProductId: The ID of the product to return. This is the REST ID used
// in the products service. Either lineItemId or productId is required.
ProductId string `json:"productId,omitempty"`
// Quantity: The quantity to return and refund.
Quantity int64 `json:"quantity,omitempty"`
// Reason: The reason for the return.
Reason string `json:"reason,omitempty"`
// ReasonText: The explanation of the reason.
ReasonText string `json:"reasonText,omitempty"`
// ForceSendFields is a list of field names (e.g. "LineItemId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LineItemId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OrdersCustomBatchRequestEntryRejectReturnLineItem) MarshalJSON() ([]byte, error) {
type NoMethod OrdersCustomBatchRequestEntryRejectReturnLineItem
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersCustomBatchRequestEntryReturnLineItem struct {
// LineItemId: The ID of the line item to return. Either lineItemId or
// productId is required.
@@ -1647,6 +1745,55 @@ func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, err
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersCustomBatchRequestEntryReturnRefundLineItem struct {
// AmountPretax: The amount that is refunded. Optional, but if filled
// then both amountPretax and amountTax must be set.
AmountPretax *Price `json:"amountPretax,omitempty"`
// AmountTax: Tax amount that correspond to refund amount in
// amountPretax.
AmountTax *Price `json:"amountTax,omitempty"`
// LineItemId: The ID of the line item to return. Either lineItemId or
// productId is required.
LineItemId string `json:"lineItemId,omitempty"`
// ProductId: The ID of the product to return. This is the REST ID used
// in the products service. Either lineItemId or productId is required.
ProductId string `json:"productId,omitempty"`
// Quantity: The quantity to return and refund.
Quantity int64 `json:"quantity,omitempty"`
// Reason: The reason for the return.
Reason string `json:"reason,omitempty"`
// ReasonText: The explanation of the reason.
ReasonText string `json:"reasonText,omitempty"`
// ForceSendFields is a list of field names (e.g. "AmountPretax") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AmountPretax") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OrdersCustomBatchRequestEntryReturnRefundLineItem) MarshalJSON() ([]byte, error) {
type NoMethod OrdersCustomBatchRequestEntryReturnRefundLineItem
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersCustomBatchRequestEntrySetLineItemMetadata struct {
Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"`
@@ -1989,6 +2136,94 @@ func (s *OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersInStoreRefundLineItemRequest struct {
// AmountPretax: The amount that is refunded. Required.
AmountPretax *Price `json:"amountPretax,omitempty"`
// AmountTax: Tax amount that correspond to refund amount in
// amountPretax. Required.
AmountTax *Price `json:"amountTax,omitempty"`
// LineItemId: The ID of the line item to return. Either lineItemId or
// productId is required.
LineItemId string `json:"lineItemId,omitempty"`
// OperationId: The ID of the operation. Unique across all operations
// for a given order.
OperationId string `json:"operationId,omitempty"`
// ProductId: The ID of the product to return. This is the REST ID used
// in the products service. Either lineItemId or productId is required.
ProductId string `json:"productId,omitempty"`
// Quantity: The quantity to return and refund.
Quantity int64 `json:"quantity,omitempty"`
// Reason: The reason for the return.
Reason string `json:"reason,omitempty"`
// ReasonText: The explanation of the reason.
ReasonText string `json:"reasonText,omitempty"`
// ForceSendFields is a list of field names (e.g. "AmountPretax") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AmountPretax") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) {
type NoMethod OrdersInStoreRefundLineItemRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersInStoreRefundLineItemResponse struct {
// ExecutionStatus: The status of the execution.
ExecutionStatus string `json:"executionStatus,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "content#ordersInStoreRefundLineItemResponse".
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExecutionStatus") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) {
type NoMethod OrdersInStoreRefundLineItemResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersListResponse struct {
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "content#ordersListResponse".
@@ -2108,6 +2343,87 @@ func (s *OrdersRefundResponse) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersRejectReturnLineItemRequest struct {
// LineItemId: The ID of the line item to return. Either lineItemId or
// productId is required.
LineItemId string `json:"lineItemId,omitempty"`
// OperationId: The ID of the operation. Unique across all operations
// for a given order.
OperationId string `json:"operationId,omitempty"`
// ProductId: The ID of the product to return. This is the REST ID used
// in the products service. Either lineItemId or productId is required.
ProductId string `json:"productId,omitempty"`
// Quantity: The quantity to return and refund.
Quantity int64 `json:"quantity,omitempty"`
// Reason: The reason for the return.
Reason string `json:"reason,omitempty"`
// ReasonText: The explanation of the reason.
ReasonText string `json:"reasonText,omitempty"`
// ForceSendFields is a list of field names (e.g. "LineItemId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LineItemId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) {
type NoMethod OrdersRejectReturnLineItemRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersRejectReturnLineItemResponse struct {
// ExecutionStatus: The status of the execution.
ExecutionStatus string `json:"executionStatus,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "content#ordersRejectReturnLineItemResponse".
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExecutionStatus") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) {
type NoMethod OrdersRejectReturnLineItemResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersReturnLineItemRequest struct {
// LineItemId: The ID of the line item to return. Either lineItemId or
// productId is required.
@@ -2189,6 +2505,95 @@ func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersReturnRefundLineItemRequest struct {
// AmountPretax: The amount that is refunded. Optional, but if filled
// then both amountPretax and amountTax must be set.
AmountPretax *Price `json:"amountPretax,omitempty"`
// AmountTax: Tax amount that correspond to refund amount in
// amountPretax.
AmountTax *Price `json:"amountTax,omitempty"`
// LineItemId: The ID of the line item to return. Either lineItemId or
// productId is required.
LineItemId string `json:"lineItemId,omitempty"`
// OperationId: The ID of the operation. Unique across all operations
// for a given order.
OperationId string `json:"operationId,omitempty"`
// ProductId: The ID of the product to return. This is the REST ID used
// in the products service. Either lineItemId or productId is required.
ProductId string `json:"productId,omitempty"`
// Quantity: The quantity to return and refund.
Quantity int64 `json:"quantity,omitempty"`
// Reason: The reason for the return.
Reason string `json:"reason,omitempty"`
// ReasonText: The explanation of the reason.
ReasonText string `json:"reasonText,omitempty"`
// ForceSendFields is a list of field names (e.g. "AmountPretax") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AmountPretax") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) {
type NoMethod OrdersReturnRefundLineItemRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersReturnRefundLineItemResponse struct {
// ExecutionStatus: The status of the execution.
ExecutionStatus string `json:"executionStatus,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "content#ordersReturnRefundLineItemResponse".
Kind string `json:"kind,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExecutionStatus") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) {
type NoMethod OrdersReturnRefundLineItemResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
type OrdersSetLineItemMetadataRequest struct {
Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"`
@@ -4127,6 +4532,152 @@ func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*Orde
}
// method id "content.orders.instorerefundlineitem":
type OrdersInstorerefundlineitemCall struct {
s *APIService
merchantId uint64
orderId string
ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Instorerefundlineitem: Notifies that item return and refund was
// handled directly in store.
func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall {
c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.merchantId = merchantId
c.orderId = orderId
c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *OrdersInstorerefundlineitemCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"merchantId": strconv.FormatUint(c.merchantId, 10),
"orderId": c.orderId,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "content.orders.instorerefundlineitem" call.
// Exactly one of *OrdersInStoreRefundLineItemResponse or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &OrdersInStoreRefundLineItemResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Notifies that item return and refund was handled directly in store.",
// "httpMethod": "POST",
// "id": "content.orders.instorerefundlineitem",
// "parameterOrder": [
// "merchantId",
// "orderId"
// ],
// "parameters": {
// "merchantId": {
// "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
// "format": "uint64",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "orderId": {
// "description": "The ID of the order.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem",
// "request": {
// "$ref": "OrdersInStoreRefundLineItemRequest"
// },
// "response": {
// "$ref": "OrdersInStoreRefundLineItemResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/content"
// ]
// }
}
// method id "content.orders.list":
type OrdersListCall struct {
@@ -4585,6 +5136,151 @@ func (c *OrdersRefundCall) Do(opts ...googleapi.CallOption) (*OrdersRefundRespon
}
// method id "content.orders.rejectreturnlineitem":
type OrdersRejectreturnlineitemCall struct {
s *APIService
merchantId uint64
orderId string
ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Rejectreturnlineitem: Rejects return on an line item.
func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall {
c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.merchantId = merchantId
c.orderId = orderId
c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *OrdersRejectreturnlineitemCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"merchantId": strconv.FormatUint(c.merchantId, 10),
"orderId": c.orderId,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "content.orders.rejectreturnlineitem" call.
// Exactly one of *OrdersRejectReturnLineItemResponse or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *OrdersRejectReturnLineItemResponse.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &OrdersRejectReturnLineItemResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Rejects return on an line item.",
// "httpMethod": "POST",
// "id": "content.orders.rejectreturnlineitem",
// "parameterOrder": [
// "merchantId",
// "orderId"
// ],
// "parameters": {
// "merchantId": {
// "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
// "format": "uint64",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "orderId": {
// "description": "The ID of the order.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem",
// "request": {
// "$ref": "OrdersRejectReturnLineItemRequest"
// },
// "response": {
// "$ref": "OrdersRejectReturnLineItemResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/content"
// ]
// }
}
// method id "content.orders.returnlineitem":
type OrdersReturnlineitemCall struct {
@@ -4729,6 +5425,152 @@ func (c *OrdersReturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRetu
}
// method id "content.orders.returnrefundlineitem":
type OrdersReturnrefundlineitemCall struct {
s *APIService
merchantId uint64
orderId string
ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// Returnrefundlineitem: Returns and refunds a line item. Note that this
// method can only be called on fully shipped orders.
func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall {
c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.merchantId = merchantId
c.orderId = orderId
c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *OrdersReturnrefundlineitemCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"merchantId": strconv.FormatUint(c.merchantId, 10),
"orderId": c.orderId,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "content.orders.returnrefundlineitem" call.
// Exactly one of *OrdersReturnRefundLineItemResponse or error will be
// non-nil. Any non-2xx status code is an error. Response headers are in
// either *OrdersReturnRefundLineItemResponse.ServerResponse.Header or
// (if a response was returned at all) in
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
// whether the returned error was because http.StatusNotModified was
// returned.
func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &OrdersReturnRefundLineItemResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders.",
// "httpMethod": "POST",
// "id": "content.orders.returnrefundlineitem",
// "parameterOrder": [
// "merchantId",
// "orderId"
// ],
// "parameters": {
// "merchantId": {
// "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
// "format": "uint64",
// "location": "path",
// "required": true,
// "type": "string"
// },
// "orderId": {
// "description": "The ID of the order.",
// "location": "path",
// "required": true,
// "type": "string"
// }
// },
// "path": "{merchantId}/orders/{orderId}/returnRefundLineItem",
// "request": {
// "$ref": "OrdersReturnRefundLineItemRequest"
// },
// "response": {
// "$ref": "OrdersReturnRefundLineItemResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/content"
// ]
// }
}
// method id "content.orders.setlineitemmetadata":
type OrdersSetlineitemmetadataCall struct {