module Paddle.Client.ListModifier where

import Data.Aeson (ToJSON, toJSON, genericToJSON)
import Protolude
import Prelude ()
import Paddle.FieldModifier (customJSONOptions)


data ListModifier = ListModifier 
  { ListModifier -> Int
vendorId :: Int
  , ListModifier -> Text
vendorAuthCode :: Text
  , ListModifier -> Maybe Text
subscriptionId :: Maybe Text
  , ListModifier -> Maybe Text
planId :: Maybe Text
  } deriving (Int -> ListModifier -> ShowS
[ListModifier] -> ShowS
ListModifier -> String
(Int -> ListModifier -> ShowS)
-> (ListModifier -> String)
-> ([ListModifier] -> ShowS)
-> Show ListModifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListModifier] -> ShowS
$cshowList :: [ListModifier] -> ShowS
show :: ListModifier -> String
$cshow :: ListModifier -> String
showsPrec :: Int -> ListModifier -> ShowS
$cshowsPrec :: Int -> ListModifier -> ShowS
Show, (forall x. ListModifier -> Rep ListModifier x)
-> (forall x. Rep ListModifier x -> ListModifier)
-> Generic ListModifier
forall x. Rep ListModifier x -> ListModifier
forall x. ListModifier -> Rep ListModifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListModifier x -> ListModifier
$cfrom :: forall x. ListModifier -> Rep ListModifier x
Generic)

instance ToJSON ListModifier where
    toJSON :: ListModifier -> Value
toJSON = Options -> ListModifier -> Value
forall a.
(Generic a, GToJSON' Value Zero (Rep a)) =>
Options -> a -> Value
genericToJSON Options
customJSONOptions