recurly-client-0.1.0.0: Client for Recurly subscription management
Safe HaskellSafe-Inferred
LanguageHaskell2010

RecurlyClient.Operations.Create_billing_info

Description

Contains the different functions to run the operation create_billing_info

Synopsis

Documentation

create_billing_info Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

account_id: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.

-> BillingInfoCreate

The request body to send

-> ClientT m (Response Create_billing_infoResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/billing_infos

If you're using Recurly.js to securely submit data from webforms without sending it through your server, you can associate the billing information with an account by passing in the `token_id`. The only other fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.

For credit card payments you'll need the following required fields:

  • first_name
  • last_name
  • number
  • month
  • year

For external (not Recurly.js) tokenized payments you'll need the following required fields:

  • first_name
  • last_name
  • gateway_token
  • gateway_code

data Create_billing_infoResponse Source #

Represents a response of the operation create_billing_info.

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), Create_billing_infoResponseError is used.

Constructors

Create_billing_infoResponseError String

Means either no matching case available or a parse error

Create_billing_infoResponse200 BillingInfo

Updated billing information.

Create_billing_infoResponse400 Error

Bad request, perhaps invalid JSON?

Create_billing_infoResponse404 Error

Incorrect site or account ID.

Create_billing_infoResponse422 ErrorMayHaveTransaction

Invalid billing information, or error running the verification transaction.

create_billing_infoWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

account_id: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.

-> BillingInfoCreate

The request body to send

-> m (Response Create_billing_infoResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/billing_infos

The same as create_billing_info but accepts an explicit configuration.

create_billing_infoRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

account_id: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.

-> BillingInfoCreate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/billing_infos

The same as create_billing_info but returns the raw ByteString.

create_billing_infoWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

account_id: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.

-> BillingInfoCreate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/billing_infos

The same as create_billing_info but accepts an explicit configuration and returns the raw ByteString.