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

RecurlyClient.Types.LineItem

Description

Contains the types generated from the schema LineItem

Synopsis

Documentation

data LineItem Source #

Defines the object schema located at components.schemas.LineItem in the specification.

Constructors

LineItem 

Fields

  • lineItemAccount :: Maybe AccountMini

    account

  • lineItemAccounting_code :: Maybe Text

    accounting_code: Internal accounting code to help you reconcile your revenue to the correct ledger. Line items created as part of a subscription invoice will use the plan or add-on's accounting code, otherwise the value will only be present if you define an accounting code when creating the line item.

    Constraints:

    • Maximum length of 20
  • lineItemAdd_on_code :: Maybe Text

    add_on_code: If the line item is a charge or credit for an add-on, this is its code.

    Constraints:

    • Maximum length of 50
  • lineItemAdd_on_id :: Maybe Text

    add_on_id: If the line item is a charge or credit for an add-on this is its ID.

    Constraints:

    • Maximum length of 13
  • lineItemAmount :: Maybe Float

    amount: `(quantity * unit_amount) - (discount + tax)`

  • lineItemAvalara_service_type :: Maybe Int

    avalara_service_type: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to the documentation for more available t/s types.

    Constraints:

    • Minimum of 0.0
  • lineItemAvalara_transaction_type :: Maybe Int

    avalara_transaction_type: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to the documentation for more available t/s types.

    Constraints:

    • Minimum of 0.0
  • lineItemBill_for_account_id :: Maybe Text

    bill_for_account_id: The UUID of the account responsible for originating the line item.

    Constraints:

    • Maximum length of 13
  • lineItemCreated_at :: Maybe JsonDateTime

    created_at: When the line item was created.

  • lineItemCredit_applied :: Maybe Float

    credit_applied: The amount of credit from this line item that was applied to the invoice.

  • lineItemCredit_reason_code :: Maybe LineItemCredit_reason_code

    credit_reason_code: The reason the credit was given when line item is `type=credit`.

  • lineItemCurrency :: Maybe Text

    currency: 3-letter ISO 4217 currency code.

    Constraints:

    • Maximum length of 3
  • lineItemCustom_fields :: Maybe CustomFields

    custom_fields: The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.

  • lineItemDescription :: Maybe Text

    description: Description that appears on the invoice. For subscription related items this will be filled in automatically.

    Constraints:

    • Maximum length of 255
  • lineItemDestination_tax_address_source :: Maybe LineItemDestination_tax_address_source

    destination_tax_address_source: The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of "destination" refers to the "Customer tax address". A value of "origin" refers to the "Business entity tax address".

  • lineItemDiscount :: Maybe Float

    discount: The discount applied to the line item.

  • lineItemEnd_date :: Maybe JsonDateTime

    end_date: If this date is provided, it indicates the end of a time range.

  • lineItemExternal_sku :: Maybe Text

    external_sku: Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.

    Constraints:

    • Maximum length of 50
  • lineItemId :: Maybe Text

    id

    Constraints:

    • Maximum length of 13
  • lineItemInvoice_id :: Maybe Text

    invoice_id: Once the line item has been invoiced this will be the invoice's ID.

    Constraints:

    • Maximum length of 13
  • lineItemInvoice_number :: Maybe Text

    invoice_number: Once the line item has been invoiced this will be the invoice's number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.

  • lineItemItem_code :: Maybe Text

    item_code: Unique code to identify an item. Available when the Credit Invoices feature is enabled.

    Constraints:

    • Maximum length of 50
    • Must match pattern '/^[a-z0-9_+-]+$/'
  • lineItemItem_id :: Maybe Text

    item_id: System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.

    Constraints:

    • Maximum length of 13
  • lineItemLegacy_category :: Maybe LineItemLegacy_category

    legacy_category: Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account.

  • lineItemLiability_gl_account_code :: Maybe Text

    liability_gl_account_code: Unique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: `-_.,:`

    Constraints:

    • Maximum length of 255
    • Must match pattern '/^[A-Za-z0-9](( *)?[\-A-Za-z0-9_.,:])*$/'
  • lineItemObject :: Maybe Text

    object

  • lineItemOrigin :: Maybe LineItemOrigin

    origin: A credit created from an original charge will have the value of the charge's origin.

  • lineItemOrigin_tax_address_source :: Maybe LineItemOrigin_tax_address_source

    origin_tax_address_source: The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of "origin" refers to the "Business entity tax address". A value of "destination" refers to the "Customer tax address".

  • lineItemOriginal_line_item_invoice_id :: Maybe Text

    original_line_item_invoice_id: The invoice where the credit originated. Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.

    Constraints:

    • Maximum length of 13
  • lineItemPerformance_obligation_id :: Maybe Text

    performance_obligation_id: The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

    Constraints:

    • Maximum length of 13
  • lineItemPlan_code :: Maybe Text

    plan_code: If the line item is a charge or credit for a plan or add-on, this is the plan's code.

    Constraints:

    • Maximum length of 50
  • lineItemPlan_id :: Maybe Text

    plan_id: If the line item is a charge or credit for a plan or add-on, this is the plan's ID.

    Constraints:

    • Maximum length of 13
  • lineItemPrevious_line_item_id :: Maybe Text

    previous_line_item_id: Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.

    Constraints:

    • Maximum length of 13
  • lineItemProduct_code :: Maybe Text

    product_code: For plan-related line items this will be the plan's code, for add-on related line items it will be the add-on's code. For item-related line items it will be the item's `external_sku`.

    Constraints:

    • Maximum length of 50
  • lineItemProration_rate :: Maybe Float

    proration_rate: When a line item has been prorated, this is the rate of the proration. Proration rates were made available for line items created after March 30, 2017. For line items created prior to that date, the proration rate will be `null`, even if the line item was prorated.

    Constraints:

    • Maxium of 1.0
    • Minimum of 0.0
  • lineItemQuantity :: Maybe Int

    quantity: This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.

  • lineItemQuantity_decimal :: Maybe Text

    quantity_decimal: A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field.

  • lineItemRefund :: Maybe Bool

    refund

  • lineItemRefunded_quantity :: Maybe Int

    refunded_quantity: For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds).

  • lineItemRefunded_quantity_decimal :: Maybe Text

    refunded_quantity_decimal: A floating-point alternative to Refunded Quantity. For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). The Decimal Quantity feature must be enabled to utilize this field.

  • lineItemRevenue_gl_account_code :: Maybe Text

    revenue_gl_account_code: Unique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: `-_.,:`

    Constraints:

    • Maximum length of 255
    • Must match pattern '/^[A-Za-z0-9](( *)?[\-A-Za-z0-9_.,:])*$/'
  • lineItemRevenue_schedule_type :: Maybe LineItemRevenue_schedule_type

    revenue_schedule_type

  • lineItemShipping_address :: Maybe ShippingAddress

    shipping_address

  • lineItemStart_date :: Maybe JsonDateTime

    start_date: If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date.

  • lineItemState :: Maybe LineItemState

    state: Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an `invoice_id` value.

  • lineItemSubscription_id :: Maybe Text

    subscription_id: If the line item is a charge or credit for a subscription, this is its ID.

    Constraints:

    • Maximum length of 13
  • lineItemSubtotal :: Maybe Float

    subtotal: `quantity * unit_amount`

  • lineItemTax :: Maybe Float

    tax: The tax amount for the line item.

  • lineItemTax_code :: Maybe Text

    tax_code: Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.

    Constraints:

    • Maximum length of 50
  • lineItemTax_exempt :: Maybe Bool

    tax_exempt: `true` exempts tax on charges, `false` applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.

  • lineItemTax_inclusive :: Maybe Bool

    tax_inclusive: Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag.

  • lineItemTax_info :: Maybe TaxInfo

    tax_info: Only for merchants using Recurly's In-The-Box taxes.

  • lineItemTaxable :: Maybe Bool

    taxable: `true` if the line item is taxable, `false` if it is not.

  • lineItemType :: Maybe LineItemType

    type: Charges are positive line items that debit the account. Credits are negative line items that credit the account.

  • lineItemUnit_amount :: Maybe Float

    unit_amount: Positive amount for a charge, negative amount for a credit.

  • lineItemUnit_amount_decimal :: Maybe Text

    unit_amount_decimal: Positive amount for a charge, negative amount for a credit.

  • lineItemUpdated_at :: Maybe JsonDateTime

    updated_at: When the line item was last changed.

  • lineItemUuid :: Maybe Text

    uuid: The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.

    Constraints:

    • Maximum length of 32

