{-# 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.Orderinvoices.Createchargeinvoice
(
OrderinvoicesCreatechargeinvoiceResource
, orderinvoicesCreatechargeinvoice
, OrderinvoicesCreatechargeinvoice
, oMerchantId
, oPayload
, oOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrderinvoicesCreatechargeinvoiceResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orderinvoices" :>
Capture "orderId" Text :>
"createChargeInvoice" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
OrderinvoicesCreateChargeInvoiceRequest
:>
Post '[JSON] OrderinvoicesCreateChargeInvoiceResponse
data OrderinvoicesCreatechargeinvoice = OrderinvoicesCreatechargeinvoice'
{ _oMerchantId :: !(Textual Word64)
, _oPayload :: !OrderinvoicesCreateChargeInvoiceRequest
, _oOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
orderinvoicesCreatechargeinvoice
:: Word64
-> OrderinvoicesCreateChargeInvoiceRequest
-> Text
-> OrderinvoicesCreatechargeinvoice
orderinvoicesCreatechargeinvoice pOMerchantId_ pOPayload_ pOOrderId_ =
OrderinvoicesCreatechargeinvoice'
{ _oMerchantId = _Coerce # pOMerchantId_
, _oPayload = pOPayload_
, _oOrderId = pOOrderId_
}
oMerchantId :: Lens' OrderinvoicesCreatechargeinvoice Word64
oMerchantId
= lens _oMerchantId (\ s a -> s{_oMerchantId = a}) .
_Coerce
oPayload :: Lens' OrderinvoicesCreatechargeinvoice OrderinvoicesCreateChargeInvoiceRequest
oPayload = lens _oPayload (\ s a -> s{_oPayload = a})
oOrderId :: Lens' OrderinvoicesCreatechargeinvoice Text
oOrderId = lens _oOrderId (\ s a -> s{_oOrderId = a})
instance GoogleRequest
OrderinvoicesCreatechargeinvoice where
type Rs OrderinvoicesCreatechargeinvoice =
OrderinvoicesCreateChargeInvoiceResponse
type Scopes OrderinvoicesCreatechargeinvoice =
'["https://www.googleapis.com/auth/content"]
requestClient OrderinvoicesCreatechargeinvoice'{..}
= go _oMerchantId _oOrderId (Just AltJSON) _oPayload
shoppingContentService
where go
= buildClient
(Proxy ::
Proxy OrderinvoicesCreatechargeinvoiceResource)
mempty