!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  HA positive integer that is an offset into the array of objects returned  by the Stripe API. *Describes an object in the Stripe system. Represents a currency (e.g., usd ) in the Stripe system. This is  a 3-letter ISO code. HA maximum number of objects that the Stripe API will return. This value + should be between 1 and 100, inclusive. 4Represents an amount in cents in the Stripe system. &Convert a time in seconds (from Stripe's servers) to  . See  Data.Time.Format for more on working with  .  Convert a  0 back to an Integer suitable for use with Stripe's API. FTakes a list of key-value arguments, where the value is optional, and D returns a list of key-value pairs with only the supplied values. "Essentially, this filters out all s and unwraps the s. 7optionalArgs [("k1", Just "supplied"), ("k2", Nothing)][("k1","supplied")]1Convenience function to get a field from a given  object. *Attempts to retrieve a field from a given  object, failing  gracefully with  if such a field is not found.       G!GDefines the monad transformer under which all Stripe REST API resource  calls take place. "#$A convenience specialization of the "! monad transformer in which  the underlying monad is IO. $JRepresents a request to the Stripe API, providing the fields necessary to . specify a Stripe resource. More generally, Z will be desired as B it provides sensible defaults that can be overriden as needed. %&'()*Attempts to describe a <% in more detail, classifying in what  specific way it failed. IPlease consult the official Stripe REST API documentation on error codes  at  "https://stripe.com/docs/api#errors for more information. +-Could not be matched; text gives error name. ,-./012345678 Describes a D, in more detail, categorizing the error and M providing additional information about it. At minimum, this is a message,  and for <,, this is a message, even more precise code  (*:), and potentially a paramter that helps suggest where an & error message should be displayed. IIn case the appropriate error could not be determined from the specified  type,  UnkownError6 will be returned with the supplied type and message. IPlease consult the official Stripe REST API documentation on error codes  at  "https://stripe.com/docs/api#errors for more information. 9:;<=>?@ABCDJThis represents the possible failures that a connection to the Stripe API  can encounter. IPlease consult the official Stripe REST API documentation on error codes  at  "https://stripe.com/docs/api#errors for more information. EFGHIJKLMNGThis represents the possible successes that a connection to the Stripe M API can encounter. For specificity, a success can be represented by other ; error codes, and so the same is true in this data type. IPlease consult the official Stripe REST API documentation on error codes  at  "https://stripe.com/docs/api#errors for more information. OPQ2A key used when authenticating to the Stripe API. RSTConfiguration for the "! monad transformer. UVWX Runs the "! monad transformer with a given UT . This will H handle all of the authorization dance steps necessary to utilize the  Stripe API. 4Its use is demonstrated in other functions, such as [. YProvides a default UT . Essentially, this inserts the RQ, but M leaves other fields blank. This is especially relavent due to the current  CA file check bug. Z The basic %$6 environment upon which all other Stripe API requests H will be built. Standard usage involves overriding one or more of the " fields. E.g., for a request to "https:api.stripe.comv1coupons",  one would have: ( baseSReq { sDestinaton = ["charges"] } FQueries the Stripe API. This returns the response body along with the  N undecoded. Use [ to try to decode it into a   type. E.g., # let conf = SConfig "key" "secret"   runStripeT conf $ 3 query' baseSReq { sDestination = ["charges"] } [JQueries the Stripe API and attempts to parse the results into a data type  that is an instance of .. This is primarily for internal use by other L Stripe submodules, which supply the request values accordingly. However, ' it can also be used directly. E.g., $ let conf = SConfig "key" "CA file"   runStripeT conf $ 2 query baseSReq { sDestination = ["charges"] } \Acts just like [3, but on success, throws away the response. Errors 5 contacting the Stripe API will still be reported. Determines the appropriate s for a given %$. I Presently, this provides a User-Agent string, adds any available HTTP  0 data, and incorporates the proper HTTP method ().  Transforms a %$ into a more general , which can be used to 5 make an authenticated query to the Stripe server. Takes a Stripe API key (see UT$) to produce a authentication-ready J URI to be used when querying the server. API. This defines fields with C the most sensible defaults, which are then overriden as needed. HGiven an HTTP status code and the response body as input, this function D determines whether or not the status code represents an error as  per Stripe'&s REST API documentation. If it does, D is thrown as  an error. Otherwise, N& is returned, representing the status  of the request. EIf an error is encountered, this function will attempt to decode the  response body with  . to retrieve (and return) an explanation with  the D.   Converts a  !-represented error code into the * data / type to more descriptively classify errors. 5If the string does not represent a known error code, + C will be returned with the raw text representing the error code.  IThis function attempts to decode the contents of a response body as JSON ' and retrieve an error message in an "error" field. E.g., +errorMsg "{\"error\":\"Oh no, an error!\"}"Just "Oh no, an error!" (Attempts to decode a response body to a   . This is used # internally by functions such as   which need to only grab, a M single value from a response body, rather than representing it first as a  more proper data type. HDefines the behavior for more general error messages that can be thrown  with  and  in combination with . KAttempts to parse error information provided with each error by the Stripe > API. In the parsing, the error is classified as a specific 8 and I any useful data, such as a message explaining the error, is extracted  accordingly. E!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ETUVWQRSNPODMLKJIHGFE8B@<9CA=>?:;*76543210/.-,+$%&'()#!"YXZ[\<!""#$%&'()%&'()* 76543210/.-,++,-./012345678 B@<9CA=>?:;9:;<=>?@ABCD MLKJIHGFEEFGHIJKLMNPOOPQRSRSTUVWUVWXYZ[\ ]BUTC timestamp specifying the last time at which the coupon can be  redeemed. ^_`IA positive number representing the maximum number of times that a coupon  can be redeemed. abcERepresents the percent off that is applied by a coupon. This must be  between 1 and 100. defFRepresents the duration of a coupon. If an interval identifier is not  known, g3 is used to carry the original identifier supplied  by Stripe. ghi8Field specifies how long (months) discount is in effect jk&Represents the identifier for a given on in the Stripe system. lmn*Represents a coupon in the Stripe system. opqrs Creates a on in the Stripe system. tRetrieves a specific on based on its lk. uRetrieves a list of all on*s. The query can optionally be refined to  a specific:  number of charges, via  and  * page of results, via  . v Deletes a on" if it exists. If it does not, an  InvalidRequestError! will be thrown indicating this. w Deletes a on, identified by its lk, if it exists. If it  does not, an InvalidRequestError! will be thrown indicating this. !Convenience function to create a %$ specific to coupon-related  actions. KReturns a list of key-value pairs representing duration specifications for # use as input in the Stripe API.  Converts a f0 to a string for input into the Stripe API. For  g,s, the original interval code will be used. Convert a string to a f#. Used for parsing output from the  Stripe API. Attempts to parse JSON into a on. ( !"TUVWX]^_`abcdefghijklmnopqrstuvw(nopqrklmfjihgcde`ab]^_stuvw TUVW!"X]^_^_`ababcdedefjihgghijklmlmnopqropqrstuvwxGRepresents the length of the trial period. That is, the number of days " before the customer is billed. yz{&Represents the identifier for a given  in the Stripe system. |}~JRepresents the billing cycle for a plan. If an interval identifier is not  known, 6 is used to carry the original identifier supplied by  Stripe. (Represents a plan in the Stripe system.  Creates a  in the Stripe system. Retrieves a specific  based on its |{. Retrieves a list of all *s. The query can optionally be refined to  a specific:  number of charges, via  and  * page of results, via  .  Deletes a " if it exists. If it does not, an InvalidRequestError # will be thrown indicating this.  Deletes a , identified by its |{, if it exists. If it does  not, an InvalidRequestError! will be thrown indicating this. !Convenience function to create a %$ specific to plan-related  actions.  Converts a ~0 to a string for input into the Stripe API. For  ,s, the original interval code will be used. Convert a string to a ~#. Used for parsing output from the  Stripe API. Attempts to parse JSON into a . * !"TUVWXxyz{|}~*~{|}xyz TUVW!"Xxyzyz{|}|}~IRepresents a credit car (with full details) that is used as input to the  Stripe API. Highly recommended to supply /Represents a credit card in the Stripe system. Turns a 6 into a list of key-value pairs that can be submitted ! to the Stripe API in a query. %Attempts to parse JSON into a credit .  %Represents a standard email address.  Represents a  'Customer'\'s ID in the Stripe system. ,Represents a customer in the Stripe system.  Create a new  in the Stripe system. Update an existing  in the Stripe system. Update an existing , identified by , in the Stripe  system. Retrieves a specific  based on its . Retrieves a list of all 's. The query can optionally be refined  to a specific:  number of charges, via  and  * page of results, via  .  Deletes a " if it exists. If it does not, an  InvalidRequestError! will be thrown indicating this.  Deletes a , identified by its , if it exists. If it  does not, an InvalidRequestError! will be thrown indicating this. !Convenience function to create a %$ specific to customer-related  actions.  Attempts to parse JSON into a . ) !"TUVWX)  TUVW!"X&Represents the identifier for a given  in the Stripe system. )Represents a token in the Stripe system.  Creates a  in the Stripe system. Retrieves a specific  based on its . !!Convenience function to create a %$ specific to tokens. "Attempts to parse JSON into a . & !"TUVWX& TUVW!"X&Represents the identifier for a given  in the Stripe system. *Represents a charge in the Stripe system.  Submit a 0 to the Stripe API using an already constructed .  Submit a  to the Stripe API using a .  Submit a  to the Stripe for a specific  that already has  payment details on file.  Submit a  to the Stripe for a specific , identified by  its ,, that already has payment details on file.  Submit a  to the Stripe API using a  to describe  payment details. #>Internal convenience function to handle actually submitting a   request to the Stripe API.  Retrieve a $ from the Stripe API, identified by . Retrieve a list of 0s from the Stripe API. The query can optionally  be refined to a specific:  number of charges, via ,  * page of results, via  , and  * . :Requests that Stripe issue a partial refund to a specific  for a  particular . :Requests that Stripe issue a partial refund to a specific ,  identified by , for a particular . 7Requests that Stripe issue a full refund to a specific . 7Requests that Stripe issue a full refund to a specific ,  identified by . $IInternal convenience function used to handle submitting a refund request  to Stripe. %!Convenience function to create a %$ specific to coupon-related  actions. &Attempts to parse JSON into a . 4 !"TUVWX4  TUVW!"X !FA boolean flag that determines whether or not the cancellation of the  8 should be delayed until the end of the current period. HUTC integer timestamp representing the end of the trial period that the > customer receives before being charged for the first time. IA boolean flag that determines whether or not to prorate switching plans  during a billing cycle. $Describes the various stages that a -Represents a subscription in the Stripe API. Current period start Current period end *Update the subscription associated with a Customer, identified by  , in the Stripe system. If : is provided, this will override the default trial period 4 of the plan to which the customer is subscribed. Behaves precisely like  , but uses a Token, identified by  , rather than a . '*Internal convenience function to update a .  Cancels the  associated with a Customer, identified by  , in the Stripe system. (!Convenience function to create a %$ specific to ! subscription-related actions. )Convert a string to a . If the code is not known,   UnkownStatus5 will be returned with the originally provided code. *Attempts to parse JSON into a . ( !"TUVWX( TUVW!"X +           !""#$%&'())*++,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWWXYYZ[\]^_`aabccdeefghijkllmnnopqrstuvwwxyyz{|}~                       ! " # $ %& stripe-0.1Web.Stripe.ClientWeb.Stripe.UtilsWeb.Stripe.CouponWeb.Stripe.PlanWeb.Stripe.CardWeb.Stripe.CustomerWeb.Stripe.TokenWeb.Stripe.ChargeWeb.Stripe.Subscriptionhttp-types-0.6.7Network.HTTP.TypesGETPOSTHEADPUTDELETETRACECONNECTOPTIONS StdMethod time-1.2.0.5Data.Time.Clock.UTC utctDayTimeutctDayUTCTimeOffsetunOffset Description unDescriptionCurrency unCurrencyCountunCountAmountunAmount fromSeconds toSeconds optionalArgsjGetmjGetStripeTStripeSRequestsMethod sDestinationsDatasQString SErrorCodeUnknownErrorCodeProcessingErrorDuplicateTransactionMissing CardDeclined IncorrectCVC InvalidAmount ExpiredCard InvalidCVCInvalidExpiryYearInvalidExpiryMonthIncorrectNumber InvalidNumberSError UnknownErrorueType ueMessage CardError ceMessageceCodeceParamAPIError apiMessageInvalidRequestError ireMessageSFailure OtherFailureGatewayTimeoutServiceUnavailable BadGatewayInternalServerErrorPaymentRequiredNotFound Unauthorized BadRequest SResponseCodeUnknownOKAPIKeyunAPIKeySConfigkeycaFile runStripeT defaultConfigbaseSReqqueryquery_ CpnRedeemBy unCpnRedeemBy CpnMaxRedeemsunCpnMaxRedeems CpnPercentOffunCpnPercentOff CpnDurationUnknownDurationForever RepeatingOnceCpnIdunCpnIdCouponcpnId cpnDuration cpnPercentOff createCoupon getCoupon getCoupons delCoupon delCouponById PlanTrialDaysunPlanTrialDaysPlanIdunPlanId PlanInterval UnknownPlanYearlyMonthlyPlanplanId planAmount planIntervalplanName planCurrency planTrialDays createPlangetPlangetPlansdelPlan delPlanById RequestCard rCardNumber rCardExpMonth rCardExpYearrCardCVC rCardFullNamerCardAddrLineOnerCardAddrLineTwo rCardAddrZiprCardAddrStaterCardAddrCountryCardcardType cardCountry cardLastFour cardExpMonth cardExpYearrCardKVEmailunEmail CustomerId unCustomerIdCustomercustId custEmailcustDescriptioncustLive custCreatedcustActiveCardcreateCustomerupdateCustomerupdateCustomerById getCustomer getCustomers delCustomerdelCustomerByIdTokenId unTokenIdTokentokIdtokLivetokUsed tokCreated tokAmount tokCurrencytokCard createTokengetTokenChargeId unChargeIdChargechargeId chargeCreatedchargeDescriptionchargeCurrency chargeAmount chargeFee chargeLive chargePaidchargeRefunded chargeCard chargeTokenchargeTokenByIdchargeCustomerchargeCustomerById chargeRCard getCharge getCharges partialRefundpartialRefundById fullRefundfullRefundByIdSubAtPeriodEndunSubAtPeriodEnd SubTrialEnd unSubTrialEnd SubProrate unSubProrate SubStatus UnknownStatusCanceledUnpaidPastDueActiveTrialing Subscription subCustomerIdsubPlan subStatussubStart subTrialStart subTrialEndsubPeriodStart subPeriodEndupdateSubRCardupdateSubToken cancelSubbase Data.MaybeNothingJustjson-0.5 Text.JSONJSON unStripeTquery' queryOptions curl-1.3.7Network.Curl.Opts CurlOptionprepRqnetwork-2.3.0.7 Network.URIURIbaseURItoCodeerrorMsgtoCECodeGHC.BaseStringtoBodyText.JSON.TypesJSObjectJSValue$fErrorSFailuretransformers-0.2.2.0Control.Monad.Trans.ErrornoMsgstrMsg mtl-2.0.1.0Control.Monad.Error.Class throwError $fJSONSErrorcpnRq cpnDurationKVfromCpnDuration toCpnDuration $fJSONCouponplanRqfromPlanIntervaltoPlanInterval $fJSONPlan $fJSONCard customerRq$fJSONCustomertokRq $fJSONTokenchargerefundChargeByIdchargeRq $fJSONCharge updateSubsubRq toSubStatus$fJSONSubscription