| Copyright | (c) David Johnson, 2014 |
|---|---|
| Maintainer | [email protected] |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Web.Stripe.Dispute
Description
https://stripe.com/docs/api#diputes
import Web.Stripe
import Web.Stripe.Charge
import Web.Stripe.Dispute
main :: IO ()
main = do
let config = SecretKey "secret_key"
result <- stripe config $ do
Charge { chargeDispute = dispute } <- getCharge (ChargeId "charge_id")
return dispute
case result of
Right (Just dispute) -> print dispute
Right Nothing -> print "no dispute on this charge"
Left stripeError -> print stripeError
- updateDispute :: ChargeId -> Maybe Evidence -> MetaData -> Stripe Dispute
- closeDispute :: ChargeId -> Stripe Dispute
- data ChargeId
- data Dispute = Dispute {
- disputeChargeId :: ChargeId
- disputeAmount :: Int
- disputeCreated :: UTCTime
- disputeStatus :: DisputeStatus
- disputeLiveMode :: Bool
- disputeCurrency :: Currency
- disputeObject :: Text
- disputeReason :: DisputeReason
- disputeIsChargeRefundable :: Bool
- disputeBalanceTransactions :: [BalanceTransaction]
- disputeEvidenceDueBy :: UTCTime
- disputeEvidence :: Maybe Evidence
- disputeMetaData :: MetaData
- data DisputeReason
- data DisputeStatus
- newtype Evidence = Evidence Text
API
Arguments
| :: ChargeId | The ID of the Charge being disputed |
| -> Maybe Evidence | Text-only evidence of the dispute |
| -> MetaData | |
| -> Stripe Dispute |
Dispute to be updated
Dispute to be closed
Types
Constructors
| ChargeId Text | |
| ExpandedCharge Charge |
Dispute Object
Constructors
data DisputeReason Source
Reason of a Dispute
Constructors
| Duplicate | |
| Fraudulent | |
| SubscriptionCanceled | |
| ProductUnacceptable | |
| ProductNotReceived | |
| Unrecognized | |
| CreditNotProcessed | |
| General |
Instances
| Eq DisputeReason | |
| Show DisputeReason | |
| FromJSON DisputeReason | JSON Instance for |
data DisputeStatus Source
Status of a Dispute
Constructors
| WarningNeedsResponse | |
| WarningUnderReview | |
| NeedsResponse | |
| UnderReview | |
| ChargeRefunded | |
| Won | |
| Lost |
Instances
| Eq DisputeStatus | |
| Show DisputeStatus | |
| FromJSON DisputeStatus | JSON Instance for |