mkLineItem :: LineItem Source #

Create a new LineItem with all required fields.

data LineItemCredit_reason_code Source #

Defines the enum schema located at components.schemas.LineItem.properties.credit_reason_code in the specification.

The reason the credit was given when line item is `type=credit`.

Constructors

LineItemCredit_reason_codeOther Value

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

LineItemCredit_reason_codeTyped Text

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

LineItemCredit_reason_codeEnumGeneral

Represents the JSON value "general"

LineItemCredit_reason_codeEnumGift_card

Represents the JSON value "gift_card"

LineItemCredit_reason_codeEnumPromotional

Represents the JSON value "promotional"

LineItemCredit_reason_codeEnumRefund

Represents the JSON value "refund"

LineItemCredit_reason_codeEnumService

Represents the JSON value "service"

LineItemCredit_reason_codeEnumWrite_off

Represents the JSON value "write_off"

data LineItemDestination_tax_address_source Source #

Defines the enum schema located at components.schemas.LineItem.properties.destination_tax_address_source in the specification.

The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of "destination" refers to the "Customer tax address". A value of "origin" refers to the "Business entity tax address".

Constructors

LineItemDestination_tax_address_sourceOther Value

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

LineItemDestination_tax_address_sourceTyped Text

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

LineItemDestination_tax_address_sourceEnumDestination

