packages feed

stripe 0.7.0 → 0.8.0

raw patch · 4 files changed

+31/−12 lines, 4 filesdep ~aesondep ~text

Dependency ranges changed: aeson, text

Files

src/Web/Stripe/Card.hs view
@@ -18,12 +18,13 @@  -- | Represents a credit card in the Stripe system. data Card = Card-    { cardType     :: T.Text-    , cardCountry  :: Maybe T.Text-    , cardLastFour :: T.Text-    , cardExpMonth :: Int-    , cardExpYear  :: Int-    , cardChecks   :: CardChecks+    { cardType        :: T.Text+    , cardCountry     :: Maybe T.Text+    , cardLastFour    :: T.Text+    , cardExpMonth    :: Int+    , cardExpYear     :: Int+    , cardFingerprint :: T.Text+    , cardChecks      :: CardChecks     } deriving Show  -- | Represents a credit car (with full details) that is used as input to the@@ -84,6 +85,7 @@     <*> v .:  "last4"     <*> v .:  "exp_month"     <*> v .:  "exp_year"+    <*> v .:  "fingerprint"     <*> (CardChecks       <$> v .: "cvc_check"       <*> v .: "address_line1_check"
src/Web/Stripe/Connect.hs view
@@ -41,9 +41,9 @@   type URL = ByteString-type AccessToken = ByteString-type RefreshToken = ByteString-type UserId = ByteString+type AccessToken = Text+type RefreshToken = Text+type UserId = Text type ClientId = ByteString type AuthCode = ByteString 
src/Web/Stripe/Subscription.hs view
@@ -7,6 +7,7 @@     , SubProrate(..)     , SubTrialEnd(..)     , SubAtPeriodEnd(..)+    , createSub     , updateSubRCard     , updateSubToken     , updateSub@@ -89,6 +90,22 @@                -> Maybe SubProrate -> Maybe SubTrialEnd                -> StripeT m Subscription updateSubToken (TokenId tid) = updateSub [("token", textToByteString tid)]+++-- | Create a new 'Subscription'. Limitations: does not yet support passing+--   a card,  quantity, or application fee++createSub :: MonadIO m => CustomerId -> PlanId -> Maybe CpnId+          -> Maybe SubTrialEnd+          -> StripeT m Subscription+          +createSub cid pid mcpnid mste =+    snd `liftM` query (subRq cid []) { sMethod = POST, sData = fdata }+    where+        fdata = ("plan", textToByteString $ unPlanId pid) : optionalArgs odata+        odata = [ ("coupon",    textToByteString . unCpnId     <$> mcpnid)+                , ("trial_end", showByteString . unSubTrialEnd <$> mste)+                ]  -- | Internal convenience function to update a 'Subscription'. updateSub :: MonadIO m => [(B.ByteString, B.ByteString)] -> CustomerId -> PlanId
stripe.cabal view
@@ -1,5 +1,5 @@ Name:                stripe-Version:             0.7.0+Version:             0.8.0 Synopsis:            A Haskell implementation of the Stripe API. Description:         This is an implementation of the Stripe API as it is                      documented at https:\/\/stripe.com\/docs\/api@@ -35,8 +35,8 @@                         , Web.Stripe.Token                         , Web.Stripe.Utils     Build-depends:        base                 >= 3       && < 5-                        , text                 >= 0.11.0  && < 0.12-                        , aeson                >= 0.6.1   && < 0.7+                        , text                 >= 0.11.0  && < 1.2+                        , aeson                >= 0.6.1   && < 0.8                         , unordered-containers >= 0.1.4.6 && < 0.3                         , time                 >= 1.0     && < 1.5                         , http-conduit         >= 2.0     && < 2.1