module Network.Google.ShoppingContent.Types.Product where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types.Sum
newtype OrdersAcknowledgeRequest = OrdersAcknowledgeRequest'
{ _oarOperationId :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersAcknowledgeRequest
:: OrdersAcknowledgeRequest
ordersAcknowledgeRequest =
OrdersAcknowledgeRequest'
{ _oarOperationId = Nothing
}
oarOperationId :: Lens' OrdersAcknowledgeRequest (Maybe Text)
oarOperationId
= lens _oarOperationId
(\ s a -> s{_oarOperationId = a})
instance FromJSON OrdersAcknowledgeRequest where
parseJSON
= withObject "OrdersAcknowledgeRequest"
(\ o ->
OrdersAcknowledgeRequest' <$> (o .:? "operationId"))
instance ToJSON OrdersAcknowledgeRequest where
toJSON OrdersAcknowledgeRequest'{..}
= object
(catMaybes [("operationId" .=) <$> _oarOperationId])
data AccountTax = AccountTax'
{ _atRules :: !(Maybe [AccountTaxTaxRule])
, _atKind :: !Text
, _atAccountId :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
accountTax
:: AccountTax
accountTax =
AccountTax'
{ _atRules = Nothing
, _atKind = "content#accountTax"
, _atAccountId = Nothing
}
atRules :: Lens' AccountTax [AccountTaxTaxRule]
atRules
= lens _atRules (\ s a -> s{_atRules = a}) . _Default
. _Coerce
atKind :: Lens' AccountTax Text
atKind = lens _atKind (\ s a -> s{_atKind = a})
atAccountId :: Lens' AccountTax (Maybe Word64)
atAccountId
= lens _atAccountId (\ s a -> s{_atAccountId = a}) .
mapping _Coerce
instance FromJSON AccountTax where
parseJSON
= withObject "AccountTax"
(\ o ->
AccountTax' <$>
(o .:? "rules" .!= mempty) <*>
(o .:? "kind" .!= "content#accountTax")
<*> (o .:? "accountId"))
instance ToJSON AccountTax where
toJSON AccountTax'{..}
= object
(catMaybes
[("rules" .=) <$> _atRules, Just ("kind" .= _atKind),
("accountId" .=) <$> _atAccountId])
data OrdersUpdateMerchantOrderIdRequest = OrdersUpdateMerchantOrderIdRequest'
{ _oumoirMerchantOrderId :: !(Maybe Text)
, _oumoirOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersUpdateMerchantOrderIdRequest
:: OrdersUpdateMerchantOrderIdRequest
ordersUpdateMerchantOrderIdRequest =
OrdersUpdateMerchantOrderIdRequest'
{ _oumoirMerchantOrderId = Nothing
, _oumoirOperationId = Nothing
}
oumoirMerchantOrderId :: Lens' OrdersUpdateMerchantOrderIdRequest (Maybe Text)
oumoirMerchantOrderId
= lens _oumoirMerchantOrderId
(\ s a -> s{_oumoirMerchantOrderId = a})
oumoirOperationId :: Lens' OrdersUpdateMerchantOrderIdRequest (Maybe Text)
oumoirOperationId
= lens _oumoirOperationId
(\ s a -> s{_oumoirOperationId = a})
instance FromJSON OrdersUpdateMerchantOrderIdRequest
where
parseJSON
= withObject "OrdersUpdateMerchantOrderIdRequest"
(\ o ->
OrdersUpdateMerchantOrderIdRequest' <$>
(o .:? "merchantOrderId") <*> (o .:? "operationId"))
instance ToJSON OrdersUpdateMerchantOrderIdRequest
where
toJSON OrdersUpdateMerchantOrderIdRequest'{..}
= object
(catMaybes
[("merchantOrderId" .=) <$> _oumoirMerchantOrderId,
("operationId" .=) <$> _oumoirOperationId])
newtype OrdersAdvanceTestOrderResponse = OrdersAdvanceTestOrderResponse'
{ _oatorKind :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersAdvanceTestOrderResponse
:: OrdersAdvanceTestOrderResponse
ordersAdvanceTestOrderResponse =
OrdersAdvanceTestOrderResponse'
{ _oatorKind = "content#ordersAdvanceTestOrderResponse"
}
oatorKind :: Lens' OrdersAdvanceTestOrderResponse Text
oatorKind
= lens _oatorKind (\ s a -> s{_oatorKind = a})
instance FromJSON OrdersAdvanceTestOrderResponse
where
parseJSON
= withObject "OrdersAdvanceTestOrderResponse"
(\ o ->
OrdersAdvanceTestOrderResponse' <$>
(o .:? "kind" .!=
"content#ordersAdvanceTestOrderResponse"))
instance ToJSON OrdersAdvanceTestOrderResponse where
toJSON OrdersAdvanceTestOrderResponse'{..}
= object (catMaybes [Just ("kind" .= _oatorKind)])
data ProductsCustomBatchResponse = ProductsCustomBatchResponse'
{ _pcbrEntries :: !(Maybe [ProductsCustomBatchResponseEntry])
, _pcbrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
productsCustomBatchResponse
:: ProductsCustomBatchResponse
productsCustomBatchResponse =
ProductsCustomBatchResponse'
{ _pcbrEntries = Nothing
, _pcbrKind = "content#productsCustomBatchResponse"
}
pcbrEntries :: Lens' ProductsCustomBatchResponse [ProductsCustomBatchResponseEntry]
pcbrEntries
= lens _pcbrEntries (\ s a -> s{_pcbrEntries = a}) .
_Default
. _Coerce
pcbrKind :: Lens' ProductsCustomBatchResponse Text
pcbrKind = lens _pcbrKind (\ s a -> s{_pcbrKind = a})
instance FromJSON ProductsCustomBatchResponse where
parseJSON
= withObject "ProductsCustomBatchResponse"
(\ o ->
ProductsCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#productsCustomBatchResponse"))
instance ToJSON ProductsCustomBatchResponse where
toJSON ProductsCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _pcbrEntries,
Just ("kind" .= _pcbrKind)])
data TestOrderCustomer = TestOrderCustomer'
{ _tocFullName :: !(Maybe Text)
, _tocEmail :: !(Maybe Text)
, _tocExplicitMarketingPreference :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
testOrderCustomer
:: TestOrderCustomer
testOrderCustomer =
TestOrderCustomer'
{ _tocFullName = Nothing
, _tocEmail = Nothing
, _tocExplicitMarketingPreference = Nothing
}
tocFullName :: Lens' TestOrderCustomer (Maybe Text)
tocFullName
= lens _tocFullName (\ s a -> s{_tocFullName = a})
tocEmail :: Lens' TestOrderCustomer (Maybe Text)
tocEmail = lens _tocEmail (\ s a -> s{_tocEmail = a})
tocExplicitMarketingPreference :: Lens' TestOrderCustomer (Maybe Bool)
tocExplicitMarketingPreference
= lens _tocExplicitMarketingPreference
(\ s a -> s{_tocExplicitMarketingPreference = a})
instance FromJSON TestOrderCustomer where
parseJSON
= withObject "TestOrderCustomer"
(\ o ->
TestOrderCustomer' <$>
(o .:? "fullName") <*> (o .:? "email") <*>
(o .:? "explicitMarketingPreference"))
instance ToJSON TestOrderCustomer where
toJSON TestOrderCustomer'{..}
= object
(catMaybes
[("fullName" .=) <$> _tocFullName,
("email" .=) <$> _tocEmail,
("explicitMarketingPreference" .=) <$>
_tocExplicitMarketingPreference])
data DatafeedstatusesCustomBatchResponse = DatafeedstatusesCustomBatchResponse'
{ _dcbrEntries :: !(Maybe [DatafeedstatusesCustomBatchResponseEntry])
, _dcbrKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedstatusesCustomBatchResponse
:: DatafeedstatusesCustomBatchResponse
datafeedstatusesCustomBatchResponse =
DatafeedstatusesCustomBatchResponse'
{ _dcbrEntries = Nothing
, _dcbrKind = "content#datafeedstatusesCustomBatchResponse"
}
dcbrEntries :: Lens' DatafeedstatusesCustomBatchResponse [DatafeedstatusesCustomBatchResponseEntry]
dcbrEntries
= lens _dcbrEntries (\ s a -> s{_dcbrEntries = a}) .
_Default
. _Coerce
dcbrKind :: Lens' DatafeedstatusesCustomBatchResponse Text
dcbrKind = lens _dcbrKind (\ s a -> s{_dcbrKind = a})
instance FromJSON DatafeedstatusesCustomBatchResponse
where
parseJSON
= withObject "DatafeedstatusesCustomBatchResponse"
(\ o ->
DatafeedstatusesCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#datafeedstatusesCustomBatchResponse"))
instance ToJSON DatafeedstatusesCustomBatchResponse
where
toJSON DatafeedstatusesCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _dcbrEntries,
Just ("kind" .= _dcbrKind)])
data OrderReturn = OrderReturn'
{ _orQuantity :: !(Maybe (Textual Word32))
, _orActor :: !(Maybe Text)
, _orReason :: !(Maybe Text)
, _orCreationDate :: !(Maybe Text)
, _orReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderReturn
:: OrderReturn
orderReturn =
OrderReturn'
{ _orQuantity = Nothing
, _orActor = Nothing
, _orReason = Nothing
, _orCreationDate = Nothing
, _orReasonText = Nothing
}
orQuantity :: Lens' OrderReturn (Maybe Word32)
orQuantity
= lens _orQuantity (\ s a -> s{_orQuantity = a}) .
mapping _Coerce
orActor :: Lens' OrderReturn (Maybe Text)
orActor = lens _orActor (\ s a -> s{_orActor = a})
orReason :: Lens' OrderReturn (Maybe Text)
orReason = lens _orReason (\ s a -> s{_orReason = a})
orCreationDate :: Lens' OrderReturn (Maybe Text)
orCreationDate
= lens _orCreationDate
(\ s a -> s{_orCreationDate = a})
orReasonText :: Lens' OrderReturn (Maybe Text)
orReasonText
= lens _orReasonText (\ s a -> s{_orReasonText = a})
instance FromJSON OrderReturn where
parseJSON
= withObject "OrderReturn"
(\ o ->
OrderReturn' <$>
(o .:? "quantity") <*> (o .:? "actor") <*>
(o .:? "reason")
<*> (o .:? "creationDate")
<*> (o .:? "reasonText"))
instance ToJSON OrderReturn where
toJSON OrderReturn'{..}
= object
(catMaybes
[("quantity" .=) <$> _orQuantity,
("actor" .=) <$> _orActor,
("reason" .=) <$> _orReason,
("creationDate" .=) <$> _orCreationDate,
("reasonText" .=) <$> _orReasonText])
data AccounttaxCustomBatchResponseEntry = AccounttaxCustomBatchResponseEntry'
{ _acbreAccountTax :: !(Maybe AccountTax)
, _acbreKind :: !Text
, _acbreErrors :: !(Maybe Errors)
, _acbreBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accounttaxCustomBatchResponseEntry
:: AccounttaxCustomBatchResponseEntry
accounttaxCustomBatchResponseEntry =
AccounttaxCustomBatchResponseEntry'
{ _acbreAccountTax = Nothing
, _acbreKind = "content#accounttaxCustomBatchResponseEntry"
, _acbreErrors = Nothing
, _acbreBatchId = Nothing
}
acbreAccountTax :: Lens' AccounttaxCustomBatchResponseEntry (Maybe AccountTax)
acbreAccountTax
= lens _acbreAccountTax
(\ s a -> s{_acbreAccountTax = a})
acbreKind :: Lens' AccounttaxCustomBatchResponseEntry Text
acbreKind
= lens _acbreKind (\ s a -> s{_acbreKind = a})
acbreErrors :: Lens' AccounttaxCustomBatchResponseEntry (Maybe Errors)
acbreErrors
= lens _acbreErrors (\ s a -> s{_acbreErrors = a})
acbreBatchId :: Lens' AccounttaxCustomBatchResponseEntry (Maybe Word32)
acbreBatchId
= lens _acbreBatchId (\ s a -> s{_acbreBatchId = a})
. mapping _Coerce
instance FromJSON AccounttaxCustomBatchResponseEntry
where
parseJSON
= withObject "AccounttaxCustomBatchResponseEntry"
(\ o ->
AccounttaxCustomBatchResponseEntry' <$>
(o .:? "accountTax") <*>
(o .:? "kind" .!=
"content#accounttaxCustomBatchResponseEntry")
<*> (o .:? "errors")
<*> (o .:? "batchId"))
instance ToJSON AccounttaxCustomBatchResponseEntry
where
toJSON AccounttaxCustomBatchResponseEntry'{..}
= object
(catMaybes
[("accountTax" .=) <$> _acbreAccountTax,
Just ("kind" .= _acbreKind),
("errors" .=) <$> _acbreErrors,
("batchId" .=) <$> _acbreBatchId])
newtype InventoryCustomBatchRequest = InventoryCustomBatchRequest'
{ _icbrEntries :: Maybe [InventoryCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
inventoryCustomBatchRequest
:: InventoryCustomBatchRequest
inventoryCustomBatchRequest =
InventoryCustomBatchRequest'
{ _icbrEntries = Nothing
}
icbrEntries :: Lens' InventoryCustomBatchRequest [InventoryCustomBatchRequestEntry]
icbrEntries
= lens _icbrEntries (\ s a -> s{_icbrEntries = a}) .
_Default
. _Coerce
instance FromJSON InventoryCustomBatchRequest where
parseJSON
= withObject "InventoryCustomBatchRequest"
(\ o ->
InventoryCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON InventoryCustomBatchRequest where
toJSON InventoryCustomBatchRequest'{..}
= object
(catMaybes [("entries" .=) <$> _icbrEntries])
data AccountsAuthInfoResponse = AccountsAuthInfoResponse'
{ _aairKind :: !Text
, _aairAccountIdentifiers :: !(Maybe [AccountIdentifier])
} deriving (Eq,Show,Data,Typeable,Generic)
accountsAuthInfoResponse
:: AccountsAuthInfoResponse
accountsAuthInfoResponse =
AccountsAuthInfoResponse'
{ _aairKind = "content#accountsAuthInfoResponse"
, _aairAccountIdentifiers = Nothing
}
aairKind :: Lens' AccountsAuthInfoResponse Text
aairKind = lens _aairKind (\ s a -> s{_aairKind = a})
aairAccountIdentifiers :: Lens' AccountsAuthInfoResponse [AccountIdentifier]
aairAccountIdentifiers
= lens _aairAccountIdentifiers
(\ s a -> s{_aairAccountIdentifiers = a})
. _Default
. _Coerce
instance FromJSON AccountsAuthInfoResponse where
parseJSON
= withObject "AccountsAuthInfoResponse"
(\ o ->
AccountsAuthInfoResponse' <$>
(o .:? "kind" .!= "content#accountsAuthInfoResponse")
<*> (o .:? "accountIdentifiers" .!= mempty))
instance ToJSON AccountsAuthInfoResponse where
toJSON AccountsAuthInfoResponse'{..}
= object
(catMaybes
[Just ("kind" .= _aairKind),
("accountIdentifiers" .=) <$>
_aairAccountIdentifiers])
data ProductStatusDestinationStatus = ProductStatusDestinationStatus'
{ _psdsDestination :: !(Maybe Text)
, _psdsIntention :: !(Maybe Text)
, _psdsApprovalStatus :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productStatusDestinationStatus
:: ProductStatusDestinationStatus
productStatusDestinationStatus =
ProductStatusDestinationStatus'
{ _psdsDestination = Nothing
, _psdsIntention = Nothing
, _psdsApprovalStatus = Nothing
}
psdsDestination :: Lens' ProductStatusDestinationStatus (Maybe Text)
psdsDestination
= lens _psdsDestination
(\ s a -> s{_psdsDestination = a})
psdsIntention :: Lens' ProductStatusDestinationStatus (Maybe Text)
psdsIntention
= lens _psdsIntention
(\ s a -> s{_psdsIntention = a})
psdsApprovalStatus :: Lens' ProductStatusDestinationStatus (Maybe Text)
psdsApprovalStatus
= lens _psdsApprovalStatus
(\ s a -> s{_psdsApprovalStatus = a})
instance FromJSON ProductStatusDestinationStatus
where
parseJSON
= withObject "ProductStatusDestinationStatus"
(\ o ->
ProductStatusDestinationStatus' <$>
(o .:? "destination") <*> (o .:? "intention") <*>
(o .:? "approvalStatus"))
instance ToJSON ProductStatusDestinationStatus where
toJSON ProductStatusDestinationStatus'{..}
= object
(catMaybes
[("destination" .=) <$> _psdsDestination,
("intention" .=) <$> _psdsIntention,
("approvalStatus" .=) <$> _psdsApprovalStatus])
data AccountTaxTaxRule = AccountTaxTaxRule'
{ _attrUseGlobalRate :: !(Maybe Bool)
, _attrCountry :: !(Maybe Text)
, _attrShippingTaxed :: !(Maybe Bool)
, _attrLocationId :: !(Maybe (Textual Word64))
, _attrRatePercent :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountTaxTaxRule
:: AccountTaxTaxRule
accountTaxTaxRule =
AccountTaxTaxRule'
{ _attrUseGlobalRate = Nothing
, _attrCountry = Nothing
, _attrShippingTaxed = Nothing
, _attrLocationId = Nothing
, _attrRatePercent = Nothing
}
attrUseGlobalRate :: Lens' AccountTaxTaxRule (Maybe Bool)
attrUseGlobalRate
= lens _attrUseGlobalRate
(\ s a -> s{_attrUseGlobalRate = a})
attrCountry :: Lens' AccountTaxTaxRule (Maybe Text)
attrCountry
= lens _attrCountry (\ s a -> s{_attrCountry = a})
attrShippingTaxed :: Lens' AccountTaxTaxRule (Maybe Bool)
attrShippingTaxed
= lens _attrShippingTaxed
(\ s a -> s{_attrShippingTaxed = a})
attrLocationId :: Lens' AccountTaxTaxRule (Maybe Word64)
attrLocationId
= lens _attrLocationId
(\ s a -> s{_attrLocationId = a})
. mapping _Coerce
attrRatePercent :: Lens' AccountTaxTaxRule (Maybe Text)
attrRatePercent
= lens _attrRatePercent
(\ s a -> s{_attrRatePercent = a})
instance FromJSON AccountTaxTaxRule where
parseJSON
= withObject "AccountTaxTaxRule"
(\ o ->
AccountTaxTaxRule' <$>
(o .:? "useGlobalRate") <*> (o .:? "country") <*>
(o .:? "shippingTaxed")
<*> (o .:? "locationId")
<*> (o .:? "ratePercent"))
instance ToJSON AccountTaxTaxRule where
toJSON AccountTaxTaxRule'{..}
= object
(catMaybes
[("useGlobalRate" .=) <$> _attrUseGlobalRate,
("country" .=) <$> _attrCountry,
("shippingTaxed" .=) <$> _attrShippingTaxed,
("locationId" .=) <$> _attrLocationId,
("ratePercent" .=) <$> _attrRatePercent])
data PostalCodeGroup = PostalCodeGroup'
{ _pcgCountry :: !(Maybe Text)
, _pcgPostalCodeRanges :: !(Maybe [PostalCodeRange])
, _pcgName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
postalCodeGroup
:: PostalCodeGroup
postalCodeGroup =
PostalCodeGroup'
{ _pcgCountry = Nothing
, _pcgPostalCodeRanges = Nothing
, _pcgName = Nothing
}
pcgCountry :: Lens' PostalCodeGroup (Maybe Text)
pcgCountry
= lens _pcgCountry (\ s a -> s{_pcgCountry = a})
pcgPostalCodeRanges :: Lens' PostalCodeGroup [PostalCodeRange]
pcgPostalCodeRanges
= lens _pcgPostalCodeRanges
(\ s a -> s{_pcgPostalCodeRanges = a})
. _Default
. _Coerce
pcgName :: Lens' PostalCodeGroup (Maybe Text)
pcgName = lens _pcgName (\ s a -> s{_pcgName = a})
instance FromJSON PostalCodeGroup where
parseJSON
= withObject "PostalCodeGroup"
(\ o ->
PostalCodeGroup' <$>
(o .:? "country") <*>
(o .:? "postalCodeRanges" .!= mempty)
<*> (o .:? "name"))
instance ToJSON PostalCodeGroup where
toJSON PostalCodeGroup'{..}
= object
(catMaybes
[("country" .=) <$> _pcgCountry,
("postalCodeRanges" .=) <$> _pcgPostalCodeRanges,
("name" .=) <$> _pcgName])
data ProductDestination = ProductDestination'
{ _pdIntention :: !(Maybe Text)
, _pdDestinationName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productDestination
:: ProductDestination
productDestination =
ProductDestination'
{ _pdIntention = Nothing
, _pdDestinationName = Nothing
}
pdIntention :: Lens' ProductDestination (Maybe Text)
pdIntention
= lens _pdIntention (\ s a -> s{_pdIntention = a})
pdDestinationName :: Lens' ProductDestination (Maybe Text)
pdDestinationName
= lens _pdDestinationName
(\ s a -> s{_pdDestinationName = a})
instance FromJSON ProductDestination where
parseJSON
= withObject "ProductDestination"
(\ o ->
ProductDestination' <$>
(o .:? "intention") <*> (o .:? "destinationName"))
instance ToJSON ProductDestination where
toJSON ProductDestination'{..}
= object
(catMaybes
[("intention" .=) <$> _pdIntention,
("destinationName" .=) <$> _pdDestinationName])
newtype DatafeedsCustomBatchRequest = DatafeedsCustomBatchRequest'
{ _dEntries :: Maybe [DatafeedsCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedsCustomBatchRequest
:: DatafeedsCustomBatchRequest
datafeedsCustomBatchRequest =
DatafeedsCustomBatchRequest'
{ _dEntries = Nothing
}
dEntries :: Lens' DatafeedsCustomBatchRequest [DatafeedsCustomBatchRequestEntry]
dEntries
= lens _dEntries (\ s a -> s{_dEntries = a}) .
_Default
. _Coerce
instance FromJSON DatafeedsCustomBatchRequest where
parseJSON
= withObject "DatafeedsCustomBatchRequest"
(\ o ->
DatafeedsCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON DatafeedsCustomBatchRequest where
toJSON DatafeedsCustomBatchRequest'{..}
= object (catMaybes [("entries" .=) <$> _dEntries])
data OrdersCustomBatchRequestEntry = OrdersCustomBatchRequestEntry'
{ _ocbreMerchantId :: !(Maybe (Textual Word64))
, _ocbreCancelLineItem :: !(Maybe OrdersCustomBatchRequestEntryCancelLineItem)
, _ocbreRefund :: !(Maybe OrdersCustomBatchRequestEntryRefund)
, _ocbreUpdateShipment :: !(Maybe OrdersCustomBatchRequestEntryUpdateShipment)
, _ocbreReturnLineItem :: !(Maybe OrdersCustomBatchRequestEntryReturnLineItem)
, _ocbreMerchantOrderId :: !(Maybe Text)
, _ocbreMethod :: !(Maybe Text)
, _ocbreShipLineItems :: !(Maybe OrdersCustomBatchRequestEntryShipLineItems)
, _ocbreOperationId :: !(Maybe Text)
, _ocbreOrderId :: !(Maybe Text)
, _ocbreCancel :: !(Maybe OrdersCustomBatchRequestEntryCancel)
, _ocbreBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchRequestEntry
:: OrdersCustomBatchRequestEntry
ordersCustomBatchRequestEntry =
OrdersCustomBatchRequestEntry'
{ _ocbreMerchantId = Nothing
, _ocbreCancelLineItem = Nothing
, _ocbreRefund = Nothing
, _ocbreUpdateShipment = Nothing
, _ocbreReturnLineItem = Nothing
, _ocbreMerchantOrderId = Nothing
, _ocbreMethod = Nothing
, _ocbreShipLineItems = Nothing
, _ocbreOperationId = Nothing
, _ocbreOrderId = Nothing
, _ocbreCancel = Nothing
, _ocbreBatchId = Nothing
}
ocbreMerchantId :: Lens' OrdersCustomBatchRequestEntry (Maybe Word64)
ocbreMerchantId
= lens _ocbreMerchantId
(\ s a -> s{_ocbreMerchantId = a})
. mapping _Coerce
ocbreCancelLineItem :: Lens' OrdersCustomBatchRequestEntry (Maybe OrdersCustomBatchRequestEntryCancelLineItem)
ocbreCancelLineItem
= lens _ocbreCancelLineItem
(\ s a -> s{_ocbreCancelLineItem = a})
ocbreRefund :: Lens' OrdersCustomBatchRequestEntry (Maybe OrdersCustomBatchRequestEntryRefund)
ocbreRefund
= lens _ocbreRefund (\ s a -> s{_ocbreRefund = a})
ocbreUpdateShipment :: Lens' OrdersCustomBatchRequestEntry (Maybe OrdersCustomBatchRequestEntryUpdateShipment)
ocbreUpdateShipment
= lens _ocbreUpdateShipment
(\ s a -> s{_ocbreUpdateShipment = a})
ocbreReturnLineItem :: Lens' OrdersCustomBatchRequestEntry (Maybe OrdersCustomBatchRequestEntryReturnLineItem)
ocbreReturnLineItem
= lens _ocbreReturnLineItem
(\ s a -> s{_ocbreReturnLineItem = a})
ocbreMerchantOrderId :: Lens' OrdersCustomBatchRequestEntry (Maybe Text)
ocbreMerchantOrderId
= lens _ocbreMerchantOrderId
(\ s a -> s{_ocbreMerchantOrderId = a})
ocbreMethod :: Lens' OrdersCustomBatchRequestEntry (Maybe Text)
ocbreMethod
= lens _ocbreMethod (\ s a -> s{_ocbreMethod = a})
ocbreShipLineItems :: Lens' OrdersCustomBatchRequestEntry (Maybe OrdersCustomBatchRequestEntryShipLineItems)
ocbreShipLineItems
= lens _ocbreShipLineItems
(\ s a -> s{_ocbreShipLineItems = a})
ocbreOperationId :: Lens' OrdersCustomBatchRequestEntry (Maybe Text)
ocbreOperationId
= lens _ocbreOperationId
(\ s a -> s{_ocbreOperationId = a})
ocbreOrderId :: Lens' OrdersCustomBatchRequestEntry (Maybe Text)
ocbreOrderId
= lens _ocbreOrderId (\ s a -> s{_ocbreOrderId = a})
ocbreCancel :: Lens' OrdersCustomBatchRequestEntry (Maybe OrdersCustomBatchRequestEntryCancel)
ocbreCancel
= lens _ocbreCancel (\ s a -> s{_ocbreCancel = a})
ocbreBatchId :: Lens' OrdersCustomBatchRequestEntry (Maybe Word32)
ocbreBatchId
= lens _ocbreBatchId (\ s a -> s{_ocbreBatchId = a})
. mapping _Coerce
instance FromJSON OrdersCustomBatchRequestEntry where
parseJSON
= withObject "OrdersCustomBatchRequestEntry"
(\ o ->
OrdersCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "cancelLineItem") <*>
(o .:? "refund")
<*> (o .:? "updateShipment")
<*> (o .:? "returnLineItem")
<*> (o .:? "merchantOrderId")
<*> (o .:? "method")
<*> (o .:? "shipLineItems")
<*> (o .:? "operationId")
<*> (o .:? "orderId")
<*> (o .:? "cancel")
<*> (o .:? "batchId"))
instance ToJSON OrdersCustomBatchRequestEntry where
toJSON OrdersCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _ocbreMerchantId,
("cancelLineItem" .=) <$> _ocbreCancelLineItem,
("refund" .=) <$> _ocbreRefund,
("updateShipment" .=) <$> _ocbreUpdateShipment,
("returnLineItem" .=) <$> _ocbreReturnLineItem,
("merchantOrderId" .=) <$> _ocbreMerchantOrderId,
("method" .=) <$> _ocbreMethod,
("shipLineItems" .=) <$> _ocbreShipLineItems,
("operationId" .=) <$> _ocbreOperationId,
("orderId" .=) <$> _ocbreOrderId,
("cancel" .=) <$> _ocbreCancel,
("batchId" .=) <$> _ocbreBatchId])
data OrdersRefundRequest = OrdersRefundRequest'
{ _orrAmount :: !(Maybe Price)
, _orrReason :: !(Maybe Text)
, _orrOperationId :: !(Maybe Text)
, _orrReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersRefundRequest
:: OrdersRefundRequest
ordersRefundRequest =
OrdersRefundRequest'
{ _orrAmount = Nothing
, _orrReason = Nothing
, _orrOperationId = Nothing
, _orrReasonText = Nothing
}
orrAmount :: Lens' OrdersRefundRequest (Maybe Price)
orrAmount
= lens _orrAmount (\ s a -> s{_orrAmount = a})
orrReason :: Lens' OrdersRefundRequest (Maybe Text)
orrReason
= lens _orrReason (\ s a -> s{_orrReason = a})
orrOperationId :: Lens' OrdersRefundRequest (Maybe Text)
orrOperationId
= lens _orrOperationId
(\ s a -> s{_orrOperationId = a})
orrReasonText :: Lens' OrdersRefundRequest (Maybe Text)
orrReasonText
= lens _orrReasonText
(\ s a -> s{_orrReasonText = a})
instance FromJSON OrdersRefundRequest where
parseJSON
= withObject "OrdersRefundRequest"
(\ o ->
OrdersRefundRequest' <$>
(o .:? "amount") <*> (o .:? "reason") <*>
(o .:? "operationId")
<*> (o .:? "reasonText"))
instance ToJSON OrdersRefundRequest where
toJSON OrdersRefundRequest'{..}
= object
(catMaybes
[("amount" .=) <$> _orrAmount,
("reason" .=) <$> _orrReason,
("operationId" .=) <$> _orrOperationId,
("reasonText" .=) <$> _orrReasonText])
data AccountShippingShippingServiceCalculationMethod = AccountShippingShippingServiceCalculationMethod'
{ _assscmPercentageRate :: !(Maybe Text)
, _assscmCarrierRate :: !(Maybe Text)
, _assscmRateTable :: !(Maybe Text)
, _assscmExcluded :: !(Maybe Bool)
, _assscmFlatRate :: !(Maybe Price)
} deriving (Eq,Show,Data,Typeable,Generic)
accountShippingShippingServiceCalculationMethod
:: AccountShippingShippingServiceCalculationMethod
accountShippingShippingServiceCalculationMethod =
AccountShippingShippingServiceCalculationMethod'
{ _assscmPercentageRate = Nothing
, _assscmCarrierRate = Nothing
, _assscmRateTable = Nothing
, _assscmExcluded = Nothing
, _assscmFlatRate = Nothing
}
assscmPercentageRate :: Lens' AccountShippingShippingServiceCalculationMethod (Maybe Text)
assscmPercentageRate
= lens _assscmPercentageRate
(\ s a -> s{_assscmPercentageRate = a})
assscmCarrierRate :: Lens' AccountShippingShippingServiceCalculationMethod (Maybe Text)
assscmCarrierRate
= lens _assscmCarrierRate
(\ s a -> s{_assscmCarrierRate = a})
assscmRateTable :: Lens' AccountShippingShippingServiceCalculationMethod (Maybe Text)
assscmRateTable
= lens _assscmRateTable
(\ s a -> s{_assscmRateTable = a})
assscmExcluded :: Lens' AccountShippingShippingServiceCalculationMethod (Maybe Bool)
assscmExcluded
= lens _assscmExcluded
(\ s a -> s{_assscmExcluded = a})
assscmFlatRate :: Lens' AccountShippingShippingServiceCalculationMethod (Maybe Price)
assscmFlatRate
= lens _assscmFlatRate
(\ s a -> s{_assscmFlatRate = a})
instance FromJSON
AccountShippingShippingServiceCalculationMethod where
parseJSON
= withObject
"AccountShippingShippingServiceCalculationMethod"
(\ o ->
AccountShippingShippingServiceCalculationMethod' <$>
(o .:? "percentageRate") <*> (o .:? "carrierRate")
<*> (o .:? "rateTable")
<*> (o .:? "excluded")
<*> (o .:? "flatRate"))
instance ToJSON
AccountShippingShippingServiceCalculationMethod where
toJSON
AccountShippingShippingServiceCalculationMethod'{..}
= object
(catMaybes
[("percentageRate" .=) <$> _assscmPercentageRate,
("carrierRate" .=) <$> _assscmCarrierRate,
("rateTable" .=) <$> _assscmRateTable,
("excluded" .=) <$> _assscmExcluded,
("flatRate" .=) <$> _assscmFlatRate])
data OrdersCustomBatchRequestEntryCancelLineItem = OrdersCustomBatchRequestEntryCancelLineItem'
{ _ocbrecliAmount :: !(Maybe Price)
, _ocbrecliQuantity :: !(Maybe (Textual Word32))
, _ocbrecliLineItemId :: !(Maybe Text)
, _ocbrecliReason :: !(Maybe Text)
, _ocbrecliReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchRequestEntryCancelLineItem
:: OrdersCustomBatchRequestEntryCancelLineItem
ordersCustomBatchRequestEntryCancelLineItem =
OrdersCustomBatchRequestEntryCancelLineItem'
{ _ocbrecliAmount = Nothing
, _ocbrecliQuantity = Nothing
, _ocbrecliLineItemId = Nothing
, _ocbrecliReason = Nothing
, _ocbrecliReasonText = Nothing
}
ocbrecliAmount :: Lens' OrdersCustomBatchRequestEntryCancelLineItem (Maybe Price)
ocbrecliAmount
= lens _ocbrecliAmount
(\ s a -> s{_ocbrecliAmount = a})
ocbrecliQuantity :: Lens' OrdersCustomBatchRequestEntryCancelLineItem (Maybe Word32)
ocbrecliQuantity
= lens _ocbrecliQuantity
(\ s a -> s{_ocbrecliQuantity = a})
. mapping _Coerce
ocbrecliLineItemId :: Lens' OrdersCustomBatchRequestEntryCancelLineItem (Maybe Text)
ocbrecliLineItemId
= lens _ocbrecliLineItemId
(\ s a -> s{_ocbrecliLineItemId = a})
ocbrecliReason :: Lens' OrdersCustomBatchRequestEntryCancelLineItem (Maybe Text)
ocbrecliReason
= lens _ocbrecliReason
(\ s a -> s{_ocbrecliReason = a})
ocbrecliReasonText :: Lens' OrdersCustomBatchRequestEntryCancelLineItem (Maybe Text)
ocbrecliReasonText
= lens _ocbrecliReasonText
(\ s a -> s{_ocbrecliReasonText = a})
instance FromJSON
OrdersCustomBatchRequestEntryCancelLineItem where
parseJSON
= withObject
"OrdersCustomBatchRequestEntryCancelLineItem"
(\ o ->
OrdersCustomBatchRequestEntryCancelLineItem' <$>
(o .:? "amount") <*> (o .:? "quantity") <*>
(o .:? "lineItemId")
<*> (o .:? "reason")
<*> (o .:? "reasonText"))
instance ToJSON
OrdersCustomBatchRequestEntryCancelLineItem where
toJSON
OrdersCustomBatchRequestEntryCancelLineItem'{..}
= object
(catMaybes
[("amount" .=) <$> _ocbrecliAmount,
("quantity" .=) <$> _ocbrecliQuantity,
("lineItemId" .=) <$> _ocbrecliLineItemId,
("reason" .=) <$> _ocbrecliReason,
("reasonText" .=) <$> _ocbrecliReasonText])
data OrderLineItemShippingDetailsMethod = OrderLineItemShippingDetailsMethod'
{ _olisdmCarrier :: !(Maybe Text)
, _olisdmMethodName :: !(Maybe Text)
, _olisdmMaxDaysInTransit :: !(Maybe (Textual Word32))
, _olisdmMinDaysInTransit :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
orderLineItemShippingDetailsMethod
:: OrderLineItemShippingDetailsMethod
orderLineItemShippingDetailsMethod =
OrderLineItemShippingDetailsMethod'
{ _olisdmCarrier = Nothing
, _olisdmMethodName = Nothing
, _olisdmMaxDaysInTransit = Nothing
, _olisdmMinDaysInTransit = Nothing
}
olisdmCarrier :: Lens' OrderLineItemShippingDetailsMethod (Maybe Text)
olisdmCarrier
= lens _olisdmCarrier
(\ s a -> s{_olisdmCarrier = a})
olisdmMethodName :: Lens' OrderLineItemShippingDetailsMethod (Maybe Text)
olisdmMethodName
= lens _olisdmMethodName
(\ s a -> s{_olisdmMethodName = a})
olisdmMaxDaysInTransit :: Lens' OrderLineItemShippingDetailsMethod (Maybe Word32)
olisdmMaxDaysInTransit
= lens _olisdmMaxDaysInTransit
(\ s a -> s{_olisdmMaxDaysInTransit = a})
. mapping _Coerce
olisdmMinDaysInTransit :: Lens' OrderLineItemShippingDetailsMethod (Maybe Word32)
olisdmMinDaysInTransit
= lens _olisdmMinDaysInTransit
(\ s a -> s{_olisdmMinDaysInTransit = a})
. mapping _Coerce
instance FromJSON OrderLineItemShippingDetailsMethod
where
parseJSON
= withObject "OrderLineItemShippingDetailsMethod"
(\ o ->
OrderLineItemShippingDetailsMethod' <$>
(o .:? "carrier") <*> (o .:? "methodName") <*>
(o .:? "maxDaysInTransit")
<*> (o .:? "minDaysInTransit"))
instance ToJSON OrderLineItemShippingDetailsMethod
where
toJSON OrderLineItemShippingDetailsMethod'{..}
= object
(catMaybes
[("carrier" .=) <$> _olisdmCarrier,
("methodName" .=) <$> _olisdmMethodName,
("maxDaysInTransit" .=) <$> _olisdmMaxDaysInTransit,
("minDaysInTransit" .=) <$> _olisdmMinDaysInTransit])
data Datafeed = Datafeed'
{ _dKind :: !Text
, _dFormat :: !(Maybe DatafeedFormat)
, _dAttributeLanguage :: !(Maybe Text)
, _dTargetCountry :: !(Maybe Text)
, _dFetchSchedule :: !(Maybe DatafeedFetchSchedule)
, _dName :: !(Maybe Text)
, _dIntendedDestinations :: !(Maybe [Text])
, _dId :: !(Maybe (Textual Int64))
, _dContentLanguage :: !(Maybe Text)
, _dContentType :: !(Maybe Text)
, _dFileName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
datafeed
:: Datafeed
datafeed =
Datafeed'
{ _dKind = "content#datafeed"
, _dFormat = Nothing
, _dAttributeLanguage = Nothing
, _dTargetCountry = Nothing
, _dFetchSchedule = Nothing
, _dName = Nothing
, _dIntendedDestinations = Nothing
, _dId = Nothing
, _dContentLanguage = Nothing
, _dContentType = Nothing
, _dFileName = Nothing
}
dKind :: Lens' Datafeed Text
dKind = lens _dKind (\ s a -> s{_dKind = a})
dFormat :: Lens' Datafeed (Maybe DatafeedFormat)
dFormat = lens _dFormat (\ s a -> s{_dFormat = a})
dAttributeLanguage :: Lens' Datafeed (Maybe Text)
dAttributeLanguage
= lens _dAttributeLanguage
(\ s a -> s{_dAttributeLanguage = a})
dTargetCountry :: Lens' Datafeed (Maybe Text)
dTargetCountry
= lens _dTargetCountry
(\ s a -> s{_dTargetCountry = a})
dFetchSchedule :: Lens' Datafeed (Maybe DatafeedFetchSchedule)
dFetchSchedule
= lens _dFetchSchedule
(\ s a -> s{_dFetchSchedule = a})
dName :: Lens' Datafeed (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a})
dIntendedDestinations :: Lens' Datafeed [Text]
dIntendedDestinations
= lens _dIntendedDestinations
(\ s a -> s{_dIntendedDestinations = a})
. _Default
. _Coerce
dId :: Lens' Datafeed (Maybe Int64)
dId
= lens _dId (\ s a -> s{_dId = a}) . mapping _Coerce
dContentLanguage :: Lens' Datafeed (Maybe Text)
dContentLanguage
= lens _dContentLanguage
(\ s a -> s{_dContentLanguage = a})
dContentType :: Lens' Datafeed (Maybe Text)
dContentType
= lens _dContentType (\ s a -> s{_dContentType = a})
dFileName :: Lens' Datafeed (Maybe Text)
dFileName
= lens _dFileName (\ s a -> s{_dFileName = a})
instance FromJSON Datafeed where
parseJSON
= withObject "Datafeed"
(\ o ->
Datafeed' <$>
(o .:? "kind" .!= "content#datafeed") <*>
(o .:? "format")
<*> (o .:? "attributeLanguage")
<*> (o .:? "targetCountry")
<*> (o .:? "fetchSchedule")
<*> (o .:? "name")
<*> (o .:? "intendedDestinations" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "contentLanguage")
<*> (o .:? "contentType")
<*> (o .:? "fileName"))
instance ToJSON Datafeed where
toJSON Datafeed'{..}
= object
(catMaybes
[Just ("kind" .= _dKind), ("format" .=) <$> _dFormat,
("attributeLanguage" .=) <$> _dAttributeLanguage,
("targetCountry" .=) <$> _dTargetCountry,
("fetchSchedule" .=) <$> _dFetchSchedule,
("name" .=) <$> _dName,
("intendedDestinations" .=) <$>
_dIntendedDestinations,
("id" .=) <$> _dId,
("contentLanguage" .=) <$> _dContentLanguage,
("contentType" .=) <$> _dContentType,
("fileName" .=) <$> _dFileName])
data OrdersCreateTestOrderResponse = OrdersCreateTestOrderResponse'
{ _octorKind :: !Text
, _octorOrderId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCreateTestOrderResponse
:: OrdersCreateTestOrderResponse
ordersCreateTestOrderResponse =
OrdersCreateTestOrderResponse'
{ _octorKind = "content#ordersCreateTestOrderResponse"
, _octorOrderId = Nothing
}
octorKind :: Lens' OrdersCreateTestOrderResponse Text
octorKind
= lens _octorKind (\ s a -> s{_octorKind = a})
octorOrderId :: Lens' OrdersCreateTestOrderResponse (Maybe Text)
octorOrderId
= lens _octorOrderId (\ s a -> s{_octorOrderId = a})
instance FromJSON OrdersCreateTestOrderResponse where
parseJSON
= withObject "OrdersCreateTestOrderResponse"
(\ o ->
OrdersCreateTestOrderResponse' <$>
(o .:? "kind" .!=
"content#ordersCreateTestOrderResponse")
<*> (o .:? "orderId"))
instance ToJSON OrdersCreateTestOrderResponse where
toJSON OrdersCreateTestOrderResponse'{..}
= object
(catMaybes
[Just ("kind" .= _octorKind),
("orderId" .=) <$> _octorOrderId])
data AccountsCustomBatchResponseEntry = AccountsCustomBatchResponseEntry'
{ _aKind :: !Text
, _aAccount :: !(Maybe Account)
, _aErrors :: !(Maybe Errors)
, _aBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsCustomBatchResponseEntry
:: AccountsCustomBatchResponseEntry
accountsCustomBatchResponseEntry =
AccountsCustomBatchResponseEntry'
{ _aKind = "content#accountsCustomBatchResponseEntry"
, _aAccount = Nothing
, _aErrors = Nothing
, _aBatchId = Nothing
}
aKind :: Lens' AccountsCustomBatchResponseEntry Text
aKind = lens _aKind (\ s a -> s{_aKind = a})
aAccount :: Lens' AccountsCustomBatchResponseEntry (Maybe Account)
aAccount = lens _aAccount (\ s a -> s{_aAccount = a})
aErrors :: Lens' AccountsCustomBatchResponseEntry (Maybe Errors)
aErrors = lens _aErrors (\ s a -> s{_aErrors = a})
aBatchId :: Lens' AccountsCustomBatchResponseEntry (Maybe Word32)
aBatchId
= lens _aBatchId (\ s a -> s{_aBatchId = a}) .
mapping _Coerce
instance FromJSON AccountsCustomBatchResponseEntry
where
parseJSON
= withObject "AccountsCustomBatchResponseEntry"
(\ o ->
AccountsCustomBatchResponseEntry' <$>
(o .:? "kind" .!=
"content#accountsCustomBatchResponseEntry")
<*> (o .:? "account")
<*> (o .:? "errors")
<*> (o .:? "batchId"))
instance ToJSON AccountsCustomBatchResponseEntry
where
toJSON AccountsCustomBatchResponseEntry'{..}
= object
(catMaybes
[Just ("kind" .= _aKind),
("account" .=) <$> _aAccount,
("errors" .=) <$> _aErrors,
("batchId" .=) <$> _aBatchId])
data AccountIdentifier = AccountIdentifier'
{ _aiMerchantId :: !(Maybe (Textual Word64))
, _aiAggregatorId :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
accountIdentifier
:: AccountIdentifier
accountIdentifier =
AccountIdentifier'
{ _aiMerchantId = Nothing
, _aiAggregatorId = Nothing
}
aiMerchantId :: Lens' AccountIdentifier (Maybe Word64)
aiMerchantId
= lens _aiMerchantId (\ s a -> s{_aiMerchantId = a})
. mapping _Coerce
aiAggregatorId :: Lens' AccountIdentifier (Maybe Word64)
aiAggregatorId
= lens _aiAggregatorId
(\ s a -> s{_aiAggregatorId = a})
. mapping _Coerce
instance FromJSON AccountIdentifier where
parseJSON
= withObject "AccountIdentifier"
(\ o ->
AccountIdentifier' <$>
(o .:? "merchantId") <*> (o .:? "aggregatorId"))
instance ToJSON AccountIdentifier where
toJSON AccountIdentifier'{..}
= object
(catMaybes
[("merchantId" .=) <$> _aiMerchantId,
("aggregatorId" .=) <$> _aiAggregatorId])
data TestOrderPaymentMethod = TestOrderPaymentMethod'
{ _topmExpirationMonth :: !(Maybe (Textual Int32))
, _topmExpirationYear :: !(Maybe (Textual Int32))
, _topmLastFourDigits :: !(Maybe Text)
, _topmType :: !(Maybe Text)
, _topmPredefinedBillingAddress :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
testOrderPaymentMethod
:: TestOrderPaymentMethod
testOrderPaymentMethod =
TestOrderPaymentMethod'
{ _topmExpirationMonth = Nothing
, _topmExpirationYear = Nothing
, _topmLastFourDigits = Nothing
, _topmType = Nothing
, _topmPredefinedBillingAddress = Nothing
}
topmExpirationMonth :: Lens' TestOrderPaymentMethod (Maybe Int32)
topmExpirationMonth
= lens _topmExpirationMonth
(\ s a -> s{_topmExpirationMonth = a})
. mapping _Coerce
topmExpirationYear :: Lens' TestOrderPaymentMethod (Maybe Int32)
topmExpirationYear
= lens _topmExpirationYear
(\ s a -> s{_topmExpirationYear = a})
. mapping _Coerce
topmLastFourDigits :: Lens' TestOrderPaymentMethod (Maybe Text)
topmLastFourDigits
= lens _topmLastFourDigits
(\ s a -> s{_topmLastFourDigits = a})
topmType :: Lens' TestOrderPaymentMethod (Maybe Text)
topmType = lens _topmType (\ s a -> s{_topmType = a})
topmPredefinedBillingAddress :: Lens' TestOrderPaymentMethod (Maybe Text)
topmPredefinedBillingAddress
= lens _topmPredefinedBillingAddress
(\ s a -> s{_topmPredefinedBillingAddress = a})
instance FromJSON TestOrderPaymentMethod where
parseJSON
= withObject "TestOrderPaymentMethod"
(\ o ->
TestOrderPaymentMethod' <$>
(o .:? "expirationMonth") <*>
(o .:? "expirationYear")
<*> (o .:? "lastFourDigits")
<*> (o .:? "type")
<*> (o .:? "predefinedBillingAddress"))
instance ToJSON TestOrderPaymentMethod where
toJSON TestOrderPaymentMethod'{..}
= object
(catMaybes
[("expirationMonth" .=) <$> _topmExpirationMonth,
("expirationYear" .=) <$> _topmExpirationYear,
("lastFourDigits" .=) <$> _topmLastFourDigits,
("type" .=) <$> _topmType,
("predefinedBillingAddress" .=) <$>
_topmPredefinedBillingAddress])
data OrderLineItem = OrderLineItem'
{ _oliQuantityOrdered :: !(Maybe (Textual Word32))
, _oliReturnInfo :: !(Maybe OrderLineItemReturnInfo)
, _oliQuantityDelivered :: !(Maybe (Textual Word32))
, _oliShippingDetails :: !(Maybe OrderLineItemShippingDetails)
, _oliQuantityPending :: !(Maybe (Textual Word32))
, _oliCancellations :: !(Maybe [OrderCancellation])
, _oliQuantityCanceled :: !(Maybe (Textual Word32))
, _oliId :: !(Maybe Text)
, _oliTax :: !(Maybe Price)
, _oliPrice :: !(Maybe Price)
, _oliQuantityShipped :: !(Maybe (Textual Word32))
, _oliQuantityReturned :: !(Maybe (Textual Word32))
, _oliProduct :: !(Maybe OrderLineItemProduct)
, _oliReturns :: !(Maybe [OrderReturn])
} deriving (Eq,Show,Data,Typeable,Generic)
orderLineItem
:: OrderLineItem
orderLineItem =
OrderLineItem'
{ _oliQuantityOrdered = Nothing
, _oliReturnInfo = Nothing
, _oliQuantityDelivered = Nothing
, _oliShippingDetails = Nothing
, _oliQuantityPending = Nothing
, _oliCancellations = Nothing
, _oliQuantityCanceled = Nothing
, _oliId = Nothing
, _oliTax = Nothing
, _oliPrice = Nothing
, _oliQuantityShipped = Nothing
, _oliQuantityReturned = Nothing
, _oliProduct = Nothing
, _oliReturns = Nothing
}
oliQuantityOrdered :: Lens' OrderLineItem (Maybe Word32)
oliQuantityOrdered
= lens _oliQuantityOrdered
(\ s a -> s{_oliQuantityOrdered = a})
. mapping _Coerce
oliReturnInfo :: Lens' OrderLineItem (Maybe OrderLineItemReturnInfo)
oliReturnInfo
= lens _oliReturnInfo
(\ s a -> s{_oliReturnInfo = a})
oliQuantityDelivered :: Lens' OrderLineItem (Maybe Word32)
oliQuantityDelivered
= lens _oliQuantityDelivered
(\ s a -> s{_oliQuantityDelivered = a})
. mapping _Coerce
oliShippingDetails :: Lens' OrderLineItem (Maybe OrderLineItemShippingDetails)
oliShippingDetails
= lens _oliShippingDetails
(\ s a -> s{_oliShippingDetails = a})
oliQuantityPending :: Lens' OrderLineItem (Maybe Word32)
oliQuantityPending
= lens _oliQuantityPending
(\ s a -> s{_oliQuantityPending = a})
. mapping _Coerce
oliCancellations :: Lens' OrderLineItem [OrderCancellation]
oliCancellations
= lens _oliCancellations
(\ s a -> s{_oliCancellations = a})
. _Default
. _Coerce
oliQuantityCanceled :: Lens' OrderLineItem (Maybe Word32)
oliQuantityCanceled
= lens _oliQuantityCanceled
(\ s a -> s{_oliQuantityCanceled = a})
. mapping _Coerce
oliId :: Lens' OrderLineItem (Maybe Text)
oliId = lens _oliId (\ s a -> s{_oliId = a})
oliTax :: Lens' OrderLineItem (Maybe Price)
oliTax = lens _oliTax (\ s a -> s{_oliTax = a})
oliPrice :: Lens' OrderLineItem (Maybe Price)
oliPrice = lens _oliPrice (\ s a -> s{_oliPrice = a})
oliQuantityShipped :: Lens' OrderLineItem (Maybe Word32)
oliQuantityShipped
= lens _oliQuantityShipped
(\ s a -> s{_oliQuantityShipped = a})
. mapping _Coerce
oliQuantityReturned :: Lens' OrderLineItem (Maybe Word32)
oliQuantityReturned
= lens _oliQuantityReturned
(\ s a -> s{_oliQuantityReturned = a})
. mapping _Coerce
oliProduct :: Lens' OrderLineItem (Maybe OrderLineItemProduct)
oliProduct
= lens _oliProduct (\ s a -> s{_oliProduct = a})
oliReturns :: Lens' OrderLineItem [OrderReturn]
oliReturns
= lens _oliReturns (\ s a -> s{_oliReturns = a}) .
_Default
. _Coerce
instance FromJSON OrderLineItem where
parseJSON
= withObject "OrderLineItem"
(\ o ->
OrderLineItem' <$>
(o .:? "quantityOrdered") <*> (o .:? "returnInfo")
<*> (o .:? "quantityDelivered")
<*> (o .:? "shippingDetails")
<*> (o .:? "quantityPending")
<*> (o .:? "cancellations" .!= mempty)
<*> (o .:? "quantityCanceled")
<*> (o .:? "id")
<*> (o .:? "tax")
<*> (o .:? "price")
<*> (o .:? "quantityShipped")
<*> (o .:? "quantityReturned")
<*> (o .:? "product")
<*> (o .:? "returns" .!= mempty))
instance ToJSON OrderLineItem where
toJSON OrderLineItem'{..}
= object
(catMaybes
[("quantityOrdered" .=) <$> _oliQuantityOrdered,
("returnInfo" .=) <$> _oliReturnInfo,
("quantityDelivered" .=) <$> _oliQuantityDelivered,
("shippingDetails" .=) <$> _oliShippingDetails,
("quantityPending" .=) <$> _oliQuantityPending,
("cancellations" .=) <$> _oliCancellations,
("quantityCanceled" .=) <$> _oliQuantityCanceled,
("id" .=) <$> _oliId, ("tax" .=) <$> _oliTax,
("price" .=) <$> _oliPrice,
("quantityShipped" .=) <$> _oliQuantityShipped,
("quantityReturned" .=) <$> _oliQuantityReturned,
("product" .=) <$> _oliProduct,
("returns" .=) <$> _oliReturns])
data Service = Service'
{ _sDeliveryCountry :: !(Maybe Text)
, _sRateGroups :: !(Maybe [RateGroup])
, _sDeliveryTime :: !(Maybe DeliveryTime)
, _sActive :: !(Maybe Bool)
, _sName :: !(Maybe Text)
, _sCurrency :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
service
:: Service
service =
Service'
{ _sDeliveryCountry = Nothing
, _sRateGroups = Nothing
, _sDeliveryTime = Nothing
, _sActive = Nothing
, _sName = Nothing
, _sCurrency = Nothing
}
sDeliveryCountry :: Lens' Service (Maybe Text)
sDeliveryCountry
= lens _sDeliveryCountry
(\ s a -> s{_sDeliveryCountry = a})
sRateGroups :: Lens' Service [RateGroup]
sRateGroups
= lens _sRateGroups (\ s a -> s{_sRateGroups = a}) .
_Default
. _Coerce
sDeliveryTime :: Lens' Service (Maybe DeliveryTime)
sDeliveryTime
= lens _sDeliveryTime
(\ s a -> s{_sDeliveryTime = a})
sActive :: Lens' Service (Maybe Bool)
sActive = lens _sActive (\ s a -> s{_sActive = a})
sName :: Lens' Service (Maybe Text)
sName = lens _sName (\ s a -> s{_sName = a})
sCurrency :: Lens' Service (Maybe Text)
sCurrency
= lens _sCurrency (\ s a -> s{_sCurrency = a})
instance FromJSON Service where
parseJSON
= withObject "Service"
(\ o ->
Service' <$>
(o .:? "deliveryCountry") <*>
(o .:? "rateGroups" .!= mempty)
<*> (o .:? "deliveryTime")
<*> (o .:? "active")
<*> (o .:? "name")
<*> (o .:? "currency"))
instance ToJSON Service where
toJSON Service'{..}
= object
(catMaybes
[("deliveryCountry" .=) <$> _sDeliveryCountry,
("rateGroups" .=) <$> _sRateGroups,
("deliveryTime" .=) <$> _sDeliveryTime,
("active" .=) <$> _sActive, ("name" .=) <$> _sName,
("currency" .=) <$> _sCurrency])
data ProductstatusesCustomBatchResponse = ProductstatusesCustomBatchResponse'
{ _pEntries :: !(Maybe [ProductstatusesCustomBatchResponseEntry])
, _pKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
productstatusesCustomBatchResponse
:: ProductstatusesCustomBatchResponse
productstatusesCustomBatchResponse =
ProductstatusesCustomBatchResponse'
{ _pEntries = Nothing
, _pKind = "content#productstatusesCustomBatchResponse"
}
pEntries :: Lens' ProductstatusesCustomBatchResponse [ProductstatusesCustomBatchResponseEntry]
pEntries
= lens _pEntries (\ s a -> s{_pEntries = a}) .
_Default
. _Coerce
pKind :: Lens' ProductstatusesCustomBatchResponse Text
pKind = lens _pKind (\ s a -> s{_pKind = a})
instance FromJSON ProductstatusesCustomBatchResponse
where
parseJSON
= withObject "ProductstatusesCustomBatchResponse"
(\ o ->
ProductstatusesCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#productstatusesCustomBatchResponse"))
instance ToJSON ProductstatusesCustomBatchResponse
where
toJSON ProductstatusesCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _pEntries,
Just ("kind" .= _pKind)])
data ProductUnitPricingMeasure = ProductUnitPricingMeasure'
{ _pupmValue :: !(Maybe (Textual Double))
, _pupmUnit :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productUnitPricingMeasure
:: ProductUnitPricingMeasure
productUnitPricingMeasure =
ProductUnitPricingMeasure'
{ _pupmValue = Nothing
, _pupmUnit = Nothing
}
pupmValue :: Lens' ProductUnitPricingMeasure (Maybe Double)
pupmValue
= lens _pupmValue (\ s a -> s{_pupmValue = a}) .
mapping _Coerce
pupmUnit :: Lens' ProductUnitPricingMeasure (Maybe Text)
pupmUnit = lens _pupmUnit (\ s a -> s{_pupmUnit = a})
instance FromJSON ProductUnitPricingMeasure where
parseJSON
= withObject "ProductUnitPricingMeasure"
(\ o ->
ProductUnitPricingMeasure' <$>
(o .:? "value") <*> (o .:? "unit"))
instance ToJSON ProductUnitPricingMeasure where
toJSON ProductUnitPricingMeasure'{..}
= object
(catMaybes
[("value" .=) <$> _pupmValue,
("unit" .=) <$> _pupmUnit])
data OrdersUpdateShipmentRequest = OrdersUpdateShipmentRequest'
{ _ousrCarrier :: !(Maybe Text)
, _ousrStatus :: !(Maybe Text)
, _ousrTrackingId :: !(Maybe Text)
, _ousrShipmentId :: !(Maybe Text)
, _ousrOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersUpdateShipmentRequest
:: OrdersUpdateShipmentRequest
ordersUpdateShipmentRequest =
OrdersUpdateShipmentRequest'
{ _ousrCarrier = Nothing
, _ousrStatus = Nothing
, _ousrTrackingId = Nothing
, _ousrShipmentId = Nothing
, _ousrOperationId = Nothing
}
ousrCarrier :: Lens' OrdersUpdateShipmentRequest (Maybe Text)
ousrCarrier
= lens _ousrCarrier (\ s a -> s{_ousrCarrier = a})
ousrStatus :: Lens' OrdersUpdateShipmentRequest (Maybe Text)
ousrStatus
= lens _ousrStatus (\ s a -> s{_ousrStatus = a})
ousrTrackingId :: Lens' OrdersUpdateShipmentRequest (Maybe Text)
ousrTrackingId
= lens _ousrTrackingId
(\ s a -> s{_ousrTrackingId = a})
ousrShipmentId :: Lens' OrdersUpdateShipmentRequest (Maybe Text)
ousrShipmentId
= lens _ousrShipmentId
(\ s a -> s{_ousrShipmentId = a})
ousrOperationId :: Lens' OrdersUpdateShipmentRequest (Maybe Text)
ousrOperationId
= lens _ousrOperationId
(\ s a -> s{_ousrOperationId = a})
instance FromJSON OrdersUpdateShipmentRequest where
parseJSON
= withObject "OrdersUpdateShipmentRequest"
(\ o ->
OrdersUpdateShipmentRequest' <$>
(o .:? "carrier") <*> (o .:? "status") <*>
(o .:? "trackingId")
<*> (o .:? "shipmentId")
<*> (o .:? "operationId"))
instance ToJSON OrdersUpdateShipmentRequest where
toJSON OrdersUpdateShipmentRequest'{..}
= object
(catMaybes
[("carrier" .=) <$> _ousrCarrier,
("status" .=) <$> _ousrStatus,
("trackingId" .=) <$> _ousrTrackingId,
("shipmentId" .=) <$> _ousrShipmentId,
("operationId" .=) <$> _ousrOperationId])
data OrderShipmentLineItemShipment = OrderShipmentLineItemShipment'
{ _oslisQuantity :: !(Maybe (Textual Word32))
, _oslisLineItemId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderShipmentLineItemShipment
:: OrderShipmentLineItemShipment
orderShipmentLineItemShipment =
OrderShipmentLineItemShipment'
{ _oslisQuantity = Nothing
, _oslisLineItemId = Nothing
}
oslisQuantity :: Lens' OrderShipmentLineItemShipment (Maybe Word32)
oslisQuantity
= lens _oslisQuantity
(\ s a -> s{_oslisQuantity = a})
. mapping _Coerce
oslisLineItemId :: Lens' OrderShipmentLineItemShipment (Maybe Text)
oslisLineItemId
= lens _oslisLineItemId
(\ s a -> s{_oslisLineItemId = a})
instance FromJSON OrderShipmentLineItemShipment where
parseJSON
= withObject "OrderShipmentLineItemShipment"
(\ o ->
OrderShipmentLineItemShipment' <$>
(o .:? "quantity") <*> (o .:? "lineItemId"))
instance ToJSON OrderShipmentLineItemShipment where
toJSON OrderShipmentLineItemShipment'{..}
= object
(catMaybes
[("quantity" .=) <$> _oslisQuantity,
("lineItemId" .=) <$> _oslisLineItemId])
data LoyaltyPoints = LoyaltyPoints'
{ _lpRatio :: !(Maybe (Textual Double))
, _lpPointsValue :: !(Maybe (Textual Int64))
, _lpName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
loyaltyPoints
:: LoyaltyPoints
loyaltyPoints =
LoyaltyPoints'
{ _lpRatio = Nothing
, _lpPointsValue = Nothing
, _lpName = Nothing
}
lpRatio :: Lens' LoyaltyPoints (Maybe Double)
lpRatio
= lens _lpRatio (\ s a -> s{_lpRatio = a}) .
mapping _Coerce
lpPointsValue :: Lens' LoyaltyPoints (Maybe Int64)
lpPointsValue
= lens _lpPointsValue
(\ s a -> s{_lpPointsValue = a})
. mapping _Coerce
lpName :: Lens' LoyaltyPoints (Maybe Text)
lpName = lens _lpName (\ s a -> s{_lpName = a})
instance FromJSON LoyaltyPoints where
parseJSON
= withObject "LoyaltyPoints"
(\ o ->
LoyaltyPoints' <$>
(o .:? "ratio") <*> (o .:? "pointsValue") <*>
(o .:? "name"))
instance ToJSON LoyaltyPoints where
toJSON LoyaltyPoints'{..}
= object
(catMaybes
[("ratio" .=) <$> _lpRatio,
("pointsValue" .=) <$> _lpPointsValue,
("name" .=) <$> _lpName])
newtype AccountshippingCustomBatchRequest = AccountshippingCustomBatchRequest'
{ _acbrEntries :: Maybe [AccountshippingCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
accountshippingCustomBatchRequest
:: AccountshippingCustomBatchRequest
accountshippingCustomBatchRequest =
AccountshippingCustomBatchRequest'
{ _acbrEntries = Nothing
}
acbrEntries :: Lens' AccountshippingCustomBatchRequest [AccountshippingCustomBatchRequestEntry]
acbrEntries
= lens _acbrEntries (\ s a -> s{_acbrEntries = a}) .
_Default
. _Coerce
instance FromJSON AccountshippingCustomBatchRequest
where
parseJSON
= withObject "AccountshippingCustomBatchRequest"
(\ o ->
AccountshippingCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON AccountshippingCustomBatchRequest
where
toJSON AccountshippingCustomBatchRequest'{..}
= object
(catMaybes [("entries" .=) <$> _acbrEntries])
data OrdersCustomBatchRequestEntryShipLineItems = OrdersCustomBatchRequestEntryShipLineItems'
{ _ocbresliCarrier :: !(Maybe Text)
, _ocbresliTrackingId :: !(Maybe Text)
, _ocbresliShipmentId :: !(Maybe Text)
, _ocbresliLineItems :: !(Maybe [OrderShipmentLineItemShipment])
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchRequestEntryShipLineItems
:: OrdersCustomBatchRequestEntryShipLineItems
ordersCustomBatchRequestEntryShipLineItems =
OrdersCustomBatchRequestEntryShipLineItems'
{ _ocbresliCarrier = Nothing
, _ocbresliTrackingId = Nothing
, _ocbresliShipmentId = Nothing
, _ocbresliLineItems = Nothing
}
ocbresliCarrier :: Lens' OrdersCustomBatchRequestEntryShipLineItems (Maybe Text)
ocbresliCarrier
= lens _ocbresliCarrier
(\ s a -> s{_ocbresliCarrier = a})
ocbresliTrackingId :: Lens' OrdersCustomBatchRequestEntryShipLineItems (Maybe Text)
ocbresliTrackingId
= lens _ocbresliTrackingId
(\ s a -> s{_ocbresliTrackingId = a})
ocbresliShipmentId :: Lens' OrdersCustomBatchRequestEntryShipLineItems (Maybe Text)
ocbresliShipmentId
= lens _ocbresliShipmentId
(\ s a -> s{_ocbresliShipmentId = a})
ocbresliLineItems :: Lens' OrdersCustomBatchRequestEntryShipLineItems [OrderShipmentLineItemShipment]
ocbresliLineItems
= lens _ocbresliLineItems
(\ s a -> s{_ocbresliLineItems = a})
. _Default
. _Coerce
instance FromJSON
OrdersCustomBatchRequestEntryShipLineItems where
parseJSON
= withObject
"OrdersCustomBatchRequestEntryShipLineItems"
(\ o ->
OrdersCustomBatchRequestEntryShipLineItems' <$>
(o .:? "carrier") <*> (o .:? "trackingId") <*>
(o .:? "shipmentId")
<*> (o .:? "lineItems" .!= mempty))
instance ToJSON
OrdersCustomBatchRequestEntryShipLineItems where
toJSON
OrdersCustomBatchRequestEntryShipLineItems'{..}
= object
(catMaybes
[("carrier" .=) <$> _ocbresliCarrier,
("trackingId" .=) <$> _ocbresliTrackingId,
("shipmentId" .=) <$> _ocbresliShipmentId,
("lineItems" .=) <$> _ocbresliLineItems])
data AccountStatus = AccountStatus'
{ _asDataQualityIssues :: !(Maybe [AccountStatusDataQualityIssue])
, _asKind :: !Text
, _asAccountId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountStatus
:: AccountStatus
accountStatus =
AccountStatus'
{ _asDataQualityIssues = Nothing
, _asKind = "content#accountStatus"
, _asAccountId = Nothing
}
asDataQualityIssues :: Lens' AccountStatus [AccountStatusDataQualityIssue]
asDataQualityIssues
= lens _asDataQualityIssues
(\ s a -> s{_asDataQualityIssues = a})
. _Default
. _Coerce
asKind :: Lens' AccountStatus Text
asKind = lens _asKind (\ s a -> s{_asKind = a})
asAccountId :: Lens' AccountStatus (Maybe Text)
asAccountId
= lens _asAccountId (\ s a -> s{_asAccountId = a})
instance FromJSON AccountStatus where
parseJSON
= withObject "AccountStatus"
(\ o ->
AccountStatus' <$>
(o .:? "dataQualityIssues" .!= mempty) <*>
(o .:? "kind" .!= "content#accountStatus")
<*> (o .:? "accountId"))
instance ToJSON AccountStatus where
toJSON AccountStatus'{..}
= object
(catMaybes
[("dataQualityIssues" .=) <$> _asDataQualityIssues,
Just ("kind" .= _asKind),
("accountId" .=) <$> _asAccountId])
data OrdersReturnLineItemRequest = OrdersReturnLineItemRequest'
{ _orlirQuantity :: !(Maybe (Textual Word32))
, _orlirLineItemId :: !(Maybe Text)
, _orlirReason :: !(Maybe Text)
, _orlirOperationId :: !(Maybe Text)
, _orlirReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersReturnLineItemRequest
:: OrdersReturnLineItemRequest
ordersReturnLineItemRequest =
OrdersReturnLineItemRequest'
{ _orlirQuantity = Nothing
, _orlirLineItemId = Nothing
, _orlirReason = Nothing
, _orlirOperationId = Nothing
, _orlirReasonText = Nothing
}
orlirQuantity :: Lens' OrdersReturnLineItemRequest (Maybe Word32)
orlirQuantity
= lens _orlirQuantity
(\ s a -> s{_orlirQuantity = a})
. mapping _Coerce
orlirLineItemId :: Lens' OrdersReturnLineItemRequest (Maybe Text)
orlirLineItemId
= lens _orlirLineItemId
(\ s a -> s{_orlirLineItemId = a})
orlirReason :: Lens' OrdersReturnLineItemRequest (Maybe Text)
orlirReason
= lens _orlirReason (\ s a -> s{_orlirReason = a})
orlirOperationId :: Lens' OrdersReturnLineItemRequest (Maybe Text)
orlirOperationId
= lens _orlirOperationId
(\ s a -> s{_orlirOperationId = a})
orlirReasonText :: Lens' OrdersReturnLineItemRequest (Maybe Text)
orlirReasonText
= lens _orlirReasonText
(\ s a -> s{_orlirReasonText = a})
instance FromJSON OrdersReturnLineItemRequest where
parseJSON
= withObject "OrdersReturnLineItemRequest"
(\ o ->
OrdersReturnLineItemRequest' <$>
(o .:? "quantity") <*> (o .:? "lineItemId") <*>
(o .:? "reason")
<*> (o .:? "operationId")
<*> (o .:? "reasonText"))
instance ToJSON OrdersReturnLineItemRequest where
toJSON OrdersReturnLineItemRequest'{..}
= object
(catMaybes
[("quantity" .=) <$> _orlirQuantity,
("lineItemId" .=) <$> _orlirLineItemId,
("reason" .=) <$> _orlirReason,
("operationId" .=) <$> _orlirOperationId,
("reasonText" .=) <$> _orlirReasonText])
data ShippingSettingsCustomBatchRequestEntry = ShippingSettingsCustomBatchRequestEntry'
{ _sscbreMerchantId :: !(Maybe (Textual Word64))
, _sscbreAccountId :: !(Maybe (Textual Word64))
, _sscbreMethod :: !(Maybe Text)
, _sscbreShippingSettings :: !(Maybe ShippingSettings)
, _sscbreBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
shippingSettingsCustomBatchRequestEntry
:: ShippingSettingsCustomBatchRequestEntry
shippingSettingsCustomBatchRequestEntry =
ShippingSettingsCustomBatchRequestEntry'
{ _sscbreMerchantId = Nothing
, _sscbreAccountId = Nothing
, _sscbreMethod = Nothing
, _sscbreShippingSettings = Nothing
, _sscbreBatchId = Nothing
}
sscbreMerchantId :: Lens' ShippingSettingsCustomBatchRequestEntry (Maybe Word64)
sscbreMerchantId
= lens _sscbreMerchantId
(\ s a -> s{_sscbreMerchantId = a})
. mapping _Coerce
sscbreAccountId :: Lens' ShippingSettingsCustomBatchRequestEntry (Maybe Word64)
sscbreAccountId
= lens _sscbreAccountId
(\ s a -> s{_sscbreAccountId = a})
. mapping _Coerce
sscbreMethod :: Lens' ShippingSettingsCustomBatchRequestEntry (Maybe Text)
sscbreMethod
= lens _sscbreMethod (\ s a -> s{_sscbreMethod = a})
sscbreShippingSettings :: Lens' ShippingSettingsCustomBatchRequestEntry (Maybe ShippingSettings)
sscbreShippingSettings
= lens _sscbreShippingSettings
(\ s a -> s{_sscbreShippingSettings = a})
sscbreBatchId :: Lens' ShippingSettingsCustomBatchRequestEntry (Maybe Word32)
sscbreBatchId
= lens _sscbreBatchId
(\ s a -> s{_sscbreBatchId = a})
. mapping _Coerce
instance FromJSON
ShippingSettingsCustomBatchRequestEntry where
parseJSON
= withObject
"ShippingSettingsCustomBatchRequestEntry"
(\ o ->
ShippingSettingsCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "accountId") <*>
(o .:? "method")
<*> (o .:? "shippingSettings")
<*> (o .:? "batchId"))
instance ToJSON
ShippingSettingsCustomBatchRequestEntry where
toJSON ShippingSettingsCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _sscbreMerchantId,
("accountId" .=) <$> _sscbreAccountId,
("method" .=) <$> _sscbreMethod,
("shippingSettings" .=) <$> _sscbreShippingSettings,
("batchId" .=) <$> _sscbreBatchId])
newtype AccountstatusesCustomBatchRequest = AccountstatusesCustomBatchRequest'
{ _aEntries :: Maybe [AccountstatusesCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
accountstatusesCustomBatchRequest
:: AccountstatusesCustomBatchRequest
accountstatusesCustomBatchRequest =
AccountstatusesCustomBatchRequest'
{ _aEntries = Nothing
}
aEntries :: Lens' AccountstatusesCustomBatchRequest [AccountstatusesCustomBatchRequestEntry]
aEntries
= lens _aEntries (\ s a -> s{_aEntries = a}) .
_Default
. _Coerce
instance FromJSON AccountstatusesCustomBatchRequest
where
parseJSON
= withObject "AccountstatusesCustomBatchRequest"
(\ o ->
AccountstatusesCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON AccountstatusesCustomBatchRequest
where
toJSON AccountstatusesCustomBatchRequest'{..}
= object (catMaybes [("entries" .=) <$> _aEntries])
data AccounttaxListResponse = AccounttaxListResponse'
{ _alrNextPageToken :: !(Maybe Text)
, _alrKind :: !Text
, _alrResources :: !(Maybe [AccountTax])
} deriving (Eq,Show,Data,Typeable,Generic)
accounttaxListResponse
:: AccounttaxListResponse
accounttaxListResponse =
AccounttaxListResponse'
{ _alrNextPageToken = Nothing
, _alrKind = "content#accounttaxListResponse"
, _alrResources = Nothing
}
alrNextPageToken :: Lens' AccounttaxListResponse (Maybe Text)
alrNextPageToken
= lens _alrNextPageToken
(\ s a -> s{_alrNextPageToken = a})
alrKind :: Lens' AccounttaxListResponse Text
alrKind = lens _alrKind (\ s a -> s{_alrKind = a})
alrResources :: Lens' AccounttaxListResponse [AccountTax]
alrResources
= lens _alrResources (\ s a -> s{_alrResources = a})
. _Default
. _Coerce
instance FromJSON AccounttaxListResponse where
parseJSON
= withObject "AccounttaxListResponse"
(\ o ->
AccounttaxListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "content#accounttaxListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON AccounttaxListResponse where
toJSON AccounttaxListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _alrNextPageToken,
Just ("kind" .= _alrKind),
("resources" .=) <$> _alrResources])
data OrdersGetTestOrderTemplateResponse = OrdersGetTestOrderTemplateResponse'
{ _ogtotrKind :: !Text
, _ogtotrTemplate :: !(Maybe TestOrder)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersGetTestOrderTemplateResponse
:: OrdersGetTestOrderTemplateResponse
ordersGetTestOrderTemplateResponse =
OrdersGetTestOrderTemplateResponse'
{ _ogtotrKind = "content#ordersGetTestOrderTemplateResponse"
, _ogtotrTemplate = Nothing
}
ogtotrKind :: Lens' OrdersGetTestOrderTemplateResponse Text
ogtotrKind
= lens _ogtotrKind (\ s a -> s{_ogtotrKind = a})
ogtotrTemplate :: Lens' OrdersGetTestOrderTemplateResponse (Maybe TestOrder)
ogtotrTemplate
= lens _ogtotrTemplate
(\ s a -> s{_ogtotrTemplate = a})
instance FromJSON OrdersGetTestOrderTemplateResponse
where
parseJSON
= withObject "OrdersGetTestOrderTemplateResponse"
(\ o ->
OrdersGetTestOrderTemplateResponse' <$>
(o .:? "kind" .!=
"content#ordersGetTestOrderTemplateResponse")
<*> (o .:? "template"))
instance ToJSON OrdersGetTestOrderTemplateResponse
where
toJSON OrdersGetTestOrderTemplateResponse'{..}
= object
(catMaybes
[Just ("kind" .= _ogtotrKind),
("template" .=) <$> _ogtotrTemplate])
data AccountsCustomBatchRequestEntry = AccountsCustomBatchRequestEntry'
{ _accMerchantId :: !(Maybe (Textual Word64))
, _accAccount :: !(Maybe Account)
, _accAccountId :: !(Maybe (Textual Word64))
, _accMethod :: !(Maybe Text)
, _accBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountsCustomBatchRequestEntry
:: AccountsCustomBatchRequestEntry
accountsCustomBatchRequestEntry =
AccountsCustomBatchRequestEntry'
{ _accMerchantId = Nothing
, _accAccount = Nothing
, _accAccountId = Nothing
, _accMethod = Nothing
, _accBatchId = Nothing
}
accMerchantId :: Lens' AccountsCustomBatchRequestEntry (Maybe Word64)
accMerchantId
= lens _accMerchantId
(\ s a -> s{_accMerchantId = a})
. mapping _Coerce
accAccount :: Lens' AccountsCustomBatchRequestEntry (Maybe Account)
accAccount
= lens _accAccount (\ s a -> s{_accAccount = a})
accAccountId :: Lens' AccountsCustomBatchRequestEntry (Maybe Word64)
accAccountId
= lens _accAccountId (\ s a -> s{_accAccountId = a})
. mapping _Coerce
accMethod :: Lens' AccountsCustomBatchRequestEntry (Maybe Text)
accMethod
= lens _accMethod (\ s a -> s{_accMethod = a})
accBatchId :: Lens' AccountsCustomBatchRequestEntry (Maybe Word32)
accBatchId
= lens _accBatchId (\ s a -> s{_accBatchId = a}) .
mapping _Coerce
instance FromJSON AccountsCustomBatchRequestEntry
where
parseJSON
= withObject "AccountsCustomBatchRequestEntry"
(\ o ->
AccountsCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "account") <*>
(o .:? "accountId")
<*> (o .:? "method")
<*> (o .:? "batchId"))
instance ToJSON AccountsCustomBatchRequestEntry where
toJSON AccountsCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _accMerchantId,
("account" .=) <$> _accAccount,
("accountId" .=) <$> _accAccountId,
("method" .=) <$> _accMethod,
("batchId" .=) <$> _accBatchId])
data Weight = Weight'
{ _wValue :: !(Maybe Text)
, _wUnit :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
weight
:: Weight
weight =
Weight'
{ _wValue = Nothing
, _wUnit = Nothing
}
wValue :: Lens' Weight (Maybe Text)
wValue = lens _wValue (\ s a -> s{_wValue = a})
wUnit :: Lens' Weight (Maybe Text)
wUnit = lens _wUnit (\ s a -> s{_wUnit = a})
instance FromJSON Weight where
parseJSON
= withObject "Weight"
(\ o ->
Weight' <$> (o .:? "value") <*> (o .:? "unit"))
instance ToJSON Weight where
toJSON Weight'{..}
= object
(catMaybes
[("value" .=) <$> _wValue, ("unit" .=) <$> _wUnit])
data Error' = Error''
{ _eDomain :: !(Maybe Text)
, _eReason :: !(Maybe Text)
, _eMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
error'
:: Error'
error' =
Error''
{ _eDomain = Nothing
, _eReason = Nothing
, _eMessage = Nothing
}
eDomain :: Lens' Error' (Maybe Text)
eDomain = lens _eDomain (\ s a -> s{_eDomain = a})
eReason :: Lens' Error' (Maybe Text)
eReason = lens _eReason (\ s a -> s{_eReason = a})
eMessage :: Lens' Error' (Maybe Text)
eMessage = lens _eMessage (\ s a -> s{_eMessage = a})
instance FromJSON Error' where
parseJSON
= withObject "Error"
(\ o ->
Error'' <$>
(o .:? "domain") <*> (o .:? "reason") <*>
(o .:? "message"))
instance ToJSON Error' where
toJSON Error''{..}
= object
(catMaybes
[("domain" .=) <$> _eDomain,
("reason" .=) <$> _eReason,
("message" .=) <$> _eMessage])
data ProductstatusesListResponse = ProductstatusesListResponse'
{ _plrNextPageToken :: !(Maybe Text)
, _plrKind :: !Text
, _plrResources :: !(Maybe [ProductStatus])
} deriving (Eq,Show,Data,Typeable,Generic)
productstatusesListResponse
:: ProductstatusesListResponse
productstatusesListResponse =
ProductstatusesListResponse'
{ _plrNextPageToken = Nothing
, _plrKind = "content#productstatusesListResponse"
, _plrResources = Nothing
}
plrNextPageToken :: Lens' ProductstatusesListResponse (Maybe Text)
plrNextPageToken
= lens _plrNextPageToken
(\ s a -> s{_plrNextPageToken = a})
plrKind :: Lens' ProductstatusesListResponse Text
plrKind = lens _plrKind (\ s a -> s{_plrKind = a})
plrResources :: Lens' ProductstatusesListResponse [ProductStatus]
plrResources
= lens _plrResources (\ s a -> s{_plrResources = a})
. _Default
. _Coerce
instance FromJSON ProductstatusesListResponse where
parseJSON
= withObject "ProductstatusesListResponse"
(\ o ->
ProductstatusesListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"content#productstatusesListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON ProductstatusesListResponse where
toJSON ProductstatusesListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _plrNextPageToken,
Just ("kind" .= _plrKind),
("resources" .=) <$> _plrResources])
data OrdersRefundResponse = OrdersRefundResponse'
{ _orrKind :: !Text
, _orrExecutionStatus :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersRefundResponse
:: OrdersRefundResponse
ordersRefundResponse =
OrdersRefundResponse'
{ _orrKind = "content#ordersRefundResponse"
, _orrExecutionStatus = Nothing
}
orrKind :: Lens' OrdersRefundResponse Text
orrKind = lens _orrKind (\ s a -> s{_orrKind = a})
orrExecutionStatus :: Lens' OrdersRefundResponse (Maybe Text)
orrExecutionStatus
= lens _orrExecutionStatus
(\ s a -> s{_orrExecutionStatus = a})
instance FromJSON OrdersRefundResponse where
parseJSON
= withObject "OrdersRefundResponse"
(\ o ->
OrdersRefundResponse' <$>
(o .:? "kind" .!= "content#ordersRefundResponse") <*>
(o .:? "executionStatus"))
instance ToJSON OrdersRefundResponse where
toJSON OrdersRefundResponse'{..}
= object
(catMaybes
[Just ("kind" .= _orrKind),
("executionStatus" .=) <$> _orrExecutionStatus])
data OrdersCreateTestOrderRequest = OrdersCreateTestOrderRequest'
{ _octorTemplateName :: !(Maybe Text)
, _octorTestOrder :: !(Maybe TestOrder)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCreateTestOrderRequest
:: OrdersCreateTestOrderRequest
ordersCreateTestOrderRequest =
OrdersCreateTestOrderRequest'
{ _octorTemplateName = Nothing
, _octorTestOrder = Nothing
}
octorTemplateName :: Lens' OrdersCreateTestOrderRequest (Maybe Text)
octorTemplateName
= lens _octorTemplateName
(\ s a -> s{_octorTemplateName = a})
octorTestOrder :: Lens' OrdersCreateTestOrderRequest (Maybe TestOrder)
octorTestOrder
= lens _octorTestOrder
(\ s a -> s{_octorTestOrder = a})
instance FromJSON OrdersCreateTestOrderRequest where
parseJSON
= withObject "OrdersCreateTestOrderRequest"
(\ o ->
OrdersCreateTestOrderRequest' <$>
(o .:? "templateName") <*> (o .:? "testOrder"))
instance ToJSON OrdersCreateTestOrderRequest where
toJSON OrdersCreateTestOrderRequest'{..}
= object
(catMaybes
[("templateName" .=) <$> _octorTemplateName,
("testOrder" .=) <$> _octorTestOrder])
data AccountUser = AccountUser'
{ _auAdmin :: !(Maybe Bool)
, _auEmailAddress :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountUser
:: AccountUser
accountUser =
AccountUser'
{ _auAdmin = Nothing
, _auEmailAddress = Nothing
}
auAdmin :: Lens' AccountUser (Maybe Bool)
auAdmin = lens _auAdmin (\ s a -> s{_auAdmin = a})
auEmailAddress :: Lens' AccountUser (Maybe Text)
auEmailAddress
= lens _auEmailAddress
(\ s a -> s{_auEmailAddress = a})
instance FromJSON AccountUser where
parseJSON
= withObject "AccountUser"
(\ o ->
AccountUser' <$>
(o .:? "admin") <*> (o .:? "emailAddress"))
instance ToJSON AccountUser where
toJSON AccountUser'{..}
= object
(catMaybes
[("admin" .=) <$> _auAdmin,
("emailAddress" .=) <$> _auEmailAddress])
data AccountStatusExampleItem = AccountStatusExampleItem'
{ _aseiSubmittedValue :: !(Maybe Text)
, _aseiLink :: !(Maybe Text)
, _aseiItemId :: !(Maybe Text)
, _aseiTitle :: !(Maybe Text)
, _aseiValueOnLandingPage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountStatusExampleItem
:: AccountStatusExampleItem
accountStatusExampleItem =
AccountStatusExampleItem'
{ _aseiSubmittedValue = Nothing
, _aseiLink = Nothing
, _aseiItemId = Nothing
, _aseiTitle = Nothing
, _aseiValueOnLandingPage = Nothing
}
aseiSubmittedValue :: Lens' AccountStatusExampleItem (Maybe Text)
aseiSubmittedValue
= lens _aseiSubmittedValue
(\ s a -> s{_aseiSubmittedValue = a})
aseiLink :: Lens' AccountStatusExampleItem (Maybe Text)
aseiLink = lens _aseiLink (\ s a -> s{_aseiLink = a})
aseiItemId :: Lens' AccountStatusExampleItem (Maybe Text)
aseiItemId
= lens _aseiItemId (\ s a -> s{_aseiItemId = a})
aseiTitle :: Lens' AccountStatusExampleItem (Maybe Text)
aseiTitle
= lens _aseiTitle (\ s a -> s{_aseiTitle = a})
aseiValueOnLandingPage :: Lens' AccountStatusExampleItem (Maybe Text)
aseiValueOnLandingPage
= lens _aseiValueOnLandingPage
(\ s a -> s{_aseiValueOnLandingPage = a})
instance FromJSON AccountStatusExampleItem where
parseJSON
= withObject "AccountStatusExampleItem"
(\ o ->
AccountStatusExampleItem' <$>
(o .:? "submittedValue") <*> (o .:? "link") <*>
(o .:? "itemId")
<*> (o .:? "title")
<*> (o .:? "valueOnLandingPage"))
instance ToJSON AccountStatusExampleItem where
toJSON AccountStatusExampleItem'{..}
= object
(catMaybes
[("submittedValue" .=) <$> _aseiSubmittedValue,
("link" .=) <$> _aseiLink,
("itemId" .=) <$> _aseiItemId,
("title" .=) <$> _aseiTitle,
("valueOnLandingPage" .=) <$>
_aseiValueOnLandingPage])
data DatafeedsCustomBatchRequestEntry = DatafeedsCustomBatchRequestEntry'
{ _dcbreMerchantId :: !(Maybe (Textual Word64))
, _dcbreDatafeed :: !(Maybe Datafeed)
, _dcbreMethod :: !(Maybe Text)
, _dcbreDatafeedId :: !(Maybe (Textual Word64))
, _dcbreBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedsCustomBatchRequestEntry
:: DatafeedsCustomBatchRequestEntry
datafeedsCustomBatchRequestEntry =
DatafeedsCustomBatchRequestEntry'
{ _dcbreMerchantId = Nothing
, _dcbreDatafeed = Nothing
, _dcbreMethod = Nothing
, _dcbreDatafeedId = Nothing
, _dcbreBatchId = Nothing
}
dcbreMerchantId :: Lens' DatafeedsCustomBatchRequestEntry (Maybe Word64)
dcbreMerchantId
= lens _dcbreMerchantId
(\ s a -> s{_dcbreMerchantId = a})
. mapping _Coerce
dcbreDatafeed :: Lens' DatafeedsCustomBatchRequestEntry (Maybe Datafeed)
dcbreDatafeed
= lens _dcbreDatafeed
(\ s a -> s{_dcbreDatafeed = a})
dcbreMethod :: Lens' DatafeedsCustomBatchRequestEntry (Maybe Text)
dcbreMethod
= lens _dcbreMethod (\ s a -> s{_dcbreMethod = a})
dcbreDatafeedId :: Lens' DatafeedsCustomBatchRequestEntry (Maybe Word64)
dcbreDatafeedId
= lens _dcbreDatafeedId
(\ s a -> s{_dcbreDatafeedId = a})
. mapping _Coerce
dcbreBatchId :: Lens' DatafeedsCustomBatchRequestEntry (Maybe Word32)
dcbreBatchId
= lens _dcbreBatchId (\ s a -> s{_dcbreBatchId = a})
. mapping _Coerce
instance FromJSON DatafeedsCustomBatchRequestEntry
where
parseJSON
= withObject "DatafeedsCustomBatchRequestEntry"
(\ o ->
DatafeedsCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "datafeed") <*>
(o .:? "method")
<*> (o .:? "datafeedId")
<*> (o .:? "batchId"))
instance ToJSON DatafeedsCustomBatchRequestEntry
where
toJSON DatafeedsCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _dcbreMerchantId,
("datafeed" .=) <$> _dcbreDatafeed,
("method" .=) <$> _dcbreMethod,
("datafeedId" .=) <$> _dcbreDatafeedId,
("batchId" .=) <$> _dcbreBatchId])
data Value = Value'
{ _vPricePercentage :: !(Maybe Text)
, _vCarrierRateName :: !(Maybe Text)
, _vFlatRate :: !(Maybe Price)
, _vSubtableName :: !(Maybe Text)
, _vNoShipping :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
value
:: Value
value =
Value'
{ _vPricePercentage = Nothing
, _vCarrierRateName = Nothing
, _vFlatRate = Nothing
, _vSubtableName = Nothing
, _vNoShipping = Nothing
}
vPricePercentage :: Lens' Value (Maybe Text)
vPricePercentage
= lens _vPricePercentage
(\ s a -> s{_vPricePercentage = a})
vCarrierRateName :: Lens' Value (Maybe Text)
vCarrierRateName
= lens _vCarrierRateName
(\ s a -> s{_vCarrierRateName = a})
vFlatRate :: Lens' Value (Maybe Price)
vFlatRate
= lens _vFlatRate (\ s a -> s{_vFlatRate = a})
vSubtableName :: Lens' Value (Maybe Text)
vSubtableName
= lens _vSubtableName
(\ s a -> s{_vSubtableName = a})
vNoShipping :: Lens' Value (Maybe Bool)
vNoShipping
= lens _vNoShipping (\ s a -> s{_vNoShipping = a})
instance FromJSON Value where
parseJSON
= withObject "Value"
(\ o ->
Value' <$>
(o .:? "pricePercentage") <*>
(o .:? "carrierRateName")
<*> (o .:? "flatRate")
<*> (o .:? "subtableName")
<*> (o .:? "noShipping"))
instance ToJSON Value where
toJSON Value'{..}
= object
(catMaybes
[("pricePercentage" .=) <$> _vPricePercentage,
("carrierRateName" .=) <$> _vCarrierRateName,
("flatRate" .=) <$> _vFlatRate,
("subtableName" .=) <$> _vSubtableName,
("noShipping" .=) <$> _vNoShipping])
data Installment = Installment'
{ _iAmount :: !(Maybe Price)
, _iMonths :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
installment
:: Installment
installment =
Installment'
{ _iAmount = Nothing
, _iMonths = Nothing
}
iAmount :: Lens' Installment (Maybe Price)
iAmount = lens _iAmount (\ s a -> s{_iAmount = a})
iMonths :: Lens' Installment (Maybe Int64)
iMonths
= lens _iMonths (\ s a -> s{_iMonths = a}) .
mapping _Coerce
instance FromJSON Installment where
parseJSON
= withObject "Installment"
(\ o ->
Installment' <$>
(o .:? "amount") <*> (o .:? "months"))
instance ToJSON Installment where
toJSON Installment'{..}
= object
(catMaybes
[("amount" .=) <$> _iAmount,
("months" .=) <$> _iMonths])
data DatafeedFetchSchedule = DatafeedFetchSchedule'
{ _dfsFetchURL :: !(Maybe Text)
, _dfsUsername :: !(Maybe Text)
, _dfsMinuteOfHour :: !(Maybe (Textual Word32))
, _dfsPassword :: !(Maybe Text)
, _dfsDayOfMonth :: !(Maybe (Textual Word32))
, _dfsHour :: !(Maybe (Textual Word32))
, _dfsWeekday :: !(Maybe Text)
, _dfsTimeZone :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedFetchSchedule
:: DatafeedFetchSchedule
datafeedFetchSchedule =
DatafeedFetchSchedule'
{ _dfsFetchURL = Nothing
, _dfsUsername = Nothing
, _dfsMinuteOfHour = Nothing
, _dfsPassword = Nothing
, _dfsDayOfMonth = Nothing
, _dfsHour = Nothing
, _dfsWeekday = Nothing
, _dfsTimeZone = Nothing
}
dfsFetchURL :: Lens' DatafeedFetchSchedule (Maybe Text)
dfsFetchURL
= lens _dfsFetchURL (\ s a -> s{_dfsFetchURL = a})
dfsUsername :: Lens' DatafeedFetchSchedule (Maybe Text)
dfsUsername
= lens _dfsUsername (\ s a -> s{_dfsUsername = a})
dfsMinuteOfHour :: Lens' DatafeedFetchSchedule (Maybe Word32)
dfsMinuteOfHour
= lens _dfsMinuteOfHour
(\ s a -> s{_dfsMinuteOfHour = a})
. mapping _Coerce
dfsPassword :: Lens' DatafeedFetchSchedule (Maybe Text)
dfsPassword
= lens _dfsPassword (\ s a -> s{_dfsPassword = a})
dfsDayOfMonth :: Lens' DatafeedFetchSchedule (Maybe Word32)
dfsDayOfMonth
= lens _dfsDayOfMonth
(\ s a -> s{_dfsDayOfMonth = a})
. mapping _Coerce
dfsHour :: Lens' DatafeedFetchSchedule (Maybe Word32)
dfsHour
= lens _dfsHour (\ s a -> s{_dfsHour = a}) .
mapping _Coerce
dfsWeekday :: Lens' DatafeedFetchSchedule (Maybe Text)
dfsWeekday
= lens _dfsWeekday (\ s a -> s{_dfsWeekday = a})
dfsTimeZone :: Lens' DatafeedFetchSchedule (Maybe Text)
dfsTimeZone
= lens _dfsTimeZone (\ s a -> s{_dfsTimeZone = a})
instance FromJSON DatafeedFetchSchedule where
parseJSON
= withObject "DatafeedFetchSchedule"
(\ o ->
DatafeedFetchSchedule' <$>
(o .:? "fetchUrl") <*> (o .:? "username") <*>
(o .:? "minuteOfHour")
<*> (o .:? "password")
<*> (o .:? "dayOfMonth")
<*> (o .:? "hour")
<*> (o .:? "weekday")
<*> (o .:? "timeZone"))
instance ToJSON DatafeedFetchSchedule where
toJSON DatafeedFetchSchedule'{..}
= object
(catMaybes
[("fetchUrl" .=) <$> _dfsFetchURL,
("username" .=) <$> _dfsUsername,
("minuteOfHour" .=) <$> _dfsMinuteOfHour,
("password" .=) <$> _dfsPassword,
("dayOfMonth" .=) <$> _dfsDayOfMonth,
("hour" .=) <$> _dfsHour,
("weekday" .=) <$> _dfsWeekday,
("timeZone" .=) <$> _dfsTimeZone])
newtype OrdersCustomBatchRequest = OrdersCustomBatchRequest'
{ _ocbrEntries :: Maybe [OrdersCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchRequest
:: OrdersCustomBatchRequest
ordersCustomBatchRequest =
OrdersCustomBatchRequest'
{ _ocbrEntries = Nothing
}
ocbrEntries :: Lens' OrdersCustomBatchRequest [OrdersCustomBatchRequestEntry]
ocbrEntries
= lens _ocbrEntries (\ s a -> s{_ocbrEntries = a}) .
_Default
. _Coerce
instance FromJSON OrdersCustomBatchRequest where
parseJSON
= withObject "OrdersCustomBatchRequest"
(\ o ->
OrdersCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON OrdersCustomBatchRequest where
toJSON OrdersCustomBatchRequest'{..}
= object
(catMaybes [("entries" .=) <$> _ocbrEntries])
data ShippingSettingsGetSupportedCarriersResponse = ShippingSettingsGetSupportedCarriersResponse'
{ _ssgscrKind :: !Text
, _ssgscrCarriers :: !(Maybe [CarriersCarrier])
} deriving (Eq,Show,Data,Typeable,Generic)
shippingSettingsGetSupportedCarriersResponse
:: ShippingSettingsGetSupportedCarriersResponse
shippingSettingsGetSupportedCarriersResponse =
ShippingSettingsGetSupportedCarriersResponse'
{ _ssgscrKind = "content#shippingsettingsGetSupportedCarriersResponse"
, _ssgscrCarriers = Nothing
}
ssgscrKind :: Lens' ShippingSettingsGetSupportedCarriersResponse Text
ssgscrKind
= lens _ssgscrKind (\ s a -> s{_ssgscrKind = a})
ssgscrCarriers :: Lens' ShippingSettingsGetSupportedCarriersResponse [CarriersCarrier]
ssgscrCarriers
= lens _ssgscrCarriers
(\ s a -> s{_ssgscrCarriers = a})
. _Default
. _Coerce
instance FromJSON
ShippingSettingsGetSupportedCarriersResponse where
parseJSON
= withObject
"ShippingSettingsGetSupportedCarriersResponse"
(\ o ->
ShippingSettingsGetSupportedCarriersResponse' <$>
(o .:? "kind" .!=
"content#shippingsettingsGetSupportedCarriersResponse")
<*> (o .:? "carriers" .!= mempty))
instance ToJSON
ShippingSettingsGetSupportedCarriersResponse where
toJSON
ShippingSettingsGetSupportedCarriersResponse'{..}
= object
(catMaybes
[Just ("kind" .= _ssgscrKind),
("carriers" .=) <$> _ssgscrCarriers])
data AccountsListResponse = AccountsListResponse'
{ _accNextPageToken :: !(Maybe Text)
, _accKind :: !Text
, _accResources :: !(Maybe [Account])
} deriving (Eq,Show,Data,Typeable,Generic)
accountsListResponse
:: AccountsListResponse
accountsListResponse =
AccountsListResponse'
{ _accNextPageToken = Nothing
, _accKind = "content#accountsListResponse"
, _accResources = Nothing
}
accNextPageToken :: Lens' AccountsListResponse (Maybe Text)
accNextPageToken
= lens _accNextPageToken
(\ s a -> s{_accNextPageToken = a})
accKind :: Lens' AccountsListResponse Text
accKind = lens _accKind (\ s a -> s{_accKind = a})
accResources :: Lens' AccountsListResponse [Account]
accResources
= lens _accResources (\ s a -> s{_accResources = a})
. _Default
. _Coerce
instance FromJSON AccountsListResponse where
parseJSON
= withObject "AccountsListResponse"
(\ o ->
AccountsListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "content#accountsListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON AccountsListResponse where
toJSON AccountsListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _accNextPageToken,
Just ("kind" .= _accKind),
("resources" .=) <$> _accResources])
data ProductStatusDataQualityIssue = ProductStatusDataQualityIssue'
{ _psdqiLocation :: !(Maybe Text)
, _psdqiFetchStatus :: !(Maybe Text)
, _psdqiSeverity :: !(Maybe Text)
, _psdqiValueProvided :: !(Maybe Text)
, _psdqiId :: !(Maybe Text)
, _psdqiValueOnLandingPage :: !(Maybe Text)
, _psdqiTimestamp :: !(Maybe Text)
, _psdqiDetail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productStatusDataQualityIssue
:: ProductStatusDataQualityIssue
productStatusDataQualityIssue =
ProductStatusDataQualityIssue'
{ _psdqiLocation = Nothing
, _psdqiFetchStatus = Nothing
, _psdqiSeverity = Nothing
, _psdqiValueProvided = Nothing
, _psdqiId = Nothing
, _psdqiValueOnLandingPage = Nothing
, _psdqiTimestamp = Nothing
, _psdqiDetail = Nothing
}
psdqiLocation :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiLocation
= lens _psdqiLocation
(\ s a -> s{_psdqiLocation = a})
psdqiFetchStatus :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiFetchStatus
= lens _psdqiFetchStatus
(\ s a -> s{_psdqiFetchStatus = a})
psdqiSeverity :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiSeverity
= lens _psdqiSeverity
(\ s a -> s{_psdqiSeverity = a})
psdqiValueProvided :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiValueProvided
= lens _psdqiValueProvided
(\ s a -> s{_psdqiValueProvided = a})
psdqiId :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiId = lens _psdqiId (\ s a -> s{_psdqiId = a})
psdqiValueOnLandingPage :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiValueOnLandingPage
= lens _psdqiValueOnLandingPage
(\ s a -> s{_psdqiValueOnLandingPage = a})
psdqiTimestamp :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiTimestamp
= lens _psdqiTimestamp
(\ s a -> s{_psdqiTimestamp = a})
psdqiDetail :: Lens' ProductStatusDataQualityIssue (Maybe Text)
psdqiDetail
= lens _psdqiDetail (\ s a -> s{_psdqiDetail = a})
instance FromJSON ProductStatusDataQualityIssue where
parseJSON
= withObject "ProductStatusDataQualityIssue"
(\ o ->
ProductStatusDataQualityIssue' <$>
(o .:? "location") <*> (o .:? "fetchStatus") <*>
(o .:? "severity")
<*> (o .:? "valueProvided")
<*> (o .:? "id")
<*> (o .:? "valueOnLandingPage")
<*> (o .:? "timestamp")
<*> (o .:? "detail"))
instance ToJSON ProductStatusDataQualityIssue where
toJSON ProductStatusDataQualityIssue'{..}
= object
(catMaybes
[("location" .=) <$> _psdqiLocation,
("fetchStatus" .=) <$> _psdqiFetchStatus,
("severity" .=) <$> _psdqiSeverity,
("valueProvided" .=) <$> _psdqiValueProvided,
("id" .=) <$> _psdqiId,
("valueOnLandingPage" .=) <$>
_psdqiValueOnLandingPage,
("timestamp" .=) <$> _psdqiTimestamp,
("detail" .=) <$> _psdqiDetail])
data CarriersCarrier = CarriersCarrier'
{ _ccCountry :: !(Maybe Text)
, _ccName :: !(Maybe Text)
, _ccServices :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
carriersCarrier
:: CarriersCarrier
carriersCarrier =
CarriersCarrier'
{ _ccCountry = Nothing
, _ccName = Nothing
, _ccServices = Nothing
}
ccCountry :: Lens' CarriersCarrier (Maybe Text)
ccCountry
= lens _ccCountry (\ s a -> s{_ccCountry = a})
ccName :: Lens' CarriersCarrier (Maybe Text)
ccName = lens _ccName (\ s a -> s{_ccName = a})
ccServices :: Lens' CarriersCarrier [Text]
ccServices
= lens _ccServices (\ s a -> s{_ccServices = a}) .
_Default
. _Coerce
instance FromJSON CarriersCarrier where
parseJSON
= withObject "CarriersCarrier"
(\ o ->
CarriersCarrier' <$>
(o .:? "country") <*> (o .:? "name") <*>
(o .:? "services" .!= mempty))
instance ToJSON CarriersCarrier where
toJSON CarriersCarrier'{..}
= object
(catMaybes
[("country" .=) <$> _ccCountry,
("name" .=) <$> _ccName,
("services" .=) <$> _ccServices])
data CarrierRate = CarrierRate'
{ _crOriginPostalCode :: !(Maybe Text)
, _crFlatAdjustment :: !(Maybe Price)
, _crCarrierService :: !(Maybe Text)
, _crName :: !(Maybe Text)
, _crPercentageAdjustment :: !(Maybe Text)
, _crCarrierName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
carrierRate
:: CarrierRate
carrierRate =
CarrierRate'
{ _crOriginPostalCode = Nothing
, _crFlatAdjustment = Nothing
, _crCarrierService = Nothing
, _crName = Nothing
, _crPercentageAdjustment = Nothing
, _crCarrierName = Nothing
}
crOriginPostalCode :: Lens' CarrierRate (Maybe Text)
crOriginPostalCode
= lens _crOriginPostalCode
(\ s a -> s{_crOriginPostalCode = a})
crFlatAdjustment :: Lens' CarrierRate (Maybe Price)
crFlatAdjustment
= lens _crFlatAdjustment
(\ s a -> s{_crFlatAdjustment = a})
crCarrierService :: Lens' CarrierRate (Maybe Text)
crCarrierService
= lens _crCarrierService
(\ s a -> s{_crCarrierService = a})
crName :: Lens' CarrierRate (Maybe Text)
crName = lens _crName (\ s a -> s{_crName = a})
crPercentageAdjustment :: Lens' CarrierRate (Maybe Text)
crPercentageAdjustment
= lens _crPercentageAdjustment
(\ s a -> s{_crPercentageAdjustment = a})
crCarrierName :: Lens' CarrierRate (Maybe Text)
crCarrierName
= lens _crCarrierName
(\ s a -> s{_crCarrierName = a})
instance FromJSON CarrierRate where
parseJSON
= withObject "CarrierRate"
(\ o ->
CarrierRate' <$>
(o .:? "originPostalCode") <*>
(o .:? "flatAdjustment")
<*> (o .:? "carrierService")
<*> (o .:? "name")
<*> (o .:? "percentageAdjustment")
<*> (o .:? "carrierName"))
instance ToJSON CarrierRate where
toJSON CarrierRate'{..}
= object
(catMaybes
[("originPostalCode" .=) <$> _crOriginPostalCode,
("flatAdjustment" .=) <$> _crFlatAdjustment,
("carrierService" .=) <$> _crCarrierService,
("name" .=) <$> _crName,
("percentageAdjustment" .=) <$>
_crPercentageAdjustment,
("carrierName" .=) <$> _crCarrierName])
data ShippingSettingsListResponse = ShippingSettingsListResponse'
{ _sslrNextPageToken :: !(Maybe Text)
, _sslrKind :: !Text
, _sslrResources :: !(Maybe [ShippingSettings])
} deriving (Eq,Show,Data,Typeable,Generic)
shippingSettingsListResponse
:: ShippingSettingsListResponse
shippingSettingsListResponse =
ShippingSettingsListResponse'
{ _sslrNextPageToken = Nothing
, _sslrKind = "content#shippingsettingsListResponse"
, _sslrResources = Nothing
}
sslrNextPageToken :: Lens' ShippingSettingsListResponse (Maybe Text)
sslrNextPageToken
= lens _sslrNextPageToken
(\ s a -> s{_sslrNextPageToken = a})
sslrKind :: Lens' ShippingSettingsListResponse Text
sslrKind = lens _sslrKind (\ s a -> s{_sslrKind = a})
sslrResources :: Lens' ShippingSettingsListResponse [ShippingSettings]
sslrResources
= lens _sslrResources
(\ s a -> s{_sslrResources = a})
. _Default
. _Coerce
instance FromJSON ShippingSettingsListResponse where
parseJSON
= withObject "ShippingSettingsListResponse"
(\ o ->
ShippingSettingsListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"content#shippingsettingsListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON ShippingSettingsListResponse where
toJSON ShippingSettingsListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _sslrNextPageToken,
Just ("kind" .= _sslrKind),
("resources" .=) <$> _sslrResources])
data OrdersShipLineItemsRequest = OrdersShipLineItemsRequest'
{ _oslirCarrier :: !(Maybe Text)
, _oslirTrackingId :: !(Maybe Text)
, _oslirShipmentId :: !(Maybe Text)
, _oslirLineItems :: !(Maybe [OrderShipmentLineItemShipment])
, _oslirOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersShipLineItemsRequest
:: OrdersShipLineItemsRequest
ordersShipLineItemsRequest =
OrdersShipLineItemsRequest'
{ _oslirCarrier = Nothing
, _oslirTrackingId = Nothing
, _oslirShipmentId = Nothing
, _oslirLineItems = Nothing
, _oslirOperationId = Nothing
}
oslirCarrier :: Lens' OrdersShipLineItemsRequest (Maybe Text)
oslirCarrier
= lens _oslirCarrier (\ s a -> s{_oslirCarrier = a})
oslirTrackingId :: Lens' OrdersShipLineItemsRequest (Maybe Text)
oslirTrackingId
= lens _oslirTrackingId
(\ s a -> s{_oslirTrackingId = a})
oslirShipmentId :: Lens' OrdersShipLineItemsRequest (Maybe Text)
oslirShipmentId
= lens _oslirShipmentId
(\ s a -> s{_oslirShipmentId = a})
oslirLineItems :: Lens' OrdersShipLineItemsRequest [OrderShipmentLineItemShipment]
oslirLineItems
= lens _oslirLineItems
(\ s a -> s{_oslirLineItems = a})
. _Default
. _Coerce
oslirOperationId :: Lens' OrdersShipLineItemsRequest (Maybe Text)
oslirOperationId
= lens _oslirOperationId
(\ s a -> s{_oslirOperationId = a})
instance FromJSON OrdersShipLineItemsRequest where
parseJSON
= withObject "OrdersShipLineItemsRequest"
(\ o ->
OrdersShipLineItemsRequest' <$>
(o .:? "carrier") <*> (o .:? "trackingId") <*>
(o .:? "shipmentId")
<*> (o .:? "lineItems" .!= mempty)
<*> (o .:? "operationId"))
instance ToJSON OrdersShipLineItemsRequest where
toJSON OrdersShipLineItemsRequest'{..}
= object
(catMaybes
[("carrier" .=) <$> _oslirCarrier,
("trackingId" .=) <$> _oslirTrackingId,
("shipmentId" .=) <$> _oslirShipmentId,
("lineItems" .=) <$> _oslirLineItems,
("operationId" .=) <$> _oslirOperationId])
data AccountsCustomBatchResponse = AccountsCustomBatchResponse'
{ _acbrcEntries :: !(Maybe [AccountsCustomBatchResponseEntry])
, _acbrcKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsCustomBatchResponse
:: AccountsCustomBatchResponse
accountsCustomBatchResponse =
AccountsCustomBatchResponse'
{ _acbrcEntries = Nothing
, _acbrcKind = "content#accountsCustomBatchResponse"
}
acbrcEntries :: Lens' AccountsCustomBatchResponse [AccountsCustomBatchResponseEntry]
acbrcEntries
= lens _acbrcEntries (\ s a -> s{_acbrcEntries = a})
. _Default
. _Coerce
acbrcKind :: Lens' AccountsCustomBatchResponse Text
acbrcKind
= lens _acbrcKind (\ s a -> s{_acbrcKind = a})
instance FromJSON AccountsCustomBatchResponse where
parseJSON
= withObject "AccountsCustomBatchResponse"
(\ o ->
AccountsCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#accountsCustomBatchResponse"))
instance ToJSON AccountsCustomBatchResponse where
toJSON AccountsCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _acbrcEntries,
Just ("kind" .= _acbrcKind)])
data ProductTax = ProductTax'
{ _ptTaxShip :: !(Maybe Bool)
, _ptCountry :: !(Maybe Text)
, _ptPostalCode :: !(Maybe Text)
, _ptRate :: !(Maybe (Textual Double))
, _ptRegion :: !(Maybe Text)
, _ptLocationId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
productTax
:: ProductTax
productTax =
ProductTax'
{ _ptTaxShip = Nothing
, _ptCountry = Nothing
, _ptPostalCode = Nothing
, _ptRate = Nothing
, _ptRegion = Nothing
, _ptLocationId = Nothing
}
ptTaxShip :: Lens' ProductTax (Maybe Bool)
ptTaxShip
= lens _ptTaxShip (\ s a -> s{_ptTaxShip = a})
ptCountry :: Lens' ProductTax (Maybe Text)
ptCountry
= lens _ptCountry (\ s a -> s{_ptCountry = a})
ptPostalCode :: Lens' ProductTax (Maybe Text)
ptPostalCode
= lens _ptPostalCode (\ s a -> s{_ptPostalCode = a})
ptRate :: Lens' ProductTax (Maybe Double)
ptRate
= lens _ptRate (\ s a -> s{_ptRate = a}) .
mapping _Coerce
ptRegion :: Lens' ProductTax (Maybe Text)
ptRegion = lens _ptRegion (\ s a -> s{_ptRegion = a})
ptLocationId :: Lens' ProductTax (Maybe Int64)
ptLocationId
= lens _ptLocationId (\ s a -> s{_ptLocationId = a})
. mapping _Coerce
instance FromJSON ProductTax where
parseJSON
= withObject "ProductTax"
(\ o ->
ProductTax' <$>
(o .:? "taxShip") <*> (o .:? "country") <*>
(o .:? "postalCode")
<*> (o .:? "rate")
<*> (o .:? "region")
<*> (o .:? "locationId"))
instance ToJSON ProductTax where
toJSON ProductTax'{..}
= object
(catMaybes
[("taxShip" .=) <$> _ptTaxShip,
("country" .=) <$> _ptCountry,
("postalCode" .=) <$> _ptPostalCode,
("rate" .=) <$> _ptRate, ("region" .=) <$> _ptRegion,
("locationId" .=) <$> _ptLocationId])
data OrderShipment = OrderShipment'
{ _osCarrier :: !(Maybe Text)
, _osStatus :: !(Maybe Text)
, _osTrackingId :: !(Maybe Text)
, _osLineItems :: !(Maybe [OrderShipmentLineItemShipment])
, _osId :: !(Maybe Text)
, _osCreationDate :: !(Maybe Text)
, _osDeliveryDate :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderShipment
:: OrderShipment
orderShipment =
OrderShipment'
{ _osCarrier = Nothing
, _osStatus = Nothing
, _osTrackingId = Nothing
, _osLineItems = Nothing
, _osId = Nothing
, _osCreationDate = Nothing
, _osDeliveryDate = Nothing
}
osCarrier :: Lens' OrderShipment (Maybe Text)
osCarrier
= lens _osCarrier (\ s a -> s{_osCarrier = a})
osStatus :: Lens' OrderShipment (Maybe Text)
osStatus = lens _osStatus (\ s a -> s{_osStatus = a})
osTrackingId :: Lens' OrderShipment (Maybe Text)
osTrackingId
= lens _osTrackingId (\ s a -> s{_osTrackingId = a})
osLineItems :: Lens' OrderShipment [OrderShipmentLineItemShipment]
osLineItems
= lens _osLineItems (\ s a -> s{_osLineItems = a}) .
_Default
. _Coerce
osId :: Lens' OrderShipment (Maybe Text)
osId = lens _osId (\ s a -> s{_osId = a})
osCreationDate :: Lens' OrderShipment (Maybe Text)
osCreationDate
= lens _osCreationDate
(\ s a -> s{_osCreationDate = a})
osDeliveryDate :: Lens' OrderShipment (Maybe Text)
osDeliveryDate
= lens _osDeliveryDate
(\ s a -> s{_osDeliveryDate = a})
instance FromJSON OrderShipment where
parseJSON
= withObject "OrderShipment"
(\ o ->
OrderShipment' <$>
(o .:? "carrier") <*> (o .:? "status") <*>
(o .:? "trackingId")
<*> (o .:? "lineItems" .!= mempty)
<*> (o .:? "id")
<*> (o .:? "creationDate")
<*> (o .:? "deliveryDate"))
instance ToJSON OrderShipment where
toJSON OrderShipment'{..}
= object
(catMaybes
[("carrier" .=) <$> _osCarrier,
("status" .=) <$> _osStatus,
("trackingId" .=) <$> _osTrackingId,
("lineItems" .=) <$> _osLineItems,
("id" .=) <$> _osId,
("creationDate" .=) <$> _osCreationDate,
("deliveryDate" .=) <$> _osDeliveryDate])
data OrderLineItemReturnInfo = OrderLineItemReturnInfo'
{ _oliriIsReturnable :: !(Maybe Bool)
, _oliriPolicyURL :: !(Maybe Text)
, _oliriDaysToReturn :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
orderLineItemReturnInfo
:: OrderLineItemReturnInfo
orderLineItemReturnInfo =
OrderLineItemReturnInfo'
{ _oliriIsReturnable = Nothing
, _oliriPolicyURL = Nothing
, _oliriDaysToReturn = Nothing
}
oliriIsReturnable :: Lens' OrderLineItemReturnInfo (Maybe Bool)
oliriIsReturnable
= lens _oliriIsReturnable
(\ s a -> s{_oliriIsReturnable = a})
oliriPolicyURL :: Lens' OrderLineItemReturnInfo (Maybe Text)
oliriPolicyURL
= lens _oliriPolicyURL
(\ s a -> s{_oliriPolicyURL = a})
oliriDaysToReturn :: Lens' OrderLineItemReturnInfo (Maybe Int32)
oliriDaysToReturn
= lens _oliriDaysToReturn
(\ s a -> s{_oliriDaysToReturn = a})
. mapping _Coerce
instance FromJSON OrderLineItemReturnInfo where
parseJSON
= withObject "OrderLineItemReturnInfo"
(\ o ->
OrderLineItemReturnInfo' <$>
(o .:? "isReturnable") <*> (o .:? "policyUrl") <*>
(o .:? "daysToReturn"))
instance ToJSON OrderLineItemReturnInfo where
toJSON OrderLineItemReturnInfo'{..}
= object
(catMaybes
[("isReturnable" .=) <$> _oliriIsReturnable,
("policyUrl" .=) <$> _oliriPolicyURL,
("daysToReturn" .=) <$> _oliriDaysToReturn])
data AccountShippingRateTableCell = AccountShippingRateTableCell'
{ _asrtcRate :: !(Maybe Price)
, _asrtcCondition :: !(Maybe AccountShippingCondition)
} deriving (Eq,Show,Data,Typeable,Generic)
accountShippingRateTableCell
:: AccountShippingRateTableCell
accountShippingRateTableCell =
AccountShippingRateTableCell'
{ _asrtcRate = Nothing
, _asrtcCondition = Nothing
}
asrtcRate :: Lens' AccountShippingRateTableCell (Maybe Price)
asrtcRate
= lens _asrtcRate (\ s a -> s{_asrtcRate = a})
asrtcCondition :: Lens' AccountShippingRateTableCell (Maybe AccountShippingCondition)
asrtcCondition
= lens _asrtcCondition
(\ s a -> s{_asrtcCondition = a})
instance FromJSON AccountShippingRateTableCell where
parseJSON
= withObject "AccountShippingRateTableCell"
(\ o ->
AccountShippingRateTableCell' <$>
(o .:? "rate") <*> (o .:? "condition"))
instance ToJSON AccountShippingRateTableCell where
toJSON AccountShippingRateTableCell'{..}
= object
(catMaybes
[("rate" .=) <$> _asrtcRate,
("condition" .=) <$> _asrtcCondition])
data Account = Account'
{ _aaUsers :: !(Maybe [AccountUser])
, _aaKind :: !Text
, _aaSellerId :: !(Maybe Text)
, _aaName :: !(Maybe Text)
, _aaReviewsURL :: !(Maybe Text)
, _aaId :: !(Maybe (Textual Word64))
, _aaWebsiteURL :: !(Maybe Text)
, _aaAdwordsLinks :: !(Maybe [AccountAdwordsLink])
, _aaAdultContent :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
account
:: Account
account =
Account'
{ _aaUsers = Nothing
, _aaKind = "content#account"
, _aaSellerId = Nothing
, _aaName = Nothing
, _aaReviewsURL = Nothing
, _aaId = Nothing
, _aaWebsiteURL = Nothing
, _aaAdwordsLinks = Nothing
, _aaAdultContent = Nothing
}
aaUsers :: Lens' Account [AccountUser]
aaUsers
= lens _aaUsers (\ s a -> s{_aaUsers = a}) . _Default
. _Coerce
aaKind :: Lens' Account Text
aaKind = lens _aaKind (\ s a -> s{_aaKind = a})
aaSellerId :: Lens' Account (Maybe Text)
aaSellerId
= lens _aaSellerId (\ s a -> s{_aaSellerId = a})
aaName :: Lens' Account (Maybe Text)
aaName = lens _aaName (\ s a -> s{_aaName = a})
aaReviewsURL :: Lens' Account (Maybe Text)
aaReviewsURL
= lens _aaReviewsURL (\ s a -> s{_aaReviewsURL = a})
aaId :: Lens' Account (Maybe Word64)
aaId
= lens _aaId (\ s a -> s{_aaId = a}) .
mapping _Coerce
aaWebsiteURL :: Lens' Account (Maybe Text)
aaWebsiteURL
= lens _aaWebsiteURL (\ s a -> s{_aaWebsiteURL = a})
aaAdwordsLinks :: Lens' Account [AccountAdwordsLink]
aaAdwordsLinks
= lens _aaAdwordsLinks
(\ s a -> s{_aaAdwordsLinks = a})
. _Default
. _Coerce
aaAdultContent :: Lens' Account (Maybe Bool)
aaAdultContent
= lens _aaAdultContent
(\ s a -> s{_aaAdultContent = a})
instance FromJSON Account where
parseJSON
= withObject "Account"
(\ o ->
Account' <$>
(o .:? "users" .!= mempty) <*>
(o .:? "kind" .!= "content#account")
<*> (o .:? "sellerId")
<*> (o .:? "name")
<*> (o .:? "reviewsUrl")
<*> (o .:? "id")
<*> (o .:? "websiteUrl")
<*> (o .:? "adwordsLinks" .!= mempty)
<*> (o .:? "adultContent"))
instance ToJSON Account where
toJSON Account'{..}
= object
(catMaybes
[("users" .=) <$> _aaUsers, Just ("kind" .= _aaKind),
("sellerId" .=) <$> _aaSellerId,
("name" .=) <$> _aaName,
("reviewsUrl" .=) <$> _aaReviewsURL,
("id" .=) <$> _aaId,
("websiteUrl" .=) <$> _aaWebsiteURL,
("adwordsLinks" .=) <$> _aaAdwordsLinks,
("adultContent" .=) <$> _aaAdultContent])
data InventorySetRequest = InventorySetRequest'
{ _isrLoyaltyPoints :: !(Maybe LoyaltyPoints)
, _isrQuantity :: !(Maybe (Textual Word32))
, _isrInstallment :: !(Maybe Installment)
, _isrSalePrice :: !(Maybe Price)
, _isrAvailability :: !(Maybe Text)
, _isrPickup :: !(Maybe InventoryPickup)
, _isrSalePriceEffectiveDate :: !(Maybe Text)
, _isrSellOnGoogleQuantity :: !(Maybe (Textual Word32))
, _isrPrice :: !(Maybe Price)
} deriving (Eq,Show,Data,Typeable,Generic)
inventorySetRequest
:: InventorySetRequest
inventorySetRequest =
InventorySetRequest'
{ _isrLoyaltyPoints = Nothing
, _isrQuantity = Nothing
, _isrInstallment = Nothing
, _isrSalePrice = Nothing
, _isrAvailability = Nothing
, _isrPickup = Nothing
, _isrSalePriceEffectiveDate = Nothing
, _isrSellOnGoogleQuantity = Nothing
, _isrPrice = Nothing
}
isrLoyaltyPoints :: Lens' InventorySetRequest (Maybe LoyaltyPoints)
isrLoyaltyPoints
= lens _isrLoyaltyPoints
(\ s a -> s{_isrLoyaltyPoints = a})
isrQuantity :: Lens' InventorySetRequest (Maybe Word32)
isrQuantity
= lens _isrQuantity (\ s a -> s{_isrQuantity = a}) .
mapping _Coerce
isrInstallment :: Lens' InventorySetRequest (Maybe Installment)
isrInstallment
= lens _isrInstallment
(\ s a -> s{_isrInstallment = a})
isrSalePrice :: Lens' InventorySetRequest (Maybe Price)
isrSalePrice
= lens _isrSalePrice (\ s a -> s{_isrSalePrice = a})
isrAvailability :: Lens' InventorySetRequest (Maybe Text)
isrAvailability
= lens _isrAvailability
(\ s a -> s{_isrAvailability = a})
isrPickup :: Lens' InventorySetRequest (Maybe InventoryPickup)
isrPickup
= lens _isrPickup (\ s a -> s{_isrPickup = a})
isrSalePriceEffectiveDate :: Lens' InventorySetRequest (Maybe Text)
isrSalePriceEffectiveDate
= lens _isrSalePriceEffectiveDate
(\ s a -> s{_isrSalePriceEffectiveDate = a})
isrSellOnGoogleQuantity :: Lens' InventorySetRequest (Maybe Word32)
isrSellOnGoogleQuantity
= lens _isrSellOnGoogleQuantity
(\ s a -> s{_isrSellOnGoogleQuantity = a})
. mapping _Coerce
isrPrice :: Lens' InventorySetRequest (Maybe Price)
isrPrice = lens _isrPrice (\ s a -> s{_isrPrice = a})
instance FromJSON InventorySetRequest where
parseJSON
= withObject "InventorySetRequest"
(\ o ->
InventorySetRequest' <$>
(o .:? "loyaltyPoints") <*> (o .:? "quantity") <*>
(o .:? "installment")
<*> (o .:? "salePrice")
<*> (o .:? "availability")
<*> (o .:? "pickup")
<*> (o .:? "salePriceEffectiveDate")
<*> (o .:? "sellOnGoogleQuantity")
<*> (o .:? "price"))
instance ToJSON InventorySetRequest where
toJSON InventorySetRequest'{..}
= object
(catMaybes
[("loyaltyPoints" .=) <$> _isrLoyaltyPoints,
("quantity" .=) <$> _isrQuantity,
("installment" .=) <$> _isrInstallment,
("salePrice" .=) <$> _isrSalePrice,
("availability" .=) <$> _isrAvailability,
("pickup" .=) <$> _isrPickup,
("salePriceEffectiveDate" .=) <$>
_isrSalePriceEffectiveDate,
("sellOnGoogleQuantity" .=) <$>
_isrSellOnGoogleQuantity,
("price" .=) <$> _isrPrice])
data AccountShippingShippingServiceCostRule = AccountShippingShippingServiceCostRule'
{ _assscrChildren :: !(Maybe [AccountShippingShippingServiceCostRule])
, _assscrCalculationMethod :: !(Maybe AccountShippingShippingServiceCalculationMethod)
, _assscrCondition :: !(Maybe AccountShippingCondition)
} deriving (Eq,Show,Data,Typeable,Generic)
accountShippingShippingServiceCostRule
:: AccountShippingShippingServiceCostRule
accountShippingShippingServiceCostRule =
AccountShippingShippingServiceCostRule'
{ _assscrChildren = Nothing
, _assscrCalculationMethod = Nothing
, _assscrCondition = Nothing
}
assscrChildren :: Lens' AccountShippingShippingServiceCostRule [AccountShippingShippingServiceCostRule]
assscrChildren
= lens _assscrChildren
(\ s a -> s{_assscrChildren = a})
. _Default
. _Coerce
assscrCalculationMethod :: Lens' AccountShippingShippingServiceCostRule (Maybe AccountShippingShippingServiceCalculationMethod)
assscrCalculationMethod
= lens _assscrCalculationMethod
(\ s a -> s{_assscrCalculationMethod = a})
assscrCondition :: Lens' AccountShippingShippingServiceCostRule (Maybe AccountShippingCondition)
assscrCondition
= lens _assscrCondition
(\ s a -> s{_assscrCondition = a})
instance FromJSON
AccountShippingShippingServiceCostRule where
parseJSON
= withObject "AccountShippingShippingServiceCostRule"
(\ o ->
AccountShippingShippingServiceCostRule' <$>
(o .:? "children" .!= mempty) <*>
(o .:? "calculationMethod")
<*> (o .:? "condition"))
instance ToJSON
AccountShippingShippingServiceCostRule where
toJSON AccountShippingShippingServiceCostRule'{..}
= object
(catMaybes
[("children" .=) <$> _assscrChildren,
("calculationMethod" .=) <$>
_assscrCalculationMethod,
("condition" .=) <$> _assscrCondition])
data OrdersCancelLineItemRequest = OrdersCancelLineItemRequest'
{ _oclirAmount :: !(Maybe Price)
, _oclirQuantity :: !(Maybe (Textual Word32))
, _oclirLineItemId :: !(Maybe Text)
, _oclirReason :: !(Maybe Text)
, _oclirOperationId :: !(Maybe Text)
, _oclirReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCancelLineItemRequest
:: OrdersCancelLineItemRequest
ordersCancelLineItemRequest =
OrdersCancelLineItemRequest'
{ _oclirAmount = Nothing
, _oclirQuantity = Nothing
, _oclirLineItemId = Nothing
, _oclirReason = Nothing
, _oclirOperationId = Nothing
, _oclirReasonText = Nothing
}
oclirAmount :: Lens' OrdersCancelLineItemRequest (Maybe Price)
oclirAmount
= lens _oclirAmount (\ s a -> s{_oclirAmount = a})
oclirQuantity :: Lens' OrdersCancelLineItemRequest (Maybe Word32)
oclirQuantity
= lens _oclirQuantity
(\ s a -> s{_oclirQuantity = a})
. mapping _Coerce
oclirLineItemId :: Lens' OrdersCancelLineItemRequest (Maybe Text)
oclirLineItemId
= lens _oclirLineItemId
(\ s a -> s{_oclirLineItemId = a})
oclirReason :: Lens' OrdersCancelLineItemRequest (Maybe Text)
oclirReason
= lens _oclirReason (\ s a -> s{_oclirReason = a})
oclirOperationId :: Lens' OrdersCancelLineItemRequest (Maybe Text)
oclirOperationId
= lens _oclirOperationId
(\ s a -> s{_oclirOperationId = a})
oclirReasonText :: Lens' OrdersCancelLineItemRequest (Maybe Text)
oclirReasonText
= lens _oclirReasonText
(\ s a -> s{_oclirReasonText = a})
instance FromJSON OrdersCancelLineItemRequest where
parseJSON
= withObject "OrdersCancelLineItemRequest"
(\ o ->
OrdersCancelLineItemRequest' <$>
(o .:? "amount") <*> (o .:? "quantity") <*>
(o .:? "lineItemId")
<*> (o .:? "reason")
<*> (o .:? "operationId")
<*> (o .:? "reasonText"))
instance ToJSON OrdersCancelLineItemRequest where
toJSON OrdersCancelLineItemRequest'{..}
= object
(catMaybes
[("amount" .=) <$> _oclirAmount,
("quantity" .=) <$> _oclirQuantity,
("lineItemId" .=) <$> _oclirLineItemId,
("reason" .=) <$> _oclirReason,
("operationId" .=) <$> _oclirOperationId,
("reasonText" .=) <$> _oclirReasonText])
data ProductShippingWeight = ProductShippingWeight'
{ _pswValue :: !(Maybe (Textual Double))
, _pswUnit :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productShippingWeight
:: ProductShippingWeight
productShippingWeight =
ProductShippingWeight'
{ _pswValue = Nothing
, _pswUnit = Nothing
}
pswValue :: Lens' ProductShippingWeight (Maybe Double)
pswValue
= lens _pswValue (\ s a -> s{_pswValue = a}) .
mapping _Coerce
pswUnit :: Lens' ProductShippingWeight (Maybe Text)
pswUnit = lens _pswUnit (\ s a -> s{_pswUnit = a})
instance FromJSON ProductShippingWeight where
parseJSON
= withObject "ProductShippingWeight"
(\ o ->
ProductShippingWeight' <$>
(o .:? "value") <*> (o .:? "unit"))
instance ToJSON ProductShippingWeight where
toJSON ProductShippingWeight'{..}
= object
(catMaybes
[("value" .=) <$> _pswValue,
("unit" .=) <$> _pswUnit])
data AccountstatusesCustomBatchRequestEntry = AccountstatusesCustomBatchRequestEntry'
{ _acbrecMerchantId :: !(Maybe (Textual Word64))
, _acbrecAccountId :: !(Maybe (Textual Word64))
, _acbrecMethod :: !(Maybe Text)
, _acbrecBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountstatusesCustomBatchRequestEntry
:: AccountstatusesCustomBatchRequestEntry
accountstatusesCustomBatchRequestEntry =
AccountstatusesCustomBatchRequestEntry'
{ _acbrecMerchantId = Nothing
, _acbrecAccountId = Nothing
, _acbrecMethod = Nothing
, _acbrecBatchId = Nothing
}
acbrecMerchantId :: Lens' AccountstatusesCustomBatchRequestEntry (Maybe Word64)
acbrecMerchantId
= lens _acbrecMerchantId
(\ s a -> s{_acbrecMerchantId = a})
. mapping _Coerce
acbrecAccountId :: Lens' AccountstatusesCustomBatchRequestEntry (Maybe Word64)
acbrecAccountId
= lens _acbrecAccountId
(\ s a -> s{_acbrecAccountId = a})
. mapping _Coerce
acbrecMethod :: Lens' AccountstatusesCustomBatchRequestEntry (Maybe Text)
acbrecMethod
= lens _acbrecMethod (\ s a -> s{_acbrecMethod = a})
acbrecBatchId :: Lens' AccountstatusesCustomBatchRequestEntry (Maybe Word32)
acbrecBatchId
= lens _acbrecBatchId
(\ s a -> s{_acbrecBatchId = a})
. mapping _Coerce
instance FromJSON
AccountstatusesCustomBatchRequestEntry where
parseJSON
= withObject "AccountstatusesCustomBatchRequestEntry"
(\ o ->
AccountstatusesCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "accountId") <*>
(o .:? "method")
<*> (o .:? "batchId"))
instance ToJSON
AccountstatusesCustomBatchRequestEntry where
toJSON AccountstatusesCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _acbrecMerchantId,
("accountId" .=) <$> _acbrecAccountId,
("method" .=) <$> _acbrecMethod,
("batchId" .=) <$> _acbrecBatchId])
data DeliveryTime = DeliveryTime'
{ _dtMinTransitTimeInDays :: !(Maybe (Textual Word32))
, _dtMaxTransitTimeInDays :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
deliveryTime
:: DeliveryTime
deliveryTime =
DeliveryTime'
{ _dtMinTransitTimeInDays = Nothing
, _dtMaxTransitTimeInDays = Nothing
}
dtMinTransitTimeInDays :: Lens' DeliveryTime (Maybe Word32)
dtMinTransitTimeInDays
= lens _dtMinTransitTimeInDays
(\ s a -> s{_dtMinTransitTimeInDays = a})
. mapping _Coerce
dtMaxTransitTimeInDays :: Lens' DeliveryTime (Maybe Word32)
dtMaxTransitTimeInDays
= lens _dtMaxTransitTimeInDays
(\ s a -> s{_dtMaxTransitTimeInDays = a})
. mapping _Coerce
instance FromJSON DeliveryTime where
parseJSON
= withObject "DeliveryTime"
(\ o ->
DeliveryTime' <$>
(o .:? "minTransitTimeInDays") <*>
(o .:? "maxTransitTimeInDays"))
instance ToJSON DeliveryTime where
toJSON DeliveryTime'{..}
= object
(catMaybes
[("minTransitTimeInDays" .=) <$>
_dtMinTransitTimeInDays,
("maxTransitTimeInDays" .=) <$>
_dtMaxTransitTimeInDays])
data ProductstatusesCustomBatchResponseEntry = ProductstatusesCustomBatchResponseEntry'
{ _pcbreKind :: !Text
, _pcbreProductStatus :: !(Maybe ProductStatus)
, _pcbreErrors :: !(Maybe Errors)
, _pcbreBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
productstatusesCustomBatchResponseEntry
:: ProductstatusesCustomBatchResponseEntry
productstatusesCustomBatchResponseEntry =
ProductstatusesCustomBatchResponseEntry'
{ _pcbreKind = "content#productstatusesCustomBatchResponseEntry"
, _pcbreProductStatus = Nothing
, _pcbreErrors = Nothing
, _pcbreBatchId = Nothing
}
pcbreKind :: Lens' ProductstatusesCustomBatchResponseEntry Text
pcbreKind
= lens _pcbreKind (\ s a -> s{_pcbreKind = a})
pcbreProductStatus :: Lens' ProductstatusesCustomBatchResponseEntry (Maybe ProductStatus)
pcbreProductStatus
= lens _pcbreProductStatus
(\ s a -> s{_pcbreProductStatus = a})
pcbreErrors :: Lens' ProductstatusesCustomBatchResponseEntry (Maybe Errors)
pcbreErrors
= lens _pcbreErrors (\ s a -> s{_pcbreErrors = a})
pcbreBatchId :: Lens' ProductstatusesCustomBatchResponseEntry (Maybe Word32)
pcbreBatchId
= lens _pcbreBatchId (\ s a -> s{_pcbreBatchId = a})
. mapping _Coerce
instance FromJSON
ProductstatusesCustomBatchResponseEntry where
parseJSON
= withObject
"ProductstatusesCustomBatchResponseEntry"
(\ o ->
ProductstatusesCustomBatchResponseEntry' <$>
(o .:? "kind" .!=
"content#productstatusesCustomBatchResponseEntry")
<*> (o .:? "productStatus")
<*> (o .:? "errors")
<*> (o .:? "batchId"))
instance ToJSON
ProductstatusesCustomBatchResponseEntry where
toJSON ProductstatusesCustomBatchResponseEntry'{..}
= object
(catMaybes
[Just ("kind" .= _pcbreKind),
("productStatus" .=) <$> _pcbreProductStatus,
("errors" .=) <$> _pcbreErrors,
("batchId" .=) <$> _pcbreBatchId])
data OrdersCustomBatchRequestEntryCancel = OrdersCustomBatchRequestEntryCancel'
{ _ocbrecReason :: !(Maybe Text)
, _ocbrecReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchRequestEntryCancel
:: OrdersCustomBatchRequestEntryCancel
ordersCustomBatchRequestEntryCancel =
OrdersCustomBatchRequestEntryCancel'
{ _ocbrecReason = Nothing
, _ocbrecReasonText = Nothing
}
ocbrecReason :: Lens' OrdersCustomBatchRequestEntryCancel (Maybe Text)
ocbrecReason
= lens _ocbrecReason (\ s a -> s{_ocbrecReason = a})
ocbrecReasonText :: Lens' OrdersCustomBatchRequestEntryCancel (Maybe Text)
ocbrecReasonText
= lens _ocbrecReasonText
(\ s a -> s{_ocbrecReasonText = a})
instance FromJSON OrdersCustomBatchRequestEntryCancel
where
parseJSON
= withObject "OrdersCustomBatchRequestEntryCancel"
(\ o ->
OrdersCustomBatchRequestEntryCancel' <$>
(o .:? "reason") <*> (o .:? "reasonText"))
instance ToJSON OrdersCustomBatchRequestEntryCancel
where
toJSON OrdersCustomBatchRequestEntryCancel'{..}
= object
(catMaybes
[("reason" .=) <$> _ocbrecReason,
("reasonText" .=) <$> _ocbrecReasonText])
data DatafeedFormat = DatafeedFormat'
{ _dfQuotingMode :: !(Maybe Text)
, _dfFileEncoding :: !(Maybe Text)
, _dfColumnDelimiter :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedFormat
:: DatafeedFormat
datafeedFormat =
DatafeedFormat'
{ _dfQuotingMode = Nothing
, _dfFileEncoding = Nothing
, _dfColumnDelimiter = Nothing
}
dfQuotingMode :: Lens' DatafeedFormat (Maybe Text)
dfQuotingMode
= lens _dfQuotingMode
(\ s a -> s{_dfQuotingMode = a})
dfFileEncoding :: Lens' DatafeedFormat (Maybe Text)
dfFileEncoding
= lens _dfFileEncoding
(\ s a -> s{_dfFileEncoding = a})
dfColumnDelimiter :: Lens' DatafeedFormat (Maybe Text)
dfColumnDelimiter
= lens _dfColumnDelimiter
(\ s a -> s{_dfColumnDelimiter = a})
instance FromJSON DatafeedFormat where
parseJSON
= withObject "DatafeedFormat"
(\ o ->
DatafeedFormat' <$>
(o .:? "quotingMode") <*> (o .:? "fileEncoding") <*>
(o .:? "columnDelimiter"))
instance ToJSON DatafeedFormat where
toJSON DatafeedFormat'{..}
= object
(catMaybes
[("quotingMode" .=) <$> _dfQuotingMode,
("fileEncoding" .=) <$> _dfFileEncoding,
("columnDelimiter" .=) <$> _dfColumnDelimiter])
data ProductShipping = ProductShipping'
{ _psService :: !(Maybe Text)
, _psLocationGroupName :: !(Maybe Text)
, _psCountry :: !(Maybe Text)
, _psPostalCode :: !(Maybe Text)
, _psPrice :: !(Maybe Price)
, _psRegion :: !(Maybe Text)
, _psLocationId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
productShipping
:: ProductShipping
productShipping =
ProductShipping'
{ _psService = Nothing
, _psLocationGroupName = Nothing
, _psCountry = Nothing
, _psPostalCode = Nothing
, _psPrice = Nothing
, _psRegion = Nothing
, _psLocationId = Nothing
}
psService :: Lens' ProductShipping (Maybe Text)
psService
= lens _psService (\ s a -> s{_psService = a})
psLocationGroupName :: Lens' ProductShipping (Maybe Text)
psLocationGroupName
= lens _psLocationGroupName
(\ s a -> s{_psLocationGroupName = a})
psCountry :: Lens' ProductShipping (Maybe Text)
psCountry
= lens _psCountry (\ s a -> s{_psCountry = a})
psPostalCode :: Lens' ProductShipping (Maybe Text)
psPostalCode
= lens _psPostalCode (\ s a -> s{_psPostalCode = a})
psPrice :: Lens' ProductShipping (Maybe Price)
psPrice = lens _psPrice (\ s a -> s{_psPrice = a})
psRegion :: Lens' ProductShipping (Maybe Text)
psRegion = lens _psRegion (\ s a -> s{_psRegion = a})
psLocationId :: Lens' ProductShipping (Maybe Int64)
psLocationId
= lens _psLocationId (\ s a -> s{_psLocationId = a})
. mapping _Coerce
instance FromJSON ProductShipping where
parseJSON
= withObject "ProductShipping"
(\ o ->
ProductShipping' <$>
(o .:? "service") <*> (o .:? "locationGroupName") <*>
(o .:? "country")
<*> (o .:? "postalCode")
<*> (o .:? "price")
<*> (o .:? "region")
<*> (o .:? "locationId"))
instance ToJSON ProductShipping where
toJSON ProductShipping'{..}
= object
(catMaybes
[("service" .=) <$> _psService,
("locationGroupName" .=) <$> _psLocationGroupName,
("country" .=) <$> _psCountry,
("postalCode" .=) <$> _psPostalCode,
("price" .=) <$> _psPrice,
("region" .=) <$> _psRegion,
("locationId" .=) <$> _psLocationId])
newtype ShippingSettingsCustomBatchRequest = ShippingSettingsCustomBatchRequest'
{ _sscbrEntries :: Maybe [ShippingSettingsCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
shippingSettingsCustomBatchRequest
:: ShippingSettingsCustomBatchRequest
shippingSettingsCustomBatchRequest =
ShippingSettingsCustomBatchRequest'
{ _sscbrEntries = Nothing
}
sscbrEntries :: Lens' ShippingSettingsCustomBatchRequest [ShippingSettingsCustomBatchRequestEntry]
sscbrEntries
= lens _sscbrEntries (\ s a -> s{_sscbrEntries = a})
. _Default
. _Coerce
instance FromJSON ShippingSettingsCustomBatchRequest
where
parseJSON
= withObject "ShippingSettingsCustomBatchRequest"
(\ o ->
ShippingSettingsCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON ShippingSettingsCustomBatchRequest
where
toJSON ShippingSettingsCustomBatchRequest'{..}
= object
(catMaybes [("entries" .=) <$> _sscbrEntries])
data AccountshippingCustomBatchRequestEntry = AccountshippingCustomBatchRequestEntry'
{ _aaMerchantId :: !(Maybe (Textual Word64))
, _aaAccountId :: !(Maybe (Textual Word64))
, _aaMethod :: !(Maybe Text)
, _aaAccountShipping :: !(Maybe AccountShipping)
, _aaBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountshippingCustomBatchRequestEntry
:: AccountshippingCustomBatchRequestEntry
accountshippingCustomBatchRequestEntry =
AccountshippingCustomBatchRequestEntry'
{ _aaMerchantId = Nothing
, _aaAccountId = Nothing
, _aaMethod = Nothing
, _aaAccountShipping = Nothing
, _aaBatchId = Nothing
}
aaMerchantId :: Lens' AccountshippingCustomBatchRequestEntry (Maybe Word64)
aaMerchantId
= lens _aaMerchantId (\ s a -> s{_aaMerchantId = a})
. mapping _Coerce
aaAccountId :: Lens' AccountshippingCustomBatchRequestEntry (Maybe Word64)
aaAccountId
= lens _aaAccountId (\ s a -> s{_aaAccountId = a}) .
mapping _Coerce
aaMethod :: Lens' AccountshippingCustomBatchRequestEntry (Maybe Text)
aaMethod = lens _aaMethod (\ s a -> s{_aaMethod = a})
aaAccountShipping :: Lens' AccountshippingCustomBatchRequestEntry (Maybe AccountShipping)
aaAccountShipping
= lens _aaAccountShipping
(\ s a -> s{_aaAccountShipping = a})
aaBatchId :: Lens' AccountshippingCustomBatchRequestEntry (Maybe Word32)
aaBatchId
= lens _aaBatchId (\ s a -> s{_aaBatchId = a}) .
mapping _Coerce
instance FromJSON
AccountshippingCustomBatchRequestEntry where
parseJSON
= withObject "AccountshippingCustomBatchRequestEntry"
(\ o ->
AccountshippingCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "accountId") <*>
(o .:? "method")
<*> (o .:? "accountShipping")
<*> (o .:? "batchId"))
instance ToJSON
AccountshippingCustomBatchRequestEntry where
toJSON AccountshippingCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _aaMerchantId,
("accountId" .=) <$> _aaAccountId,
("method" .=) <$> _aaMethod,
("accountShipping" .=) <$> _aaAccountShipping,
("batchId" .=) <$> _aaBatchId])
newtype AccountsCustomBatchRequest = AccountsCustomBatchRequest'
{ _accEntries :: Maybe [AccountsCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
accountsCustomBatchRequest
:: AccountsCustomBatchRequest
accountsCustomBatchRequest =
AccountsCustomBatchRequest'
{ _accEntries = Nothing
}
accEntries :: Lens' AccountsCustomBatchRequest [AccountsCustomBatchRequestEntry]
accEntries
= lens _accEntries (\ s a -> s{_accEntries = a}) .
_Default
. _Coerce
instance FromJSON AccountsCustomBatchRequest where
parseJSON
= withObject "AccountsCustomBatchRequest"
(\ o ->
AccountsCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON AccountsCustomBatchRequest where
toJSON AccountsCustomBatchRequest'{..}
= object (catMaybes [("entries" .=) <$> _accEntries])
data ProductCustomAttribute = ProductCustomAttribute'
{ _pcaValue :: !(Maybe Text)
, _pcaName :: !(Maybe Text)
, _pcaType :: !(Maybe Text)
, _pcaUnit :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productCustomAttribute
:: ProductCustomAttribute
productCustomAttribute =
ProductCustomAttribute'
{ _pcaValue = Nothing
, _pcaName = Nothing
, _pcaType = Nothing
, _pcaUnit = Nothing
}
pcaValue :: Lens' ProductCustomAttribute (Maybe Text)
pcaValue = lens _pcaValue (\ s a -> s{_pcaValue = a})
pcaName :: Lens' ProductCustomAttribute (Maybe Text)
pcaName = lens _pcaName (\ s a -> s{_pcaName = a})
pcaType :: Lens' ProductCustomAttribute (Maybe Text)
pcaType = lens _pcaType (\ s a -> s{_pcaType = a})
pcaUnit :: Lens' ProductCustomAttribute (Maybe Text)
pcaUnit = lens _pcaUnit (\ s a -> s{_pcaUnit = a})
instance FromJSON ProductCustomAttribute where
parseJSON
= withObject "ProductCustomAttribute"
(\ o ->
ProductCustomAttribute' <$>
(o .:? "value") <*> (o .:? "name") <*> (o .:? "type")
<*> (o .:? "unit"))
instance ToJSON ProductCustomAttribute where
toJSON ProductCustomAttribute'{..}
= object
(catMaybes
[("value" .=) <$> _pcaValue,
("name" .=) <$> _pcaName, ("type" .=) <$> _pcaType,
("unit" .=) <$> _pcaUnit])
data AccountShippingPostalCodeRange = AccountShippingPostalCodeRange'
{ _aspcrStart :: !(Maybe Text)
, _aspcrEnd :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountShippingPostalCodeRange
:: AccountShippingPostalCodeRange
accountShippingPostalCodeRange =
AccountShippingPostalCodeRange'
{ _aspcrStart = Nothing
, _aspcrEnd = Nothing
}
aspcrStart :: Lens' AccountShippingPostalCodeRange (Maybe Text)
aspcrStart
= lens _aspcrStart (\ s a -> s{_aspcrStart = a})
aspcrEnd :: Lens' AccountShippingPostalCodeRange (Maybe Text)
aspcrEnd = lens _aspcrEnd (\ s a -> s{_aspcrEnd = a})
instance FromJSON AccountShippingPostalCodeRange
where
parseJSON
= withObject "AccountShippingPostalCodeRange"
(\ o ->
AccountShippingPostalCodeRange' <$>
(o .:? "start") <*> (o .:? "end"))
instance ToJSON AccountShippingPostalCodeRange where
toJSON AccountShippingPostalCodeRange'{..}
= object
(catMaybes
[("start" .=) <$> _aspcrStart,
("end" .=) <$> _aspcrEnd])
data OrdersListResponse = OrdersListResponse'
{ _olrNextPageToken :: !(Maybe Text)
, _olrKind :: !Text
, _olrResources :: !(Maybe [Order])
} deriving (Eq,Show,Data,Typeable,Generic)
ordersListResponse
:: OrdersListResponse
ordersListResponse =
OrdersListResponse'
{ _olrNextPageToken = Nothing
, _olrKind = "content#ordersListResponse"
, _olrResources = Nothing
}
olrNextPageToken :: Lens' OrdersListResponse (Maybe Text)
olrNextPageToken
= lens _olrNextPageToken
(\ s a -> s{_olrNextPageToken = a})
olrKind :: Lens' OrdersListResponse Text
olrKind = lens _olrKind (\ s a -> s{_olrKind = a})
olrResources :: Lens' OrdersListResponse [Order]
olrResources
= lens _olrResources (\ s a -> s{_olrResources = a})
. _Default
. _Coerce
instance FromJSON OrdersListResponse where
parseJSON
= withObject "OrdersListResponse"
(\ o ->
OrdersListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "content#ordersListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON OrdersListResponse where
toJSON OrdersListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _olrNextPageToken,
Just ("kind" .= _olrKind),
("resources" .=) <$> _olrResources])
data Headers = Headers'
{ _hNumberOfItems :: !(Maybe [Text])
, _hPostalCodeGroupNames :: !(Maybe [Text])
, _hPrices :: !(Maybe [Price])
, _hWeights :: !(Maybe [Weight])
, _hLocations :: !(Maybe [LocationIdSet])
} deriving (Eq,Show,Data,Typeable,Generic)
headers
:: Headers
headers =
Headers'
{ _hNumberOfItems = Nothing
, _hPostalCodeGroupNames = Nothing
, _hPrices = Nothing
, _hWeights = Nothing
, _hLocations = Nothing
}
hNumberOfItems :: Lens' Headers [Text]
hNumberOfItems
= lens _hNumberOfItems
(\ s a -> s{_hNumberOfItems = a})
. _Default
. _Coerce
hPostalCodeGroupNames :: Lens' Headers [Text]
hPostalCodeGroupNames
= lens _hPostalCodeGroupNames
(\ s a -> s{_hPostalCodeGroupNames = a})
. _Default
. _Coerce
hPrices :: Lens' Headers [Price]
hPrices
= lens _hPrices (\ s a -> s{_hPrices = a}) . _Default
. _Coerce
hWeights :: Lens' Headers [Weight]
hWeights
= lens _hWeights (\ s a -> s{_hWeights = a}) .
_Default
. _Coerce
hLocations :: Lens' Headers [LocationIdSet]
hLocations
= lens _hLocations (\ s a -> s{_hLocations = a}) .
_Default
. _Coerce
instance FromJSON Headers where
parseJSON
= withObject "Headers"
(\ o ->
Headers' <$>
(o .:? "numberOfItems" .!= mempty) <*>
(o .:? "postalCodeGroupNames" .!= mempty)
<*> (o .:? "prices" .!= mempty)
<*> (o .:? "weights" .!= mempty)
<*> (o .:? "locations" .!= mempty))
instance ToJSON Headers where
toJSON Headers'{..}
= object
(catMaybes
[("numberOfItems" .=) <$> _hNumberOfItems,
("postalCodeGroupNames" .=) <$>
_hPostalCodeGroupNames,
("prices" .=) <$> _hPrices,
("weights" .=) <$> _hWeights,
("locations" .=) <$> _hLocations])
data OrdersShipLineItemsResponse = OrdersShipLineItemsResponse'
{ _oslirKind :: !Text
, _oslirExecutionStatus :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersShipLineItemsResponse
:: OrdersShipLineItemsResponse
ordersShipLineItemsResponse =
OrdersShipLineItemsResponse'
{ _oslirKind = "content#ordersShipLineItemsResponse"
, _oslirExecutionStatus = Nothing
}
oslirKind :: Lens' OrdersShipLineItemsResponse Text
oslirKind
= lens _oslirKind (\ s a -> s{_oslirKind = a})
oslirExecutionStatus :: Lens' OrdersShipLineItemsResponse (Maybe Text)
oslirExecutionStatus
= lens _oslirExecutionStatus
(\ s a -> s{_oslirExecutionStatus = a})
instance FromJSON OrdersShipLineItemsResponse where
parseJSON
= withObject "OrdersShipLineItemsResponse"
(\ o ->
OrdersShipLineItemsResponse' <$>
(o .:? "kind" .!=
"content#ordersShipLineItemsResponse")
<*> (o .:? "executionStatus"))
instance ToJSON OrdersShipLineItemsResponse where
toJSON OrdersShipLineItemsResponse'{..}
= object
(catMaybes
[Just ("kind" .= _oslirKind),
("executionStatus" .=) <$> _oslirExecutionStatus])
data AccountShippingShippingService = AccountShippingShippingService'
{ _asssCostRuleTree :: !(Maybe AccountShippingShippingServiceCostRule)
, _asssSaleCountry :: !(Maybe Text)
, _asssMaxDaysInTransit :: !(Maybe (Textual Word64))
, _asssCalculationMethod :: !(Maybe AccountShippingShippingServiceCalculationMethod)
, _asssActive :: !(Maybe Bool)
, _asssName :: !(Maybe Text)
, _asssMinDaysInTransit :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
accountShippingShippingService
:: AccountShippingShippingService
accountShippingShippingService =
AccountShippingShippingService'
{ _asssCostRuleTree = Nothing
, _asssSaleCountry = Nothing
, _asssMaxDaysInTransit = Nothing
, _asssCalculationMethod = Nothing
, _asssActive = Nothing
, _asssName = Nothing
, _asssMinDaysInTransit = Nothing
}
asssCostRuleTree :: Lens' AccountShippingShippingService (Maybe AccountShippingShippingServiceCostRule)
asssCostRuleTree
= lens _asssCostRuleTree
(\ s a -> s{_asssCostRuleTree = a})
asssSaleCountry :: Lens' AccountShippingShippingService (Maybe Text)
asssSaleCountry
= lens _asssSaleCountry
(\ s a -> s{_asssSaleCountry = a})
asssMaxDaysInTransit :: Lens' AccountShippingShippingService (Maybe Word64)
asssMaxDaysInTransit
= lens _asssMaxDaysInTransit
(\ s a -> s{_asssMaxDaysInTransit = a})
. mapping _Coerce
asssCalculationMethod :: Lens' AccountShippingShippingService (Maybe AccountShippingShippingServiceCalculationMethod)
asssCalculationMethod
= lens _asssCalculationMethod
(\ s a -> s{_asssCalculationMethod = a})
asssActive :: Lens' AccountShippingShippingService (Maybe Bool)
asssActive
= lens _asssActive (\ s a -> s{_asssActive = a})
asssName :: Lens' AccountShippingShippingService (Maybe Text)
asssName = lens _asssName (\ s a -> s{_asssName = a})
asssMinDaysInTransit :: Lens' AccountShippingShippingService (Maybe Word64)
asssMinDaysInTransit
= lens _asssMinDaysInTransit
(\ s a -> s{_asssMinDaysInTransit = a})
. mapping _Coerce
instance FromJSON AccountShippingShippingService
where
parseJSON
= withObject "AccountShippingShippingService"
(\ o ->
AccountShippingShippingService' <$>
(o .:? "costRuleTree") <*> (o .:? "saleCountry") <*>
(o .:? "maxDaysInTransit")
<*> (o .:? "calculationMethod")
<*> (o .:? "active")
<*> (o .:? "name")
<*> (o .:? "minDaysInTransit"))
instance ToJSON AccountShippingShippingService where
toJSON AccountShippingShippingService'{..}
= object
(catMaybes
[("costRuleTree" .=) <$> _asssCostRuleTree,
("saleCountry" .=) <$> _asssSaleCountry,
("maxDaysInTransit" .=) <$> _asssMaxDaysInTransit,
("calculationMethod" .=) <$> _asssCalculationMethod,
("active" .=) <$> _asssActive,
("name" .=) <$> _asssName,
("minDaysInTransit" .=) <$> _asssMinDaysInTransit])
data AccountShippingRateTable = AccountShippingRateTable'
{ _asrtSaleCountry :: !(Maybe Text)
, _asrtContent :: !(Maybe [AccountShippingRateTableCell])
, _asrtName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountShippingRateTable
:: AccountShippingRateTable
accountShippingRateTable =
AccountShippingRateTable'
{ _asrtSaleCountry = Nothing
, _asrtContent = Nothing
, _asrtName = Nothing
}
asrtSaleCountry :: Lens' AccountShippingRateTable (Maybe Text)
asrtSaleCountry
= lens _asrtSaleCountry
(\ s a -> s{_asrtSaleCountry = a})
asrtContent :: Lens' AccountShippingRateTable [AccountShippingRateTableCell]
asrtContent
= lens _asrtContent (\ s a -> s{_asrtContent = a}) .
_Default
. _Coerce
asrtName :: Lens' AccountShippingRateTable (Maybe Text)
asrtName = lens _asrtName (\ s a -> s{_asrtName = a})
instance FromJSON AccountShippingRateTable where
parseJSON
= withObject "AccountShippingRateTable"
(\ o ->
AccountShippingRateTable' <$>
(o .:? "saleCountry") <*>
(o .:? "content" .!= mempty)
<*> (o .:? "name"))
instance ToJSON AccountShippingRateTable where
toJSON AccountShippingRateTable'{..}
= object
(catMaybes
[("saleCountry" .=) <$> _asrtSaleCountry,
("content" .=) <$> _asrtContent,
("name" .=) <$> _asrtName])
data AccountshippingCustomBatchResponse = AccountshippingCustomBatchResponse'
{ _acccEntries :: !(Maybe [AccountshippingCustomBatchResponseEntry])
, _acccKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountshippingCustomBatchResponse
:: AccountshippingCustomBatchResponse
accountshippingCustomBatchResponse =
AccountshippingCustomBatchResponse'
{ _acccEntries = Nothing
, _acccKind = "content#accountshippingCustomBatchResponse"
}
acccEntries :: Lens' AccountshippingCustomBatchResponse [AccountshippingCustomBatchResponseEntry]
acccEntries
= lens _acccEntries (\ s a -> s{_acccEntries = a}) .
_Default
. _Coerce
acccKind :: Lens' AccountshippingCustomBatchResponse Text
acccKind = lens _acccKind (\ s a -> s{_acccKind = a})
instance FromJSON AccountshippingCustomBatchResponse
where
parseJSON
= withObject "AccountshippingCustomBatchResponse"
(\ o ->
AccountshippingCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#accountshippingCustomBatchResponse"))
instance ToJSON AccountshippingCustomBatchResponse
where
toJSON AccountshippingCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _acccEntries,
Just ("kind" .= _acccKind)])
data ShippingSettings = ShippingSettings'
{ _ssPostalCodeGroups :: !(Maybe [PostalCodeGroup])
, _ssAccountId :: !(Maybe (Textual Word64))
, _ssServices :: !(Maybe [Service])
} deriving (Eq,Show,Data,Typeable,Generic)
shippingSettings
:: ShippingSettings
shippingSettings =
ShippingSettings'
{ _ssPostalCodeGroups = Nothing
, _ssAccountId = Nothing
, _ssServices = Nothing
}
ssPostalCodeGroups :: Lens' ShippingSettings [PostalCodeGroup]
ssPostalCodeGroups
= lens _ssPostalCodeGroups
(\ s a -> s{_ssPostalCodeGroups = a})
. _Default
. _Coerce
ssAccountId :: Lens' ShippingSettings (Maybe Word64)
ssAccountId
= lens _ssAccountId (\ s a -> s{_ssAccountId = a}) .
mapping _Coerce
ssServices :: Lens' ShippingSettings [Service]
ssServices
= lens _ssServices (\ s a -> s{_ssServices = a}) .
_Default
. _Coerce
instance FromJSON ShippingSettings where
parseJSON
= withObject "ShippingSettings"
(\ o ->
ShippingSettings' <$>
(o .:? "postalCodeGroups" .!= mempty) <*>
(o .:? "accountId")
<*> (o .:? "services" .!= mempty))
instance ToJSON ShippingSettings where
toJSON ShippingSettings'{..}
= object
(catMaybes
[("postalCodeGroups" .=) <$> _ssPostalCodeGroups,
("accountId" .=) <$> _ssAccountId,
("services" .=) <$> _ssServices])
data PostalCodeRange = PostalCodeRange'
{ _pcrPostalCodeRangeBegin :: !(Maybe Text)
, _pcrPostalCodeRangeEnd :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
postalCodeRange
:: PostalCodeRange
postalCodeRange =
PostalCodeRange'
{ _pcrPostalCodeRangeBegin = Nothing
, _pcrPostalCodeRangeEnd = Nothing
}
pcrPostalCodeRangeBegin :: Lens' PostalCodeRange (Maybe Text)
pcrPostalCodeRangeBegin
= lens _pcrPostalCodeRangeBegin
(\ s a -> s{_pcrPostalCodeRangeBegin = a})
pcrPostalCodeRangeEnd :: Lens' PostalCodeRange (Maybe Text)
pcrPostalCodeRangeEnd
= lens _pcrPostalCodeRangeEnd
(\ s a -> s{_pcrPostalCodeRangeEnd = a})
instance FromJSON PostalCodeRange where
parseJSON
= withObject "PostalCodeRange"
(\ o ->
PostalCodeRange' <$>
(o .:? "postalCodeRangeBegin") <*>
(o .:? "postalCodeRangeEnd"))
instance ToJSON PostalCodeRange where
toJSON PostalCodeRange'{..}
= object
(catMaybes
[("postalCodeRangeBegin" .=) <$>
_pcrPostalCodeRangeBegin,
("postalCodeRangeEnd" .=) <$>
_pcrPostalCodeRangeEnd])
data OrdersUpdateShipmentResponse = OrdersUpdateShipmentResponse'
{ _ousrKind :: !Text
, _ousrExecutionStatus :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersUpdateShipmentResponse
:: OrdersUpdateShipmentResponse
ordersUpdateShipmentResponse =
OrdersUpdateShipmentResponse'
{ _ousrKind = "content#ordersUpdateShipmentResponse"
, _ousrExecutionStatus = Nothing
}
ousrKind :: Lens' OrdersUpdateShipmentResponse Text
ousrKind = lens _ousrKind (\ s a -> s{_ousrKind = a})
ousrExecutionStatus :: Lens' OrdersUpdateShipmentResponse (Maybe Text)
ousrExecutionStatus
= lens _ousrExecutionStatus
(\ s a -> s{_ousrExecutionStatus = a})
instance FromJSON OrdersUpdateShipmentResponse where
parseJSON
= withObject "OrdersUpdateShipmentResponse"
(\ o ->
OrdersUpdateShipmentResponse' <$>
(o .:? "kind" .!=
"content#ordersUpdateShipmentResponse")
<*> (o .:? "executionStatus"))
instance ToJSON OrdersUpdateShipmentResponse where
toJSON OrdersUpdateShipmentResponse'{..}
= object
(catMaybes
[Just ("kind" .= _ousrKind),
("executionStatus" .=) <$> _ousrExecutionStatus])
newtype ProductstatusesCustomBatchRequest = ProductstatusesCustomBatchRequest'
{ _proEntries :: Maybe [ProductstatusesCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
productstatusesCustomBatchRequest
:: ProductstatusesCustomBatchRequest
productstatusesCustomBatchRequest =
ProductstatusesCustomBatchRequest'
{ _proEntries = Nothing
}
proEntries :: Lens' ProductstatusesCustomBatchRequest [ProductstatusesCustomBatchRequestEntry]
proEntries
= lens _proEntries (\ s a -> s{_proEntries = a}) .
_Default
. _Coerce
instance FromJSON ProductstatusesCustomBatchRequest
where
parseJSON
= withObject "ProductstatusesCustomBatchRequest"
(\ o ->
ProductstatusesCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON ProductstatusesCustomBatchRequest
where
toJSON ProductstatusesCustomBatchRequest'{..}
= object (catMaybes [("entries" .=) <$> _proEntries])
data OrdersReturnLineItemResponse = OrdersReturnLineItemResponse'
{ _orlirKind :: !Text
, _orlirExecutionStatus :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersReturnLineItemResponse
:: OrdersReturnLineItemResponse
ordersReturnLineItemResponse =
OrdersReturnLineItemResponse'
{ _orlirKind = "content#ordersReturnLineItemResponse"
, _orlirExecutionStatus = Nothing
}
orlirKind :: Lens' OrdersReturnLineItemResponse Text
orlirKind
= lens _orlirKind (\ s a -> s{_orlirKind = a})
orlirExecutionStatus :: Lens' OrdersReturnLineItemResponse (Maybe Text)
orlirExecutionStatus
= lens _orlirExecutionStatus
(\ s a -> s{_orlirExecutionStatus = a})
instance FromJSON OrdersReturnLineItemResponse where
parseJSON
= withObject "OrdersReturnLineItemResponse"
(\ o ->
OrdersReturnLineItemResponse' <$>
(o .:? "kind" .!=
"content#ordersReturnLineItemResponse")
<*> (o .:? "executionStatus"))
instance ToJSON OrdersReturnLineItemResponse where
toJSON OrdersReturnLineItemResponse'{..}
= object
(catMaybes
[Just ("kind" .= _orlirKind),
("executionStatus" .=) <$> _orlirExecutionStatus])
data ProductCustomGroup = ProductCustomGroup'
{ _pName :: !(Maybe Text)
, _pAttributes :: !(Maybe [ProductCustomAttribute])
} deriving (Eq,Show,Data,Typeable,Generic)
productCustomGroup
:: ProductCustomGroup
productCustomGroup =
ProductCustomGroup'
{ _pName = Nothing
, _pAttributes = Nothing
}
pName :: Lens' ProductCustomGroup (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a})
pAttributes :: Lens' ProductCustomGroup [ProductCustomAttribute]
pAttributes
= lens _pAttributes (\ s a -> s{_pAttributes = a}) .
_Default
. _Coerce
instance FromJSON ProductCustomGroup where
parseJSON
= withObject "ProductCustomGroup"
(\ o ->
ProductCustomGroup' <$>
(o .:? "name") <*> (o .:? "attributes" .!= mempty))
instance ToJSON ProductCustomGroup where
toJSON ProductCustomGroup'{..}
= object
(catMaybes
[("name" .=) <$> _pName,
("attributes" .=) <$> _pAttributes])
data AccountstatusesCustomBatchResponse = AccountstatusesCustomBatchResponse'
{ _acbr1Entries :: !(Maybe [AccountstatusesCustomBatchResponseEntry])
, _acbr1Kind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountstatusesCustomBatchResponse
:: AccountstatusesCustomBatchResponse
accountstatusesCustomBatchResponse =
AccountstatusesCustomBatchResponse'
{ _acbr1Entries = Nothing
, _acbr1Kind = "content#accountstatusesCustomBatchResponse"
}
acbr1Entries :: Lens' AccountstatusesCustomBatchResponse [AccountstatusesCustomBatchResponseEntry]
acbr1Entries
= lens _acbr1Entries (\ s a -> s{_acbr1Entries = a})
. _Default
. _Coerce
acbr1Kind :: Lens' AccountstatusesCustomBatchResponse Text
acbr1Kind
= lens _acbr1Kind (\ s a -> s{_acbr1Kind = a})
instance FromJSON AccountstatusesCustomBatchResponse
where
parseJSON
= withObject "AccountstatusesCustomBatchResponse"
(\ o ->
AccountstatusesCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#accountstatusesCustomBatchResponse"))
instance ToJSON AccountstatusesCustomBatchResponse
where
toJSON AccountstatusesCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _acbr1Entries,
Just ("kind" .= _acbr1Kind)])
data ShippingSettingsCustomBatchResponseEntry = ShippingSettingsCustomBatchResponseEntry'
{ _sKind :: !Text
, _sShippingSettings :: !(Maybe ShippingSettings)
, _sErrors :: !(Maybe Errors)
, _sBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
shippingSettingsCustomBatchResponseEntry
:: ShippingSettingsCustomBatchResponseEntry
shippingSettingsCustomBatchResponseEntry =
ShippingSettingsCustomBatchResponseEntry'
{ _sKind = "content#shippingsettingsCustomBatchResponseEntry"
, _sShippingSettings = Nothing
, _sErrors = Nothing
, _sBatchId = Nothing
}
sKind :: Lens' ShippingSettingsCustomBatchResponseEntry Text
sKind = lens _sKind (\ s a -> s{_sKind = a})
sShippingSettings :: Lens' ShippingSettingsCustomBatchResponseEntry (Maybe ShippingSettings)
sShippingSettings
= lens _sShippingSettings
(\ s a -> s{_sShippingSettings = a})
sErrors :: Lens' ShippingSettingsCustomBatchResponseEntry (Maybe Errors)
sErrors = lens _sErrors (\ s a -> s{_sErrors = a})
sBatchId :: Lens' ShippingSettingsCustomBatchResponseEntry (Maybe Word32)
sBatchId
= lens _sBatchId (\ s a -> s{_sBatchId = a}) .
mapping _Coerce
instance FromJSON
ShippingSettingsCustomBatchResponseEntry where
parseJSON
= withObject
"ShippingSettingsCustomBatchResponseEntry"
(\ o ->
ShippingSettingsCustomBatchResponseEntry' <$>
(o .:? "kind" .!=
"content#shippingsettingsCustomBatchResponseEntry")
<*> (o .:? "shippingSettings")
<*> (o .:? "errors")
<*> (o .:? "batchId"))
instance ToJSON
ShippingSettingsCustomBatchResponseEntry where
toJSON ShippingSettingsCustomBatchResponseEntry'{..}
= object
(catMaybes
[Just ("kind" .= _sKind),
("shippingSettings" .=) <$> _sShippingSettings,
("errors" .=) <$> _sErrors,
("batchId" .=) <$> _sBatchId])
data ProductStatus = ProductStatus'
{ _psDataQualityIssues :: !(Maybe [ProductStatusDataQualityIssue])
, _psKind :: !Text
, _psLink :: !(Maybe Text)
, _psDestinationStatuses :: !(Maybe [ProductStatusDestinationStatus])
, _psLastUpdateDate :: !(Maybe Text)
, _psCreationDate :: !(Maybe Text)
, _psTitle :: !(Maybe Text)
, _psGoogleExpirationDate :: !(Maybe Text)
, _psProductId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productStatus
:: ProductStatus
productStatus =
ProductStatus'
{ _psDataQualityIssues = Nothing
, _psKind = "content#productStatus"
, _psLink = Nothing
, _psDestinationStatuses = Nothing
, _psLastUpdateDate = Nothing
, _psCreationDate = Nothing
, _psTitle = Nothing
, _psGoogleExpirationDate = Nothing
, _psProductId = Nothing
}
psDataQualityIssues :: Lens' ProductStatus [ProductStatusDataQualityIssue]
psDataQualityIssues
= lens _psDataQualityIssues
(\ s a -> s{_psDataQualityIssues = a})
. _Default
. _Coerce
psKind :: Lens' ProductStatus Text
psKind = lens _psKind (\ s a -> s{_psKind = a})
psLink :: Lens' ProductStatus (Maybe Text)
psLink = lens _psLink (\ s a -> s{_psLink = a})
psDestinationStatuses :: Lens' ProductStatus [ProductStatusDestinationStatus]
psDestinationStatuses
= lens _psDestinationStatuses
(\ s a -> s{_psDestinationStatuses = a})
. _Default
. _Coerce
psLastUpdateDate :: Lens' ProductStatus (Maybe Text)
psLastUpdateDate
= lens _psLastUpdateDate
(\ s a -> s{_psLastUpdateDate = a})
psCreationDate :: Lens' ProductStatus (Maybe Text)
psCreationDate
= lens _psCreationDate
(\ s a -> s{_psCreationDate = a})
psTitle :: Lens' ProductStatus (Maybe Text)
psTitle = lens _psTitle (\ s a -> s{_psTitle = a})
psGoogleExpirationDate :: Lens' ProductStatus (Maybe Text)
psGoogleExpirationDate
= lens _psGoogleExpirationDate
(\ s a -> s{_psGoogleExpirationDate = a})
psProductId :: Lens' ProductStatus (Maybe Text)
psProductId
= lens _psProductId (\ s a -> s{_psProductId = a})
instance FromJSON ProductStatus where
parseJSON
= withObject "ProductStatus"
(\ o ->
ProductStatus' <$>
(o .:? "dataQualityIssues" .!= mempty) <*>
(o .:? "kind" .!= "content#productStatus")
<*> (o .:? "link")
<*> (o .:? "destinationStatuses" .!= mempty)
<*> (o .:? "lastUpdateDate")
<*> (o .:? "creationDate")
<*> (o .:? "title")
<*> (o .:? "googleExpirationDate")
<*> (o .:? "productId"))
instance ToJSON ProductStatus where
toJSON ProductStatus'{..}
= object
(catMaybes
[("dataQualityIssues" .=) <$> _psDataQualityIssues,
Just ("kind" .= _psKind), ("link" .=) <$> _psLink,
("destinationStatuses" .=) <$>
_psDestinationStatuses,
("lastUpdateDate" .=) <$> _psLastUpdateDate,
("creationDate" .=) <$> _psCreationDate,
("title" .=) <$> _psTitle,
("googleExpirationDate" .=) <$>
_psGoogleExpirationDate,
("productId" .=) <$> _psProductId])
data AccountstatusesListResponse = AccountstatusesListResponse'
{ _alrlNextPageToken :: !(Maybe Text)
, _alrlKind :: !Text
, _alrlResources :: !(Maybe [AccountStatus])
} deriving (Eq,Show,Data,Typeable,Generic)
accountstatusesListResponse
:: AccountstatusesListResponse
accountstatusesListResponse =
AccountstatusesListResponse'
{ _alrlNextPageToken = Nothing
, _alrlKind = "content#accountstatusesListResponse"
, _alrlResources = Nothing
}
alrlNextPageToken :: Lens' AccountstatusesListResponse (Maybe Text)
alrlNextPageToken
= lens _alrlNextPageToken
(\ s a -> s{_alrlNextPageToken = a})
alrlKind :: Lens' AccountstatusesListResponse Text
alrlKind = lens _alrlKind (\ s a -> s{_alrlKind = a})
alrlResources :: Lens' AccountstatusesListResponse [AccountStatus]
alrlResources
= lens _alrlResources
(\ s a -> s{_alrlResources = a})
. _Default
. _Coerce
instance FromJSON AccountstatusesListResponse where
parseJSON
= withObject "AccountstatusesListResponse"
(\ o ->
AccountstatusesListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"content#accountstatusesListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON AccountstatusesListResponse where
toJSON AccountstatusesListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _alrlNextPageToken,
Just ("kind" .= _alrlKind),
("resources" .=) <$> _alrlResources])
newtype AccounttaxCustomBatchRequest = AccounttaxCustomBatchRequest'
{ _aaEntries :: Maybe [AccounttaxCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
accounttaxCustomBatchRequest
:: AccounttaxCustomBatchRequest
accounttaxCustomBatchRequest =
AccounttaxCustomBatchRequest'
{ _aaEntries = Nothing
}
aaEntries :: Lens' AccounttaxCustomBatchRequest [AccounttaxCustomBatchRequestEntry]
aaEntries
= lens _aaEntries (\ s a -> s{_aaEntries = a}) .
_Default
. _Coerce
instance FromJSON AccounttaxCustomBatchRequest where
parseJSON
= withObject "AccounttaxCustomBatchRequest"
(\ o ->
AccounttaxCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON AccounttaxCustomBatchRequest where
toJSON AccounttaxCustomBatchRequest'{..}
= object (catMaybes [("entries" .=) <$> _aaEntries])
data ProductsCustomBatchRequestEntry = ProductsCustomBatchRequestEntry'
{ _pMerchantId :: !(Maybe (Textual Word64))
, _pMethod :: !(Maybe Text)
, _pProduct :: !(Maybe Product)
, _pProductId :: !(Maybe Text)
, _pBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
productsCustomBatchRequestEntry
:: ProductsCustomBatchRequestEntry
productsCustomBatchRequestEntry =
ProductsCustomBatchRequestEntry'
{ _pMerchantId = Nothing
, _pMethod = Nothing
, _pProduct = Nothing
, _pProductId = Nothing
, _pBatchId = Nothing
}
pMerchantId :: Lens' ProductsCustomBatchRequestEntry (Maybe Word64)
pMerchantId
= lens _pMerchantId (\ s a -> s{_pMerchantId = a}) .
mapping _Coerce
pMethod :: Lens' ProductsCustomBatchRequestEntry (Maybe Text)
pMethod = lens _pMethod (\ s a -> s{_pMethod = a})
pProduct :: Lens' ProductsCustomBatchRequestEntry (Maybe Product)
pProduct = lens _pProduct (\ s a -> s{_pProduct = a})
pProductId :: Lens' ProductsCustomBatchRequestEntry (Maybe Text)
pProductId
= lens _pProductId (\ s a -> s{_pProductId = a})
pBatchId :: Lens' ProductsCustomBatchRequestEntry (Maybe Word32)
pBatchId
= lens _pBatchId (\ s a -> s{_pBatchId = a}) .
mapping _Coerce
instance FromJSON ProductsCustomBatchRequestEntry
where
parseJSON
= withObject "ProductsCustomBatchRequestEntry"
(\ o ->
ProductsCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "method") <*>
(o .:? "product")
<*> (o .:? "productId")
<*> (o .:? "batchId"))
instance ToJSON ProductsCustomBatchRequestEntry where
toJSON ProductsCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _pMerchantId,
("method" .=) <$> _pMethod,
("product" .=) <$> _pProduct,
("productId" .=) <$> _pProductId,
("batchId" .=) <$> _pBatchId])
data DatafeedstatusesCustomBatchRequestEntry = DatafeedstatusesCustomBatchRequestEntry'
{ _dMerchantId :: !(Maybe (Textual Word64))
, _dMethod :: !(Maybe Text)
, _dDatafeedId :: !(Maybe (Textual Word64))
, _dBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedstatusesCustomBatchRequestEntry
:: DatafeedstatusesCustomBatchRequestEntry
datafeedstatusesCustomBatchRequestEntry =
DatafeedstatusesCustomBatchRequestEntry'
{ _dMerchantId = Nothing
, _dMethod = Nothing
, _dDatafeedId = Nothing
, _dBatchId = Nothing
}
dMerchantId :: Lens' DatafeedstatusesCustomBatchRequestEntry (Maybe Word64)
dMerchantId
= lens _dMerchantId (\ s a -> s{_dMerchantId = a}) .
mapping _Coerce
dMethod :: Lens' DatafeedstatusesCustomBatchRequestEntry (Maybe Text)
dMethod = lens _dMethod (\ s a -> s{_dMethod = a})
dDatafeedId :: Lens' DatafeedstatusesCustomBatchRequestEntry (Maybe Word64)
dDatafeedId
= lens _dDatafeedId (\ s a -> s{_dDatafeedId = a}) .
mapping _Coerce
dBatchId :: Lens' DatafeedstatusesCustomBatchRequestEntry (Maybe Word32)
dBatchId
= lens _dBatchId (\ s a -> s{_dBatchId = a}) .
mapping _Coerce
instance FromJSON
DatafeedstatusesCustomBatchRequestEntry where
parseJSON
= withObject
"DatafeedstatusesCustomBatchRequestEntry"
(\ o ->
DatafeedstatusesCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "method") <*>
(o .:? "datafeedId")
<*> (o .:? "batchId"))
instance ToJSON
DatafeedstatusesCustomBatchRequestEntry where
toJSON DatafeedstatusesCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _dMerchantId,
("method" .=) <$> _dMethod,
("datafeedId" .=) <$> _dDatafeedId,
("batchId" .=) <$> _dBatchId])
data OrderCustomer = OrderCustomer'
{ _ocFullName :: !(Maybe Text)
, _ocEmail :: !(Maybe Text)
, _ocExplicitMarketingPreference :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
orderCustomer
:: OrderCustomer
orderCustomer =
OrderCustomer'
{ _ocFullName = Nothing
, _ocEmail = Nothing
, _ocExplicitMarketingPreference = Nothing
}
ocFullName :: Lens' OrderCustomer (Maybe Text)
ocFullName
= lens _ocFullName (\ s a -> s{_ocFullName = a})
ocEmail :: Lens' OrderCustomer (Maybe Text)
ocEmail = lens _ocEmail (\ s a -> s{_ocEmail = a})
ocExplicitMarketingPreference :: Lens' OrderCustomer (Maybe Bool)
ocExplicitMarketingPreference
= lens _ocExplicitMarketingPreference
(\ s a -> s{_ocExplicitMarketingPreference = a})
instance FromJSON OrderCustomer where
parseJSON
= withObject "OrderCustomer"
(\ o ->
OrderCustomer' <$>
(o .:? "fullName") <*> (o .:? "email") <*>
(o .:? "explicitMarketingPreference"))
instance ToJSON OrderCustomer where
toJSON OrderCustomer'{..}
= object
(catMaybes
[("fullName" .=) <$> _ocFullName,
("email" .=) <$> _ocEmail,
("explicitMarketingPreference" .=) <$>
_ocExplicitMarketingPreference])
data InventoryCustomBatchResponseEntry = InventoryCustomBatchResponseEntry'
{ _icbreKind :: !Text
, _icbreErrors :: !(Maybe Errors)
, _icbreBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
inventoryCustomBatchResponseEntry
:: InventoryCustomBatchResponseEntry
inventoryCustomBatchResponseEntry =
InventoryCustomBatchResponseEntry'
{ _icbreKind = "content#inventoryCustomBatchResponseEntry"
, _icbreErrors = Nothing
, _icbreBatchId = Nothing
}
icbreKind :: Lens' InventoryCustomBatchResponseEntry Text
icbreKind
= lens _icbreKind (\ s a -> s{_icbreKind = a})
icbreErrors :: Lens' InventoryCustomBatchResponseEntry (Maybe Errors)
icbreErrors
= lens _icbreErrors (\ s a -> s{_icbreErrors = a})
icbreBatchId :: Lens' InventoryCustomBatchResponseEntry (Maybe Word32)
icbreBatchId
= lens _icbreBatchId (\ s a -> s{_icbreBatchId = a})
. mapping _Coerce
instance FromJSON InventoryCustomBatchResponseEntry
where
parseJSON
= withObject "InventoryCustomBatchResponseEntry"
(\ o ->
InventoryCustomBatchResponseEntry' <$>
(o .:? "kind" .!=
"content#inventoryCustomBatchResponseEntry")
<*> (o .:? "errors")
<*> (o .:? "batchId"))
instance ToJSON InventoryCustomBatchResponseEntry
where
toJSON InventoryCustomBatchResponseEntry'{..}
= object
(catMaybes
[Just ("kind" .= _icbreKind),
("errors" .=) <$> _icbreErrors,
("batchId" .=) <$> _icbreBatchId])
data AccountshippingListResponse = AccountshippingListResponse'
{ _alr1NextPageToken :: !(Maybe Text)
, _alr1Kind :: !Text
, _alr1Resources :: !(Maybe [AccountShipping])
} deriving (Eq,Show,Data,Typeable,Generic)
accountshippingListResponse
:: AccountshippingListResponse
accountshippingListResponse =
AccountshippingListResponse'
{ _alr1NextPageToken = Nothing
, _alr1Kind = "content#accountshippingListResponse"
, _alr1Resources = Nothing
}
alr1NextPageToken :: Lens' AccountshippingListResponse (Maybe Text)
alr1NextPageToken
= lens _alr1NextPageToken
(\ s a -> s{_alr1NextPageToken = a})
alr1Kind :: Lens' AccountshippingListResponse Text
alr1Kind = lens _alr1Kind (\ s a -> s{_alr1Kind = a})
alr1Resources :: Lens' AccountshippingListResponse [AccountShipping]
alr1Resources
= lens _alr1Resources
(\ s a -> s{_alr1Resources = a})
. _Default
. _Coerce
instance FromJSON AccountshippingListResponse where
parseJSON
= withObject "AccountshippingListResponse"
(\ o ->
AccountshippingListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"content#accountshippingListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON AccountshippingListResponse where
toJSON AccountshippingListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _alr1NextPageToken,
Just ("kind" .= _alr1Kind),
("resources" .=) <$> _alr1Resources])
newtype LocationIdSet = LocationIdSet'
{ _lisLocationIds :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
locationIdSet
:: LocationIdSet
locationIdSet =
LocationIdSet'
{ _lisLocationIds = Nothing
}
lisLocationIds :: Lens' LocationIdSet [Text]
lisLocationIds
= lens _lisLocationIds
(\ s a -> s{_lisLocationIds = a})
. _Default
. _Coerce
instance FromJSON LocationIdSet where
parseJSON
= withObject "LocationIdSet"
(\ o ->
LocationIdSet' <$> (o .:? "locationIds" .!= mempty))
instance ToJSON LocationIdSet where
toJSON LocationIdSet'{..}
= object
(catMaybes [("locationIds" .=) <$> _lisLocationIds])
newtype Row = Row'
{ _rCells :: Maybe [Value]
} deriving (Eq,Show,Data,Typeable,Generic)
row
:: Row
row =
Row'
{ _rCells = Nothing
}
rCells :: Lens' Row [Value]
rCells
= lens _rCells (\ s a -> s{_rCells = a}) . _Default .
_Coerce
instance FromJSON Row where
parseJSON
= withObject "Row"
(\ o -> Row' <$> (o .:? "cells" .!= mempty))
instance ToJSON Row where
toJSON Row'{..}
= object (catMaybes [("cells" .=) <$> _rCells])
data Inventory = Inventory'
{ _iLoyaltyPoints :: !(Maybe LoyaltyPoints)
, _iKind :: !Text
, _iQuantity :: !(Maybe (Textual Word32))
, _iInstallment :: !(Maybe Installment)
, _iSalePrice :: !(Maybe Price)
, _iAvailability :: !(Maybe Text)
, _iPickup :: !(Maybe InventoryPickup)
, _iSalePriceEffectiveDate :: !(Maybe Text)
, _iSellOnGoogleQuantity :: !(Maybe (Textual Word32))
, _iPrice :: !(Maybe Price)
} deriving (Eq,Show,Data,Typeable,Generic)
inventory
:: Inventory
inventory =
Inventory'
{ _iLoyaltyPoints = Nothing
, _iKind = "content#inventory"
, _iQuantity = Nothing
, _iInstallment = Nothing
, _iSalePrice = Nothing
, _iAvailability = Nothing
, _iPickup = Nothing
, _iSalePriceEffectiveDate = Nothing
, _iSellOnGoogleQuantity = Nothing
, _iPrice = Nothing
}
iLoyaltyPoints :: Lens' Inventory (Maybe LoyaltyPoints)
iLoyaltyPoints
= lens _iLoyaltyPoints
(\ s a -> s{_iLoyaltyPoints = a})
iKind :: Lens' Inventory Text
iKind = lens _iKind (\ s a -> s{_iKind = a})
iQuantity :: Lens' Inventory (Maybe Word32)
iQuantity
= lens _iQuantity (\ s a -> s{_iQuantity = a}) .
mapping _Coerce
iInstallment :: Lens' Inventory (Maybe Installment)
iInstallment
= lens _iInstallment (\ s a -> s{_iInstallment = a})
iSalePrice :: Lens' Inventory (Maybe Price)
iSalePrice
= lens _iSalePrice (\ s a -> s{_iSalePrice = a})
iAvailability :: Lens' Inventory (Maybe Text)
iAvailability
= lens _iAvailability
(\ s a -> s{_iAvailability = a})
iPickup :: Lens' Inventory (Maybe InventoryPickup)
iPickup = lens _iPickup (\ s a -> s{_iPickup = a})
iSalePriceEffectiveDate :: Lens' Inventory (Maybe Text)
iSalePriceEffectiveDate
= lens _iSalePriceEffectiveDate
(\ s a -> s{_iSalePriceEffectiveDate = a})
iSellOnGoogleQuantity :: Lens' Inventory (Maybe Word32)
iSellOnGoogleQuantity
= lens _iSellOnGoogleQuantity
(\ s a -> s{_iSellOnGoogleQuantity = a})
. mapping _Coerce
iPrice :: Lens' Inventory (Maybe Price)
iPrice = lens _iPrice (\ s a -> s{_iPrice = a})
instance FromJSON Inventory where
parseJSON
= withObject "Inventory"
(\ o ->
Inventory' <$>
(o .:? "loyaltyPoints") <*>
(o .:? "kind" .!= "content#inventory")
<*> (o .:? "quantity")
<*> (o .:? "installment")
<*> (o .:? "salePrice")
<*> (o .:? "availability")
<*> (o .:? "pickup")
<*> (o .:? "salePriceEffectiveDate")
<*> (o .:? "sellOnGoogleQuantity")
<*> (o .:? "price"))
instance ToJSON Inventory where
toJSON Inventory'{..}
= object
(catMaybes
[("loyaltyPoints" .=) <$> _iLoyaltyPoints,
Just ("kind" .= _iKind),
("quantity" .=) <$> _iQuantity,
("installment" .=) <$> _iInstallment,
("salePrice" .=) <$> _iSalePrice,
("availability" .=) <$> _iAvailability,
("pickup" .=) <$> _iPickup,
("salePriceEffectiveDate" .=) <$>
_iSalePriceEffectiveDate,
("sellOnGoogleQuantity" .=) <$>
_iSellOnGoogleQuantity,
("price" .=) <$> _iPrice])
data OrdersGetByMerchantOrderIdResponse = OrdersGetByMerchantOrderIdResponse'
{ _ogbmoirKind :: !Text
, _ogbmoirOrder :: !(Maybe Order)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersGetByMerchantOrderIdResponse
:: OrdersGetByMerchantOrderIdResponse
ordersGetByMerchantOrderIdResponse =
OrdersGetByMerchantOrderIdResponse'
{ _ogbmoirKind = "content#ordersGetByMerchantOrderIdResponse"
, _ogbmoirOrder = Nothing
}
ogbmoirKind :: Lens' OrdersGetByMerchantOrderIdResponse Text
ogbmoirKind
= lens _ogbmoirKind (\ s a -> s{_ogbmoirKind = a})
ogbmoirOrder :: Lens' OrdersGetByMerchantOrderIdResponse (Maybe Order)
ogbmoirOrder
= lens _ogbmoirOrder (\ s a -> s{_ogbmoirOrder = a})
instance FromJSON OrdersGetByMerchantOrderIdResponse
where
parseJSON
= withObject "OrdersGetByMerchantOrderIdResponse"
(\ o ->
OrdersGetByMerchantOrderIdResponse' <$>
(o .:? "kind" .!=
"content#ordersGetByMerchantOrderIdResponse")
<*> (o .:? "order"))
instance ToJSON OrdersGetByMerchantOrderIdResponse
where
toJSON OrdersGetByMerchantOrderIdResponse'{..}
= object
(catMaybes
[Just ("kind" .= _ogbmoirKind),
("order" .=) <$> _ogbmoirOrder])
data OrderPromotionBenefit = OrderPromotionBenefit'
{ _opbTaxImpact :: !(Maybe Price)
, _opbDiscount :: !(Maybe Price)
, _opbOfferIds :: !(Maybe [Text])
, _opbSubType :: !(Maybe Text)
, _opbType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderPromotionBenefit
:: OrderPromotionBenefit
orderPromotionBenefit =
OrderPromotionBenefit'
{ _opbTaxImpact = Nothing
, _opbDiscount = Nothing
, _opbOfferIds = Nothing
, _opbSubType = Nothing
, _opbType = Nothing
}
opbTaxImpact :: Lens' OrderPromotionBenefit (Maybe Price)
opbTaxImpact
= lens _opbTaxImpact (\ s a -> s{_opbTaxImpact = a})
opbDiscount :: Lens' OrderPromotionBenefit (Maybe Price)
opbDiscount
= lens _opbDiscount (\ s a -> s{_opbDiscount = a})
opbOfferIds :: Lens' OrderPromotionBenefit [Text]
opbOfferIds
= lens _opbOfferIds (\ s a -> s{_opbOfferIds = a}) .
_Default
. _Coerce
opbSubType :: Lens' OrderPromotionBenefit (Maybe Text)
opbSubType
= lens _opbSubType (\ s a -> s{_opbSubType = a})
opbType :: Lens' OrderPromotionBenefit (Maybe Text)
opbType = lens _opbType (\ s a -> s{_opbType = a})
instance FromJSON OrderPromotionBenefit where
parseJSON
= withObject "OrderPromotionBenefit"
(\ o ->
OrderPromotionBenefit' <$>
(o .:? "taxImpact") <*> (o .:? "discount") <*>
(o .:? "offerIds" .!= mempty)
<*> (o .:? "subType")
<*> (o .:? "type"))
instance ToJSON OrderPromotionBenefit where
toJSON OrderPromotionBenefit'{..}
= object
(catMaybes
[("taxImpact" .=) <$> _opbTaxImpact,
("discount" .=) <$> _opbDiscount,
("offerIds" .=) <$> _opbOfferIds,
("subType" .=) <$> _opbSubType,
("type" .=) <$> _opbType])
data OrdersCancelRequest = OrdersCancelRequest'
{ _ocrReason :: !(Maybe Text)
, _ocrOperationId :: !(Maybe Text)
, _ocrReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCancelRequest
:: OrdersCancelRequest
ordersCancelRequest =
OrdersCancelRequest'
{ _ocrReason = Nothing
, _ocrOperationId = Nothing
, _ocrReasonText = Nothing
}
ocrReason :: Lens' OrdersCancelRequest (Maybe Text)
ocrReason
= lens _ocrReason (\ s a -> s{_ocrReason = a})
ocrOperationId :: Lens' OrdersCancelRequest (Maybe Text)
ocrOperationId
= lens _ocrOperationId
(\ s a -> s{_ocrOperationId = a})
ocrReasonText :: Lens' OrdersCancelRequest (Maybe Text)
ocrReasonText
= lens _ocrReasonText
(\ s a -> s{_ocrReasonText = a})
instance FromJSON OrdersCancelRequest where
parseJSON
= withObject "OrdersCancelRequest"
(\ o ->
OrdersCancelRequest' <$>
(o .:? "reason") <*> (o .:? "operationId") <*>
(o .:? "reasonText"))
instance ToJSON OrdersCancelRequest where
toJSON OrdersCancelRequest'{..}
= object
(catMaybes
[("reason" .=) <$> _ocrReason,
("operationId" .=) <$> _ocrOperationId,
("reasonText" .=) <$> _ocrReasonText])
data OrderLineItemProductVariantAttribute = OrderLineItemProductVariantAttribute'
{ _olipvaDimension :: !(Maybe Text)
, _olipvaValue :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderLineItemProductVariantAttribute
:: OrderLineItemProductVariantAttribute
orderLineItemProductVariantAttribute =
OrderLineItemProductVariantAttribute'
{ _olipvaDimension = Nothing
, _olipvaValue = Nothing
}
olipvaDimension :: Lens' OrderLineItemProductVariantAttribute (Maybe Text)
olipvaDimension
= lens _olipvaDimension
(\ s a -> s{_olipvaDimension = a})
olipvaValue :: Lens' OrderLineItemProductVariantAttribute (Maybe Text)
olipvaValue
= lens _olipvaValue (\ s a -> s{_olipvaValue = a})
instance FromJSON
OrderLineItemProductVariantAttribute where
parseJSON
= withObject "OrderLineItemProductVariantAttribute"
(\ o ->
OrderLineItemProductVariantAttribute' <$>
(o .:? "dimension") <*> (o .:? "value"))
instance ToJSON OrderLineItemProductVariantAttribute
where
toJSON OrderLineItemProductVariantAttribute'{..}
= object
(catMaybes
[("dimension" .=) <$> _olipvaDimension,
("value" .=) <$> _olipvaValue])
data OrdersCustomBatchResponseEntry = OrdersCustomBatchResponseEntry'
{ _oKind :: !Text
, _oExecutionStatus :: !(Maybe Text)
, _oErrors :: !(Maybe Errors)
, _oOrder :: !(Maybe Order)
, _oBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchResponseEntry
:: OrdersCustomBatchResponseEntry
ordersCustomBatchResponseEntry =
OrdersCustomBatchResponseEntry'
{ _oKind = "content#ordersCustomBatchResponseEntry"
, _oExecutionStatus = Nothing
, _oErrors = Nothing
, _oOrder = Nothing
, _oBatchId = Nothing
}
oKind :: Lens' OrdersCustomBatchResponseEntry Text
oKind = lens _oKind (\ s a -> s{_oKind = a})
oExecutionStatus :: Lens' OrdersCustomBatchResponseEntry (Maybe Text)
oExecutionStatus
= lens _oExecutionStatus
(\ s a -> s{_oExecutionStatus = a})
oErrors :: Lens' OrdersCustomBatchResponseEntry (Maybe Errors)
oErrors = lens _oErrors (\ s a -> s{_oErrors = a})
oOrder :: Lens' OrdersCustomBatchResponseEntry (Maybe Order)
oOrder = lens _oOrder (\ s a -> s{_oOrder = a})
oBatchId :: Lens' OrdersCustomBatchResponseEntry (Maybe Word32)
oBatchId
= lens _oBatchId (\ s a -> s{_oBatchId = a}) .
mapping _Coerce
instance FromJSON OrdersCustomBatchResponseEntry
where
parseJSON
= withObject "OrdersCustomBatchResponseEntry"
(\ o ->
OrdersCustomBatchResponseEntry' <$>
(o .:? "kind" .!=
"content#ordersCustomBatchResponseEntry")
<*> (o .:? "executionStatus")
<*> (o .:? "errors")
<*> (o .:? "order")
<*> (o .:? "batchId"))
instance ToJSON OrdersCustomBatchResponseEntry where
toJSON OrdersCustomBatchResponseEntry'{..}
= object
(catMaybes
[Just ("kind" .= _oKind),
("executionStatus" .=) <$> _oExecutionStatus,
("errors" .=) <$> _oErrors, ("order" .=) <$> _oOrder,
("batchId" .=) <$> _oBatchId])
data AccountShippingCarrierRate = AccountShippingCarrierRate'
{ _ascrCarrier :: !(Maybe Text)
, _ascrSaleCountry :: !(Maybe Text)
, _ascrShippingOrigin :: !(Maybe Text)
, _ascrCarrierService :: !(Maybe Text)
, _ascrModifierPercent :: !(Maybe Text)
, _ascrName :: !(Maybe Text)
, _ascrModifierFlatRate :: !(Maybe Price)
} deriving (Eq,Show,Data,Typeable,Generic)
accountShippingCarrierRate
:: AccountShippingCarrierRate
accountShippingCarrierRate =
AccountShippingCarrierRate'
{ _ascrCarrier = Nothing
, _ascrSaleCountry = Nothing
, _ascrShippingOrigin = Nothing
, _ascrCarrierService = Nothing
, _ascrModifierPercent = Nothing
, _ascrName = Nothing
, _ascrModifierFlatRate = Nothing
}
ascrCarrier :: Lens' AccountShippingCarrierRate (Maybe Text)
ascrCarrier
= lens _ascrCarrier (\ s a -> s{_ascrCarrier = a})
ascrSaleCountry :: Lens' AccountShippingCarrierRate (Maybe Text)
ascrSaleCountry
= lens _ascrSaleCountry
(\ s a -> s{_ascrSaleCountry = a})
ascrShippingOrigin :: Lens' AccountShippingCarrierRate (Maybe Text)
ascrShippingOrigin
= lens _ascrShippingOrigin
(\ s a -> s{_ascrShippingOrigin = a})
ascrCarrierService :: Lens' AccountShippingCarrierRate (Maybe Text)
ascrCarrierService
= lens _ascrCarrierService
(\ s a -> s{_ascrCarrierService = a})
ascrModifierPercent :: Lens' AccountShippingCarrierRate (Maybe Text)
ascrModifierPercent
= lens _ascrModifierPercent
(\ s a -> s{_ascrModifierPercent = a})
ascrName :: Lens' AccountShippingCarrierRate (Maybe Text)
ascrName = lens _ascrName (\ s a -> s{_ascrName = a})
ascrModifierFlatRate :: Lens' AccountShippingCarrierRate (Maybe Price)
ascrModifierFlatRate
= lens _ascrModifierFlatRate
(\ s a -> s{_ascrModifierFlatRate = a})
instance FromJSON AccountShippingCarrierRate where
parseJSON
= withObject "AccountShippingCarrierRate"
(\ o ->
AccountShippingCarrierRate' <$>
(o .:? "carrier") <*> (o .:? "saleCountry") <*>
(o .:? "shippingOrigin")
<*> (o .:? "carrierService")
<*> (o .:? "modifierPercent")
<*> (o .:? "name")
<*> (o .:? "modifierFlatRate"))
instance ToJSON AccountShippingCarrierRate where
toJSON AccountShippingCarrierRate'{..}
= object
(catMaybes
[("carrier" .=) <$> _ascrCarrier,
("saleCountry" .=) <$> _ascrSaleCountry,
("shippingOrigin" .=) <$> _ascrShippingOrigin,
("carrierService" .=) <$> _ascrCarrierService,
("modifierPercent" .=) <$> _ascrModifierPercent,
("name" .=) <$> _ascrName,
("modifierFlatRate" .=) <$> _ascrModifierFlatRate])
data RateGroup = RateGroup'
{ _rgCarrierRates :: !(Maybe [CarrierRate])
, _rgApplicableShippingLabels :: !(Maybe [Text])
, _rgMainTable :: !(Maybe Table)
, _rgSingleValue :: !(Maybe Value)
, _rgSubtables :: !(Maybe [Table])
} deriving (Eq,Show,Data,Typeable,Generic)
rateGroup
:: RateGroup
rateGroup =
RateGroup'
{ _rgCarrierRates = Nothing
, _rgApplicableShippingLabels = Nothing
, _rgMainTable = Nothing
, _rgSingleValue = Nothing
, _rgSubtables = Nothing
}
rgCarrierRates :: Lens' RateGroup [CarrierRate]
rgCarrierRates
= lens _rgCarrierRates
(\ s a -> s{_rgCarrierRates = a})
. _Default
. _Coerce
rgApplicableShippingLabels :: Lens' RateGroup [Text]
rgApplicableShippingLabels
= lens _rgApplicableShippingLabels
(\ s a -> s{_rgApplicableShippingLabels = a})
. _Default
. _Coerce
rgMainTable :: Lens' RateGroup (Maybe Table)
rgMainTable
= lens _rgMainTable (\ s a -> s{_rgMainTable = a})
rgSingleValue :: Lens' RateGroup (Maybe Value)
rgSingleValue
= lens _rgSingleValue
(\ s a -> s{_rgSingleValue = a})
rgSubtables :: Lens' RateGroup [Table]
rgSubtables
= lens _rgSubtables (\ s a -> s{_rgSubtables = a}) .
_Default
. _Coerce
instance FromJSON RateGroup where
parseJSON
= withObject "RateGroup"
(\ o ->
RateGroup' <$>
(o .:? "carrierRates" .!= mempty) <*>
(o .:? "applicableShippingLabels" .!= mempty)
<*> (o .:? "mainTable")
<*> (o .:? "singleValue")
<*> (o .:? "subtables" .!= mempty))
instance ToJSON RateGroup where
toJSON RateGroup'{..}
= object
(catMaybes
[("carrierRates" .=) <$> _rgCarrierRates,
("applicableShippingLabels" .=) <$>
_rgApplicableShippingLabels,
("mainTable" .=) <$> _rgMainTable,
("singleValue" .=) <$> _rgSingleValue,
("subtables" .=) <$> _rgSubtables])
data OrderPromotion = OrderPromotion'
{ _opEffectiveDates :: !(Maybe Text)
, _opGenericRedemptionCode :: !(Maybe Text)
, _opRedemptionChannel :: !(Maybe Text)
, _opBenefits :: !(Maybe [OrderPromotionBenefit])
, _opLongTitle :: !(Maybe Text)
, _opId :: !(Maybe Text)
, _opProductApplicability :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderPromotion
:: OrderPromotion
orderPromotion =
OrderPromotion'
{ _opEffectiveDates = Nothing
, _opGenericRedemptionCode = Nothing
, _opRedemptionChannel = Nothing
, _opBenefits = Nothing
, _opLongTitle = Nothing
, _opId = Nothing
, _opProductApplicability = Nothing
}
opEffectiveDates :: Lens' OrderPromotion (Maybe Text)
opEffectiveDates
= lens _opEffectiveDates
(\ s a -> s{_opEffectiveDates = a})
opGenericRedemptionCode :: Lens' OrderPromotion (Maybe Text)
opGenericRedemptionCode
= lens _opGenericRedemptionCode
(\ s a -> s{_opGenericRedemptionCode = a})
opRedemptionChannel :: Lens' OrderPromotion (Maybe Text)
opRedemptionChannel
= lens _opRedemptionChannel
(\ s a -> s{_opRedemptionChannel = a})
opBenefits :: Lens' OrderPromotion [OrderPromotionBenefit]
opBenefits
= lens _opBenefits (\ s a -> s{_opBenefits = a}) .
_Default
. _Coerce
opLongTitle :: Lens' OrderPromotion (Maybe Text)
opLongTitle
= lens _opLongTitle (\ s a -> s{_opLongTitle = a})
opId :: Lens' OrderPromotion (Maybe Text)
opId = lens _opId (\ s a -> s{_opId = a})
opProductApplicability :: Lens' OrderPromotion (Maybe Text)
opProductApplicability
= lens _opProductApplicability
(\ s a -> s{_opProductApplicability = a})
instance FromJSON OrderPromotion where
parseJSON
= withObject "OrderPromotion"
(\ o ->
OrderPromotion' <$>
(o .:? "effectiveDates") <*>
(o .:? "genericRedemptionCode")
<*> (o .:? "redemptionChannel")
<*> (o .:? "benefits" .!= mempty)
<*> (o .:? "longTitle")
<*> (o .:? "id")
<*> (o .:? "productApplicability"))
instance ToJSON OrderPromotion where
toJSON OrderPromotion'{..}
= object
(catMaybes
[("effectiveDates" .=) <$> _opEffectiveDates,
("genericRedemptionCode" .=) <$>
_opGenericRedemptionCode,
("redemptionChannel" .=) <$> _opRedemptionChannel,
("benefits" .=) <$> _opBenefits,
("longTitle" .=) <$> _opLongTitle,
("id" .=) <$> _opId,
("productApplicability" .=) <$>
_opProductApplicability])
data Price = Price'
{ _pValue :: !(Maybe Text)
, _pCurrency :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
price
:: Price
price =
Price'
{ _pValue = Nothing
, _pCurrency = Nothing
}
pValue :: Lens' Price (Maybe Text)
pValue = lens _pValue (\ s a -> s{_pValue = a})
pCurrency :: Lens' Price (Maybe Text)
pCurrency
= lens _pCurrency (\ s a -> s{_pCurrency = a})
instance FromJSON Price where
parseJSON
= withObject "Price"
(\ o ->
Price' <$> (o .:? "value") <*> (o .:? "currency"))
instance ToJSON Price where
toJSON Price'{..}
= object
(catMaybes
[("value" .=) <$> _pValue,
("currency" .=) <$> _pCurrency])
data OrderLineItemShippingDetails = OrderLineItemShippingDetails'
{ _olisdShipByDate :: !(Maybe Text)
, _olisdMethod :: !(Maybe OrderLineItemShippingDetailsMethod)
, _olisdDeliverByDate :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderLineItemShippingDetails
:: OrderLineItemShippingDetails
orderLineItemShippingDetails =
OrderLineItemShippingDetails'
{ _olisdShipByDate = Nothing
, _olisdMethod = Nothing
, _olisdDeliverByDate = Nothing
}
olisdShipByDate :: Lens' OrderLineItemShippingDetails (Maybe Text)
olisdShipByDate
= lens _olisdShipByDate
(\ s a -> s{_olisdShipByDate = a})
olisdMethod :: Lens' OrderLineItemShippingDetails (Maybe OrderLineItemShippingDetailsMethod)
olisdMethod
= lens _olisdMethod (\ s a -> s{_olisdMethod = a})
olisdDeliverByDate :: Lens' OrderLineItemShippingDetails (Maybe Text)
olisdDeliverByDate
= lens _olisdDeliverByDate
(\ s a -> s{_olisdDeliverByDate = a})
instance FromJSON OrderLineItemShippingDetails where
parseJSON
= withObject "OrderLineItemShippingDetails"
(\ o ->
OrderLineItemShippingDetails' <$>
(o .:? "shipByDate") <*> (o .:? "method") <*>
(o .:? "deliverByDate"))
instance ToJSON OrderLineItemShippingDetails where
toJSON OrderLineItemShippingDetails'{..}
= object
(catMaybes
[("shipByDate" .=) <$> _olisdShipByDate,
("method" .=) <$> _olisdMethod,
("deliverByDate" .=) <$> _olisdDeliverByDate])
data DatafeedsCustomBatchResponse = DatafeedsCustomBatchResponse'
{ _datEntries :: !(Maybe [DatafeedsCustomBatchResponseEntry])
, _datKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedsCustomBatchResponse
:: DatafeedsCustomBatchResponse
datafeedsCustomBatchResponse =
DatafeedsCustomBatchResponse'
{ _datEntries = Nothing
, _datKind = "content#datafeedsCustomBatchResponse"
}
datEntries :: Lens' DatafeedsCustomBatchResponse [DatafeedsCustomBatchResponseEntry]
datEntries
= lens _datEntries (\ s a -> s{_datEntries = a}) .
_Default
. _Coerce
datKind :: Lens' DatafeedsCustomBatchResponse Text
datKind = lens _datKind (\ s a -> s{_datKind = a})
instance FromJSON DatafeedsCustomBatchResponse where
parseJSON
= withObject "DatafeedsCustomBatchResponse"
(\ o ->
DatafeedsCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#datafeedsCustomBatchResponse"))
instance ToJSON DatafeedsCustomBatchResponse where
toJSON DatafeedsCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _datEntries,
Just ("kind" .= _datKind)])
data OrderDeliveryDetails = OrderDeliveryDetails'
{ _oddAddress :: !(Maybe OrderAddress)
, _oddPhoneNumber :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderDeliveryDetails
:: OrderDeliveryDetails
orderDeliveryDetails =
OrderDeliveryDetails'
{ _oddAddress = Nothing
, _oddPhoneNumber = Nothing
}
oddAddress :: Lens' OrderDeliveryDetails (Maybe OrderAddress)
oddAddress
= lens _oddAddress (\ s a -> s{_oddAddress = a})
oddPhoneNumber :: Lens' OrderDeliveryDetails (Maybe Text)
oddPhoneNumber
= lens _oddPhoneNumber
(\ s a -> s{_oddPhoneNumber = a})
instance FromJSON OrderDeliveryDetails where
parseJSON
= withObject "OrderDeliveryDetails"
(\ o ->
OrderDeliveryDetails' <$>
(o .:? "address") <*> (o .:? "phoneNumber"))
instance ToJSON OrderDeliveryDetails where
toJSON OrderDeliveryDetails'{..}
= object
(catMaybes
[("address" .=) <$> _oddAddress,
("phoneNumber" .=) <$> _oddPhoneNumber])
data OrdersCancelResponse = OrdersCancelResponse'
{ _ocrKind :: !Text
, _ocrExecutionStatus :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCancelResponse
:: OrdersCancelResponse
ordersCancelResponse =
OrdersCancelResponse'
{ _ocrKind = "content#ordersCancelResponse"
, _ocrExecutionStatus = Nothing
}
ocrKind :: Lens' OrdersCancelResponse Text
ocrKind = lens _ocrKind (\ s a -> s{_ocrKind = a})
ocrExecutionStatus :: Lens' OrdersCancelResponse (Maybe Text)
ocrExecutionStatus
= lens _ocrExecutionStatus
(\ s a -> s{_ocrExecutionStatus = a})
instance FromJSON OrdersCancelResponse where
parseJSON
= withObject "OrdersCancelResponse"
(\ o ->
OrdersCancelResponse' <$>
(o .:? "kind" .!= "content#ordersCancelResponse") <*>
(o .:? "executionStatus"))
instance ToJSON OrdersCancelResponse where
toJSON OrdersCancelResponse'{..}
= object
(catMaybes
[Just ("kind" .= _ocrKind),
("executionStatus" .=) <$> _ocrExecutionStatus])
data TestOrder = TestOrder'
{ _toKind :: !Text
, _toLineItems :: !(Maybe [TestOrderLineItem])
, _toShippingOption :: !(Maybe Text)
, _toPredefinedDeliveryAddress :: !(Maybe Text)
, _toShippingCostTax :: !(Maybe Price)
, _toCustomer :: !(Maybe TestOrderCustomer)
, _toPaymentMethod :: !(Maybe TestOrderPaymentMethod)
, _toPromotions :: !(Maybe [OrderPromotion])
, _toShippingCost :: !(Maybe Price)
} deriving (Eq,Show,Data,Typeable,Generic)
testOrder
:: TestOrder
testOrder =
TestOrder'
{ _toKind = "content#testOrder"
, _toLineItems = Nothing
, _toShippingOption = Nothing
, _toPredefinedDeliveryAddress = Nothing
, _toShippingCostTax = Nothing
, _toCustomer = Nothing
, _toPaymentMethod = Nothing
, _toPromotions = Nothing
, _toShippingCost = Nothing
}
toKind :: Lens' TestOrder Text
toKind = lens _toKind (\ s a -> s{_toKind = a})
toLineItems :: Lens' TestOrder [TestOrderLineItem]
toLineItems
= lens _toLineItems (\ s a -> s{_toLineItems = a}) .
_Default
. _Coerce
toShippingOption :: Lens' TestOrder (Maybe Text)
toShippingOption
= lens _toShippingOption
(\ s a -> s{_toShippingOption = a})
toPredefinedDeliveryAddress :: Lens' TestOrder (Maybe Text)
toPredefinedDeliveryAddress
= lens _toPredefinedDeliveryAddress
(\ s a -> s{_toPredefinedDeliveryAddress = a})
toShippingCostTax :: Lens' TestOrder (Maybe Price)
toShippingCostTax
= lens _toShippingCostTax
(\ s a -> s{_toShippingCostTax = a})
toCustomer :: Lens' TestOrder (Maybe TestOrderCustomer)
toCustomer
= lens _toCustomer (\ s a -> s{_toCustomer = a})
toPaymentMethod :: Lens' TestOrder (Maybe TestOrderPaymentMethod)
toPaymentMethod
= lens _toPaymentMethod
(\ s a -> s{_toPaymentMethod = a})
toPromotions :: Lens' TestOrder [OrderPromotion]
toPromotions
= lens _toPromotions (\ s a -> s{_toPromotions = a})
. _Default
. _Coerce
toShippingCost :: Lens' TestOrder (Maybe Price)
toShippingCost
= lens _toShippingCost
(\ s a -> s{_toShippingCost = a})
instance FromJSON TestOrder where
parseJSON
= withObject "TestOrder"
(\ o ->
TestOrder' <$>
(o .:? "kind" .!= "content#testOrder") <*>
(o .:? "lineItems" .!= mempty)
<*> (o .:? "shippingOption")
<*> (o .:? "predefinedDeliveryAddress")
<*> (o .:? "shippingCostTax")
<*> (o .:? "customer")
<*> (o .:? "paymentMethod")
<*> (o .:? "promotions" .!= mempty)
<*> (o .:? "shippingCost"))
instance ToJSON TestOrder where
toJSON TestOrder'{..}
= object
(catMaybes
[Just ("kind" .= _toKind),
("lineItems" .=) <$> _toLineItems,
("shippingOption" .=) <$> _toShippingOption,
("predefinedDeliveryAddress" .=) <$>
_toPredefinedDeliveryAddress,
("shippingCostTax" .=) <$> _toShippingCostTax,
("customer" .=) <$> _toCustomer,
("paymentMethod" .=) <$> _toPaymentMethod,
("promotions" .=) <$> _toPromotions,
("shippingCost" .=) <$> _toShippingCost])
data DatafeedstatusesCustomBatchResponseEntry = DatafeedstatusesCustomBatchResponseEntry'
{ _datErrors :: !(Maybe Errors)
, _datDatafeedStatus :: !(Maybe DatafeedStatus)
, _datBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedstatusesCustomBatchResponseEntry
:: DatafeedstatusesCustomBatchResponseEntry
datafeedstatusesCustomBatchResponseEntry =
DatafeedstatusesCustomBatchResponseEntry'
{ _datErrors = Nothing
, _datDatafeedStatus = Nothing
, _datBatchId = Nothing
}
datErrors :: Lens' DatafeedstatusesCustomBatchResponseEntry (Maybe Errors)
datErrors
= lens _datErrors (\ s a -> s{_datErrors = a})
datDatafeedStatus :: Lens' DatafeedstatusesCustomBatchResponseEntry (Maybe DatafeedStatus)
datDatafeedStatus
= lens _datDatafeedStatus
(\ s a -> s{_datDatafeedStatus = a})
datBatchId :: Lens' DatafeedstatusesCustomBatchResponseEntry (Maybe Word32)
datBatchId
= lens _datBatchId (\ s a -> s{_datBatchId = a}) .
mapping _Coerce
instance FromJSON
DatafeedstatusesCustomBatchResponseEntry where
parseJSON
= withObject
"DatafeedstatusesCustomBatchResponseEntry"
(\ o ->
DatafeedstatusesCustomBatchResponseEntry' <$>
(o .:? "errors") <*> (o .:? "datafeedStatus") <*>
(o .:? "batchId"))
instance ToJSON
DatafeedstatusesCustomBatchResponseEntry where
toJSON DatafeedstatusesCustomBatchResponseEntry'{..}
= object
(catMaybes
[("errors" .=) <$> _datErrors,
("datafeedStatus" .=) <$> _datDatafeedStatus,
("batchId" .=) <$> _datBatchId])
data OrderRefund = OrderRefund'
{ _oAmount :: !(Maybe Price)
, _oActor :: !(Maybe Text)
, _oReason :: !(Maybe Text)
, _oCreationDate :: !(Maybe Text)
, _oReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderRefund
:: OrderRefund
orderRefund =
OrderRefund'
{ _oAmount = Nothing
, _oActor = Nothing
, _oReason = Nothing
, _oCreationDate = Nothing
, _oReasonText = Nothing
}
oAmount :: Lens' OrderRefund (Maybe Price)
oAmount = lens _oAmount (\ s a -> s{_oAmount = a})
oActor :: Lens' OrderRefund (Maybe Text)
oActor = lens _oActor (\ s a -> s{_oActor = a})
oReason :: Lens' OrderRefund (Maybe Text)
oReason = lens _oReason (\ s a -> s{_oReason = a})
oCreationDate :: Lens' OrderRefund (Maybe Text)
oCreationDate
= lens _oCreationDate
(\ s a -> s{_oCreationDate = a})
oReasonText :: Lens' OrderRefund (Maybe Text)
oReasonText
= lens _oReasonText (\ s a -> s{_oReasonText = a})
instance FromJSON OrderRefund where
parseJSON
= withObject "OrderRefund"
(\ o ->
OrderRefund' <$>
(o .:? "amount") <*> (o .:? "actor") <*>
(o .:? "reason")
<*> (o .:? "creationDate")
<*> (o .:? "reasonText"))
instance ToJSON OrderRefund where
toJSON OrderRefund'{..}
= object
(catMaybes
[("amount" .=) <$> _oAmount,
("actor" .=) <$> _oActor, ("reason" .=) <$> _oReason,
("creationDate" .=) <$> _oCreationDate,
("reasonText" .=) <$> _oReasonText])
data TestOrderLineItemProduct = TestOrderLineItemProduct'
{ _tolipImageLink :: !(Maybe Text)
, _tolipChannel :: !(Maybe Text)
, _tolipBrand :: !(Maybe Text)
, _tolipTargetCountry :: !(Maybe Text)
, _tolipGtin :: !(Maybe Text)
, _tolipItemGroupId :: !(Maybe Text)
, _tolipOfferId :: !(Maybe Text)
, _tolipPrice :: !(Maybe Price)
, _tolipVariantAttributes :: !(Maybe [OrderLineItemProductVariantAttribute])
, _tolipTitle :: !(Maybe Text)
, _tolipContentLanguage :: !(Maybe Text)
, _tolipMpn :: !(Maybe Text)
, _tolipCondition :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
testOrderLineItemProduct
:: TestOrderLineItemProduct
testOrderLineItemProduct =
TestOrderLineItemProduct'
{ _tolipImageLink = Nothing
, _tolipChannel = Nothing
, _tolipBrand = Nothing
, _tolipTargetCountry = Nothing
, _tolipGtin = Nothing
, _tolipItemGroupId = Nothing
, _tolipOfferId = Nothing
, _tolipPrice = Nothing
, _tolipVariantAttributes = Nothing
, _tolipTitle = Nothing
, _tolipContentLanguage = Nothing
, _tolipMpn = Nothing
, _tolipCondition = Nothing
}
tolipImageLink :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipImageLink
= lens _tolipImageLink
(\ s a -> s{_tolipImageLink = a})
tolipChannel :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipChannel
= lens _tolipChannel (\ s a -> s{_tolipChannel = a})
tolipBrand :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipBrand
= lens _tolipBrand (\ s a -> s{_tolipBrand = a})
tolipTargetCountry :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipTargetCountry
= lens _tolipTargetCountry
(\ s a -> s{_tolipTargetCountry = a})
tolipGtin :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipGtin
= lens _tolipGtin (\ s a -> s{_tolipGtin = a})
tolipItemGroupId :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipItemGroupId
= lens _tolipItemGroupId
(\ s a -> s{_tolipItemGroupId = a})
tolipOfferId :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipOfferId
= lens _tolipOfferId (\ s a -> s{_tolipOfferId = a})
tolipPrice :: Lens' TestOrderLineItemProduct (Maybe Price)
tolipPrice
= lens _tolipPrice (\ s a -> s{_tolipPrice = a})
tolipVariantAttributes :: Lens' TestOrderLineItemProduct [OrderLineItemProductVariantAttribute]
tolipVariantAttributes
= lens _tolipVariantAttributes
(\ s a -> s{_tolipVariantAttributes = a})
. _Default
. _Coerce
tolipTitle :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipTitle
= lens _tolipTitle (\ s a -> s{_tolipTitle = a})
tolipContentLanguage :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipContentLanguage
= lens _tolipContentLanguage
(\ s a -> s{_tolipContentLanguage = a})
tolipMpn :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipMpn = lens _tolipMpn (\ s a -> s{_tolipMpn = a})
tolipCondition :: Lens' TestOrderLineItemProduct (Maybe Text)
tolipCondition
= lens _tolipCondition
(\ s a -> s{_tolipCondition = a})
instance FromJSON TestOrderLineItemProduct where
parseJSON
= withObject "TestOrderLineItemProduct"
(\ o ->
TestOrderLineItemProduct' <$>
(o .:? "imageLink") <*> (o .:? "channel") <*>
(o .:? "brand")
<*> (o .:? "targetCountry")
<*> (o .:? "gtin")
<*> (o .:? "itemGroupId")
<*> (o .:? "offerId")
<*> (o .:? "price")
<*> (o .:? "variantAttributes" .!= mempty)
<*> (o .:? "title")
<*> (o .:? "contentLanguage")
<*> (o .:? "mpn")
<*> (o .:? "condition"))
instance ToJSON TestOrderLineItemProduct where
toJSON TestOrderLineItemProduct'{..}
= object
(catMaybes
[("imageLink" .=) <$> _tolipImageLink,
("channel" .=) <$> _tolipChannel,
("brand" .=) <$> _tolipBrand,
("targetCountry" .=) <$> _tolipTargetCountry,
("gtin" .=) <$> _tolipGtin,
("itemGroupId" .=) <$> _tolipItemGroupId,
("offerId" .=) <$> _tolipOfferId,
("price" .=) <$> _tolipPrice,
("variantAttributes" .=) <$> _tolipVariantAttributes,
("title" .=) <$> _tolipTitle,
("contentLanguage" .=) <$> _tolipContentLanguage,
("mpn" .=) <$> _tolipMpn,
("condition" .=) <$> _tolipCondition])
data AccounttaxCustomBatchResponse = AccounttaxCustomBatchResponse'
{ _a2Entries :: !(Maybe [AccounttaxCustomBatchResponseEntry])
, _a2Kind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accounttaxCustomBatchResponse
:: AccounttaxCustomBatchResponse
accounttaxCustomBatchResponse =
AccounttaxCustomBatchResponse'
{ _a2Entries = Nothing
, _a2Kind = "content#accounttaxCustomBatchResponse"
}
a2Entries :: Lens' AccounttaxCustomBatchResponse [AccounttaxCustomBatchResponseEntry]
a2Entries
= lens _a2Entries (\ s a -> s{_a2Entries = a}) .
_Default
. _Coerce
a2Kind :: Lens' AccounttaxCustomBatchResponse Text
a2Kind = lens _a2Kind (\ s a -> s{_a2Kind = a})
instance FromJSON AccounttaxCustomBatchResponse where
parseJSON
= withObject "AccounttaxCustomBatchResponse"
(\ o ->
AccounttaxCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#accounttaxCustomBatchResponse"))
instance ToJSON AccounttaxCustomBatchResponse where
toJSON AccounttaxCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _a2Entries,
Just ("kind" .= _a2Kind)])
data InventoryCustomBatchRequestEntry = InventoryCustomBatchRequestEntry'
{ _iMerchantId :: !(Maybe (Textual Word64))
, _iStoreCode :: !(Maybe Text)
, _iInventory :: !(Maybe Inventory)
, _iProductId :: !(Maybe Text)
, _iBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
inventoryCustomBatchRequestEntry
:: InventoryCustomBatchRequestEntry
inventoryCustomBatchRequestEntry =
InventoryCustomBatchRequestEntry'
{ _iMerchantId = Nothing
, _iStoreCode = Nothing
, _iInventory = Nothing
, _iProductId = Nothing
, _iBatchId = Nothing
}
iMerchantId :: Lens' InventoryCustomBatchRequestEntry (Maybe Word64)
iMerchantId
= lens _iMerchantId (\ s a -> s{_iMerchantId = a}) .
mapping _Coerce
iStoreCode :: Lens' InventoryCustomBatchRequestEntry (Maybe Text)
iStoreCode
= lens _iStoreCode (\ s a -> s{_iStoreCode = a})
iInventory :: Lens' InventoryCustomBatchRequestEntry (Maybe Inventory)
iInventory
= lens _iInventory (\ s a -> s{_iInventory = a})
iProductId :: Lens' InventoryCustomBatchRequestEntry (Maybe Text)
iProductId
= lens _iProductId (\ s a -> s{_iProductId = a})
iBatchId :: Lens' InventoryCustomBatchRequestEntry (Maybe Word32)
iBatchId
= lens _iBatchId (\ s a -> s{_iBatchId = a}) .
mapping _Coerce
instance FromJSON InventoryCustomBatchRequestEntry
where
parseJSON
= withObject "InventoryCustomBatchRequestEntry"
(\ o ->
InventoryCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "storeCode") <*>
(o .:? "inventory")
<*> (o .:? "productId")
<*> (o .:? "batchId"))
instance ToJSON InventoryCustomBatchRequestEntry
where
toJSON InventoryCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _iMerchantId,
("storeCode" .=) <$> _iStoreCode,
("inventory" .=) <$> _iInventory,
("productId" .=) <$> _iProductId,
("batchId" .=) <$> _iBatchId])
data OrderAddress = OrderAddress'
{ _oaRecipientName :: !(Maybe Text)
, _oaStreetAddress :: !(Maybe [Text])
, _oaCountry :: !(Maybe Text)
, _oaPostalCode :: !(Maybe Text)
, _oaLocality :: !(Maybe Text)
, _oaIsPostOfficeBox :: !(Maybe Bool)
, _oaFullAddress :: !(Maybe [Text])
, _oaRegion :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderAddress
:: OrderAddress
orderAddress =
OrderAddress'
{ _oaRecipientName = Nothing
, _oaStreetAddress = Nothing
, _oaCountry = Nothing
, _oaPostalCode = Nothing
, _oaLocality = Nothing
, _oaIsPostOfficeBox = Nothing
, _oaFullAddress = Nothing
, _oaRegion = Nothing
}
oaRecipientName :: Lens' OrderAddress (Maybe Text)
oaRecipientName
= lens _oaRecipientName
(\ s a -> s{_oaRecipientName = a})
oaStreetAddress :: Lens' OrderAddress [Text]
oaStreetAddress
= lens _oaStreetAddress
(\ s a -> s{_oaStreetAddress = a})
. _Default
. _Coerce
oaCountry :: Lens' OrderAddress (Maybe Text)
oaCountry
= lens _oaCountry (\ s a -> s{_oaCountry = a})
oaPostalCode :: Lens' OrderAddress (Maybe Text)
oaPostalCode
= lens _oaPostalCode (\ s a -> s{_oaPostalCode = a})
oaLocality :: Lens' OrderAddress (Maybe Text)
oaLocality
= lens _oaLocality (\ s a -> s{_oaLocality = a})
oaIsPostOfficeBox :: Lens' OrderAddress (Maybe Bool)
oaIsPostOfficeBox
= lens _oaIsPostOfficeBox
(\ s a -> s{_oaIsPostOfficeBox = a})
oaFullAddress :: Lens' OrderAddress [Text]
oaFullAddress
= lens _oaFullAddress
(\ s a -> s{_oaFullAddress = a})
. _Default
. _Coerce
oaRegion :: Lens' OrderAddress (Maybe Text)
oaRegion = lens _oaRegion (\ s a -> s{_oaRegion = a})
instance FromJSON OrderAddress where
parseJSON
= withObject "OrderAddress"
(\ o ->
OrderAddress' <$>
(o .:? "recipientName") <*>
(o .:? "streetAddress" .!= mempty)
<*> (o .:? "country")
<*> (o .:? "postalCode")
<*> (o .:? "locality")
<*> (o .:? "isPostOfficeBox")
<*> (o .:? "fullAddress" .!= mempty)
<*> (o .:? "region"))
instance ToJSON OrderAddress where
toJSON OrderAddress'{..}
= object
(catMaybes
[("recipientName" .=) <$> _oaRecipientName,
("streetAddress" .=) <$> _oaStreetAddress,
("country" .=) <$> _oaCountry,
("postalCode" .=) <$> _oaPostalCode,
("locality" .=) <$> _oaLocality,
("isPostOfficeBox" .=) <$> _oaIsPostOfficeBox,
("fullAddress" .=) <$> _oaFullAddress,
("region" .=) <$> _oaRegion])
data ProductUnitPricingBaseMeasure = ProductUnitPricingBaseMeasure'
{ _pupbmValue :: !(Maybe (Textual Int64))
, _pupbmUnit :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productUnitPricingBaseMeasure
:: ProductUnitPricingBaseMeasure
productUnitPricingBaseMeasure =
ProductUnitPricingBaseMeasure'
{ _pupbmValue = Nothing
, _pupbmUnit = Nothing
}
pupbmValue :: Lens' ProductUnitPricingBaseMeasure (Maybe Int64)
pupbmValue
= lens _pupbmValue (\ s a -> s{_pupbmValue = a}) .
mapping _Coerce
pupbmUnit :: Lens' ProductUnitPricingBaseMeasure (Maybe Text)
pupbmUnit
= lens _pupbmUnit (\ s a -> s{_pupbmUnit = a})
instance FromJSON ProductUnitPricingBaseMeasure where
parseJSON
= withObject "ProductUnitPricingBaseMeasure"
(\ o ->
ProductUnitPricingBaseMeasure' <$>
(o .:? "value") <*> (o .:? "unit"))
instance ToJSON ProductUnitPricingBaseMeasure where
toJSON ProductUnitPricingBaseMeasure'{..}
= object
(catMaybes
[("value" .=) <$> _pupbmValue,
("unit" .=) <$> _pupbmUnit])
data AccountShippingCondition = AccountShippingCondition'
{ _ascWeightMax :: !(Maybe Weight)
, _ascDeliveryPostalCode :: !(Maybe Text)
, _ascDeliveryLocationGroup :: !(Maybe Text)
, _ascPriceMax :: !(Maybe Price)
, _ascShippingLabel :: !(Maybe Text)
, _ascDeliveryLocationId :: !(Maybe (Textual Int64))
, _ascDeliveryPostalCodeRange :: !(Maybe AccountShippingPostalCodeRange)
} deriving (Eq,Show,Data,Typeable,Generic)
accountShippingCondition
:: AccountShippingCondition
accountShippingCondition =
AccountShippingCondition'
{ _ascWeightMax = Nothing
, _ascDeliveryPostalCode = Nothing
, _ascDeliveryLocationGroup = Nothing
, _ascPriceMax = Nothing
, _ascShippingLabel = Nothing
, _ascDeliveryLocationId = Nothing
, _ascDeliveryPostalCodeRange = Nothing
}
ascWeightMax :: Lens' AccountShippingCondition (Maybe Weight)
ascWeightMax
= lens _ascWeightMax (\ s a -> s{_ascWeightMax = a})
ascDeliveryPostalCode :: Lens' AccountShippingCondition (Maybe Text)
ascDeliveryPostalCode
= lens _ascDeliveryPostalCode
(\ s a -> s{_ascDeliveryPostalCode = a})
ascDeliveryLocationGroup :: Lens' AccountShippingCondition (Maybe Text)
ascDeliveryLocationGroup
= lens _ascDeliveryLocationGroup
(\ s a -> s{_ascDeliveryLocationGroup = a})
ascPriceMax :: Lens' AccountShippingCondition (Maybe Price)
ascPriceMax
= lens _ascPriceMax (\ s a -> s{_ascPriceMax = a})
ascShippingLabel :: Lens' AccountShippingCondition (Maybe Text)
ascShippingLabel
= lens _ascShippingLabel
(\ s a -> s{_ascShippingLabel = a})
ascDeliveryLocationId :: Lens' AccountShippingCondition (Maybe Int64)
ascDeliveryLocationId
= lens _ascDeliveryLocationId
(\ s a -> s{_ascDeliveryLocationId = a})
. mapping _Coerce
ascDeliveryPostalCodeRange :: Lens' AccountShippingCondition (Maybe AccountShippingPostalCodeRange)
ascDeliveryPostalCodeRange
= lens _ascDeliveryPostalCodeRange
(\ s a -> s{_ascDeliveryPostalCodeRange = a})
instance FromJSON AccountShippingCondition where
parseJSON
= withObject "AccountShippingCondition"
(\ o ->
AccountShippingCondition' <$>
(o .:? "weightMax") <*> (o .:? "deliveryPostalCode")
<*> (o .:? "deliveryLocationGroup")
<*> (o .:? "priceMax")
<*> (o .:? "shippingLabel")
<*> (o .:? "deliveryLocationId")
<*> (o .:? "deliveryPostalCodeRange"))
instance ToJSON AccountShippingCondition where
toJSON AccountShippingCondition'{..}
= object
(catMaybes
[("weightMax" .=) <$> _ascWeightMax,
("deliveryPostalCode" .=) <$> _ascDeliveryPostalCode,
("deliveryLocationGroup" .=) <$>
_ascDeliveryLocationGroup,
("priceMax" .=) <$> _ascPriceMax,
("shippingLabel" .=) <$> _ascShippingLabel,
("deliveryLocationId" .=) <$> _ascDeliveryLocationId,
("deliveryPostalCodeRange" .=) <$>
_ascDeliveryPostalCodeRange])
data DatafeedsListResponse = DatafeedsListResponse'
{ _dlrNextPageToken :: !(Maybe Text)
, _dlrKind :: !Text
, _dlrResources :: !(Maybe [Datafeed])
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedsListResponse
:: DatafeedsListResponse
datafeedsListResponse =
DatafeedsListResponse'
{ _dlrNextPageToken = Nothing
, _dlrKind = "content#datafeedsListResponse"
, _dlrResources = Nothing
}
dlrNextPageToken :: Lens' DatafeedsListResponse (Maybe Text)
dlrNextPageToken
= lens _dlrNextPageToken
(\ s a -> s{_dlrNextPageToken = a})
dlrKind :: Lens' DatafeedsListResponse Text
dlrKind = lens _dlrKind (\ s a -> s{_dlrKind = a})
dlrResources :: Lens' DatafeedsListResponse [Datafeed]
dlrResources
= lens _dlrResources (\ s a -> s{_dlrResources = a})
. _Default
. _Coerce
instance FromJSON DatafeedsListResponse where
parseJSON
= withObject "DatafeedsListResponse"
(\ o ->
DatafeedsListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "content#datafeedsListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON DatafeedsListResponse where
toJSON DatafeedsListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _dlrNextPageToken,
Just ("kind" .= _dlrKind),
("resources" .=) <$> _dlrResources])
data ProductsCustomBatchResponseEntry = ProductsCustomBatchResponseEntry'
{ _proKind :: !Text
, _proProduct :: !(Maybe Product)
, _proErrors :: !(Maybe Errors)
, _proBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
productsCustomBatchResponseEntry
:: ProductsCustomBatchResponseEntry
productsCustomBatchResponseEntry =
ProductsCustomBatchResponseEntry'
{ _proKind = "content#productsCustomBatchResponseEntry"
, _proProduct = Nothing
, _proErrors = Nothing
, _proBatchId = Nothing
}
proKind :: Lens' ProductsCustomBatchResponseEntry Text
proKind = lens _proKind (\ s a -> s{_proKind = a})
proProduct :: Lens' ProductsCustomBatchResponseEntry (Maybe Product)
proProduct
= lens _proProduct (\ s a -> s{_proProduct = a})
proErrors :: Lens' ProductsCustomBatchResponseEntry (Maybe Errors)
proErrors
= lens _proErrors (\ s a -> s{_proErrors = a})
proBatchId :: Lens' ProductsCustomBatchResponseEntry (Maybe Word32)
proBatchId
= lens _proBatchId (\ s a -> s{_proBatchId = a}) .
mapping _Coerce
instance FromJSON ProductsCustomBatchResponseEntry
where
parseJSON
= withObject "ProductsCustomBatchResponseEntry"
(\ o ->
ProductsCustomBatchResponseEntry' <$>
(o .:? "kind" .!=
"content#productsCustomBatchResponseEntry")
<*> (o .:? "product")
<*> (o .:? "errors")
<*> (o .:? "batchId"))
instance ToJSON ProductsCustomBatchResponseEntry
where
toJSON ProductsCustomBatchResponseEntry'{..}
= object
(catMaybes
[Just ("kind" .= _proKind),
("product" .=) <$> _proProduct,
("errors" .=) <$> _proErrors,
("batchId" .=) <$> _proBatchId])
data OrderPaymentMethod = OrderPaymentMethod'
{ _opmExpirationMonth :: !(Maybe (Textual Int32))
, _opmExpirationYear :: !(Maybe (Textual Int32))
, _opmPhoneNumber :: !(Maybe Text)
, _opmBillingAddress :: !(Maybe OrderAddress)
, _opmLastFourDigits :: !(Maybe Text)
, _opmType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderPaymentMethod
:: OrderPaymentMethod
orderPaymentMethod =
OrderPaymentMethod'
{ _opmExpirationMonth = Nothing
, _opmExpirationYear = Nothing
, _opmPhoneNumber = Nothing
, _opmBillingAddress = Nothing
, _opmLastFourDigits = Nothing
, _opmType = Nothing
}
opmExpirationMonth :: Lens' OrderPaymentMethod (Maybe Int32)
opmExpirationMonth
= lens _opmExpirationMonth
(\ s a -> s{_opmExpirationMonth = a})
. mapping _Coerce
opmExpirationYear :: Lens' OrderPaymentMethod (Maybe Int32)
opmExpirationYear
= lens _opmExpirationYear
(\ s a -> s{_opmExpirationYear = a})
. mapping _Coerce
opmPhoneNumber :: Lens' OrderPaymentMethod (Maybe Text)
opmPhoneNumber
= lens _opmPhoneNumber
(\ s a -> s{_opmPhoneNumber = a})
opmBillingAddress :: Lens' OrderPaymentMethod (Maybe OrderAddress)
opmBillingAddress
= lens _opmBillingAddress
(\ s a -> s{_opmBillingAddress = a})
opmLastFourDigits :: Lens' OrderPaymentMethod (Maybe Text)
opmLastFourDigits
= lens _opmLastFourDigits
(\ s a -> s{_opmLastFourDigits = a})
opmType :: Lens' OrderPaymentMethod (Maybe Text)
opmType = lens _opmType (\ s a -> s{_opmType = a})
instance FromJSON OrderPaymentMethod where
parseJSON
= withObject "OrderPaymentMethod"
(\ o ->
OrderPaymentMethod' <$>
(o .:? "expirationMonth") <*>
(o .:? "expirationYear")
<*> (o .:? "phoneNumber")
<*> (o .:? "billingAddress")
<*> (o .:? "lastFourDigits")
<*> (o .:? "type"))
instance ToJSON OrderPaymentMethod where
toJSON OrderPaymentMethod'{..}
= object
(catMaybes
[("expirationMonth" .=) <$> _opmExpirationMonth,
("expirationYear" .=) <$> _opmExpirationYear,
("phoneNumber" .=) <$> _opmPhoneNumber,
("billingAddress" .=) <$> _opmBillingAddress,
("lastFourDigits" .=) <$> _opmLastFourDigits,
("type" .=) <$> _opmType])
data Product = Product'
{ _ppDisplayAdsLink :: !(Maybe Text)
, _ppCustomLabel1 :: !(Maybe Text)
, _ppShippingWidth :: !(Maybe ProductShippingDimension)
, _ppCustomGroups :: !(Maybe [ProductCustomGroup])
, _ppImageLink :: !(Maybe Text)
, _ppDisplayAdsValue :: !(Maybe (Textual Double))
, _ppLoyaltyPoints :: !(Maybe LoyaltyPoints)
, _ppAdditionalImageLinks :: !(Maybe [Text])
, _ppValidatedDestinations :: !(Maybe [Text])
, _ppColor :: !(Maybe Text)
, _ppCustomLabel0 :: !(Maybe Text)
, _ppKind :: !Text
, _ppMultipack :: !(Maybe (Textual Int64))
, _ppPattern :: !(Maybe Text)
, _ppLink :: !(Maybe Text)
, _ppSizeSystem :: !(Maybe Text)
, _ppUnitPricingBaseMeasure :: !(Maybe ProductUnitPricingBaseMeasure)
, _ppTaxes :: !(Maybe [ProductTax])
, _ppMaterial :: !(Maybe Text)
, _ppInstallment :: !(Maybe Installment)
, _ppChannel :: !(Maybe Text)
, _ppProductType :: !(Maybe Text)
, _ppIdentifierExists :: !(Maybe Bool)
, _ppOnlineOnly :: !(Maybe Bool)
, _ppBrand :: !(Maybe Text)
, _ppUnitPricingMeasure :: !(Maybe ProductUnitPricingMeasure)
, _ppSalePrice :: !(Maybe Price)
, _ppShippingLength :: !(Maybe ProductShippingDimension)
, _ppCustomLabel3 :: !(Maybe Text)
, _ppWarnings :: !(Maybe [Error'])
, _ppAdditionalProductTypes :: !(Maybe [Text])
, _ppAvailability :: !(Maybe Text)
, _ppTargetCountry :: !(Maybe Text)
, _ppShippingLabel :: !(Maybe Text)
, _ppCustomAttributes :: !(Maybe [ProductCustomAttribute])
, _ppGtin :: !(Maybe Text)
, _ppAgeGroup :: !(Maybe Text)
, _ppDisplayAdsTitle :: !(Maybe Text)
, _ppGender :: !(Maybe Text)
, _ppDestinations :: !(Maybe [ProductDestination])
, _ppExpirationDate :: !(Maybe Text)
, _ppItemGroupId :: !(Maybe Text)
, _ppAdwordsGrouping :: !(Maybe Text)
, _ppSalePriceEffectiveDate :: !(Maybe Text)
, _ppCustomLabel2 :: !(Maybe Text)
, _ppGoogleProductCategory :: !(Maybe Text)
, _ppShipping :: !(Maybe [ProductShipping])
, _ppAdwordsRedirect :: !(Maybe Text)
, _ppShippingWeight :: !(Maybe ProductShippingWeight)
, _ppSellOnGoogleQuantity :: !(Maybe (Textual Int64))
, _ppShippingHeight :: !(Maybe ProductShippingDimension)
, _ppAvailabilityDate :: !(Maybe Text)
, _ppOfferId :: !(Maybe Text)
, _ppId :: !(Maybe Text)
, _ppAdwordsLabels :: !(Maybe [Text])
, _ppPrice :: !(Maybe Price)
, _ppPromotionIds :: !(Maybe [Text])
, _ppSizeType :: !(Maybe Text)
, _ppMobileLink :: !(Maybe Text)
, _ppTitle :: !(Maybe Text)
, _ppAdult :: !(Maybe Bool)
, _ppContentLanguage :: !(Maybe Text)
, _ppAspects :: !(Maybe [ProductAspect])
, _ppEnergyEfficiencyClass :: !(Maybe Text)
, _ppDisplayAdsSimilarIds :: !(Maybe [Text])
, _ppMpn :: !(Maybe Text)
, _ppCondition :: !(Maybe Text)
, _ppSizes :: !(Maybe [Text])
, _ppIsBundle :: !(Maybe Bool)
, _ppDescription :: !(Maybe Text)
, _ppCustomLabel4 :: !(Maybe Text)
, _ppDisplayAdsId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
product
:: Product
product =
Product'
{ _ppDisplayAdsLink = Nothing
, _ppCustomLabel1 = Nothing
, _ppShippingWidth = Nothing
, _ppCustomGroups = Nothing
, _ppImageLink = Nothing
, _ppDisplayAdsValue = Nothing
, _ppLoyaltyPoints = Nothing
, _ppAdditionalImageLinks = Nothing
, _ppValidatedDestinations = Nothing
, _ppColor = Nothing
, _ppCustomLabel0 = Nothing
, _ppKind = "content#product"
, _ppMultipack = Nothing
, _ppPattern = Nothing
, _ppLink = Nothing
, _ppSizeSystem = Nothing
, _ppUnitPricingBaseMeasure = Nothing
, _ppTaxes = Nothing
, _ppMaterial = Nothing
, _ppInstallment = Nothing
, _ppChannel = Nothing
, _ppProductType = Nothing
, _ppIdentifierExists = Nothing
, _ppOnlineOnly = Nothing
, _ppBrand = Nothing
, _ppUnitPricingMeasure = Nothing
, _ppSalePrice = Nothing
, _ppShippingLength = Nothing
, _ppCustomLabel3 = Nothing
, _ppWarnings = Nothing
, _ppAdditionalProductTypes = Nothing
, _ppAvailability = Nothing
, _ppTargetCountry = Nothing
, _ppShippingLabel = Nothing
, _ppCustomAttributes = Nothing
, _ppGtin = Nothing
, _ppAgeGroup = Nothing
, _ppDisplayAdsTitle = Nothing
, _ppGender = Nothing
, _ppDestinations = Nothing
, _ppExpirationDate = Nothing
, _ppItemGroupId = Nothing
, _ppAdwordsGrouping = Nothing
, _ppSalePriceEffectiveDate = Nothing
, _ppCustomLabel2 = Nothing
, _ppGoogleProductCategory = Nothing
, _ppShipping = Nothing
, _ppAdwordsRedirect = Nothing
, _ppShippingWeight = Nothing
, _ppSellOnGoogleQuantity = Nothing
, _ppShippingHeight = Nothing
, _ppAvailabilityDate = Nothing
, _ppOfferId = Nothing
, _ppId = Nothing
, _ppAdwordsLabels = Nothing
, _ppPrice = Nothing
, _ppPromotionIds = Nothing
, _ppSizeType = Nothing
, _ppMobileLink = Nothing
, _ppTitle = Nothing
, _ppAdult = Nothing
, _ppContentLanguage = Nothing
, _ppAspects = Nothing
, _ppEnergyEfficiencyClass = Nothing
, _ppDisplayAdsSimilarIds = Nothing
, _ppMpn = Nothing
, _ppCondition = Nothing
, _ppSizes = Nothing
, _ppIsBundle = Nothing
, _ppDescription = Nothing
, _ppCustomLabel4 = Nothing
, _ppDisplayAdsId = Nothing
}
ppDisplayAdsLink :: Lens' Product (Maybe Text)
ppDisplayAdsLink
= lens _ppDisplayAdsLink
(\ s a -> s{_ppDisplayAdsLink = a})
ppCustomLabel1 :: Lens' Product (Maybe Text)
ppCustomLabel1
= lens _ppCustomLabel1
(\ s a -> s{_ppCustomLabel1 = a})
ppShippingWidth :: Lens' Product (Maybe ProductShippingDimension)
ppShippingWidth
= lens _ppShippingWidth
(\ s a -> s{_ppShippingWidth = a})
ppCustomGroups :: Lens' Product [ProductCustomGroup]
ppCustomGroups
= lens _ppCustomGroups
(\ s a -> s{_ppCustomGroups = a})
. _Default
. _Coerce
ppImageLink :: Lens' Product (Maybe Text)
ppImageLink
= lens _ppImageLink (\ s a -> s{_ppImageLink = a})
ppDisplayAdsValue :: Lens' Product (Maybe Double)
ppDisplayAdsValue
= lens _ppDisplayAdsValue
(\ s a -> s{_ppDisplayAdsValue = a})
. mapping _Coerce
ppLoyaltyPoints :: Lens' Product (Maybe LoyaltyPoints)
ppLoyaltyPoints
= lens _ppLoyaltyPoints
(\ s a -> s{_ppLoyaltyPoints = a})
ppAdditionalImageLinks :: Lens' Product [Text]
ppAdditionalImageLinks
= lens _ppAdditionalImageLinks
(\ s a -> s{_ppAdditionalImageLinks = a})
. _Default
. _Coerce
ppValidatedDestinations :: Lens' Product [Text]
ppValidatedDestinations
= lens _ppValidatedDestinations
(\ s a -> s{_ppValidatedDestinations = a})
. _Default
. _Coerce
ppColor :: Lens' Product (Maybe Text)
ppColor = lens _ppColor (\ s a -> s{_ppColor = a})
ppCustomLabel0 :: Lens' Product (Maybe Text)
ppCustomLabel0
= lens _ppCustomLabel0
(\ s a -> s{_ppCustomLabel0 = a})
ppKind :: Lens' Product Text
ppKind = lens _ppKind (\ s a -> s{_ppKind = a})
ppMultipack :: Lens' Product (Maybe Int64)
ppMultipack
= lens _ppMultipack (\ s a -> s{_ppMultipack = a}) .
mapping _Coerce
ppPattern :: Lens' Product (Maybe Text)
ppPattern
= lens _ppPattern (\ s a -> s{_ppPattern = a})
ppLink :: Lens' Product (Maybe Text)
ppLink = lens _ppLink (\ s a -> s{_ppLink = a})
ppSizeSystem :: Lens' Product (Maybe Text)
ppSizeSystem
= lens _ppSizeSystem (\ s a -> s{_ppSizeSystem = a})
ppUnitPricingBaseMeasure :: Lens' Product (Maybe ProductUnitPricingBaseMeasure)
ppUnitPricingBaseMeasure
= lens _ppUnitPricingBaseMeasure
(\ s a -> s{_ppUnitPricingBaseMeasure = a})
ppTaxes :: Lens' Product [ProductTax]
ppTaxes
= lens _ppTaxes (\ s a -> s{_ppTaxes = a}) . _Default
. _Coerce
ppMaterial :: Lens' Product (Maybe Text)
ppMaterial
= lens _ppMaterial (\ s a -> s{_ppMaterial = a})
ppInstallment :: Lens' Product (Maybe Installment)
ppInstallment
= lens _ppInstallment
(\ s a -> s{_ppInstallment = a})
ppChannel :: Lens' Product (Maybe Text)
ppChannel
= lens _ppChannel (\ s a -> s{_ppChannel = a})
ppProductType :: Lens' Product (Maybe Text)
ppProductType
= lens _ppProductType
(\ s a -> s{_ppProductType = a})
ppIdentifierExists :: Lens' Product (Maybe Bool)
ppIdentifierExists
= lens _ppIdentifierExists
(\ s a -> s{_ppIdentifierExists = a})
ppOnlineOnly :: Lens' Product (Maybe Bool)
ppOnlineOnly
= lens _ppOnlineOnly (\ s a -> s{_ppOnlineOnly = a})
ppBrand :: Lens' Product (Maybe Text)
ppBrand = lens _ppBrand (\ s a -> s{_ppBrand = a})
ppUnitPricingMeasure :: Lens' Product (Maybe ProductUnitPricingMeasure)
ppUnitPricingMeasure
= lens _ppUnitPricingMeasure
(\ s a -> s{_ppUnitPricingMeasure = a})
ppSalePrice :: Lens' Product (Maybe Price)
ppSalePrice
= lens _ppSalePrice (\ s a -> s{_ppSalePrice = a})
ppShippingLength :: Lens' Product (Maybe ProductShippingDimension)
ppShippingLength
= lens _ppShippingLength
(\ s a -> s{_ppShippingLength = a})
ppCustomLabel3 :: Lens' Product (Maybe Text)
ppCustomLabel3
= lens _ppCustomLabel3
(\ s a -> s{_ppCustomLabel3 = a})
ppWarnings :: Lens' Product [Error']
ppWarnings
= lens _ppWarnings (\ s a -> s{_ppWarnings = a}) .
_Default
. _Coerce
ppAdditionalProductTypes :: Lens' Product [Text]
ppAdditionalProductTypes
= lens _ppAdditionalProductTypes
(\ s a -> s{_ppAdditionalProductTypes = a})
. _Default
. _Coerce
ppAvailability :: Lens' Product (Maybe Text)
ppAvailability
= lens _ppAvailability
(\ s a -> s{_ppAvailability = a})
ppTargetCountry :: Lens' Product (Maybe Text)
ppTargetCountry
= lens _ppTargetCountry
(\ s a -> s{_ppTargetCountry = a})
ppShippingLabel :: Lens' Product (Maybe Text)
ppShippingLabel
= lens _ppShippingLabel
(\ s a -> s{_ppShippingLabel = a})
ppCustomAttributes :: Lens' Product [ProductCustomAttribute]
ppCustomAttributes
= lens _ppCustomAttributes
(\ s a -> s{_ppCustomAttributes = a})
. _Default
. _Coerce
ppGtin :: Lens' Product (Maybe Text)
ppGtin = lens _ppGtin (\ s a -> s{_ppGtin = a})
ppAgeGroup :: Lens' Product (Maybe Text)
ppAgeGroup
= lens _ppAgeGroup (\ s a -> s{_ppAgeGroup = a})
ppDisplayAdsTitle :: Lens' Product (Maybe Text)
ppDisplayAdsTitle
= lens _ppDisplayAdsTitle
(\ s a -> s{_ppDisplayAdsTitle = a})
ppGender :: Lens' Product (Maybe Text)
ppGender = lens _ppGender (\ s a -> s{_ppGender = a})
ppDestinations :: Lens' Product [ProductDestination]
ppDestinations
= lens _ppDestinations
(\ s a -> s{_ppDestinations = a})
. _Default
. _Coerce
ppExpirationDate :: Lens' Product (Maybe Text)
ppExpirationDate
= lens _ppExpirationDate
(\ s a -> s{_ppExpirationDate = a})
ppItemGroupId :: Lens' Product (Maybe Text)
ppItemGroupId
= lens _ppItemGroupId
(\ s a -> s{_ppItemGroupId = a})
ppAdwordsGrouping :: Lens' Product (Maybe Text)
ppAdwordsGrouping
= lens _ppAdwordsGrouping
(\ s a -> s{_ppAdwordsGrouping = a})
ppSalePriceEffectiveDate :: Lens' Product (Maybe Text)
ppSalePriceEffectiveDate
= lens _ppSalePriceEffectiveDate
(\ s a -> s{_ppSalePriceEffectiveDate = a})
ppCustomLabel2 :: Lens' Product (Maybe Text)
ppCustomLabel2
= lens _ppCustomLabel2
(\ s a -> s{_ppCustomLabel2 = a})
ppGoogleProductCategory :: Lens' Product (Maybe Text)
ppGoogleProductCategory
= lens _ppGoogleProductCategory
(\ s a -> s{_ppGoogleProductCategory = a})
ppShipping :: Lens' Product [ProductShipping]
ppShipping
= lens _ppShipping (\ s a -> s{_ppShipping = a}) .
_Default
. _Coerce
ppAdwordsRedirect :: Lens' Product (Maybe Text)
ppAdwordsRedirect
= lens _ppAdwordsRedirect
(\ s a -> s{_ppAdwordsRedirect = a})
ppShippingWeight :: Lens' Product (Maybe ProductShippingWeight)
ppShippingWeight
= lens _ppShippingWeight
(\ s a -> s{_ppShippingWeight = a})
ppSellOnGoogleQuantity :: Lens' Product (Maybe Int64)
ppSellOnGoogleQuantity
= lens _ppSellOnGoogleQuantity
(\ s a -> s{_ppSellOnGoogleQuantity = a})
. mapping _Coerce
ppShippingHeight :: Lens' Product (Maybe ProductShippingDimension)
ppShippingHeight
= lens _ppShippingHeight
(\ s a -> s{_ppShippingHeight = a})
ppAvailabilityDate :: Lens' Product (Maybe Text)
ppAvailabilityDate
= lens _ppAvailabilityDate
(\ s a -> s{_ppAvailabilityDate = a})
ppOfferId :: Lens' Product (Maybe Text)
ppOfferId
= lens _ppOfferId (\ s a -> s{_ppOfferId = a})
ppId :: Lens' Product (Maybe Text)
ppId = lens _ppId (\ s a -> s{_ppId = a})
ppAdwordsLabels :: Lens' Product [Text]
ppAdwordsLabels
= lens _ppAdwordsLabels
(\ s a -> s{_ppAdwordsLabels = a})
. _Default
. _Coerce
ppPrice :: Lens' Product (Maybe Price)
ppPrice = lens _ppPrice (\ s a -> s{_ppPrice = a})
ppPromotionIds :: Lens' Product [Text]
ppPromotionIds
= lens _ppPromotionIds
(\ s a -> s{_ppPromotionIds = a})
. _Default
. _Coerce
ppSizeType :: Lens' Product (Maybe Text)
ppSizeType
= lens _ppSizeType (\ s a -> s{_ppSizeType = a})
ppMobileLink :: Lens' Product (Maybe Text)
ppMobileLink
= lens _ppMobileLink (\ s a -> s{_ppMobileLink = a})
ppTitle :: Lens' Product (Maybe Text)
ppTitle = lens _ppTitle (\ s a -> s{_ppTitle = a})
ppAdult :: Lens' Product (Maybe Bool)
ppAdult = lens _ppAdult (\ s a -> s{_ppAdult = a})
ppContentLanguage :: Lens' Product (Maybe Text)
ppContentLanguage
= lens _ppContentLanguage
(\ s a -> s{_ppContentLanguage = a})
ppAspects :: Lens' Product [ProductAspect]
ppAspects
= lens _ppAspects (\ s a -> s{_ppAspects = a}) .
_Default
. _Coerce
ppEnergyEfficiencyClass :: Lens' Product (Maybe Text)
ppEnergyEfficiencyClass
= lens _ppEnergyEfficiencyClass
(\ s a -> s{_ppEnergyEfficiencyClass = a})
ppDisplayAdsSimilarIds :: Lens' Product [Text]
ppDisplayAdsSimilarIds
= lens _ppDisplayAdsSimilarIds
(\ s a -> s{_ppDisplayAdsSimilarIds = a})
. _Default
. _Coerce
ppMpn :: Lens' Product (Maybe Text)
ppMpn = lens _ppMpn (\ s a -> s{_ppMpn = a})
ppCondition :: Lens' Product (Maybe Text)
ppCondition
= lens _ppCondition (\ s a -> s{_ppCondition = a})
ppSizes :: Lens' Product [Text]
ppSizes
= lens _ppSizes (\ s a -> s{_ppSizes = a}) . _Default
. _Coerce
ppIsBundle :: Lens' Product (Maybe Bool)
ppIsBundle
= lens _ppIsBundle (\ s a -> s{_ppIsBundle = a})
ppDescription :: Lens' Product (Maybe Text)
ppDescription
= lens _ppDescription
(\ s a -> s{_ppDescription = a})
ppCustomLabel4 :: Lens' Product (Maybe Text)
ppCustomLabel4
= lens _ppCustomLabel4
(\ s a -> s{_ppCustomLabel4 = a})
ppDisplayAdsId :: Lens' Product (Maybe Text)
ppDisplayAdsId
= lens _ppDisplayAdsId
(\ s a -> s{_ppDisplayAdsId = a})
instance FromJSON Product where
parseJSON
= withObject "Product"
(\ o ->
Product' <$>
(o .:? "displayAdsLink") <*> (o .:? "customLabel1")
<*> (o .:? "shippingWidth")
<*> (o .:? "customGroups" .!= mempty)
<*> (o .:? "imageLink")
<*> (o .:? "displayAdsValue")
<*> (o .:? "loyaltyPoints")
<*> (o .:? "additionalImageLinks" .!= mempty)
<*> (o .:? "validatedDestinations" .!= mempty)
<*> (o .:? "color")
<*> (o .:? "customLabel0")
<*> (o .:? "kind" .!= "content#product")
<*> (o .:? "multipack")
<*> (o .:? "pattern")
<*> (o .:? "link")
<*> (o .:? "sizeSystem")
<*> (o .:? "unitPricingBaseMeasure")
<*> (o .:? "taxes" .!= mempty)
<*> (o .:? "material")
<*> (o .:? "installment")
<*> (o .:? "channel")
<*> (o .:? "productType")
<*> (o .:? "identifierExists")
<*> (o .:? "onlineOnly")
<*> (o .:? "brand")
<*> (o .:? "unitPricingMeasure")
<*> (o .:? "salePrice")
<*> (o .:? "shippingLength")
<*> (o .:? "customLabel3")
<*> (o .:? "warnings" .!= mempty)
<*> (o .:? "additionalProductTypes" .!= mempty)
<*> (o .:? "availability")
<*> (o .:? "targetCountry")
<*> (o .:? "shippingLabel")
<*> (o .:? "customAttributes" .!= mempty)
<*> (o .:? "gtin")
<*> (o .:? "ageGroup")
<*> (o .:? "displayAdsTitle")
<*> (o .:? "gender")
<*> (o .:? "destinations" .!= mempty)
<*> (o .:? "expirationDate")
<*> (o .:? "itemGroupId")
<*> (o .:? "adwordsGrouping")
<*> (o .:? "salePriceEffectiveDate")
<*> (o .:? "customLabel2")
<*> (o .:? "googleProductCategory")
<*> (o .:? "shipping" .!= mempty)
<*> (o .:? "adwordsRedirect")
<*> (o .:? "shippingWeight")
<*> (o .:? "sellOnGoogleQuantity")
<*> (o .:? "shippingHeight")
<*> (o .:? "availabilityDate")
<*> (o .:? "offerId")
<*> (o .:? "id")
<*> (o .:? "adwordsLabels" .!= mempty)
<*> (o .:? "price")
<*> (o .:? "promotionIds" .!= mempty)
<*> (o .:? "sizeType")
<*> (o .:? "mobileLink")
<*> (o .:? "title")
<*> (o .:? "adult")
<*> (o .:? "contentLanguage")
<*> (o .:? "aspects" .!= mempty)
<*> (o .:? "energyEfficiencyClass")
<*> (o .:? "displayAdsSimilarIds" .!= mempty)
<*> (o .:? "mpn")
<*> (o .:? "condition")
<*> (o .:? "sizes" .!= mempty)
<*> (o .:? "isBundle")
<*> (o .:? "description")
<*> (o .:? "customLabel4")
<*> (o .:? "displayAdsId"))
instance ToJSON Product where
toJSON Product'{..}
= object
(catMaybes
[("displayAdsLink" .=) <$> _ppDisplayAdsLink,
("customLabel1" .=) <$> _ppCustomLabel1,
("shippingWidth" .=) <$> _ppShippingWidth,
("customGroups" .=) <$> _ppCustomGroups,
("imageLink" .=) <$> _ppImageLink,
("displayAdsValue" .=) <$> _ppDisplayAdsValue,
("loyaltyPoints" .=) <$> _ppLoyaltyPoints,
("additionalImageLinks" .=) <$>
_ppAdditionalImageLinks,
("validatedDestinations" .=) <$>
_ppValidatedDestinations,
("color" .=) <$> _ppColor,
("customLabel0" .=) <$> _ppCustomLabel0,
Just ("kind" .= _ppKind),
("multipack" .=) <$> _ppMultipack,
("pattern" .=) <$> _ppPattern,
("link" .=) <$> _ppLink,
("sizeSystem" .=) <$> _ppSizeSystem,
("unitPricingBaseMeasure" .=) <$>
_ppUnitPricingBaseMeasure,
("taxes" .=) <$> _ppTaxes,
("material" .=) <$> _ppMaterial,
("installment" .=) <$> _ppInstallment,
("channel" .=) <$> _ppChannel,
("productType" .=) <$> _ppProductType,
("identifierExists" .=) <$> _ppIdentifierExists,
("onlineOnly" .=) <$> _ppOnlineOnly,
("brand" .=) <$> _ppBrand,
("unitPricingMeasure" .=) <$> _ppUnitPricingMeasure,
("salePrice" .=) <$> _ppSalePrice,
("shippingLength" .=) <$> _ppShippingLength,
("customLabel3" .=) <$> _ppCustomLabel3,
("warnings" .=) <$> _ppWarnings,
("additionalProductTypes" .=) <$>
_ppAdditionalProductTypes,
("availability" .=) <$> _ppAvailability,
("targetCountry" .=) <$> _ppTargetCountry,
("shippingLabel" .=) <$> _ppShippingLabel,
("customAttributes" .=) <$> _ppCustomAttributes,
("gtin" .=) <$> _ppGtin,
("ageGroup" .=) <$> _ppAgeGroup,
("displayAdsTitle" .=) <$> _ppDisplayAdsTitle,
("gender" .=) <$> _ppGender,
("destinations" .=) <$> _ppDestinations,
("expirationDate" .=) <$> _ppExpirationDate,
("itemGroupId" .=) <$> _ppItemGroupId,
("adwordsGrouping" .=) <$> _ppAdwordsGrouping,
("salePriceEffectiveDate" .=) <$>
_ppSalePriceEffectiveDate,
("customLabel2" .=) <$> _ppCustomLabel2,
("googleProductCategory" .=) <$>
_ppGoogleProductCategory,
("shipping" .=) <$> _ppShipping,
("adwordsRedirect" .=) <$> _ppAdwordsRedirect,
("shippingWeight" .=) <$> _ppShippingWeight,
("sellOnGoogleQuantity" .=) <$>
_ppSellOnGoogleQuantity,
("shippingHeight" .=) <$> _ppShippingHeight,
("availabilityDate" .=) <$> _ppAvailabilityDate,
("offerId" .=) <$> _ppOfferId, ("id" .=) <$> _ppId,
("adwordsLabels" .=) <$> _ppAdwordsLabels,
("price" .=) <$> _ppPrice,
("promotionIds" .=) <$> _ppPromotionIds,
("sizeType" .=) <$> _ppSizeType,
("mobileLink" .=) <$> _ppMobileLink,
("title" .=) <$> _ppTitle, ("adult" .=) <$> _ppAdult,
("contentLanguage" .=) <$> _ppContentLanguage,
("aspects" .=) <$> _ppAspects,
("energyEfficiencyClass" .=) <$>
_ppEnergyEfficiencyClass,
("displayAdsSimilarIds" .=) <$>
_ppDisplayAdsSimilarIds,
("mpn" .=) <$> _ppMpn,
("condition" .=) <$> _ppCondition,
("sizes" .=) <$> _ppSizes,
("isBundle" .=) <$> _ppIsBundle,
("description" .=) <$> _ppDescription,
("customLabel4" .=) <$> _ppCustomLabel4,
("displayAdsId" .=) <$> _ppDisplayAdsId])
data Errors = Errors'
{ _errCode :: !(Maybe (Textual Word32))
, _errMessage :: !(Maybe Text)
, _errErrors :: !(Maybe [Error'])
} deriving (Eq,Show,Data,Typeable,Generic)
errors
:: Errors
errors =
Errors'
{ _errCode = Nothing
, _errMessage = Nothing
, _errErrors = Nothing
}
errCode :: Lens' Errors (Maybe Word32)
errCode
= lens _errCode (\ s a -> s{_errCode = a}) .
mapping _Coerce
errMessage :: Lens' Errors (Maybe Text)
errMessage
= lens _errMessage (\ s a -> s{_errMessage = a})
errErrors :: Lens' Errors [Error']
errErrors
= lens _errErrors (\ s a -> s{_errErrors = a}) .
_Default
. _Coerce
instance FromJSON Errors where
parseJSON
= withObject "Errors"
(\ o ->
Errors' <$>
(o .:? "code") <*> (o .:? "message") <*>
(o .:? "errors" .!= mempty))
instance ToJSON Errors where
toJSON Errors'{..}
= object
(catMaybes
[("code" .=) <$> _errCode,
("message" .=) <$> _errMessage,
("errors" .=) <$> _errErrors])
data AccountstatusesCustomBatchResponseEntry = AccountstatusesCustomBatchResponseEntry'
{ _acccAccountStatus :: !(Maybe AccountStatus)
, _acccErrors :: !(Maybe Errors)
, _acccBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountstatusesCustomBatchResponseEntry
:: AccountstatusesCustomBatchResponseEntry
accountstatusesCustomBatchResponseEntry =
AccountstatusesCustomBatchResponseEntry'
{ _acccAccountStatus = Nothing
, _acccErrors = Nothing
, _acccBatchId = Nothing
}
acccAccountStatus :: Lens' AccountstatusesCustomBatchResponseEntry (Maybe AccountStatus)
acccAccountStatus
= lens _acccAccountStatus
(\ s a -> s{_acccAccountStatus = a})
acccErrors :: Lens' AccountstatusesCustomBatchResponseEntry (Maybe Errors)
acccErrors
= lens _acccErrors (\ s a -> s{_acccErrors = a})
acccBatchId :: Lens' AccountstatusesCustomBatchResponseEntry (Maybe Word32)
acccBatchId
= lens _acccBatchId (\ s a -> s{_acccBatchId = a}) .
mapping _Coerce
instance FromJSON
AccountstatusesCustomBatchResponseEntry where
parseJSON
= withObject
"AccountstatusesCustomBatchResponseEntry"
(\ o ->
AccountstatusesCustomBatchResponseEntry' <$>
(o .:? "accountStatus") <*> (o .:? "errors") <*>
(o .:? "batchId"))
instance ToJSON
AccountstatusesCustomBatchResponseEntry where
toJSON AccountstatusesCustomBatchResponseEntry'{..}
= object
(catMaybes
[("accountStatus" .=) <$> _acccAccountStatus,
("errors" .=) <$> _acccErrors,
("batchId" .=) <$> _acccBatchId])
newtype InventorySetResponse = InventorySetResponse'
{ _isrKind :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
inventorySetResponse
:: InventorySetResponse
inventorySetResponse =
InventorySetResponse'
{ _isrKind = "content#inventorySetResponse"
}
isrKind :: Lens' InventorySetResponse Text
isrKind = lens _isrKind (\ s a -> s{_isrKind = a})
instance FromJSON InventorySetResponse where
parseJSON
= withObject "InventorySetResponse"
(\ o ->
InventorySetResponse' <$>
(o .:? "kind" .!= "content#inventorySetResponse"))
instance ToJSON InventorySetResponse where
toJSON InventorySetResponse'{..}
= object (catMaybes [Just ("kind" .= _isrKind)])
data OrdersCancelLineItemResponse = OrdersCancelLineItemResponse'
{ _oclirKind :: !Text
, _oclirExecutionStatus :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCancelLineItemResponse
:: OrdersCancelLineItemResponse
ordersCancelLineItemResponse =
OrdersCancelLineItemResponse'
{ _oclirKind = "content#ordersCancelLineItemResponse"
, _oclirExecutionStatus = Nothing
}
oclirKind :: Lens' OrdersCancelLineItemResponse Text
oclirKind
= lens _oclirKind (\ s a -> s{_oclirKind = a})
oclirExecutionStatus :: Lens' OrdersCancelLineItemResponse (Maybe Text)
oclirExecutionStatus
= lens _oclirExecutionStatus
(\ s a -> s{_oclirExecutionStatus = a})
instance FromJSON OrdersCancelLineItemResponse where
parseJSON
= withObject "OrdersCancelLineItemResponse"
(\ o ->
OrdersCancelLineItemResponse' <$>
(o .:? "kind" .!=
"content#ordersCancelLineItemResponse")
<*> (o .:? "executionStatus"))
instance ToJSON OrdersCancelLineItemResponse where
toJSON OrdersCancelLineItemResponse'{..}
= object
(catMaybes
[Just ("kind" .= _oclirKind),
("executionStatus" .=) <$> _oclirExecutionStatus])
data TestOrderLineItem = TestOrderLineItem'
{ _toliQuantityOrdered :: !(Maybe (Textual Word32))
, _toliReturnInfo :: !(Maybe OrderLineItemReturnInfo)
, _toliShippingDetails :: !(Maybe OrderLineItemShippingDetails)
, _toliProduct :: !(Maybe TestOrderLineItemProduct)
, _toliUnitTax :: !(Maybe Price)
} deriving (Eq,Show,Data,Typeable,Generic)
testOrderLineItem
:: TestOrderLineItem
testOrderLineItem =
TestOrderLineItem'
{ _toliQuantityOrdered = Nothing
, _toliReturnInfo = Nothing
, _toliShippingDetails = Nothing
, _toliProduct = Nothing
, _toliUnitTax = Nothing
}
toliQuantityOrdered :: Lens' TestOrderLineItem (Maybe Word32)
toliQuantityOrdered
= lens _toliQuantityOrdered
(\ s a -> s{_toliQuantityOrdered = a})
. mapping _Coerce
toliReturnInfo :: Lens' TestOrderLineItem (Maybe OrderLineItemReturnInfo)
toliReturnInfo
= lens _toliReturnInfo
(\ s a -> s{_toliReturnInfo = a})
toliShippingDetails :: Lens' TestOrderLineItem (Maybe OrderLineItemShippingDetails)
toliShippingDetails
= lens _toliShippingDetails
(\ s a -> s{_toliShippingDetails = a})
toliProduct :: Lens' TestOrderLineItem (Maybe TestOrderLineItemProduct)
toliProduct
= lens _toliProduct (\ s a -> s{_toliProduct = a})
toliUnitTax :: Lens' TestOrderLineItem (Maybe Price)
toliUnitTax
= lens _toliUnitTax (\ s a -> s{_toliUnitTax = a})
instance FromJSON TestOrderLineItem where
parseJSON
= withObject "TestOrderLineItem"
(\ o ->
TestOrderLineItem' <$>
(o .:? "quantityOrdered") <*> (o .:? "returnInfo")
<*> (o .:? "shippingDetails")
<*> (o .:? "product")
<*> (o .:? "unitTax"))
instance ToJSON TestOrderLineItem where
toJSON TestOrderLineItem'{..}
= object
(catMaybes
[("quantityOrdered" .=) <$> _toliQuantityOrdered,
("returnInfo" .=) <$> _toliReturnInfo,
("shippingDetails" .=) <$> _toliShippingDetails,
("product" .=) <$> _toliProduct,
("unitTax" .=) <$> _toliUnitTax])
data ProductstatusesCustomBatchRequestEntry = ProductstatusesCustomBatchRequestEntry'
{ _pcbrecMerchantId :: !(Maybe (Textual Word64))
, _pcbrecMethod :: !(Maybe Text)
, _pcbrecProductId :: !(Maybe Text)
, _pcbrecBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
productstatusesCustomBatchRequestEntry
:: ProductstatusesCustomBatchRequestEntry
productstatusesCustomBatchRequestEntry =
ProductstatusesCustomBatchRequestEntry'
{ _pcbrecMerchantId = Nothing
, _pcbrecMethod = Nothing
, _pcbrecProductId = Nothing
, _pcbrecBatchId = Nothing
}
pcbrecMerchantId :: Lens' ProductstatusesCustomBatchRequestEntry (Maybe Word64)
pcbrecMerchantId
= lens _pcbrecMerchantId
(\ s a -> s{_pcbrecMerchantId = a})
. mapping _Coerce
pcbrecMethod :: Lens' ProductstatusesCustomBatchRequestEntry (Maybe Text)
pcbrecMethod
= lens _pcbrecMethod (\ s a -> s{_pcbrecMethod = a})
pcbrecProductId :: Lens' ProductstatusesCustomBatchRequestEntry (Maybe Text)
pcbrecProductId
= lens _pcbrecProductId
(\ s a -> s{_pcbrecProductId = a})
pcbrecBatchId :: Lens' ProductstatusesCustomBatchRequestEntry (Maybe Word32)
pcbrecBatchId
= lens _pcbrecBatchId
(\ s a -> s{_pcbrecBatchId = a})
. mapping _Coerce
instance FromJSON
ProductstatusesCustomBatchRequestEntry where
parseJSON
= withObject "ProductstatusesCustomBatchRequestEntry"
(\ o ->
ProductstatusesCustomBatchRequestEntry' <$>
(o .:? "merchantId") <*> (o .:? "method") <*>
(o .:? "productId")
<*> (o .:? "batchId"))
instance ToJSON
ProductstatusesCustomBatchRequestEntry where
toJSON ProductstatusesCustomBatchRequestEntry'{..}
= object
(catMaybes
[("merchantId" .=) <$> _pcbrecMerchantId,
("method" .=) <$> _pcbrecMethod,
("productId" .=) <$> _pcbrecProductId,
("batchId" .=) <$> _pcbrecBatchId])
data ShippingSettingsCustomBatchResponse = ShippingSettingsCustomBatchResponse'
{ _shiEntries :: !(Maybe [ShippingSettingsCustomBatchResponseEntry])
, _shiKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
shippingSettingsCustomBatchResponse
:: ShippingSettingsCustomBatchResponse
shippingSettingsCustomBatchResponse =
ShippingSettingsCustomBatchResponse'
{ _shiEntries = Nothing
, _shiKind = "content#shippingsettingsCustomBatchResponse"
}
shiEntries :: Lens' ShippingSettingsCustomBatchResponse [ShippingSettingsCustomBatchResponseEntry]
shiEntries
= lens _shiEntries (\ s a -> s{_shiEntries = a}) .
_Default
. _Coerce
shiKind :: Lens' ShippingSettingsCustomBatchResponse Text
shiKind = lens _shiKind (\ s a -> s{_shiKind = a})
instance FromJSON ShippingSettingsCustomBatchResponse
where
parseJSON
= withObject "ShippingSettingsCustomBatchResponse"
(\ o ->
ShippingSettingsCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#shippingsettingsCustomBatchResponse"))
instance ToJSON ShippingSettingsCustomBatchResponse
where
toJSON ShippingSettingsCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _shiEntries,
Just ("kind" .= _shiKind)])
data AccountshippingCustomBatchResponseEntry = AccountshippingCustomBatchResponseEntry'
{ _acbre1Kind :: !Text
, _acbre1Errors :: !(Maybe Errors)
, _acbre1AccountShipping :: !(Maybe AccountShipping)
, _acbre1BatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accountshippingCustomBatchResponseEntry
:: AccountshippingCustomBatchResponseEntry
accountshippingCustomBatchResponseEntry =
AccountshippingCustomBatchResponseEntry'
{ _acbre1Kind = "content#accountshippingCustomBatchResponseEntry"
, _acbre1Errors = Nothing
, _acbre1AccountShipping = Nothing
, _acbre1BatchId = Nothing
}
acbre1Kind :: Lens' AccountshippingCustomBatchResponseEntry Text
acbre1Kind
= lens _acbre1Kind (\ s a -> s{_acbre1Kind = a})
acbre1Errors :: Lens' AccountshippingCustomBatchResponseEntry (Maybe Errors)
acbre1Errors
= lens _acbre1Errors (\ s a -> s{_acbre1Errors = a})
acbre1AccountShipping :: Lens' AccountshippingCustomBatchResponseEntry (Maybe AccountShipping)
acbre1AccountShipping
= lens _acbre1AccountShipping
(\ s a -> s{_acbre1AccountShipping = a})
acbre1BatchId :: Lens' AccountshippingCustomBatchResponseEntry (Maybe Word32)
acbre1BatchId
= lens _acbre1BatchId
(\ s a -> s{_acbre1BatchId = a})
. mapping _Coerce
instance FromJSON
AccountshippingCustomBatchResponseEntry where
parseJSON
= withObject
"AccountshippingCustomBatchResponseEntry"
(\ o ->
AccountshippingCustomBatchResponseEntry' <$>
(o .:? "kind" .!=
"content#accountshippingCustomBatchResponseEntry")
<*> (o .:? "errors")
<*> (o .:? "accountShipping")
<*> (o .:? "batchId"))
instance ToJSON
AccountshippingCustomBatchResponseEntry where
toJSON AccountshippingCustomBatchResponseEntry'{..}
= object
(catMaybes
[Just ("kind" .= _acbre1Kind),
("errors" .=) <$> _acbre1Errors,
("accountShipping" .=) <$> _acbre1AccountShipping,
("batchId" .=) <$> _acbre1BatchId])
data ProductAspect = ProductAspect'
{ _paIntention :: !(Maybe Text)
, _paAspectName :: !(Maybe Text)
, _paDestinationName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productAspect
:: ProductAspect
productAspect =
ProductAspect'
{ _paIntention = Nothing
, _paAspectName = Nothing
, _paDestinationName = Nothing
}
paIntention :: Lens' ProductAspect (Maybe Text)
paIntention
= lens _paIntention (\ s a -> s{_paIntention = a})
paAspectName :: Lens' ProductAspect (Maybe Text)
paAspectName
= lens _paAspectName (\ s a -> s{_paAspectName = a})
paDestinationName :: Lens' ProductAspect (Maybe Text)
paDestinationName
= lens _paDestinationName
(\ s a -> s{_paDestinationName = a})
instance FromJSON ProductAspect where
parseJSON
= withObject "ProductAspect"
(\ o ->
ProductAspect' <$>
(o .:? "intention") <*> (o .:? "aspectName") <*>
(o .:? "destinationName"))
instance ToJSON ProductAspect where
toJSON ProductAspect'{..}
= object
(catMaybes
[("intention" .=) <$> _paIntention,
("aspectName" .=) <$> _paAspectName,
("destinationName" .=) <$> _paDestinationName])
data AccountShipping = AccountShipping'
{ _assRateTables :: !(Maybe [AccountShippingRateTable])
, _assCarrierRates :: !(Maybe [AccountShippingCarrierRate])
, _assKind :: !Text
, _assLocationGroups :: !(Maybe [AccountShippingLocationGroup])
, _assAccountId :: !(Maybe (Textual Word64))
, _assServices :: !(Maybe [AccountShippingShippingService])
} deriving (Eq,Show,Data,Typeable,Generic)
accountShipping
:: AccountShipping
accountShipping =
AccountShipping'
{ _assRateTables = Nothing
, _assCarrierRates = Nothing
, _assKind = "content#accountShipping"
, _assLocationGroups = Nothing
, _assAccountId = Nothing
, _assServices = Nothing
}
assRateTables :: Lens' AccountShipping [AccountShippingRateTable]
assRateTables
= lens _assRateTables
(\ s a -> s{_assRateTables = a})
. _Default
. _Coerce
assCarrierRates :: Lens' AccountShipping [AccountShippingCarrierRate]
assCarrierRates
= lens _assCarrierRates
(\ s a -> s{_assCarrierRates = a})
. _Default
. _Coerce
assKind :: Lens' AccountShipping Text
assKind = lens _assKind (\ s a -> s{_assKind = a})
assLocationGroups :: Lens' AccountShipping [AccountShippingLocationGroup]
assLocationGroups
= lens _assLocationGroups
(\ s a -> s{_assLocationGroups = a})
. _Default
. _Coerce
assAccountId :: Lens' AccountShipping (Maybe Word64)
assAccountId
= lens _assAccountId (\ s a -> s{_assAccountId = a})
. mapping _Coerce
assServices :: Lens' AccountShipping [AccountShippingShippingService]
assServices
= lens _assServices (\ s a -> s{_assServices = a}) .
_Default
. _Coerce
instance FromJSON AccountShipping where
parseJSON
= withObject "AccountShipping"
(\ o ->
AccountShipping' <$>
(o .:? "rateTables" .!= mempty) <*>
(o .:? "carrierRates" .!= mempty)
<*> (o .:? "kind" .!= "content#accountShipping")
<*> (o .:? "locationGroups" .!= mempty)
<*> (o .:? "accountId")
<*> (o .:? "services" .!= mempty))
instance ToJSON AccountShipping where
toJSON AccountShipping'{..}
= object
(catMaybes
[("rateTables" .=) <$> _assRateTables,
("carrierRates" .=) <$> _assCarrierRates,
Just ("kind" .= _assKind),
("locationGroups" .=) <$> _assLocationGroups,
("accountId" .=) <$> _assAccountId,
("services" .=) <$> _assServices])
data OrdersUpdateMerchantOrderIdResponse = OrdersUpdateMerchantOrderIdResponse'
{ _oumoirKind :: !Text
, _oumoirExecutionStatus :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersUpdateMerchantOrderIdResponse
:: OrdersUpdateMerchantOrderIdResponse
ordersUpdateMerchantOrderIdResponse =
OrdersUpdateMerchantOrderIdResponse'
{ _oumoirKind = "content#ordersUpdateMerchantOrderIdResponse"
, _oumoirExecutionStatus = Nothing
}
oumoirKind :: Lens' OrdersUpdateMerchantOrderIdResponse Text
oumoirKind
= lens _oumoirKind (\ s a -> s{_oumoirKind = a})
oumoirExecutionStatus :: Lens' OrdersUpdateMerchantOrderIdResponse (Maybe Text)
oumoirExecutionStatus
= lens _oumoirExecutionStatus
(\ s a -> s{_oumoirExecutionStatus = a})
instance FromJSON OrdersUpdateMerchantOrderIdResponse
where
parseJSON
= withObject "OrdersUpdateMerchantOrderIdResponse"
(\ o ->
OrdersUpdateMerchantOrderIdResponse' <$>
(o .:? "kind" .!=
"content#ordersUpdateMerchantOrderIdResponse")
<*> (o .:? "executionStatus"))
instance ToJSON OrdersUpdateMerchantOrderIdResponse
where
toJSON OrdersUpdateMerchantOrderIdResponse'{..}
= object
(catMaybes
[Just ("kind" .= _oumoirKind),
("executionStatus" .=) <$> _oumoirExecutionStatus])
data InventoryPickup = InventoryPickup'
{ _ipPickupSla :: !(Maybe Text)
, _ipPickupMethod :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
inventoryPickup
:: InventoryPickup
inventoryPickup =
InventoryPickup'
{ _ipPickupSla = Nothing
, _ipPickupMethod = Nothing
}
ipPickupSla :: Lens' InventoryPickup (Maybe Text)
ipPickupSla
= lens _ipPickupSla (\ s a -> s{_ipPickupSla = a})
ipPickupMethod :: Lens' InventoryPickup (Maybe Text)
ipPickupMethod
= lens _ipPickupMethod
(\ s a -> s{_ipPickupMethod = a})
instance FromJSON InventoryPickup where
parseJSON
= withObject "InventoryPickup"
(\ o ->
InventoryPickup' <$>
(o .:? "pickupSla") <*> (o .:? "pickupMethod"))
instance ToJSON InventoryPickup where
toJSON InventoryPickup'{..}
= object
(catMaybes
[("pickupSla" .=) <$> _ipPickupSla,
("pickupMethod" .=) <$> _ipPickupMethod])
data DatafeedStatusExample = DatafeedStatusExample'
{ _dseLineNumber :: !(Maybe (Textual Word64))
, _dseItemId :: !(Maybe Text)
, _dseValue :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedStatusExample
:: DatafeedStatusExample
datafeedStatusExample =
DatafeedStatusExample'
{ _dseLineNumber = Nothing
, _dseItemId = Nothing
, _dseValue = Nothing
}
dseLineNumber :: Lens' DatafeedStatusExample (Maybe Word64)
dseLineNumber
= lens _dseLineNumber
(\ s a -> s{_dseLineNumber = a})
. mapping _Coerce
dseItemId :: Lens' DatafeedStatusExample (Maybe Text)
dseItemId
= lens _dseItemId (\ s a -> s{_dseItemId = a})
dseValue :: Lens' DatafeedStatusExample (Maybe Text)
dseValue = lens _dseValue (\ s a -> s{_dseValue = a})
instance FromJSON DatafeedStatusExample where
parseJSON
= withObject "DatafeedStatusExample"
(\ o ->
DatafeedStatusExample' <$>
(o .:? "lineNumber") <*> (o .:? "itemId") <*>
(o .:? "value"))
instance ToJSON DatafeedStatusExample where
toJSON DatafeedStatusExample'{..}
= object
(catMaybes
[("lineNumber" .=) <$> _dseLineNumber,
("itemId" .=) <$> _dseItemId,
("value" .=) <$> _dseValue])
data OrdersAcknowledgeResponse = OrdersAcknowledgeResponse'
{ _oarKind :: !Text
, _oarExecutionStatus :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersAcknowledgeResponse
:: OrdersAcknowledgeResponse
ordersAcknowledgeResponse =
OrdersAcknowledgeResponse'
{ _oarKind = "content#ordersAcknowledgeResponse"
, _oarExecutionStatus = Nothing
}
oarKind :: Lens' OrdersAcknowledgeResponse Text
oarKind = lens _oarKind (\ s a -> s{_oarKind = a})
oarExecutionStatus :: Lens' OrdersAcknowledgeResponse (Maybe Text)
oarExecutionStatus
= lens _oarExecutionStatus
(\ s a -> s{_oarExecutionStatus = a})
instance FromJSON OrdersAcknowledgeResponse where
parseJSON
= withObject "OrdersAcknowledgeResponse"
(\ o ->
OrdersAcknowledgeResponse' <$>
(o .:? "kind" .!=
"content#ordersAcknowledgeResponse")
<*> (o .:? "executionStatus"))
instance ToJSON OrdersAcknowledgeResponse where
toJSON OrdersAcknowledgeResponse'{..}
= object
(catMaybes
[Just ("kind" .= _oarKind),
("executionStatus" .=) <$> _oarExecutionStatus])
data Table = Table'
{ _tRows :: !(Maybe [Row])
, _tName :: !(Maybe Text)
, _tColumnHeaders :: !(Maybe Headers)
, _tRowHeaders :: !(Maybe Headers)
} deriving (Eq,Show,Data,Typeable,Generic)
table
:: Table
table =
Table'
{ _tRows = Nothing
, _tName = Nothing
, _tColumnHeaders = Nothing
, _tRowHeaders = Nothing
}
tRows :: Lens' Table [Row]
tRows
= lens _tRows (\ s a -> s{_tRows = a}) . _Default .
_Coerce
tName :: Lens' Table (Maybe Text)
tName = lens _tName (\ s a -> s{_tName = a})
tColumnHeaders :: Lens' Table (Maybe Headers)
tColumnHeaders
= lens _tColumnHeaders
(\ s a -> s{_tColumnHeaders = a})
tRowHeaders :: Lens' Table (Maybe Headers)
tRowHeaders
= lens _tRowHeaders (\ s a -> s{_tRowHeaders = a})
instance FromJSON Table where
parseJSON
= withObject "Table"
(\ o ->
Table' <$>
(o .:? "rows" .!= mempty) <*> (o .:? "name") <*>
(o .:? "columnHeaders")
<*> (o .:? "rowHeaders"))
instance ToJSON Table where
toJSON Table'{..}
= object
(catMaybes
[("rows" .=) <$> _tRows, ("name" .=) <$> _tName,
("columnHeaders" .=) <$> _tColumnHeaders,
("rowHeaders" .=) <$> _tRowHeaders])
data Order = Order'
{ _ooStatus :: !(Maybe Text)
, _ooMerchantId :: !(Maybe (Textual Word64))
, _ooRefunds :: !(Maybe [OrderRefund])
, _ooKind :: !Text
, _ooLineItems :: !(Maybe [OrderLineItem])
, _ooShipments :: !(Maybe [OrderShipment])
, _ooNetAmount :: !(Maybe Price)
, _ooPlacedDate :: !(Maybe Text)
, _ooDeliveryDetails :: !(Maybe OrderDeliveryDetails)
, _ooShippingOption :: !(Maybe Text)
, _ooMerchantOrderId :: !(Maybe Text)
, _ooAcknowledged :: !(Maybe Bool)
, _ooShippingCostTax :: !(Maybe Price)
, _ooCustomer :: !(Maybe OrderCustomer)
, _ooId :: !(Maybe Text)
, _ooPaymentMethod :: !(Maybe OrderPaymentMethod)
, _ooPromotions :: !(Maybe [OrderPromotion])
, _ooChannelType :: !(Maybe Text)
, _ooPaymentStatus :: !(Maybe Text)
, _ooShippingCost :: !(Maybe Price)
} deriving (Eq,Show,Data,Typeable,Generic)
order
:: Order
order =
Order'
{ _ooStatus = Nothing
, _ooMerchantId = Nothing
, _ooRefunds = Nothing
, _ooKind = "content#order"
, _ooLineItems = Nothing
, _ooShipments = Nothing
, _ooNetAmount = Nothing
, _ooPlacedDate = Nothing
, _ooDeliveryDetails = Nothing
, _ooShippingOption = Nothing
, _ooMerchantOrderId = Nothing
, _ooAcknowledged = Nothing
, _ooShippingCostTax = Nothing
, _ooCustomer = Nothing
, _ooId = Nothing
, _ooPaymentMethod = Nothing
, _ooPromotions = Nothing
, _ooChannelType = Nothing
, _ooPaymentStatus = Nothing
, _ooShippingCost = Nothing
}
ooStatus :: Lens' Order (Maybe Text)
ooStatus = lens _ooStatus (\ s a -> s{_ooStatus = a})
ooMerchantId :: Lens' Order (Maybe Word64)
ooMerchantId
= lens _ooMerchantId (\ s a -> s{_ooMerchantId = a})
. mapping _Coerce
ooRefunds :: Lens' Order [OrderRefund]
ooRefunds
= lens _ooRefunds (\ s a -> s{_ooRefunds = a}) .
_Default
. _Coerce
ooKind :: Lens' Order Text
ooKind = lens _ooKind (\ s a -> s{_ooKind = a})
ooLineItems :: Lens' Order [OrderLineItem]
ooLineItems
= lens _ooLineItems (\ s a -> s{_ooLineItems = a}) .
_Default
. _Coerce
ooShipments :: Lens' Order [OrderShipment]
ooShipments
= lens _ooShipments (\ s a -> s{_ooShipments = a}) .
_Default
. _Coerce
ooNetAmount :: Lens' Order (Maybe Price)
ooNetAmount
= lens _ooNetAmount (\ s a -> s{_ooNetAmount = a})
ooPlacedDate :: Lens' Order (Maybe Text)
ooPlacedDate
= lens _ooPlacedDate (\ s a -> s{_ooPlacedDate = a})
ooDeliveryDetails :: Lens' Order (Maybe OrderDeliveryDetails)
ooDeliveryDetails
= lens _ooDeliveryDetails
(\ s a -> s{_ooDeliveryDetails = a})
ooShippingOption :: Lens' Order (Maybe Text)
ooShippingOption
= lens _ooShippingOption
(\ s a -> s{_ooShippingOption = a})
ooMerchantOrderId :: Lens' Order (Maybe Text)
ooMerchantOrderId
= lens _ooMerchantOrderId
(\ s a -> s{_ooMerchantOrderId = a})
ooAcknowledged :: Lens' Order (Maybe Bool)
ooAcknowledged
= lens _ooAcknowledged
(\ s a -> s{_ooAcknowledged = a})
ooShippingCostTax :: Lens' Order (Maybe Price)
ooShippingCostTax
= lens _ooShippingCostTax
(\ s a -> s{_ooShippingCostTax = a})
ooCustomer :: Lens' Order (Maybe OrderCustomer)
ooCustomer
= lens _ooCustomer (\ s a -> s{_ooCustomer = a})
ooId :: Lens' Order (Maybe Text)
ooId = lens _ooId (\ s a -> s{_ooId = a})
ooPaymentMethod :: Lens' Order (Maybe OrderPaymentMethod)
ooPaymentMethod
= lens _ooPaymentMethod
(\ s a -> s{_ooPaymentMethod = a})
ooPromotions :: Lens' Order [OrderPromotion]
ooPromotions
= lens _ooPromotions (\ s a -> s{_ooPromotions = a})
. _Default
. _Coerce
ooChannelType :: Lens' Order (Maybe Text)
ooChannelType
= lens _ooChannelType
(\ s a -> s{_ooChannelType = a})
ooPaymentStatus :: Lens' Order (Maybe Text)
ooPaymentStatus
= lens _ooPaymentStatus
(\ s a -> s{_ooPaymentStatus = a})
ooShippingCost :: Lens' Order (Maybe Price)
ooShippingCost
= lens _ooShippingCost
(\ s a -> s{_ooShippingCost = a})
instance FromJSON Order where
parseJSON
= withObject "Order"
(\ o ->
Order' <$>
(o .:? "status") <*> (o .:? "merchantId") <*>
(o .:? "refunds" .!= mempty)
<*> (o .:? "kind" .!= "content#order")
<*> (o .:? "lineItems" .!= mempty)
<*> (o .:? "shipments" .!= mempty)
<*> (o .:? "netAmount")
<*> (o .:? "placedDate")
<*> (o .:? "deliveryDetails")
<*> (o .:? "shippingOption")
<*> (o .:? "merchantOrderId")
<*> (o .:? "acknowledged")
<*> (o .:? "shippingCostTax")
<*> (o .:? "customer")
<*> (o .:? "id")
<*> (o .:? "paymentMethod")
<*> (o .:? "promotions" .!= mempty)
<*> (o .:? "channelType")
<*> (o .:? "paymentStatus")
<*> (o .:? "shippingCost"))
instance ToJSON Order where
toJSON Order'{..}
= object
(catMaybes
[("status" .=) <$> _ooStatus,
("merchantId" .=) <$> _ooMerchantId,
("refunds" .=) <$> _ooRefunds,
Just ("kind" .= _ooKind),
("lineItems" .=) <$> _ooLineItems,
("shipments" .=) <$> _ooShipments,
("netAmount" .=) <$> _ooNetAmount,
("placedDate" .=) <$> _ooPlacedDate,
("deliveryDetails" .=) <$> _ooDeliveryDetails,
("shippingOption" .=) <$> _ooShippingOption,
("merchantOrderId" .=) <$> _ooMerchantOrderId,
("acknowledged" .=) <$> _ooAcknowledged,
("shippingCostTax" .=) <$> _ooShippingCostTax,
("customer" .=) <$> _ooCustomer, ("id" .=) <$> _ooId,
("paymentMethod" .=) <$> _ooPaymentMethod,
("promotions" .=) <$> _ooPromotions,
("channelType" .=) <$> _ooChannelType,
("paymentStatus" .=) <$> _ooPaymentStatus,
("shippingCost" .=) <$> _ooShippingCost])
data InventoryCustomBatchResponse = InventoryCustomBatchResponse'
{ _invEntries :: !(Maybe [InventoryCustomBatchResponseEntry])
, _invKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
inventoryCustomBatchResponse
:: InventoryCustomBatchResponse
inventoryCustomBatchResponse =
InventoryCustomBatchResponse'
{ _invEntries = Nothing
, _invKind = "content#inventoryCustomBatchResponse"
}
invEntries :: Lens' InventoryCustomBatchResponse [InventoryCustomBatchResponseEntry]
invEntries
= lens _invEntries (\ s a -> s{_invEntries = a}) .
_Default
. _Coerce
invKind :: Lens' InventoryCustomBatchResponse Text
invKind = lens _invKind (\ s a -> s{_invKind = a})
instance FromJSON InventoryCustomBatchResponse where
parseJSON
= withObject "InventoryCustomBatchResponse"
(\ o ->
InventoryCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#inventoryCustomBatchResponse"))
instance ToJSON InventoryCustomBatchResponse where
toJSON InventoryCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _invEntries,
Just ("kind" .= _invKind)])
data OrderLineItemProduct = OrderLineItemProduct'
{ _olipImageLink :: !(Maybe Text)
, _olipShownImage :: !(Maybe Text)
, _olipChannel :: !(Maybe Text)
, _olipBrand :: !(Maybe Text)
, _olipTargetCountry :: !(Maybe Text)
, _olipGtin :: !(Maybe Text)
, _olipItemGroupId :: !(Maybe Text)
, _olipOfferId :: !(Maybe Text)
, _olipId :: !(Maybe Text)
, _olipPrice :: !(Maybe Price)
, _olipVariantAttributes :: !(Maybe [OrderLineItemProductVariantAttribute])
, _olipTitle :: !(Maybe Text)
, _olipContentLanguage :: !(Maybe Text)
, _olipMpn :: !(Maybe Text)
, _olipCondition :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderLineItemProduct
:: OrderLineItemProduct
orderLineItemProduct =
OrderLineItemProduct'
{ _olipImageLink = Nothing
, _olipShownImage = Nothing
, _olipChannel = Nothing
, _olipBrand = Nothing
, _olipTargetCountry = Nothing
, _olipGtin = Nothing
, _olipItemGroupId = Nothing
, _olipOfferId = Nothing
, _olipId = Nothing
, _olipPrice = Nothing
, _olipVariantAttributes = Nothing
, _olipTitle = Nothing
, _olipContentLanguage = Nothing
, _olipMpn = Nothing
, _olipCondition = Nothing
}
olipImageLink :: Lens' OrderLineItemProduct (Maybe Text)
olipImageLink
= lens _olipImageLink
(\ s a -> s{_olipImageLink = a})
olipShownImage :: Lens' OrderLineItemProduct (Maybe Text)
olipShownImage
= lens _olipShownImage
(\ s a -> s{_olipShownImage = a})
olipChannel :: Lens' OrderLineItemProduct (Maybe Text)
olipChannel
= lens _olipChannel (\ s a -> s{_olipChannel = a})
olipBrand :: Lens' OrderLineItemProduct (Maybe Text)
olipBrand
= lens _olipBrand (\ s a -> s{_olipBrand = a})
olipTargetCountry :: Lens' OrderLineItemProduct (Maybe Text)
olipTargetCountry
= lens _olipTargetCountry
(\ s a -> s{_olipTargetCountry = a})
olipGtin :: Lens' OrderLineItemProduct (Maybe Text)
olipGtin = lens _olipGtin (\ s a -> s{_olipGtin = a})
olipItemGroupId :: Lens' OrderLineItemProduct (Maybe Text)
olipItemGroupId
= lens _olipItemGroupId
(\ s a -> s{_olipItemGroupId = a})
olipOfferId :: Lens' OrderLineItemProduct (Maybe Text)
olipOfferId
= lens _olipOfferId (\ s a -> s{_olipOfferId = a})
olipId :: Lens' OrderLineItemProduct (Maybe Text)
olipId = lens _olipId (\ s a -> s{_olipId = a})
olipPrice :: Lens' OrderLineItemProduct (Maybe Price)
olipPrice
= lens _olipPrice (\ s a -> s{_olipPrice = a})
olipVariantAttributes :: Lens' OrderLineItemProduct [OrderLineItemProductVariantAttribute]
olipVariantAttributes
= lens _olipVariantAttributes
(\ s a -> s{_olipVariantAttributes = a})
. _Default
. _Coerce
olipTitle :: Lens' OrderLineItemProduct (Maybe Text)
olipTitle
= lens _olipTitle (\ s a -> s{_olipTitle = a})
olipContentLanguage :: Lens' OrderLineItemProduct (Maybe Text)
olipContentLanguage
= lens _olipContentLanguage
(\ s a -> s{_olipContentLanguage = a})
olipMpn :: Lens' OrderLineItemProduct (Maybe Text)
olipMpn = lens _olipMpn (\ s a -> s{_olipMpn = a})
olipCondition :: Lens' OrderLineItemProduct (Maybe Text)
olipCondition
= lens _olipCondition
(\ s a -> s{_olipCondition = a})
instance FromJSON OrderLineItemProduct where
parseJSON
= withObject "OrderLineItemProduct"
(\ o ->
OrderLineItemProduct' <$>
(o .:? "imageLink") <*> (o .:? "shownImage") <*>
(o .:? "channel")
<*> (o .:? "brand")
<*> (o .:? "targetCountry")
<*> (o .:? "gtin")
<*> (o .:? "itemGroupId")
<*> (o .:? "offerId")
<*> (o .:? "id")
<*> (o .:? "price")
<*> (o .:? "variantAttributes" .!= mempty)
<*> (o .:? "title")
<*> (o .:? "contentLanguage")
<*> (o .:? "mpn")
<*> (o .:? "condition"))
instance ToJSON OrderLineItemProduct where
toJSON OrderLineItemProduct'{..}
= object
(catMaybes
[("imageLink" .=) <$> _olipImageLink,
("shownImage" .=) <$> _olipShownImage,
("channel" .=) <$> _olipChannel,
("brand" .=) <$> _olipBrand,
("targetCountry" .=) <$> _olipTargetCountry,
("gtin" .=) <$> _olipGtin,
("itemGroupId" .=) <$> _olipItemGroupId,
("offerId" .=) <$> _olipOfferId,
("id" .=) <$> _olipId, ("price" .=) <$> _olipPrice,
("variantAttributes" .=) <$> _olipVariantAttributes,
("title" .=) <$> _olipTitle,
("contentLanguage" .=) <$> _olipContentLanguage,
("mpn" .=) <$> _olipMpn,
("condition" .=) <$> _olipCondition])
data AccounttaxCustomBatchRequestEntry = AccounttaxCustomBatchRequestEntry'
{ _a2AccountTax :: !(Maybe AccountTax)
, _a2MerchantId :: !(Maybe (Textual Word64))
, _a2AccountId :: !(Maybe (Textual Word64))
, _a2Method :: !(Maybe Text)
, _a2BatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
accounttaxCustomBatchRequestEntry
:: AccounttaxCustomBatchRequestEntry
accounttaxCustomBatchRequestEntry =
AccounttaxCustomBatchRequestEntry'
{ _a2AccountTax = Nothing
, _a2MerchantId = Nothing
, _a2AccountId = Nothing
, _a2Method = Nothing
, _a2BatchId = Nothing
}
a2AccountTax :: Lens' AccounttaxCustomBatchRequestEntry (Maybe AccountTax)
a2AccountTax
= lens _a2AccountTax (\ s a -> s{_a2AccountTax = a})
a2MerchantId :: Lens' AccounttaxCustomBatchRequestEntry (Maybe Word64)
a2MerchantId
= lens _a2MerchantId (\ s a -> s{_a2MerchantId = a})
. mapping _Coerce
a2AccountId :: Lens' AccounttaxCustomBatchRequestEntry (Maybe Word64)
a2AccountId
= lens _a2AccountId (\ s a -> s{_a2AccountId = a}) .
mapping _Coerce
a2Method :: Lens' AccounttaxCustomBatchRequestEntry (Maybe Text)
a2Method = lens _a2Method (\ s a -> s{_a2Method = a})
a2BatchId :: Lens' AccounttaxCustomBatchRequestEntry (Maybe Word32)
a2BatchId
= lens _a2BatchId (\ s a -> s{_a2BatchId = a}) .
mapping _Coerce
instance FromJSON AccounttaxCustomBatchRequestEntry
where
parseJSON
= withObject "AccounttaxCustomBatchRequestEntry"
(\ o ->
AccounttaxCustomBatchRequestEntry' <$>
(o .:? "accountTax") <*> (o .:? "merchantId") <*>
(o .:? "accountId")
<*> (o .:? "method")
<*> (o .:? "batchId"))
instance ToJSON AccounttaxCustomBatchRequestEntry
where
toJSON AccounttaxCustomBatchRequestEntry'{..}
= object
(catMaybes
[("accountTax" .=) <$> _a2AccountTax,
("merchantId" .=) <$> _a2MerchantId,
("accountId" .=) <$> _a2AccountId,
("method" .=) <$> _a2Method,
("batchId" .=) <$> _a2BatchId])
data DatafeedStatusError = DatafeedStatusError'
{ _dseCount :: !(Maybe (Textual Word64))
, _dseCode :: !(Maybe Text)
, _dseMessage :: !(Maybe Text)
, _dseExamples :: !(Maybe [DatafeedStatusExample])
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedStatusError
:: DatafeedStatusError
datafeedStatusError =
DatafeedStatusError'
{ _dseCount = Nothing
, _dseCode = Nothing
, _dseMessage = Nothing
, _dseExamples = Nothing
}
dseCount :: Lens' DatafeedStatusError (Maybe Word64)
dseCount
= lens _dseCount (\ s a -> s{_dseCount = a}) .
mapping _Coerce
dseCode :: Lens' DatafeedStatusError (Maybe Text)
dseCode = lens _dseCode (\ s a -> s{_dseCode = a})
dseMessage :: Lens' DatafeedStatusError (Maybe Text)
dseMessage
= lens _dseMessage (\ s a -> s{_dseMessage = a})
dseExamples :: Lens' DatafeedStatusError [DatafeedStatusExample]
dseExamples
= lens _dseExamples (\ s a -> s{_dseExamples = a}) .
_Default
. _Coerce
instance FromJSON DatafeedStatusError where
parseJSON
= withObject "DatafeedStatusError"
(\ o ->
DatafeedStatusError' <$>
(o .:? "count") <*> (o .:? "code") <*>
(o .:? "message")
<*> (o .:? "examples" .!= mempty))
instance ToJSON DatafeedStatusError where
toJSON DatafeedStatusError'{..}
= object
(catMaybes
[("count" .=) <$> _dseCount,
("code" .=) <$> _dseCode,
("message" .=) <$> _dseMessage,
("examples" .=) <$> _dseExamples])
newtype ProductsCustomBatchRequest = ProductsCustomBatchRequest'
{ _pcbrcEntries :: Maybe [ProductsCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
productsCustomBatchRequest
:: ProductsCustomBatchRequest
productsCustomBatchRequest =
ProductsCustomBatchRequest'
{ _pcbrcEntries = Nothing
}
pcbrcEntries :: Lens' ProductsCustomBatchRequest [ProductsCustomBatchRequestEntry]
pcbrcEntries
= lens _pcbrcEntries (\ s a -> s{_pcbrcEntries = a})
. _Default
. _Coerce
instance FromJSON ProductsCustomBatchRequest where
parseJSON
= withObject "ProductsCustomBatchRequest"
(\ o ->
ProductsCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON ProductsCustomBatchRequest where
toJSON ProductsCustomBatchRequest'{..}
= object
(catMaybes [("entries" .=) <$> _pcbrcEntries])
data OrdersCustomBatchRequestEntryReturnLineItem = OrdersCustomBatchRequestEntryReturnLineItem'
{ _ocbrerliQuantity :: !(Maybe (Textual Word32))
, _ocbrerliLineItemId :: !(Maybe Text)
, _ocbrerliReason :: !(Maybe Text)
, _ocbrerliReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchRequestEntryReturnLineItem
:: OrdersCustomBatchRequestEntryReturnLineItem
ordersCustomBatchRequestEntryReturnLineItem =
OrdersCustomBatchRequestEntryReturnLineItem'
{ _ocbrerliQuantity = Nothing
, _ocbrerliLineItemId = Nothing
, _ocbrerliReason = Nothing
, _ocbrerliReasonText = Nothing
}
ocbrerliQuantity :: Lens' OrdersCustomBatchRequestEntryReturnLineItem (Maybe Word32)
ocbrerliQuantity
= lens _ocbrerliQuantity
(\ s a -> s{_ocbrerliQuantity = a})
. mapping _Coerce
ocbrerliLineItemId :: Lens' OrdersCustomBatchRequestEntryReturnLineItem (Maybe Text)
ocbrerliLineItemId
= lens _ocbrerliLineItemId
(\ s a -> s{_ocbrerliLineItemId = a})
ocbrerliReason :: Lens' OrdersCustomBatchRequestEntryReturnLineItem (Maybe Text)
ocbrerliReason
= lens _ocbrerliReason
(\ s a -> s{_ocbrerliReason = a})
ocbrerliReasonText :: Lens' OrdersCustomBatchRequestEntryReturnLineItem (Maybe Text)
ocbrerliReasonText
= lens _ocbrerliReasonText
(\ s a -> s{_ocbrerliReasonText = a})
instance FromJSON
OrdersCustomBatchRequestEntryReturnLineItem where
parseJSON
= withObject
"OrdersCustomBatchRequestEntryReturnLineItem"
(\ o ->
OrdersCustomBatchRequestEntryReturnLineItem' <$>
(o .:? "quantity") <*> (o .:? "lineItemId") <*>
(o .:? "reason")
<*> (o .:? "reasonText"))
instance ToJSON
OrdersCustomBatchRequestEntryReturnLineItem where
toJSON
OrdersCustomBatchRequestEntryReturnLineItem'{..}
= object
(catMaybes
[("quantity" .=) <$> _ocbrerliQuantity,
("lineItemId" .=) <$> _ocbrerliLineItemId,
("reason" .=) <$> _ocbrerliReason,
("reasonText" .=) <$> _ocbrerliReasonText])
data OrdersCustomBatchRequestEntryUpdateShipment = OrdersCustomBatchRequestEntryUpdateShipment'
{ _ocbreusCarrier :: !(Maybe Text)
, _ocbreusStatus :: !(Maybe Text)
, _ocbreusTrackingId :: !(Maybe Text)
, _ocbreusShipmentId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchRequestEntryUpdateShipment
:: OrdersCustomBatchRequestEntryUpdateShipment
ordersCustomBatchRequestEntryUpdateShipment =
OrdersCustomBatchRequestEntryUpdateShipment'
{ _ocbreusCarrier = Nothing
, _ocbreusStatus = Nothing
, _ocbreusTrackingId = Nothing
, _ocbreusShipmentId = Nothing
}
ocbreusCarrier :: Lens' OrdersCustomBatchRequestEntryUpdateShipment (Maybe Text)
ocbreusCarrier
= lens _ocbreusCarrier
(\ s a -> s{_ocbreusCarrier = a})
ocbreusStatus :: Lens' OrdersCustomBatchRequestEntryUpdateShipment (Maybe Text)
ocbreusStatus
= lens _ocbreusStatus
(\ s a -> s{_ocbreusStatus = a})
ocbreusTrackingId :: Lens' OrdersCustomBatchRequestEntryUpdateShipment (Maybe Text)
ocbreusTrackingId
= lens _ocbreusTrackingId
(\ s a -> s{_ocbreusTrackingId = a})
ocbreusShipmentId :: Lens' OrdersCustomBatchRequestEntryUpdateShipment (Maybe Text)
ocbreusShipmentId
= lens _ocbreusShipmentId
(\ s a -> s{_ocbreusShipmentId = a})
instance FromJSON
OrdersCustomBatchRequestEntryUpdateShipment where
parseJSON
= withObject
"OrdersCustomBatchRequestEntryUpdateShipment"
(\ o ->
OrdersCustomBatchRequestEntryUpdateShipment' <$>
(o .:? "carrier") <*> (o .:? "status") <*>
(o .:? "trackingId")
<*> (o .:? "shipmentId"))
instance ToJSON
OrdersCustomBatchRequestEntryUpdateShipment where
toJSON
OrdersCustomBatchRequestEntryUpdateShipment'{..}
= object
(catMaybes
[("carrier" .=) <$> _ocbreusCarrier,
("status" .=) <$> _ocbreusStatus,
("trackingId" .=) <$> _ocbreusTrackingId,
("shipmentId" .=) <$> _ocbreusShipmentId])
data DatafeedStatus = DatafeedStatus'
{ _dsItemsTotal :: !(Maybe (Textual Word64))
, _dsKind :: !Text
, _dsWarnings :: !(Maybe [DatafeedStatusError])
, _dsDatafeedId :: !(Maybe (Textual Word64))
, _dsProcessingStatus :: !(Maybe Text)
, _dsLastUploadDate :: !(Maybe Text)
, _dsItemsValid :: !(Maybe (Textual Word64))
, _dsErrors :: !(Maybe [DatafeedStatusError])
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedStatus
:: DatafeedStatus
datafeedStatus =
DatafeedStatus'
{ _dsItemsTotal = Nothing
, _dsKind = "content#datafeedStatus"
, _dsWarnings = Nothing
, _dsDatafeedId = Nothing
, _dsProcessingStatus = Nothing
, _dsLastUploadDate = Nothing
, _dsItemsValid = Nothing
, _dsErrors = Nothing
}
dsItemsTotal :: Lens' DatafeedStatus (Maybe Word64)
dsItemsTotal
= lens _dsItemsTotal (\ s a -> s{_dsItemsTotal = a})
. mapping _Coerce
dsKind :: Lens' DatafeedStatus Text
dsKind = lens _dsKind (\ s a -> s{_dsKind = a})
dsWarnings :: Lens' DatafeedStatus [DatafeedStatusError]
dsWarnings
= lens _dsWarnings (\ s a -> s{_dsWarnings = a}) .
_Default
. _Coerce
dsDatafeedId :: Lens' DatafeedStatus (Maybe Word64)
dsDatafeedId
= lens _dsDatafeedId (\ s a -> s{_dsDatafeedId = a})
. mapping _Coerce
dsProcessingStatus :: Lens' DatafeedStatus (Maybe Text)
dsProcessingStatus
= lens _dsProcessingStatus
(\ s a -> s{_dsProcessingStatus = a})
dsLastUploadDate :: Lens' DatafeedStatus (Maybe Text)
dsLastUploadDate
= lens _dsLastUploadDate
(\ s a -> s{_dsLastUploadDate = a})
dsItemsValid :: Lens' DatafeedStatus (Maybe Word64)
dsItemsValid
= lens _dsItemsValid (\ s a -> s{_dsItemsValid = a})
. mapping _Coerce
dsErrors :: Lens' DatafeedStatus [DatafeedStatusError]
dsErrors
= lens _dsErrors (\ s a -> s{_dsErrors = a}) .
_Default
. _Coerce
instance FromJSON DatafeedStatus where
parseJSON
= withObject "DatafeedStatus"
(\ o ->
DatafeedStatus' <$>
(o .:? "itemsTotal") <*>
(o .:? "kind" .!= "content#datafeedStatus")
<*> (o .:? "warnings" .!= mempty)
<*> (o .:? "datafeedId")
<*> (o .:? "processingStatus")
<*> (o .:? "lastUploadDate")
<*> (o .:? "itemsValid")
<*> (o .:? "errors" .!= mempty))
instance ToJSON DatafeedStatus where
toJSON DatafeedStatus'{..}
= object
(catMaybes
[("itemsTotal" .=) <$> _dsItemsTotal,
Just ("kind" .= _dsKind),
("warnings" .=) <$> _dsWarnings,
("datafeedId" .=) <$> _dsDatafeedId,
("processingStatus" .=) <$> _dsProcessingStatus,
("lastUploadDate" .=) <$> _dsLastUploadDate,
("itemsValid" .=) <$> _dsItemsValid,
("errors" .=) <$> _dsErrors])
newtype DatafeedstatusesCustomBatchRequest = DatafeedstatusesCustomBatchRequest'
{ _dcbrcEntries :: Maybe [DatafeedstatusesCustomBatchRequestEntry]
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedstatusesCustomBatchRequest
:: DatafeedstatusesCustomBatchRequest
datafeedstatusesCustomBatchRequest =
DatafeedstatusesCustomBatchRequest'
{ _dcbrcEntries = Nothing
}
dcbrcEntries :: Lens' DatafeedstatusesCustomBatchRequest [DatafeedstatusesCustomBatchRequestEntry]
dcbrcEntries
= lens _dcbrcEntries (\ s a -> s{_dcbrcEntries = a})
. _Default
. _Coerce
instance FromJSON DatafeedstatusesCustomBatchRequest
where
parseJSON
= withObject "DatafeedstatusesCustomBatchRequest"
(\ o ->
DatafeedstatusesCustomBatchRequest' <$>
(o .:? "entries" .!= mempty))
instance ToJSON DatafeedstatusesCustomBatchRequest
where
toJSON DatafeedstatusesCustomBatchRequest'{..}
= object
(catMaybes [("entries" .=) <$> _dcbrcEntries])
data AccountShippingLocationGroup = AccountShippingLocationGroup'
{ _aslgCountry :: !(Maybe Text)
, _aslgLocationIds :: !(Maybe [Textual Int64])
, _aslgPostalCodeRanges :: !(Maybe [AccountShippingPostalCodeRange])
, _aslgName :: !(Maybe Text)
, _aslgPostalCodes :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
accountShippingLocationGroup
:: AccountShippingLocationGroup
accountShippingLocationGroup =
AccountShippingLocationGroup'
{ _aslgCountry = Nothing
, _aslgLocationIds = Nothing
, _aslgPostalCodeRanges = Nothing
, _aslgName = Nothing
, _aslgPostalCodes = Nothing
}
aslgCountry :: Lens' AccountShippingLocationGroup (Maybe Text)
aslgCountry
= lens _aslgCountry (\ s a -> s{_aslgCountry = a})
aslgLocationIds :: Lens' AccountShippingLocationGroup [Int64]
aslgLocationIds
= lens _aslgLocationIds
(\ s a -> s{_aslgLocationIds = a})
. _Default
. _Coerce
aslgPostalCodeRanges :: Lens' AccountShippingLocationGroup [AccountShippingPostalCodeRange]
aslgPostalCodeRanges
= lens _aslgPostalCodeRanges
(\ s a -> s{_aslgPostalCodeRanges = a})
. _Default
. _Coerce
aslgName :: Lens' AccountShippingLocationGroup (Maybe Text)
aslgName = lens _aslgName (\ s a -> s{_aslgName = a})
aslgPostalCodes :: Lens' AccountShippingLocationGroup [Text]
aslgPostalCodes
= lens _aslgPostalCodes
(\ s a -> s{_aslgPostalCodes = a})
. _Default
. _Coerce
instance FromJSON AccountShippingLocationGroup where
parseJSON
= withObject "AccountShippingLocationGroup"
(\ o ->
AccountShippingLocationGroup' <$>
(o .:? "country") <*>
(o .:? "locationIds" .!= mempty)
<*> (o .:? "postalCodeRanges" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "postalCodes" .!= mempty))
instance ToJSON AccountShippingLocationGroup where
toJSON AccountShippingLocationGroup'{..}
= object
(catMaybes
[("country" .=) <$> _aslgCountry,
("locationIds" .=) <$> _aslgLocationIds,
("postalCodeRanges" .=) <$> _aslgPostalCodeRanges,
("name" .=) <$> _aslgName,
("postalCodes" .=) <$> _aslgPostalCodes])
data AccountStatusDataQualityIssue = AccountStatusDataQualityIssue'
{ _asdqiSubmittedValue :: !(Maybe Text)
, _asdqiCountry :: !(Maybe Text)
, _asdqiDisplayedValue :: !(Maybe Text)
, _asdqiNumItems :: !(Maybe (Textual Word32))
, _asdqiSeverity :: !(Maybe Text)
, _asdqiExampleItems :: !(Maybe [AccountStatusExampleItem])
, _asdqiLastChecked :: !(Maybe Text)
, _asdqiId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accountStatusDataQualityIssue
:: AccountStatusDataQualityIssue
accountStatusDataQualityIssue =
AccountStatusDataQualityIssue'
{ _asdqiSubmittedValue = Nothing
, _asdqiCountry = Nothing
, _asdqiDisplayedValue = Nothing
, _asdqiNumItems = Nothing
, _asdqiSeverity = Nothing
, _asdqiExampleItems = Nothing
, _asdqiLastChecked = Nothing
, _asdqiId = Nothing
}
asdqiSubmittedValue :: Lens' AccountStatusDataQualityIssue (Maybe Text)
asdqiSubmittedValue
= lens _asdqiSubmittedValue
(\ s a -> s{_asdqiSubmittedValue = a})
asdqiCountry :: Lens' AccountStatusDataQualityIssue (Maybe Text)
asdqiCountry
= lens _asdqiCountry (\ s a -> s{_asdqiCountry = a})
asdqiDisplayedValue :: Lens' AccountStatusDataQualityIssue (Maybe Text)
asdqiDisplayedValue
= lens _asdqiDisplayedValue
(\ s a -> s{_asdqiDisplayedValue = a})
asdqiNumItems :: Lens' AccountStatusDataQualityIssue (Maybe Word32)
asdqiNumItems
= lens _asdqiNumItems
(\ s a -> s{_asdqiNumItems = a})
. mapping _Coerce
asdqiSeverity :: Lens' AccountStatusDataQualityIssue (Maybe Text)
asdqiSeverity
= lens _asdqiSeverity
(\ s a -> s{_asdqiSeverity = a})
asdqiExampleItems :: Lens' AccountStatusDataQualityIssue [AccountStatusExampleItem]
asdqiExampleItems
= lens _asdqiExampleItems
(\ s a -> s{_asdqiExampleItems = a})
. _Default
. _Coerce
asdqiLastChecked :: Lens' AccountStatusDataQualityIssue (Maybe Text)
asdqiLastChecked
= lens _asdqiLastChecked
(\ s a -> s{_asdqiLastChecked = a})
asdqiId :: Lens' AccountStatusDataQualityIssue (Maybe Text)
asdqiId = lens _asdqiId (\ s a -> s{_asdqiId = a})
instance FromJSON AccountStatusDataQualityIssue where
parseJSON
= withObject "AccountStatusDataQualityIssue"
(\ o ->
AccountStatusDataQualityIssue' <$>
(o .:? "submittedValue") <*> (o .:? "country") <*>
(o .:? "displayedValue")
<*> (o .:? "numItems")
<*> (o .:? "severity")
<*> (o .:? "exampleItems" .!= mempty)
<*> (o .:? "lastChecked")
<*> (o .:? "id"))
instance ToJSON AccountStatusDataQualityIssue where
toJSON AccountStatusDataQualityIssue'{..}
= object
(catMaybes
[("submittedValue" .=) <$> _asdqiSubmittedValue,
("country" .=) <$> _asdqiCountry,
("displayedValue" .=) <$> _asdqiDisplayedValue,
("numItems" .=) <$> _asdqiNumItems,
("severity" .=) <$> _asdqiSeverity,
("exampleItems" .=) <$> _asdqiExampleItems,
("lastChecked" .=) <$> _asdqiLastChecked,
("id" .=) <$> _asdqiId])
data ProductShippingDimension = ProductShippingDimension'
{ _psdValue :: !(Maybe (Textual Double))
, _psdUnit :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
productShippingDimension
:: ProductShippingDimension
productShippingDimension =
ProductShippingDimension'
{ _psdValue = Nothing
, _psdUnit = Nothing
}
psdValue :: Lens' ProductShippingDimension (Maybe Double)
psdValue
= lens _psdValue (\ s a -> s{_psdValue = a}) .
mapping _Coerce
psdUnit :: Lens' ProductShippingDimension (Maybe Text)
psdUnit = lens _psdUnit (\ s a -> s{_psdUnit = a})
instance FromJSON ProductShippingDimension where
parseJSON
= withObject "ProductShippingDimension"
(\ o ->
ProductShippingDimension' <$>
(o .:? "value") <*> (o .:? "unit"))
instance ToJSON ProductShippingDimension where
toJSON ProductShippingDimension'{..}
= object
(catMaybes
[("value" .=) <$> _psdValue,
("unit" .=) <$> _psdUnit])
data DatafeedsCustomBatchResponseEntry = DatafeedsCustomBatchResponseEntry'
{ _dcbrecDatafeed :: !(Maybe Datafeed)
, _dcbrecErrors :: !(Maybe Errors)
, _dcbrecBatchId :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedsCustomBatchResponseEntry
:: DatafeedsCustomBatchResponseEntry
datafeedsCustomBatchResponseEntry =
DatafeedsCustomBatchResponseEntry'
{ _dcbrecDatafeed = Nothing
, _dcbrecErrors = Nothing
, _dcbrecBatchId = Nothing
}
dcbrecDatafeed :: Lens' DatafeedsCustomBatchResponseEntry (Maybe Datafeed)
dcbrecDatafeed
= lens _dcbrecDatafeed
(\ s a -> s{_dcbrecDatafeed = a})
dcbrecErrors :: Lens' DatafeedsCustomBatchResponseEntry (Maybe Errors)
dcbrecErrors
= lens _dcbrecErrors (\ s a -> s{_dcbrecErrors = a})
dcbrecBatchId :: Lens' DatafeedsCustomBatchResponseEntry (Maybe Word32)
dcbrecBatchId
= lens _dcbrecBatchId
(\ s a -> s{_dcbrecBatchId = a})
. mapping _Coerce
instance FromJSON DatafeedsCustomBatchResponseEntry
where
parseJSON
= withObject "DatafeedsCustomBatchResponseEntry"
(\ o ->
DatafeedsCustomBatchResponseEntry' <$>
(o .:? "datafeed") <*> (o .:? "errors") <*>
(o .:? "batchId"))
instance ToJSON DatafeedsCustomBatchResponseEntry
where
toJSON DatafeedsCustomBatchResponseEntry'{..}
= object
(catMaybes
[("datafeed" .=) <$> _dcbrecDatafeed,
("errors" .=) <$> _dcbrecErrors,
("batchId" .=) <$> _dcbrecBatchId])
data OrdersCustomBatchRequestEntryRefund = OrdersCustomBatchRequestEntryRefund'
{ _ocbrerAmount :: !(Maybe Price)
, _ocbrerReason :: !(Maybe Text)
, _ocbrerReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchRequestEntryRefund
:: OrdersCustomBatchRequestEntryRefund
ordersCustomBatchRequestEntryRefund =
OrdersCustomBatchRequestEntryRefund'
{ _ocbrerAmount = Nothing
, _ocbrerReason = Nothing
, _ocbrerReasonText = Nothing
}
ocbrerAmount :: Lens' OrdersCustomBatchRequestEntryRefund (Maybe Price)
ocbrerAmount
= lens _ocbrerAmount (\ s a -> s{_ocbrerAmount = a})
ocbrerReason :: Lens' OrdersCustomBatchRequestEntryRefund (Maybe Text)
ocbrerReason
= lens _ocbrerReason (\ s a -> s{_ocbrerReason = a})
ocbrerReasonText :: Lens' OrdersCustomBatchRequestEntryRefund (Maybe Text)
ocbrerReasonText
= lens _ocbrerReasonText
(\ s a -> s{_ocbrerReasonText = a})
instance FromJSON OrdersCustomBatchRequestEntryRefund
where
parseJSON
= withObject "OrdersCustomBatchRequestEntryRefund"
(\ o ->
OrdersCustomBatchRequestEntryRefund' <$>
(o .:? "amount") <*> (o .:? "reason") <*>
(o .:? "reasonText"))
instance ToJSON OrdersCustomBatchRequestEntryRefund
where
toJSON OrdersCustomBatchRequestEntryRefund'{..}
= object
(catMaybes
[("amount" .=) <$> _ocbrerAmount,
("reason" .=) <$> _ocbrerReason,
("reasonText" .=) <$> _ocbrerReasonText])
data DatafeedstatusesListResponse = DatafeedstatusesListResponse'
{ _dlrlNextPageToken :: !(Maybe Text)
, _dlrlKind :: !Text
, _dlrlResources :: !(Maybe [DatafeedStatus])
} deriving (Eq,Show,Data,Typeable,Generic)
datafeedstatusesListResponse
:: DatafeedstatusesListResponse
datafeedstatusesListResponse =
DatafeedstatusesListResponse'
{ _dlrlNextPageToken = Nothing
, _dlrlKind = "content#datafeedstatusesListResponse"
, _dlrlResources = Nothing
}
dlrlNextPageToken :: Lens' DatafeedstatusesListResponse (Maybe Text)
dlrlNextPageToken
= lens _dlrlNextPageToken
(\ s a -> s{_dlrlNextPageToken = a})
dlrlKind :: Lens' DatafeedstatusesListResponse Text
dlrlKind = lens _dlrlKind (\ s a -> s{_dlrlKind = a})
dlrlResources :: Lens' DatafeedstatusesListResponse [DatafeedStatus]
dlrlResources
= lens _dlrlResources
(\ s a -> s{_dlrlResources = a})
. _Default
. _Coerce
instance FromJSON DatafeedstatusesListResponse where
parseJSON
= withObject "DatafeedstatusesListResponse"
(\ o ->
DatafeedstatusesListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"content#datafeedstatusesListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON DatafeedstatusesListResponse where
toJSON DatafeedstatusesListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _dlrlNextPageToken,
Just ("kind" .= _dlrlKind),
("resources" .=) <$> _dlrlResources])
data ProductsListResponse = ProductsListResponse'
{ _plrlNextPageToken :: !(Maybe Text)
, _plrlKind :: !Text
, _plrlResources :: !(Maybe [Product])
} deriving (Eq,Show,Data,Typeable,Generic)
productsListResponse
:: ProductsListResponse
productsListResponse =
ProductsListResponse'
{ _plrlNextPageToken = Nothing
, _plrlKind = "content#productsListResponse"
, _plrlResources = Nothing
}
plrlNextPageToken :: Lens' ProductsListResponse (Maybe Text)
plrlNextPageToken
= lens _plrlNextPageToken
(\ s a -> s{_plrlNextPageToken = a})
plrlKind :: Lens' ProductsListResponse Text
plrlKind = lens _plrlKind (\ s a -> s{_plrlKind = a})
plrlResources :: Lens' ProductsListResponse [Product]
plrlResources
= lens _plrlResources
(\ s a -> s{_plrlResources = a})
. _Default
. _Coerce
instance FromJSON ProductsListResponse where
parseJSON
= withObject "ProductsListResponse"
(\ o ->
ProductsListResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "content#productsListResponse")
<*> (o .:? "resources" .!= mempty))
instance ToJSON ProductsListResponse where
toJSON ProductsListResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _plrlNextPageToken,
Just ("kind" .= _plrlKind),
("resources" .=) <$> _plrlResources])
data AccountAdwordsLink = AccountAdwordsLink'
{ _aalStatus :: !(Maybe Text)
, _aalAdwordsId :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
accountAdwordsLink
:: AccountAdwordsLink
accountAdwordsLink =
AccountAdwordsLink'
{ _aalStatus = Nothing
, _aalAdwordsId = Nothing
}
aalStatus :: Lens' AccountAdwordsLink (Maybe Text)
aalStatus
= lens _aalStatus (\ s a -> s{_aalStatus = a})
aalAdwordsId :: Lens' AccountAdwordsLink (Maybe Word64)
aalAdwordsId
= lens _aalAdwordsId (\ s a -> s{_aalAdwordsId = a})
. mapping _Coerce
instance FromJSON AccountAdwordsLink where
parseJSON
= withObject "AccountAdwordsLink"
(\ o ->
AccountAdwordsLink' <$>
(o .:? "status") <*> (o .:? "adwordsId"))
instance ToJSON AccountAdwordsLink where
toJSON AccountAdwordsLink'{..}
= object
(catMaybes
[("status" .=) <$> _aalStatus,
("adwordsId" .=) <$> _aalAdwordsId])
data OrderCancellation = OrderCancellation'
{ _ocQuantity :: !(Maybe (Textual Word32))
, _ocActor :: !(Maybe Text)
, _ocReason :: !(Maybe Text)
, _ocCreationDate :: !(Maybe Text)
, _ocReasonText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
orderCancellation
:: OrderCancellation
orderCancellation =
OrderCancellation'
{ _ocQuantity = Nothing
, _ocActor = Nothing
, _ocReason = Nothing
, _ocCreationDate = Nothing
, _ocReasonText = Nothing
}
ocQuantity :: Lens' OrderCancellation (Maybe Word32)
ocQuantity
= lens _ocQuantity (\ s a -> s{_ocQuantity = a}) .
mapping _Coerce
ocActor :: Lens' OrderCancellation (Maybe Text)
ocActor = lens _ocActor (\ s a -> s{_ocActor = a})
ocReason :: Lens' OrderCancellation (Maybe Text)
ocReason = lens _ocReason (\ s a -> s{_ocReason = a})
ocCreationDate :: Lens' OrderCancellation (Maybe Text)
ocCreationDate
= lens _ocCreationDate
(\ s a -> s{_ocCreationDate = a})
ocReasonText :: Lens' OrderCancellation (Maybe Text)
ocReasonText
= lens _ocReasonText (\ s a -> s{_ocReasonText = a})
instance FromJSON OrderCancellation where
parseJSON
= withObject "OrderCancellation"
(\ o ->
OrderCancellation' <$>
(o .:? "quantity") <*> (o .:? "actor") <*>
(o .:? "reason")
<*> (o .:? "creationDate")
<*> (o .:? "reasonText"))
instance ToJSON OrderCancellation where
toJSON OrderCancellation'{..}
= object
(catMaybes
[("quantity" .=) <$> _ocQuantity,
("actor" .=) <$> _ocActor,
("reason" .=) <$> _ocReason,
("creationDate" .=) <$> _ocCreationDate,
("reasonText" .=) <$> _ocReasonText])
data OrdersCustomBatchResponse = OrdersCustomBatchResponse'
{ _ordEntries :: !(Maybe [OrdersCustomBatchResponseEntry])
, _ordKind :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
ordersCustomBatchResponse
:: OrdersCustomBatchResponse
ordersCustomBatchResponse =
OrdersCustomBatchResponse'
{ _ordEntries = Nothing
, _ordKind = "content#ordersCustomBatchResponse"
}
ordEntries :: Lens' OrdersCustomBatchResponse [OrdersCustomBatchResponseEntry]
ordEntries
= lens _ordEntries (\ s a -> s{_ordEntries = a}) .
_Default
. _Coerce
ordKind :: Lens' OrdersCustomBatchResponse Text
ordKind = lens _ordKind (\ s a -> s{_ordKind = a})
instance FromJSON OrdersCustomBatchResponse where
parseJSON
= withObject "OrdersCustomBatchResponse"
(\ o ->
OrdersCustomBatchResponse' <$>
(o .:? "entries" .!= mempty) <*>
(o .:? "kind" .!=
"content#ordersCustomBatchResponse"))
instance ToJSON OrdersCustomBatchResponse where
toJSON OrdersCustomBatchResponse'{..}
= object
(catMaybes
[("entries" .=) <$> _ordEntries,
Just ("kind" .= _ordKind)])