module Paddle.Client.ListModifierResponse where

import Data.Aeson (FromJSON, parseJSON, genericParseJSON)
import Protolude
import Prelude ()
import Paddle.FieldModifier (customJSONOptions)
import Paddle.Amount

data ListModifierResponse = ListModifierResponse
  { ListModifierResponse -> Integer
modifierId :: Integer
  , ListModifierResponse -> Integer
subscriptionId :: Integer
  , ListModifierResponse -> Amount
amount :: Amount
  } deriving (Int -> ListModifierResponse -> ShowS
[ListModifierResponse] -> ShowS
ListModifierResponse -> String
(Int -> ListModifierResponse -> ShowS)
-> (ListModifierResponse -> String)
-> ([ListModifierResponse] -> ShowS)
-> Show ListModifierResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListModifierResponse] -> ShowS
$cshowList :: [ListModifierResponse] -> ShowS
show :: ListModifierResponse -> String
$cshow :: ListModifierResponse -> String
showsPrec :: Int -> ListModifierResponse -> ShowS
$cshowsPrec :: Int -> ListModifierResponse -> ShowS
Show, (forall x. ListModifierResponse -> Rep ListModifierResponse x)
-> (forall x. Rep ListModifierResponse x -> ListModifierResponse)
-> Generic ListModifierResponse
forall x. Rep ListModifierResponse x -> ListModifierResponse
forall x. ListModifierResponse -> Rep ListModifierResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListModifierResponse x -> ListModifierResponse
$cfrom :: forall x. ListModifierResponse -> Rep ListModifierResponse x
Generic)

instance FromJSON ListModifierResponse where
  parseJSON :: Value -> Parser ListModifierResponse
parseJSON = Options -> Value -> Parser ListModifierResponse
forall a.
(Generic a, GFromJSON Zero (Rep a)) =>
Options -> Value -> Parser a
genericParseJSON Options
customJSONOptions