| Copyright | (c) David Johnson, 2014 |
|---|---|
| Maintainer | djohnson.m@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Web.Stripe.Recipient
Description
https://stripe.com/docs/api#recipients
{-# LANGUAGE OverloadedStrings #-}
import Web.Stripe
import Web.Stripe.Recipient
main :: IO ()
main = do
let config = StripeConfig (StripeKey "secret_key")
result <- stripe config $
createRecipient (Name "simon marlow")
Individual
case result of
Right recipient -> print recipient
Left stripeError -> print stripeError
- data CreateRecipient
- createRecipient :: Name -> RecipientType -> StripeRequest CreateRecipient
- data GetRecipient
- getRecipient :: RecipientId -> StripeRequest GetRecipient
- data UpdateRecipient
- updateRecipient :: RecipientId -> StripeRequest UpdateRecipient
- data DeleteRecipient
- deleteRecipient :: RecipientId -> StripeRequest DeleteRecipient
- data GetRecipients
- getRecipients :: StripeRequest GetRecipients
- newtype AccountNumber = AccountNumber Text
- newtype AddressCity = AddressCity Text
- newtype AddressCountry = AddressCountry Text
- newtype AddressLine1 = AddressLine1 Text
- newtype AddressLine2 = AddressLine2 Text
- newtype AddressState = AddressState Text
- newtype AddressZip = AddressZip Text
- data BankAccount = BankAccount {}
- newtype BankAccountId = BankAccountId Text
- data BankAccountStatus
- newtype CardNumber = CardNumber Text
- newtype Country = Country Text
- newtype CVC = CVC Text
- data DefaultCard = DefaultCard {}
- newtype Description = Description Text
- newtype ExpandParams = ExpandParams {
- getExpandParams :: [Text]
- newtype ExpMonth = ExpMonth Int
- newtype ExpYear = ExpYear Int
- newtype Email = Email Text
- newtype IsVerified = IsVerified {
- getVerified :: Bool
- newtype Limit = Limit Int
- newtype MetaData = MetaData [(Text, Text)]
- newtype Name = Name {}
- data NewBankAccount = NewBankAccount {}
- data NewCard = NewCard {
- newCardCardNumber :: CardNumber
- newCardExpMonth :: ExpMonth
- newCardExpYear :: ExpYear
- newCardCVC :: Maybe CVC
- newCardName :: Maybe Name
- newCardAddressLine1 :: Maybe AddressLine1
- newCardAddressLine2 :: Maybe AddressLine2
- newCardAddressCity :: Maybe AddressCity
- newCardAddressZip :: Maybe AddressZip
- newCardAddressState :: Maybe AddressState
- newCardAddressCountry :: Maybe AddressCountry
- data Recipient
- = Recipient {
- recipientId :: RecipientId
- recipientObject :: Text
- recipientCreated :: UTCTime
- recipientLiveMode :: Bool
- recipientType :: RecipientType
- recipientDescription :: Maybe Description
- recipientEmail :: Maybe Email
- recipientName :: Name
- recipientVerified :: Bool
- recipientActiveAccount :: Maybe BankAccount
- recipientCards :: StripeList RecipientCard
- recipientDefaultCard :: Maybe (Expandable RecipientCardId)
- | DeletedRecipient { }
- = Recipient {
- newtype RecipientId = RecipientId Text
- data RecipientType
- newtype RoutingNumber = RoutingNumber Text
- data StripeDeleteResult = StripeDeleteResult {}
- newtype TaxID = TaxID {}
- newtype TokenId = TokenId Text
API
data CreateRecipient Source #
Instances
Arguments
| :: Name | |
| -> RecipientType | |
| -> StripeRequest CreateRecipient |
Base Request for issues create Recipient requests
data GetRecipient Source #
Instances
Arguments
| :: RecipientId | The |
| -> StripeRequest GetRecipient |
Retrieve a Recipient
data UpdateRecipient Source #
Instances
Arguments
| :: RecipientId |
|
| -> StripeRequest UpdateRecipient |
Update Recipient
data DeleteRecipient Source #
Instances
Arguments
| :: RecipientId |
|
| -> StripeRequest DeleteRecipient |
Delete a Recipient
data GetRecipients Source #
Instances
getRecipients :: StripeRequest GetRecipients Source #
Retrieve multiple Recipients
Types
data BankAccount Source #
BankAccount Object
Constructors
| BankAccount | |
Instances
| Eq BankAccount Source # | |
| Data BankAccount Source # | |
| Ord BankAccount Source # | |
| Read BankAccount Source # | |
| Show BankAccount Source # | |
| FromJSON BankAccount Source # |
|
newtype BankAccountId Source #
Constructors
| BankAccountId Text |
Country
CVC for a Card
newtype Description Source #
Generic Description for use in constructing API Calls
Constructors
| Description Text |
Instances
newtype ExpandParams Source #
Type of Expansion Parameters for use on Stripe objects
Constructors
| ExpandParams | |
Fields
| |
Instances
Expiration Month for a Card
Expiration Year for a Card
Instances
Pagination Option for StripeList
Instances
Type of MetaData for use on Stripe objects
Instances
a cardholder's full name
Constructors
Instances
Recipient Object
Constructors
newtype RecipientId Source #
RecipientId for a Recipient
Constructors
| RecipientId Text |
Instances
data RecipientType Source #
Type of Recipient
Constructors
| Individual | |
| Corporation |
Instances
| Eq RecipientType Source # | |
| Data RecipientType Source # | |
| Ord RecipientType Source # | |
| Read RecipientType Source # |
|
| Show RecipientType Source # |
|
| FromJSON RecipientType Source # | JSON Instance for |
| ToStripeParam RecipientType Source # | |
Instances