# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.
defmodule GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntry do
@moduledoc """
## Attributes
* `batchId` (*type:* `integer()`, *default:* `nil`) - An entry ID, unique within the batch request.
* `cancel` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryCancel.t`, *default:* `nil`) - Required for `cancel` method.
* `cancelLineItem` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryCancelLineItem.t`, *default:* `nil`) - Required for `cancelLineItem` method.
* `inStoreRefundLineItem` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryInStoreRefundLineItem.t`, *default:* `nil`) - Required for `inStoreReturnLineItem` method.
* `merchantId` (*type:* `String.t`, *default:* `nil`) - The ID of the managing account.
* `merchantOrderId` (*type:* `String.t`, *default:* `nil`) - The merchant order ID. Required for `updateMerchantOrderId` and `getByMerchantOrderId` methods.
* `method` (*type:* `String.t`, *default:* `nil`) - The method of the batch entry. Acceptable values are: - "`acknowledge`" - "`cancel`" - "`cancelLineItem`" - "`get`" - "`getByMerchantOrderId`" - "`inStoreRefundLineItem`" - "`refund`" - "`rejectReturnLineItem`" - "`returnLineItem`" - "`returnRefundLineItem`" - "`setLineItemMetadata`" - "`shipLineItems`" - "`updateLineItemShippingDetails`" - "`updateMerchantOrderId`" - "`updateShipment`"
* `operationId` (*type:* `String.t`, *default:* `nil`) - The ID of the operation. Unique across all operations for a given order. Required for all methods beside `get` and `getByMerchantOrderId`.
* `orderId` (*type:* `String.t`, *default:* `nil`) - The ID of the order. Required for all methods beside `getByMerchantOrderId`.
* `refund` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryRefund.t`, *default:* `nil`) - Required for `refund` method.
* `rejectReturnLineItem` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryRejectReturnLineItem.t`, *default:* `nil`) - Required for `rejectReturnLineItem` method.
* `returnLineItem` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryReturnLineItem.t`, *default:* `nil`) - Required for `returnLineItem` method.
* `returnRefundLineItem` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryReturnRefundLineItem.t`, *default:* `nil`) - Required for `returnRefundLineItem` method.
* `setLineItemMetadata` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntrySetLineItemMetadata.t`, *default:* `nil`) - Required for `setLineItemMetadata` method.
* `shipLineItems` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryShipLineItems.t`, *default:* `nil`) - Required for `shipLineItems` method.
* `updateLineItemShippingDetails` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails.t`, *default:* `nil`) - Required for `updateLineItemShippingDate` method.
* `updateShipment` (*type:* `GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryUpdateShipment.t`, *default:* `nil`) - Required for `updateShipment` method.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:batchId => integer() | nil,
:cancel => GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryCancel.t() | nil,
:cancelLineItem =>
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryCancelLineItem.t() | nil,
:inStoreRefundLineItem =>
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryInStoreRefundLineItem.t()
| nil,
:merchantId => String.t() | nil,
:merchantOrderId => String.t() | nil,
:method => String.t() | nil,
:operationId => String.t() | nil,
:orderId => String.t() | nil,
:refund => GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryRefund.t() | nil,
:rejectReturnLineItem =>
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryRejectReturnLineItem.t() | nil,
:returnLineItem =>
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryReturnLineItem.t() | nil,
:returnRefundLineItem =>
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryReturnRefundLineItem.t() | nil,
:setLineItemMetadata =>
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntrySetLineItemMetadata.t() | nil,
:shipLineItems =>
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryShipLineItems.t() | nil,
:updateLineItemShippingDetails =>
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails.t()
| nil,
:updateShipment =>
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryUpdateShipment.t() | nil
}
field(:batchId)
field(:cancel, as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryCancel)
field(:cancelLineItem,
as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryCancelLineItem
)
field(:inStoreRefundLineItem,
as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryInStoreRefundLineItem
)
field(:merchantId)
field(:merchantOrderId)
field(:method)
field(:operationId)
field(:orderId)
field(:refund, as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryRefund)
field(:rejectReturnLineItem,
as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryRejectReturnLineItem
)
field(:returnLineItem,
as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryReturnLineItem
)
field(:returnRefundLineItem,
as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryReturnRefundLineItem
)
field(:setLineItemMetadata,
as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntrySetLineItemMetadata
)
field(:shipLineItems, as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryShipLineItems)
field(:updateLineItemShippingDetails,
as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails
)
field(:updateShipment,
as: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntryUpdateShipment
)
end
defimpl Poison.Decoder, for: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntry do
def decode(value, options) do
GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntry.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Content.V2.Model.OrdersCustomBatchRequestEntry do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end