on develop help sign in
Regenerating gogol-android-publisher from updated service defintions
commit2e750bc1b8882240fab739fe49e3337fa99c67b5 authorBrendan Hay <brendan.g.hay@gmail.com> dateSat 11 Feb 2017, 11:36 (10 years ago) parentf35afef
7 files changed+618−13
gogol-android-publisher/gen/Network/Google/AndroidPublisher.hs+39 gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types.hs+34 gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs+346 gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Purchases/Voidedpurchases/List.hs+160 gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/Get.hs+17−4 gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/List.hs+21−9 gogol-android-publisher/gogol-android-publisher.cabal+1
gogol-android-publisher/gen/Network/Google/AndroidPublisher.hs+39
@@ -188,6 +188,9 @@ module Network.Google.AndroidPublisher
188188 -- ** androidpublisher.purchases.subscriptions.revoke
189189 , module Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Revoke
190190
191+ -- ** androidpublisher.purchases.voidedpurchases.list
192+ , module Network.Google.Resource.AndroidPublisher.Purchases.Voidedpurchases.List
193+
191194 -- ** androidpublisher.reviews.get
192195 , module Network.Google.Resource.AndroidPublisher.Reviews.Get
193196
@@ -272,9 +275,13 @@ module Network.Google.AndroidPublisher
272275 , ucAndroidOSVersion
273276 , ucText
274277 , ucDevice
278+ , ucThumbsUpCount
275279 , ucAppVersionCode
280+ , ucThumbsDownCount
281+ , ucOriginalText
276282 , ucAppVersionName
277283 , ucReviewerLanguage
284+ , ucDeviceMetadata
278285 , ucStarRating
279286 , ucLastModified
280287
@@ -433,6 +440,13 @@ module Network.Google.AndroidPublisher
433440 , deobfuscationFile
434441 , dfSymbolType
435442
443+ -- ** VoidedPurchasesListResponse
444+ , VoidedPurchasesListResponse
445+ , voidedPurchasesListResponse
446+ , vplrTokenPagination
447+ , vplrPageInfo
448+ , vplrVoidedPurchases
449+
436450 -- ** ExpansionFilesUploadResponse
437451 , ExpansionFilesUploadResponse
438452 , expansionFilesUploadResponse
@@ -514,6 +528,21 @@ module Network.Google.AndroidPublisher
514528 -- ** EditsExpansionFilesUpdateExpansionFileType
515529 , EditsExpansionFilesUpdateExpansionFileType (..)
516530
531+ -- ** DeviceMetadata
532+ , DeviceMetadata
533+ , deviceMetadata
534+ , dmProductName
535+ , dmGlEsVersion
536+ , dmManufacturer
537+ , dmScreenWidthPx
538+ , dmRamMb
539+ , dmCPUMake
540+ , dmScreenHeightPx
541+ , dmNATivePlatform
542+ , dmDeviceClass
543+ , dmCPUModel
544+ , dmScreenDensityDpi
545+
517546 -- ** DeveloperComment
518547 , DeveloperComment
519548 , developerComment
@@ -616,6 +645,14 @@ module Network.Google.AndroidPublisher
616645 , tNanos
617646 , tSeconds
618647
648+ -- ** VoidedPurchase
649+ , VoidedPurchase
650+ , voidedPurchase
651+ , vpKind
652+ , vpPurchaseTimeMillis
653+ , vpPurchaseToken
654+ , vpVoidedTimeMillis
655+
619656 -- ** ReviewReplyResult
620657 , ReviewReplyResult
621658 , reviewReplyResult
@@ -692,6 +729,7 @@ import Network.Google.Resource.AndroidPublisher.Purchases.Subscription
692729import Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Get
693730import Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Refund
694731import Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Revoke
732+import Network.Google.Resource.AndroidPublisher.Purchases.Voidedpurchases.List
695733import Network.Google.Resource.AndroidPublisher.Reviews.Get
696734import Network.Google.Resource.AndroidPublisher.Reviews.List
697735import Network.Google.Resource.AndroidPublisher.Reviews.Reply
@@ -752,6 +790,7 @@ type AndroidPublisherAPI =
752790 :<|> EditsDeleteResource
753791 :<|> EditsCommitResource
754792 :<|> EntitlementsListResource
793+ :<|> PurchasesVoidedpurchasesListResource
755794 :<|> PurchasesProductsGetResource
756795 :<|> PurchasesSubscriptionsDeferResource
757796 :<|> PurchasesSubscriptionsGetResource
gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types.hs+34
@@ -95,9 +95,13 @@ module Network.Google.AndroidPublisher.Types
9595 , ucAndroidOSVersion
9696 , ucText
9797 , ucDevice
98+ , ucThumbsUpCount
9899 , ucAppVersionCode
100+ , ucThumbsDownCount
101+ , ucOriginalText
99102 , ucAppVersionName
100103 , ucReviewerLanguage
104+ , ucDeviceMetadata
101105 , ucStarRating
102106 , ucLastModified
103107
@@ -256,6 +260,13 @@ module Network.Google.AndroidPublisher.Types
256260 , deobfuscationFile
257261 , dfSymbolType
258262
263+ -- * VoidedPurchasesListResponse
264+ , VoidedPurchasesListResponse
265+ , voidedPurchasesListResponse
266+ , vplrTokenPagination
267+ , vplrPageInfo
268+ , vplrVoidedPurchases
269+
259270 -- * ExpansionFilesUploadResponse
260271 , ExpansionFilesUploadResponse
261272 , expansionFilesUploadResponse
@@ -337,6 +348,21 @@ module Network.Google.AndroidPublisher.Types
337348 -- * EditsExpansionFilesUpdateExpansionFileType
338349 , EditsExpansionFilesUpdateExpansionFileType (..)
339350
351+ -- * DeviceMetadata
352+ , DeviceMetadata
353+ , deviceMetadata
354+ , dmProductName
355+ , dmGlEsVersion
356+ , dmManufacturer
357+ , dmScreenWidthPx
358+ , dmRamMb
359+ , dmCPUMake
360+ , dmScreenHeightPx
361+ , dmNATivePlatform
362+ , dmDeviceClass
363+ , dmCPUModel
364+ , dmScreenDensityDpi
365+
340366 -- * DeveloperComment
341367 , DeveloperComment
342368 , developerComment
@@ -439,6 +465,14 @@ module Network.Google.AndroidPublisher.Types
439465 , tNanos
440466 , tSeconds
441467
468+ -- * VoidedPurchase
469+ , VoidedPurchase
470+ , voidedPurchase
471+ , vpKind
472+ , vpPurchaseTimeMillis
473+ , vpPurchaseToken
474+ , vpVoidedTimeMillis
475+
442476 -- * ReviewReplyResult
443477 , ReviewReplyResult
444478 , reviewReplyResult
gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs+346
@@ -509,9 +509,13 @@ data UserComment = UserComment'
509509 { _ucAndroidOSVersion :: !(Maybe (Textual Int32))
510510 , _ucText :: !(Maybe Text)
511511 , _ucDevice :: !(Maybe Text)
512+ , _ucThumbsUpCount :: !(Maybe (Textual Int32))
512513 , _ucAppVersionCode :: !(Maybe (Textual Int32))
514+ , _ucThumbsDownCount :: !(Maybe (Textual Int32))
515+ , _ucOriginalText :: !(Maybe Text)
513516 , _ucAppVersionName :: !(Maybe Text)
514517 , _ucReviewerLanguage :: !(Maybe Text)
518+ , _ucDeviceMetadata :: !(Maybe DeviceMetadata)
515519 , _ucStarRating :: !(Maybe (Textual Int32))
516520 , _ucLastModified :: !(Maybe Timestamp)
517521 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -526,12 +530,20 @@ data UserComment = UserComment'
526530--
527531-- * 'ucDevice'
528532--
533+-- * 'ucThumbsUpCount'
534+--
529535-- * 'ucAppVersionCode'
530536--
537+-- * 'ucThumbsDownCount'
538+--
539+-- * 'ucOriginalText'
540+--
531541-- * 'ucAppVersionName'
532542--
533543-- * 'ucReviewerLanguage'
534544--
545+-- * 'ucDeviceMetadata'
546+--
535547-- * 'ucStarRating'
536548--
537549-- * 'ucLastModified'
@@ -542,9 +554,13 @@ userComment =
542554 { _ucAndroidOSVersion = Nothing
543555 , _ucText = Nothing
544556 , _ucDevice = Nothing
557+ , _ucThumbsUpCount = Nothing
545558 , _ucAppVersionCode = Nothing
559+ , _ucThumbsDownCount = Nothing
560+ , _ucOriginalText = Nothing
546561 , _ucAppVersionName = Nothing
547562 , _ucReviewerLanguage = Nothing
563+ , _ucDeviceMetadata = Nothing
548564 , _ucStarRating = Nothing
549565 , _ucLastModified = Nothing
550566 }
@@ -567,6 +583,13 @@ ucText = lens _ucText (\ s a -> s{_ucText = a})
567583ucDevice :: Lens' UserComment (Maybe Text)
568584ucDevice = lens _ucDevice (\ s a -> s{_ucDevice = a})
569585
586+-- | Number of users who have given this review a thumbs up
587+ucThumbsUpCount :: Lens' UserComment (Maybe Int32)
588+ucThumbsUpCount
589+ = lens _ucThumbsUpCount
590+ (\ s a -> s{_ucThumbsUpCount = a})
591+ . mapping _Coerce
592+
570593-- | Integer version code of the app as installed at the time the review was
571594-- written. May be absent.
572595ucAppVersionCode :: Lens' UserComment (Maybe Int32)
@@ -575,6 +598,20 @@ ucAppVersionCode
575598 (\ s a -> s{_ucAppVersionCode = a})
576599 . mapping _Coerce
577600
601+-- | Number of users who have given this review a thumbs down
602+ucThumbsDownCount :: Lens' UserComment (Maybe Int32)
603+ucThumbsDownCount
604+ = lens _ucThumbsDownCount
605+ (\ s a -> s{_ucThumbsDownCount = a})
606+ . mapping _Coerce
607+
608+-- | Untranslated text of the review, in the case where the review has been
609+-- translated. If the review has not been translated this is left blank.
610+ucOriginalText :: Lens' UserComment (Maybe Text)
611+ucOriginalText
612+ = lens _ucOriginalText
613+ (\ s a -> s{_ucOriginalText = a})
614+
578615-- | String version name of the app as installed at the time the review was
579616-- written. May be absent.
580617ucAppVersionName :: Lens' UserComment (Maybe Text)
@@ -590,6 +627,12 @@ ucReviewerLanguage
590627 = lens _ucReviewerLanguage
591628 (\ s a -> s{_ucReviewerLanguage = a})
592629
630+-- | Some information about the characteristics of the user\'s device
631+ucDeviceMetadata :: Lens' UserComment (Maybe DeviceMetadata)
632+ucDeviceMetadata
633+ = lens _ucDeviceMetadata
634+ (\ s a -> s{_ucDeviceMetadata = a})
635+
593636-- | The star rating associated with the review, from 1 to 5.
594637ucStarRating :: Lens' UserComment (Maybe Int32)
595638ucStarRating
@@ -609,9 +652,13 @@ instance FromJSON UserComment where
609652 UserComment' <$>
610653 (o .:? "androidOsVersion") <*> (o .:? "text") <*>
611654 (o .:? "device")
655+ <*> (o .:? "thumbsUpCount")
612656 <*> (o .:? "appVersionCode")
657+ <*> (o .:? "thumbsDownCount")
658+ <*> (o .:? "originalText")
613659 <*> (o .:? "appVersionName")
614660 <*> (o .:? "reviewerLanguage")
661+ <*> (o .:? "deviceMetadata")
615662 <*> (o .:? "starRating")
616663 <*> (o .:? "lastModified"))
617664
@@ -621,9 +668,13 @@ instance ToJSON UserComment where
621668 (catMaybes
622669 [("androidOsVersion" .=) <$> _ucAndroidOSVersion,
623670 ("text" .=) <$> _ucText, ("device" .=) <$> _ucDevice,
671+ ("thumbsUpCount" .=) <$> _ucThumbsUpCount,
624672 ("appVersionCode" .=) <$> _ucAppVersionCode,
673+ ("thumbsDownCount" .=) <$> _ucThumbsDownCount,
674+ ("originalText" .=) <$> _ucOriginalText,
625675 ("appVersionName" .=) <$> _ucAppVersionName,
626676 ("reviewerLanguage" .=) <$> _ucReviewerLanguage,
677+ ("deviceMetadata" .=) <$> _ucDeviceMetadata,
627678 ("starRating" .=) <$> _ucStarRating,
628679 ("lastModified" .=) <$> _ucLastModified])
629680
@@ -1901,6 +1952,64 @@ instance ToJSON DeobfuscationFile where
19011952 = object
19021953 (catMaybes [("symbolType" .=) <$> _dfSymbolType])
19031954
1955+--
1956+-- /See:/ 'voidedPurchasesListResponse' smart constructor.
1957+data VoidedPurchasesListResponse = VoidedPurchasesListResponse'
1958+ { _vplrTokenPagination :: !(Maybe TokenPagination)
1959+ , _vplrPageInfo :: !(Maybe PageInfo)
1960+ , _vplrVoidedPurchases :: !(Maybe [VoidedPurchase])
1961+ } deriving (Eq,Show,Data,Typeable,Generic)
1962+
1963+-- | Creates a value of 'VoidedPurchasesListResponse' with the minimum fields required to make a request.
1964+--
1965+-- Use one of the following lenses to modify other fields as desired:
1966+--
1967+-- * 'vplrTokenPagination'
1968+--
1969+-- * 'vplrPageInfo'
1970+--
1971+-- * 'vplrVoidedPurchases'
1972+voidedPurchasesListResponse
1973+ :: VoidedPurchasesListResponse
1974+voidedPurchasesListResponse =
1975+ VoidedPurchasesListResponse'
1976+ { _vplrTokenPagination = Nothing
1977+ , _vplrPageInfo = Nothing
1978+ , _vplrVoidedPurchases = Nothing
1979+ }
1980+
1981+vplrTokenPagination :: Lens' VoidedPurchasesListResponse (Maybe TokenPagination)
1982+vplrTokenPagination
1983+ = lens _vplrTokenPagination
1984+ (\ s a -> s{_vplrTokenPagination = a})
1985+
1986+vplrPageInfo :: Lens' VoidedPurchasesListResponse (Maybe PageInfo)
1987+vplrPageInfo
1988+ = lens _vplrPageInfo (\ s a -> s{_vplrPageInfo = a})
1989+
1990+vplrVoidedPurchases :: Lens' VoidedPurchasesListResponse [VoidedPurchase]
1991+vplrVoidedPurchases
1992+ = lens _vplrVoidedPurchases
1993+ (\ s a -> s{_vplrVoidedPurchases = a})
1994+ . _Default
1995+ . _Coerce
1996+
1997+instance FromJSON VoidedPurchasesListResponse where
1998+ parseJSON
1999+ = withObject "VoidedPurchasesListResponse"
2000+ (\ o ->
2001+ VoidedPurchasesListResponse' <$>
2002+ (o .:? "tokenPagination") <*> (o .:? "pageInfo") <*>
2003+ (o .:? "voidedPurchases" .!= mempty))
2004+
2005+instance ToJSON VoidedPurchasesListResponse where
2006+ toJSON VoidedPurchasesListResponse'{..}
2007+ = object
2008+ (catMaybes
2009+ [("tokenPagination" .=) <$> _vplrTokenPagination,
2010+ ("pageInfo" .=) <$> _vplrPageInfo,
2011+ ("voidedPurchases" .=) <$> _vplrVoidedPurchases])
2012+
19042013--
19052014-- /See:/ 'expansionFilesUploadResponse' smart constructor.
19062015newtype ExpansionFilesUploadResponse = ExpansionFilesUploadResponse'
@@ -2405,6 +2514,164 @@ instance ToJSON ReviewsReplyRequest where
24052514 = object
24062515 (catMaybes [("replyText" .=) <$> _rrrReplyText])
24072516
2517+--
2518+-- /See:/ 'deviceMetadata' smart constructor.
2519+data DeviceMetadata = DeviceMetadata'
2520+ { _dmProductName :: !(Maybe Text)
2521+ , _dmGlEsVersion :: !(Maybe (Textual Int32))
2522+ , _dmManufacturer :: !(Maybe Text)
2523+ , _dmScreenWidthPx :: !(Maybe (Textual Int32))
2524+ , _dmRamMb :: !(Maybe (Textual Int32))
2525+ , _dmCPUMake :: !(Maybe Text)
2526+ , _dmScreenHeightPx :: !(Maybe (Textual Int32))
2527+ , _dmNATivePlatform :: !(Maybe Text)
2528+ , _dmDeviceClass :: !(Maybe Text)
2529+ , _dmCPUModel :: !(Maybe Text)
2530+ , _dmScreenDensityDpi :: !(Maybe (Textual Int32))
2531+ } deriving (Eq,Show,Data,Typeable,Generic)
2532+
2533+-- | Creates a value of 'DeviceMetadata' with the minimum fields required to make a request.
2534+--
2535+-- Use one of the following lenses to modify other fields as desired:
2536+--
2537+-- * 'dmProductName'
2538+--
2539+-- * 'dmGlEsVersion'
2540+--
2541+-- * 'dmManufacturer'
2542+--
2543+-- * 'dmScreenWidthPx'
2544+--
2545+-- * 'dmRamMb'
2546+--
2547+-- * 'dmCPUMake'
2548+--
2549+-- * 'dmScreenHeightPx'
2550+--
2551+-- * 'dmNATivePlatform'
2552+--
2553+-- * 'dmDeviceClass'
2554+--
2555+-- * 'dmCPUModel'
2556+--
2557+-- * 'dmScreenDensityDpi'
2558+deviceMetadata
2559+ :: DeviceMetadata
2560+deviceMetadata =
2561+ DeviceMetadata'
2562+ { _dmProductName = Nothing
2563+ , _dmGlEsVersion = Nothing
2564+ , _dmManufacturer = Nothing
2565+ , _dmScreenWidthPx = Nothing
2566+ , _dmRamMb = Nothing
2567+ , _dmCPUMake = Nothing
2568+ , _dmScreenHeightPx = Nothing
2569+ , _dmNATivePlatform = Nothing
2570+ , _dmDeviceClass = Nothing
2571+ , _dmCPUModel = Nothing
2572+ , _dmScreenDensityDpi = Nothing
2573+ }
2574+
2575+-- | Device model name (e.g. Droid)
2576+dmProductName :: Lens' DeviceMetadata (Maybe Text)
2577+dmProductName
2578+ = lens _dmProductName
2579+ (\ s a -> s{_dmProductName = a})
2580+
2581+-- | OpenGL version
2582+dmGlEsVersion :: Lens' DeviceMetadata (Maybe Int32)
2583+dmGlEsVersion
2584+ = lens _dmGlEsVersion
2585+ (\ s a -> s{_dmGlEsVersion = a})
2586+ . mapping _Coerce
2587+
2588+-- | Device manufacturer (e.g. Motorola)
2589+dmManufacturer :: Lens' DeviceMetadata (Maybe Text)
2590+dmManufacturer
2591+ = lens _dmManufacturer
2592+ (\ s a -> s{_dmManufacturer = a})
2593+
2594+-- | Screen width in pixels
2595+dmScreenWidthPx :: Lens' DeviceMetadata (Maybe Int32)
2596+dmScreenWidthPx
2597+ = lens _dmScreenWidthPx
2598+ (\ s a -> s{_dmScreenWidthPx = a})
2599+ . mapping _Coerce
2600+
2601+-- | Device RAM in Megabytes e.g. \"2048\"
2602+dmRamMb :: Lens' DeviceMetadata (Maybe Int32)
2603+dmRamMb
2604+ = lens _dmRamMb (\ s a -> s{_dmRamMb = a}) .
2605+ mapping _Coerce
2606+
2607+-- | Device CPU make e.g. \"Qualcomm\"
2608+dmCPUMake :: Lens' DeviceMetadata (Maybe Text)
2609+dmCPUMake
2610+ = lens _dmCPUMake (\ s a -> s{_dmCPUMake = a})
2611+
2612+-- | Screen height in pixels
2613+dmScreenHeightPx :: Lens' DeviceMetadata (Maybe Int32)
2614+dmScreenHeightPx
2615+ = lens _dmScreenHeightPx
2616+ (\ s a -> s{_dmScreenHeightPx = a})
2617+ . mapping _Coerce
2618+
2619+-- | Comma separated list of native platforms (e.g. \"arm\", \"arm7\")
2620+dmNATivePlatform :: Lens' DeviceMetadata (Maybe Text)
2621+dmNATivePlatform
2622+ = lens _dmNATivePlatform
2623+ (\ s a -> s{_dmNATivePlatform = a})
2624+
2625+-- | Device class (e.g. tablet)
2626+dmDeviceClass :: Lens' DeviceMetadata (Maybe Text)
2627+dmDeviceClass
2628+ = lens _dmDeviceClass
2629+ (\ s a -> s{_dmDeviceClass = a})
2630+
2631+-- | Device CPU model e.g. \"MSM8974\"
2632+dmCPUModel :: Lens' DeviceMetadata (Maybe Text)
2633+dmCPUModel
2634+ = lens _dmCPUModel (\ s a -> s{_dmCPUModel = a})
2635+
2636+-- | Screen density in DPI
2637+dmScreenDensityDpi :: Lens' DeviceMetadata (Maybe Int32)
2638+dmScreenDensityDpi
2639+ = lens _dmScreenDensityDpi
2640+ (\ s a -> s{_dmScreenDensityDpi = a})
2641+ . mapping _Coerce
2642+
2643+instance FromJSON DeviceMetadata where
2644+ parseJSON
2645+ = withObject "DeviceMetadata"
2646+ (\ o ->
2647+ DeviceMetadata' <$>
2648+ (o .:? "productName") <*> (o .:? "glEsVersion") <*>
2649+ (o .:? "manufacturer")
2650+ <*> (o .:? "screenWidthPx")
2651+ <*> (o .:? "ramMb")
2652+ <*> (o .:? "cpuMake")
2653+ <*> (o .:? "screenHeightPx")
2654+ <*> (o .:? "nativePlatform")
2655+ <*> (o .:? "deviceClass")
2656+ <*> (o .:? "cpuModel")
2657+ <*> (o .:? "screenDensityDpi"))
2658+
2659+instance ToJSON DeviceMetadata where
2660+ toJSON DeviceMetadata'{..}
2661+ = object
2662+ (catMaybes
2663+ [("productName" .=) <$> _dmProductName,
2664+ ("glEsVersion" .=) <$> _dmGlEsVersion,
2665+ ("manufacturer" .=) <$> _dmManufacturer,
2666+ ("screenWidthPx" .=) <$> _dmScreenWidthPx,
2667+ ("ramMb" .=) <$> _dmRamMb,
2668+ ("cpuMake" .=) <$> _dmCPUMake,
2669+ ("screenHeightPx" .=) <$> _dmScreenHeightPx,
2670+ ("nativePlatform" .=) <$> _dmNATivePlatform,
2671+ ("deviceClass" .=) <$> _dmDeviceClass,
2672+ ("cpuModel" .=) <$> _dmCPUModel,
2673+ ("screenDensityDpi" .=) <$> _dmScreenDensityDpi])
2674+
24082675--
24092676-- /See:/ 'developerComment' smart constructor.
24102677data DeveloperComment = DeveloperComment'
@@ -3188,6 +3455,85 @@ instance ToJSON Timestamp where
31883455 [("nanos" .=) <$> _tNanos,
31893456 ("seconds" .=) <$> _tSeconds])
31903457
3458+-- | A VoidedPurchase resource indicates a purchase that was either
3459+-- cancelled\/refunded\/charged-back.
3460+--
3461+-- /See:/ 'voidedPurchase' smart constructor.
3462+data VoidedPurchase = VoidedPurchase'
3463+ { _vpKind :: !Text
3464+ , _vpPurchaseTimeMillis :: !(Maybe (Textual Int64))
3465+ , _vpPurchaseToken :: !(Maybe Text)
3466+ , _vpVoidedTimeMillis :: !(Maybe (Textual Int64))
3467+ } deriving (Eq,Show,Data,Typeable,Generic)
3468+
3469+-- | Creates a value of 'VoidedPurchase' with the minimum fields required to make a request.
3470+--
3471+-- Use one of the following lenses to modify other fields as desired:
3472+--
3473+-- * 'vpKind'
3474+--
3475+-- * 'vpPurchaseTimeMillis'
3476+--
3477+-- * 'vpPurchaseToken'
3478+--
3479+-- * 'vpVoidedTimeMillis'
3480+voidedPurchase
3481+ :: VoidedPurchase
3482+voidedPurchase =
3483+ VoidedPurchase'
3484+ { _vpKind = "androidpublisher#voidedPurchase"
3485+ , _vpPurchaseTimeMillis = Nothing
3486+ , _vpPurchaseToken = Nothing
3487+ , _vpVoidedTimeMillis = Nothing
3488+ }
3489+
3490+-- | This kind represents a voided purchase object in the androidpublisher
3491+-- service.
3492+vpKind :: Lens' VoidedPurchase Text
3493+vpKind = lens _vpKind (\ s a -> s{_vpKind = a})
3494+
3495+-- | The time at which the purchase was made, in milliseconds since the epoch
3496+-- (Jan 1, 1970).
3497+vpPurchaseTimeMillis :: Lens' VoidedPurchase (Maybe Int64)
3498+vpPurchaseTimeMillis
3499+ = lens _vpPurchaseTimeMillis
3500+ (\ s a -> s{_vpPurchaseTimeMillis = a})
3501+ . mapping _Coerce
3502+
3503+-- | The token that was generated when a purchase was made. This uniquely
3504+-- identifies a purchase.
3505+vpPurchaseToken :: Lens' VoidedPurchase (Maybe Text)
3506+vpPurchaseToken
3507+ = lens _vpPurchaseToken
3508+ (\ s a -> s{_vpPurchaseToken = a})
3509+
3510+-- | The time at which the purchase was cancelled\/refunded\/charged-back, in
3511+-- milliseconds since the epoch (Jan 1, 1970).
3512+vpVoidedTimeMillis :: Lens' VoidedPurchase (Maybe Int64)
3513+vpVoidedTimeMillis
3514+ = lens _vpVoidedTimeMillis
3515+ (\ s a -> s{_vpVoidedTimeMillis = a})
3516+ . mapping _Coerce
3517+
3518+instance FromJSON VoidedPurchase where
3519+ parseJSON
3520+ = withObject "VoidedPurchase"
3521+ (\ o ->
3522+ VoidedPurchase' <$>
3523+ (o .:? "kind" .!= "androidpublisher#voidedPurchase")
3524+ <*> (o .:? "purchaseTimeMillis")
3525+ <*> (o .:? "purchaseToken")
3526+ <*> (o .:? "voidedTimeMillis"))
3527+
3528+instance ToJSON VoidedPurchase where
3529+ toJSON VoidedPurchase'{..}
3530+ = object
3531+ (catMaybes
3532+ [Just ("kind" .= _vpKind),
3533+ ("purchaseTimeMillis" .=) <$> _vpPurchaseTimeMillis,
3534+ ("purchaseToken" .=) <$> _vpPurchaseToken,
3535+ ("voidedTimeMillis" .=) <$> _vpVoidedTimeMillis])
3536+
31913537--
31923538-- /See:/ 'reviewReplyResult' smart constructor.
31933539data ReviewReplyResult = ReviewReplyResult'
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Purchases/Voidedpurchases/List.hsnew file+160
@@ -0,0 +1,160 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidPublisher.Purchases.Voidedpurchases.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists the purchases that were cancelled, refunded or charged-back.
24+--
25+-- /See:/ <https://developers.google.com/android-publisher Google Play Developer API Reference> for @androidpublisher.purchases.voidedpurchases.list@.
26+module Network.Google.Resource.AndroidPublisher.Purchases.Voidedpurchases.List
27+ (
28+ -- * REST Resource
29+ PurchasesVoidedpurchasesListResource
30+
31+ -- * Creating a Request
32+ , purchasesVoidedpurchasesList
33+ , PurchasesVoidedpurchasesList
34+
35+ -- * Request Lenses
36+ , pvlPackageName
37+ , pvlStartTime
38+ , pvlToken
39+ , pvlEndTime
40+ , pvlStartIndex
41+ , pvlMaxResults
42+ ) where
43+
44+import Network.Google.AndroidPublisher.Types
45+import Network.Google.Prelude
46+
47+-- | A resource alias for @androidpublisher.purchases.voidedpurchases.list@ method which the
48+-- 'PurchasesVoidedpurchasesList' request conforms to.
49+type PurchasesVoidedpurchasesListResource =
50+ "androidpublisher" :>
51+ "v2" :>
52+ "applications" :>
53+ Capture "packageName" Text :>
54+ "purchases" :>
55+ "voidedpurchases" :>
56+ QueryParam "startTime" (Textual Int64) :>
57+ QueryParam "token" Text :>
58+ QueryParam "endTime" (Textual Int64) :>
59+ QueryParam "startIndex" (Textual Word32) :>
60+ QueryParam "maxResults" (Textual Word32) :>
61+ QueryParam "alt" AltJSON :>
62+ Get '[JSON] VoidedPurchasesListResponse
63+
64+-- | Lists the purchases that were cancelled, refunded or charged-back.
65+--
66+-- /See:/ 'purchasesVoidedpurchasesList' smart constructor.
67+data PurchasesVoidedpurchasesList = PurchasesVoidedpurchasesList'
68+ { _pvlPackageName :: !Text
69+ , _pvlStartTime :: !(Maybe (Textual Int64))
70+ , _pvlToken :: !(Maybe Text)
71+ , _pvlEndTime :: !(Maybe (Textual Int64))
72+ , _pvlStartIndex :: !(Maybe (Textual Word32))
73+ , _pvlMaxResults :: !(Maybe (Textual Word32))
74+ } deriving (Eq,Show,Data,Typeable,Generic)
75+
76+-- | Creates a value of 'PurchasesVoidedpurchasesList' with the minimum fields required to make a request.
77+--
78+-- Use one of the following lenses to modify other fields as desired:
79+--
80+-- * 'pvlPackageName'
81+--
82+-- * 'pvlStartTime'
83+--
84+-- * 'pvlToken'
85+--
86+-- * 'pvlEndTime'
87+--
88+-- * 'pvlStartIndex'
89+--
90+-- * 'pvlMaxResults'
91+purchasesVoidedpurchasesList
92+ :: Text -- ^ 'pvlPackageName'
93+ -> PurchasesVoidedpurchasesList
94+purchasesVoidedpurchasesList pPvlPackageName_ =
95+ PurchasesVoidedpurchasesList'
96+ { _pvlPackageName = pPvlPackageName_
97+ , _pvlStartTime = Nothing
98+ , _pvlToken = Nothing
99+ , _pvlEndTime = Nothing
100+ , _pvlStartIndex = Nothing
101+ , _pvlMaxResults = Nothing
102+ }
103+
104+-- | The package name of the application for which voided purchases need to
105+-- be returned (for example, \'com.some.thing\').
106+pvlPackageName :: Lens' PurchasesVoidedpurchasesList Text
107+pvlPackageName
108+ = lens _pvlPackageName
109+ (\ s a -> s{_pvlPackageName = a})
110+
111+-- | The time, in milliseconds since the Epoch, of the oldest voided in-app
112+-- product purchase that you want to see in the response. The value of this
113+-- parameter cannot be older than 30 days and is ignored if a pagination
114+-- token is set. Default value is current time minus 30 days.
115+pvlStartTime :: Lens' PurchasesVoidedpurchasesList (Maybe Int64)
116+pvlStartTime
117+ = lens _pvlStartTime (\ s a -> s{_pvlStartTime = a})
118+ . mapping _Coerce
119+
120+pvlToken :: Lens' PurchasesVoidedpurchasesList (Maybe Text)
121+pvlToken = lens _pvlToken (\ s a -> s{_pvlToken = a})
122+
123+-- | The time, in milliseconds since the Epoch, of the newest voided in-app
124+-- product purchase that you want to see in the response. The value of this
125+-- parameter cannot be greater than the current time and is ignored if a
126+-- pagination token is set. Default value is current time.
127+pvlEndTime :: Lens' PurchasesVoidedpurchasesList (Maybe Int64)
128+pvlEndTime
129+ = lens _pvlEndTime (\ s a -> s{_pvlEndTime = a}) .
130+ mapping _Coerce
131+
132+pvlStartIndex :: Lens' PurchasesVoidedpurchasesList (Maybe Word32)
133+pvlStartIndex
134+ = lens _pvlStartIndex
135+ (\ s a -> s{_pvlStartIndex = a})
136+ . mapping _Coerce
137+
138+pvlMaxResults :: Lens' PurchasesVoidedpurchasesList (Maybe Word32)
139+pvlMaxResults
140+ = lens _pvlMaxResults
141+ (\ s a -> s{_pvlMaxResults = a})
142+ . mapping _Coerce
143+
144+instance GoogleRequest PurchasesVoidedpurchasesList
145+ where
146+ type Rs PurchasesVoidedpurchasesList =
147+ VoidedPurchasesListResponse
148+ type Scopes PurchasesVoidedpurchasesList =
149+ '["https://www.googleapis.com/auth/androidpublisher"]
150+ requestClient PurchasesVoidedpurchasesList'{..}
151+ = go _pvlPackageName _pvlStartTime _pvlToken
152+ _pvlEndTime
153+ _pvlStartIndex
154+ _pvlMaxResults
155+ (Just AltJSON)
156+ androidPublisherService
157+ where go
158+ = buildClient
159+ (Proxy :: Proxy PurchasesVoidedpurchasesListResource)
160+ mempty
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/Get.hs+17−4
@@ -35,6 +35,7 @@ module Network.Google.Resource.AndroidPublisher.Reviews.Get
3535 -- * Request Lenses
3636 , rgReviewId
3737 , rgPackageName
38+ , rgTranslationLanguage
3839 ) where
3940
4041import Network.Google.AndroidPublisher.Types
@@ -49,14 +50,16 @@ type ReviewsGetResource =
4950 Capture "packageName" Text :>
5051 "reviews" :>
5152 Capture "reviewId" Text :>
52− QueryParam "alt" AltJSON :> Get '[JSON] Review
53+ QueryParam "translationLanguage" Text :>
54+ QueryParam "alt" AltJSON :> Get '[JSON] Review
5355
5456-- | Returns a single review.
5557--
5658-- /See:/ 'reviewsGet' smart constructor.
5759data ReviewsGet = ReviewsGet'
58− { _rgReviewId :: !Text
59− , _rgPackageName :: !Text
60+ { _rgReviewId :: !Text
61+ , _rgPackageName :: !Text
62+ , _rgTranslationLanguage :: !(Maybe Text)
6063 } deriving (Eq,Show,Data,Typeable,Generic)
6164
6265-- | Creates a value of 'ReviewsGet' with the minimum fields required to make a request.
@@ -66,6 +69,8 @@ data ReviewsGet = ReviewsGet'
6669-- * 'rgReviewId'
6770--
6871-- * 'rgPackageName'
72+--
73+-- * 'rgTranslationLanguage'
6974reviewsGet
7075 :: Text -- ^ 'rgReviewId'
7176 -> Text -- ^ 'rgPackageName'
@@ -74,6 +79,7 @@ reviewsGet pRgReviewId_ pRgPackageName_ =
7479 ReviewsGet'
7580 { _rgReviewId = pRgReviewId_
7681 , _rgPackageName = pRgPackageName_
82+ , _rgTranslationLanguage = Nothing
7783 }
7884
7985rgReviewId :: Lens' ReviewsGet Text
@@ -87,12 +93,19 @@ rgPackageName
8793 = lens _rgPackageName
8894 (\ s a -> s{_rgPackageName = a})
8995
96+rgTranslationLanguage :: Lens' ReviewsGet (Maybe Text)
97+rgTranslationLanguage
98+ = lens _rgTranslationLanguage
99+ (\ s a -> s{_rgTranslationLanguage = a})
100+
90101instance GoogleRequest ReviewsGet where
91102 type Rs ReviewsGet = Review
92103 type Scopes ReviewsGet =
93104 '["https://www.googleapis.com/auth/androidpublisher"]
94105 requestClient ReviewsGet'{..}
95− = go _rgPackageName _rgReviewId (Just AltJSON)
106+ = go _rgPackageName _rgReviewId
107+ _rgTranslationLanguage
108+ (Just AltJSON)
96109 androidPublisherService
97110 where go
98111 = buildClient (Proxy :: Proxy ReviewsGetResource)
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/List.hs+21−9
@@ -35,6 +35,7 @@ module Network.Google.Resource.AndroidPublisher.Reviews.List
3535 -- * Request Lenses
3636 , rlPackageName
3737 , rlToken
38+ , rlTranslationLanguage
3839 , rlStartIndex
3940 , rlMaxResults
4041 ) where
@@ -51,19 +52,21 @@ type ReviewsListResource =
5152 Capture "packageName" Text :>
5253 "reviews" :>
5354 QueryParam "token" Text :>
54− QueryParam "startIndex" (Textual Word32) :>
55− QueryParam "maxResults" (Textual Word32) :>
56− QueryParam "alt" AltJSON :>
57− Get '[JSON] ReviewsListResponse
55+ QueryParam "translationLanguage" Text :>
56+ QueryParam "startIndex" (Textual Word32) :>
57+ QueryParam "maxResults" (Textual Word32) :>
58+ QueryParam "alt" AltJSON :>
59+ Get '[JSON] ReviewsListResponse
5860
5961-- | Returns a list of reviews.
6062--
6163-- /See:/ 'reviewsList' smart constructor.
6264data ReviewsList = ReviewsList'
63− { _rlPackageName :: !Text
64− , _rlToken :: !(Maybe Text)
65− , _rlStartIndex :: !(Maybe (Textual Word32))
66− , _rlMaxResults :: !(Maybe (Textual Word32))
65+ { _rlPackageName :: !Text
66+ , _rlToken :: !(Maybe Text)
67+ , _rlTranslationLanguage :: !(Maybe Text)
68+ , _rlStartIndex :: !(Maybe (Textual Word32))
69+ , _rlMaxResults :: !(Maybe (Textual Word32))
6770 } deriving (Eq,Show,Data,Typeable,Generic)
6871
6972-- | Creates a value of 'ReviewsList' with the minimum fields required to make a request.
@@ -74,6 +77,8 @@ data ReviewsList = ReviewsList'
7477--
7578-- * 'rlToken'
7679--
80+-- * 'rlTranslationLanguage'
81+--
7782-- * 'rlStartIndex'
7883--
7984-- * 'rlMaxResults'
@@ -84,6 +89,7 @@ reviewsList pRlPackageName_ =
8489 ReviewsList'
8590 { _rlPackageName = pRlPackageName_
8691 , _rlToken = Nothing
92+ , _rlTranslationLanguage = Nothing
8793 , _rlStartIndex = Nothing
8894 , _rlMaxResults = Nothing
8995 }
@@ -98,6 +104,11 @@ rlPackageName
98104rlToken :: Lens' ReviewsList (Maybe Text)
99105rlToken = lens _rlToken (\ s a -> s{_rlToken = a})
100106
107+rlTranslationLanguage :: Lens' ReviewsList (Maybe Text)
108+rlTranslationLanguage
109+ = lens _rlTranslationLanguage
110+ (\ s a -> s{_rlTranslationLanguage = a})
111+
101112rlStartIndex :: Lens' ReviewsList (Maybe Word32)
102113rlStartIndex
103114 = lens _rlStartIndex (\ s a -> s{_rlStartIndex = a})
@@ -113,7 +124,8 @@ instance GoogleRequest ReviewsList where
113124 type Scopes ReviewsList =
114125 '["https://www.googleapis.com/auth/androidpublisher"]
115126 requestClient ReviewsList'{..}
116− = go _rlPackageName _rlToken _rlStartIndex
127+ = go _rlPackageName _rlToken _rlTranslationLanguage
128+ _rlStartIndex
117129 _rlMaxResults
118130 (Just AltJSON)
119131 androidPublisherService
gogol-android-publisher/gogol-android-publisher.cabal+1
@@ -88,6 +88,7 @@ library
8888 , Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Get
8989 , Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Refund
9090 , Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Revoke
91+ , Network.Google.Resource.AndroidPublisher.Purchases.Voidedpurchases.List
9192 , Network.Google.Resource.AndroidPublisher.Reviews.Get
9293 , Network.Google.Resource.AndroidPublisher.Reviews.List
9394 , Network.Google.Resource.AndroidPublisher.Reviews.Reply