Represents the JSON value "destination"

LineItemDestination_tax_address_sourceEnumOrigin

Represents the JSON value "origin"

data LineItemLegacy_category Source #

Defines the enum schema located at components.schemas.LineItem.properties.legacy_category in the specification.

Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account.

Constructors

LineItemLegacy_categoryOther Value

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

LineItemLegacy_categoryTyped Text

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

LineItemLegacy_categoryEnumApplied_credit

Represents the JSON value "applied_credit"

LineItemLegacy_categoryEnumCarryforward

Represents the JSON value "carryforward"

LineItemLegacy_categoryEnumCharge

Represents the JSON value "charge"

LineItemLegacy_categoryEnumCredit

Represents the JSON value "credit"

data LineItemOrigin Source #

Defines the enum schema located at components.schemas.LineItem.properties.origin in the specification.

A credit created from an original charge will have the value of the charge's origin.

Constructors

LineItemOriginOther Value

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

LineItemOriginTyped Text

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

LineItemOriginEnumAdd_on

Represents the JSON value "add_on"

LineItemOriginEnumAdd_on_trial

Represents the JSON value "add_on_trial"

LineItemOriginEnumCarryforward

Represents the JSON value "carryforward"

LineItemOriginEnumCoupon

Represents the JSON value "coupon"

LineItemOriginEnumCredit

Represents the JSON value "credit"

LineItemOriginEnumDebit

Represents the JSON value "debit"

LineItemOriginEnumOne_time

Represents the JSON value "one_time"

LineItemOriginEnumPlan

Represents the JSON value "plan"

LineItemOriginEnumPlan_trial

Represents the JSON value "plan_trial"

LineItemOriginEnumSetup_fee

Represents the JSON value "setup_fee"

LineItemOriginEnumPrepayment

Represents the JSON value "prepayment"

data LineItemOrigin_tax_address_source Source #

Defines the enum schema located at components.schemas.LineItem.properties.origin_tax_address_source in the specification.

The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of "origin" refers to the "Business entity tax address". A value of "destination" refers to the "Customer tax address".

Constructors

LineItemOrigin_tax_address_sourceOther Value

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

LineItemOrigin_tax_address_sourceTyped Text

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

LineItemOrigin_tax_address_sourceEnumOrigin

Represents the JSON value "origin"

LineItemOrigin_tax_address_sourceEnumDestination

Represents the JSON value "destination"

data LineItemRevenue_schedule_type Source #

Defines the enum schema located at components.schemas.LineItem.properties.revenue_schedule_type in the specification.

Constructors

LineItemRevenue_schedule_typeOther Value

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

LineItemRevenue_schedule_typeTyped Text

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

LineItemRevenue_schedule_typeEnumAt_invoice

Represents the JSON value "at_invoice"

LineItemRevenue_schedule_typeEnumAt_range_end

Represents the JSON value "at_range_end"

LineItemRevenue_schedule_typeEnumAt_range_start

Represents the JSON value "at_range_start"

LineItemRevenue_schedule_typeEnumEvenly

Represents the JSON value "evenly"

LineItemRevenue_schedule_typeEnumNever

Represents the JSON value "never"

data LineItemState Source #

Defines the enum schema located at components.schemas.LineItem.properties.state in the specification.

Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an `invoice_id` value.

Constructors

LineItemStateOther Value

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

LineItemStateTyped Text

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

LineItemStateEnumInvoiced

Represents the JSON value "invoiced"

LineItemStateEnumPending

Represents the JSON value "pending"

data LineItemType Source #

Defines the enum schema located at components.schemas.LineItem.properties.type in the specification.

Charges are positive line items that debit the account. Credits are negative line items that credit the account.

Constructors

LineItemTypeOther Value

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

LineItemTypeTyped Text

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

LineItemTypeEnumCharge

Represents the JSON value "charge"

LineItemTypeEnumCredit

Represents the JSON value "credit"