stripeapi-2.0.0.1: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostCustomersCustomerCards

Description

Contains the different functions to run the operation postCustomersCustomerCards

Synopsis

Documentation

postCustomersCustomerCards Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

customer | Constraints: Maximum length of 5000

-> Maybe PostCustomersCustomerCardsRequestBody

The request body to send

-> ClientT m (Response PostCustomersCustomerCardsResponse)

Monadic computation which returns the result of the operation

POST /v1/customers/{customer}/cards

<p>When you create a new credit card, you must specify a customer or recipient on which to create it.</p>

<p>If the card’s owner has no default card, then the new card will become the default. However, if the owner already has a default, then it will not change. To change the default, you should <a href="/docs/api#update_customer">update the customer</a> to have a new <code>default_source</code>.</p>

data PostCustomersCustomerCardsRequestBody Source #

Defines the object schema located at paths./v1/customers/{customer}/cards.POST.requestBody.content.application/x-www-form-urlencoded.schema in the specification.

Constructors

PostCustomersCustomerCardsRequestBody 

Fields

data PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1 Source #

Defines the object schema located at paths./v1/customers/{customer}/cards.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.bank_account.anyOf in the specification.

Instances

Instances details
Eq PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

Show PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

ToJSON PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

FromJSON PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

data PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1AccountHolderType' Source #

Defines the enum schema located at paths./v1/customers/{customer}/cards.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.bank_account.anyOf.properties.account_holder_type in the specification.

Constructors

PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1AccountHolderType'Other Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1AccountHolderType'Typed Text

This constructor can be used to send values to the server which are not present in the specification yet.

PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1AccountHolderType'EnumCompany

Represents the JSON value "company"

PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1AccountHolderType'EnumIndividual

Represents the JSON value "individual"

Instances

Instances details
Eq PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1AccountHolderType' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

Show PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1AccountHolderType' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

ToJSON PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1AccountHolderType' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

FromJSON PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1AccountHolderType' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

data PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1Object' Source #

Defines the enum schema located at paths./v1/customers/{customer}/cards.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.bank_account.anyOf.properties.object in the specification.

Constructors

PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1Object'Other Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1Object'Typed Text

This constructor can be used to send values to the server which are not present in the specification yet.

PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1Object'EnumBankAccount

Represents the JSON value "bank_account"

Instances

Instances details
Eq PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1Object' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

Show PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1Object' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

ToJSON PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1Object' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

FromJSON PostCustomersCustomerCardsRequestBodyBankAccount'OneOf1Object' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

data PostCustomersCustomerCardsRequestBodyBankAccount'Variants Source #

Defines the oneOf schema located at paths./v1/customers/{customer}/cards.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.bank_account.anyOf in the specification.

Either a token, like the ones returned by Stripe.js, or a dictionary containing a user's bank account details.

Instances

Instances details
Eq PostCustomersCustomerCardsRequestBodyBankAccount'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

Show PostCustomersCustomerCardsRequestBodyBankAccount'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

ToJSON PostCustomersCustomerCardsRequestBodyBankAccount'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

FromJSON PostCustomersCustomerCardsRequestBodyBankAccount'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

data PostCustomersCustomerCardsRequestBodyCard'OneOf1 Source #

Defines the object schema located at paths./v1/customers/{customer}/cards.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.card.anyOf in the specification.

Instances

Instances details
Eq PostCustomersCustomerCardsRequestBodyCard'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

Show PostCustomersCustomerCardsRequestBodyCard'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

ToJSON PostCustomersCustomerCardsRequestBodyCard'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

FromJSON PostCustomersCustomerCardsRequestBodyCard'OneOf1 Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

data PostCustomersCustomerCardsRequestBodyCard'OneOf1Object' Source #

Defines the enum schema located at paths./v1/customers/{customer}/cards.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.card.anyOf.properties.object in the specification.

Constructors

PostCustomersCustomerCardsRequestBodyCard'OneOf1Object'Other Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

PostCustomersCustomerCardsRequestBodyCard'OneOf1Object'Typed Text

This constructor can be used to send values to the server which are not present in the specification yet.

PostCustomersCustomerCardsRequestBodyCard'OneOf1Object'EnumCard

Represents the JSON value "card"

Instances

Instances details
Eq PostCustomersCustomerCardsRequestBodyCard'OneOf1Object' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

Show PostCustomersCustomerCardsRequestBodyCard'OneOf1Object' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

ToJSON PostCustomersCustomerCardsRequestBodyCard'OneOf1Object' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

FromJSON PostCustomersCustomerCardsRequestBodyCard'OneOf1Object' Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

data PostCustomersCustomerCardsRequestBodyCard'Variants Source #

Defines the oneOf schema located at paths./v1/customers/{customer}/cards.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.card.anyOf in the specification.

A token, like the ones returned by Stripe.js.

Instances

Instances details
Eq PostCustomersCustomerCardsRequestBodyCard'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

Show PostCustomersCustomerCardsRequestBodyCard'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

ToJSON PostCustomersCustomerCardsRequestBodyCard'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

FromJSON PostCustomersCustomerCardsRequestBodyCard'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostCustomersCustomerCards

data PostCustomersCustomerCardsResponse Source #

Represents a response of the operation postCustomersCustomerCards.

The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), PostCustomersCustomerCardsResponseError is used.

Constructors

PostCustomersCustomerCardsResponseError String

Means either no matching case available or a parse error

PostCustomersCustomerCardsResponse200 PaymentSource

Successful response.

PostCustomersCustomerCardsResponseDefault Error

Error response.