{-# 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.Pos.Inventory
(
PosInventoryResource
, posInventory'
, PosInventory'
, piMerchantId
, piTargetMerchantId
, piPayload
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type PosInventoryResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"pos" :>
Capture "targetMerchantId" (Textual Word64) :>
"inventory" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PosInventoryRequest :>
Post '[JSON] PosInventoryResponse
data PosInventory' = PosInventory''
{ _piMerchantId :: !(Textual Word64)
, _piTargetMerchantId :: !(Textual Word64)
, _piPayload :: !PosInventoryRequest
} deriving (Eq,Show,Data,Typeable,Generic)
posInventory'
:: Word64
-> Word64
-> PosInventoryRequest
-> PosInventory'
posInventory' pPiMerchantId_ pPiTargetMerchantId_ pPiPayload_ =
PosInventory''
{ _piMerchantId = _Coerce # pPiMerchantId_
, _piTargetMerchantId = _Coerce # pPiTargetMerchantId_
, _piPayload = pPiPayload_
}
piMerchantId :: Lens' PosInventory' Word64
piMerchantId
= lens _piMerchantId (\ s a -> s{_piMerchantId = a})
. _Coerce
piTargetMerchantId :: Lens' PosInventory' Word64
piTargetMerchantId
= lens _piTargetMerchantId
(\ s a -> s{_piTargetMerchantId = a})
. _Coerce
piPayload :: Lens' PosInventory' PosInventoryRequest
piPayload
= lens _piPayload (\ s a -> s{_piPayload = a})
instance GoogleRequest PosInventory' where
type Rs PosInventory' = PosInventoryResponse
type Scopes PosInventory' =
'["https://www.googleapis.com/auth/content"]
requestClient PosInventory''{..}
= go _piMerchantId _piTargetMerchantId (Just AltJSON)
_piPayload
shoppingContentService
where go
= buildClient (Proxy :: Proxy PosInventoryResource)
mempty