{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Content.Orders.Updateshipment
(
OrdersUpdateshipmentResource
, ordersUpdateshipment
, OrdersUpdateshipment
, ouMerchantId
, ouPayload
, ouOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersUpdateshipmentResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"updateShipment" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersUpdateShipmentRequest :>
Post '[JSON] OrdersUpdateShipmentResponse
data OrdersUpdateshipment = OrdersUpdateshipment'
{ _ouMerchantId :: !(Textual Word64)
, _ouPayload :: !OrdersUpdateShipmentRequest
, _ouOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersUpdateshipment
:: Word64
-> OrdersUpdateShipmentRequest
-> Text
-> OrdersUpdateshipment
ordersUpdateshipment pOuMerchantId_ pOuPayload_ pOuOrderId_ =
OrdersUpdateshipment'
{ _ouMerchantId = _Coerce # pOuMerchantId_
, _ouPayload = pOuPayload_
, _ouOrderId = pOuOrderId_
}
ouMerchantId :: Lens' OrdersUpdateshipment Word64
ouMerchantId
= lens _ouMerchantId (\ s a -> s{_ouMerchantId = a})
. _Coerce
ouPayload :: Lens' OrdersUpdateshipment OrdersUpdateShipmentRequest
ouPayload
= lens _ouPayload (\ s a -> s{_ouPayload = a})
ouOrderId :: Lens' OrdersUpdateshipment Text
ouOrderId
= lens _ouOrderId (\ s a -> s{_ouOrderId = a})
instance GoogleRequest OrdersUpdateshipment where
type Rs OrdersUpdateshipment =
OrdersUpdateShipmentResponse
type Scopes OrdersUpdateshipment =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersUpdateshipment'{..}
= go _ouMerchantId _ouOrderId (Just AltJSON)
_ouPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersUpdateshipmentResource)
mempty