{-# 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.Createrefundinvoice
(
OrderinvoicesCreaterefundinvoiceResource
, orderinvoicesCreaterefundinvoice
, OrderinvoicesCreaterefundinvoice
, ocMerchantId
, ocPayload
, ocOrderId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type OrderinvoicesCreaterefundinvoiceResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"orderinvoices" :>
Capture "orderId" Text :>
"createRefundInvoice" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
OrderinvoicesCreateRefundInvoiceRequest
:>
Post '[JSON] OrderinvoicesCreateRefundInvoiceResponse
data OrderinvoicesCreaterefundinvoice = OrderinvoicesCreaterefundinvoice'
{ _ocMerchantId :: !(Textual Word64)
, _ocPayload :: !OrderinvoicesCreateRefundInvoiceRequest
, _ocOrderId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
orderinvoicesCreaterefundinvoice
:: Word64
-> OrderinvoicesCreateRefundInvoiceRequest
-> Text
-> OrderinvoicesCreaterefundinvoice
orderinvoicesCreaterefundinvoice pOcMerchantId_ pOcPayload_ pOcOrderId_ =
OrderinvoicesCreaterefundinvoice'
{ _ocMerchantId = _Coerce # pOcMerchantId_
, _ocPayload = pOcPayload_
, _ocOrderId = pOcOrderId_
}
ocMerchantId :: Lens' OrderinvoicesCreaterefundinvoice Word64
ocMerchantId
= lens _ocMerchantId (\ s a -> s{_ocMerchantId = a})
. _Coerce
ocPayload :: Lens' OrderinvoicesCreaterefundinvoice OrderinvoicesCreateRefundInvoiceRequest
ocPayload
= lens _ocPayload (\ s a -> s{_ocPayload = a})
ocOrderId :: Lens' OrderinvoicesCreaterefundinvoice Text
ocOrderId
= lens _ocOrderId (\ s a -> s{_ocOrderId = a})
instance GoogleRequest
OrderinvoicesCreaterefundinvoice where
type Rs OrderinvoicesCreaterefundinvoice =
OrderinvoicesCreateRefundInvoiceResponse
type Scopes OrderinvoicesCreaterefundinvoice =
'["https://www.googleapis.com/auth/content"]
requestClient OrderinvoicesCreaterefundinvoice'{..}
= go _ocMerchantId _ocOrderId (Just AltJSON)
_ocPayload
shoppingContentService
where go
= buildClient
(Proxy ::
Proxy OrderinvoicesCreaterefundinvoiceResource)
mempty