module Paddle.WebHook.SubscriptionCreated where

import Protolude
import Prelude ()

{-
data SubscriptionStatus =
    Active | Trialing | PastDue | Deleted
    deriving (Show, Eq)

instance FromHttpApiData SubscriptionStatus where
  where
    parseUrlPiece = 

instance FromForm SubscriptionStatus where
  fromForm form = 
    Left (trace ("form" :: Text) $ show form) -- TODO
-}

data SubscriptionCreated passthrough = SubscriptionCreated
  { SubscriptionCreated passthrough -> Text
subscriptionId :: Text
  , SubscriptionCreated passthrough -> Text
subscriptionPlanId :: Text
  , SubscriptionCreated passthrough -> Text
updateUrl :: Text
  , SubscriptionCreated passthrough -> Text
cancelUrl :: Text
  --, status :: SubscriptionStatus
  , SubscriptionCreated passthrough -> passthrough
passthrough :: passthrough
  } deriving ((forall x.
 SubscriptionCreated passthrough
 -> Rep (SubscriptionCreated passthrough) x)
-> (forall x.
    Rep (SubscriptionCreated passthrough) x
    -> SubscriptionCreated passthrough)
-> Generic (SubscriptionCreated passthrough)
forall x.
Rep (SubscriptionCreated passthrough) x
-> SubscriptionCreated passthrough
forall x.
SubscriptionCreated passthrough
-> Rep (SubscriptionCreated passthrough) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall passthrough x.
Rep (SubscriptionCreated passthrough) x
-> SubscriptionCreated passthrough
forall passthrough x.
SubscriptionCreated passthrough
-> Rep (SubscriptionCreated passthrough) x
$cto :: forall passthrough x.
Rep (SubscriptionCreated passthrough) x
-> SubscriptionCreated passthrough
$cfrom :: forall passthrough x.
SubscriptionCreated passthrough
-> Rep (SubscriptionCreated passthrough) x
Generic, Int -> SubscriptionCreated passthrough -> ShowS
[SubscriptionCreated passthrough] -> ShowS
SubscriptionCreated passthrough -> String
(Int -> SubscriptionCreated passthrough -> ShowS)
-> (SubscriptionCreated passthrough -> String)
-> ([SubscriptionCreated passthrough] -> ShowS)
-> Show (SubscriptionCreated passthrough)
forall passthrough.
Show passthrough =>
Int -> SubscriptionCreated passthrough -> ShowS
forall passthrough.
Show passthrough =>
[SubscriptionCreated passthrough] -> ShowS
forall passthrough.
Show passthrough =>
SubscriptionCreated passthrough -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubscriptionCreated passthrough] -> ShowS
$cshowList :: forall passthrough.
Show passthrough =>
[SubscriptionCreated passthrough] -> ShowS
show :: SubscriptionCreated passthrough -> String
$cshow :: forall passthrough.
Show passthrough =>
SubscriptionCreated passthrough -> String
showsPrec :: Int -> SubscriptionCreated passthrough -> ShowS
$cshowsPrec :: forall passthrough.
Show passthrough =>
Int -> SubscriptionCreated passthrough -> ShowS
Show)