{-# 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.Shiplineitems
(
OrdersShiplineitemsResource
, ordersShiplineitems
, OrdersShiplineitems
, osMerchantId
, osPayload
, osOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrdersShiplineitemsResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orders" :>
Capture "orderId" Text :>
"shipLineItems" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] OrdersShipLineItemsRequest :>
Post '[JSON] OrdersShipLineItemsResponse
data OrdersShiplineitems = OrdersShiplineitems'
{ _osMerchantId :: !(Textual Word64)
, _osPayload :: !OrdersShipLineItemsRequest
, _osOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersShiplineitems
:: Word64
-> OrdersShipLineItemsRequest
-> Text
-> OrdersShiplineitems
ordersShiplineitems pOsMerchantId_ pOsPayload_ pOsOrderId_ =
OrdersShiplineitems'
{ _osMerchantId = _Coerce # pOsMerchantId_
, _osPayload = pOsPayload_
, _osOrderId = pOsOrderId_
}
osMerchantId :: Lens' OrdersShiplineitems Word64
osMerchantId
= lens _osMerchantId (\ s a -> s{_osMerchantId = a})
. _Coerce
osPayload :: Lens' OrdersShiplineitems OrdersShipLineItemsRequest
osPayload
= lens _osPayload (\ s a -> s{_osPayload = a})
osOrderId :: Lens' OrdersShiplineitems Text
osOrderId
= lens _osOrderId (\ s a -> s{_osOrderId = a})
instance GoogleRequest OrdersShiplineitems where
type Rs OrdersShiplineitems =
OrdersShipLineItemsResponse
type Scopes OrdersShiplineitems =
'["https://www.googleapis.com/auth/content"]
requestClient OrdersShiplineitems'{..}
= go _osMerchantId _osOrderId (Just AltJSON)
_osPayload
shoppingContentService
where go
= buildClient
(Proxy :: Proxy OrdersShiplineitemsResource)
mempty