class Stripe::InvoiceitemsApi

Defined in:

stripe/api/invoiceitems_api.cr

Constant Summary

DELETE_INVOICEITEMS_INVOICEITEM_MAX_LENGTH_FOR_INVOICEITEM = 5000
GET_INVOICEITEMS_INVOICEITEM_MAX_LENGTH_FOR_INVOICEITEM = 5000
GET_INVOICEITEMS_MAX_LENGTH_FOR_CUSTOMER = 5000
GET_INVOICEITEMS_MAX_LENGTH_FOR_ENDING_BEFORE = 5000
GET_INVOICEITEMS_MAX_LENGTH_FOR_INVOICE = 5000
GET_INVOICEITEMS_MAX_LENGTH_FOR_STARTING_AFTER = 5000
POST_INVOICEITEMS_INVOICEITEM_MAX_LENGTH_FOR_DESCRIPTION = 5000
POST_INVOICEITEMS_INVOICEITEM_MAX_LENGTH_FOR_INVOICEITEM = 5000
POST_INVOICEITEMS_INVOICEITEM_MAX_LENGTH_FOR_PRICE = 5000
POST_INVOICEITEMS_INVOICEITEM_VALID_VALUES_FOR_TAX_BEHAVIOR = String.static_array("exclusive", "inclusive", "unspecified")
POST_INVOICEITEMS_MAX_LENGTH_FOR_CUSTOMER = 5000
POST_INVOICEITEMS_MAX_LENGTH_FOR_DESCRIPTION = 5000
POST_INVOICEITEMS_MAX_LENGTH_FOR_INVOICE = 5000
POST_INVOICEITEMS_MAX_LENGTH_FOR_PRICE = 5000
POST_INVOICEITEMS_MAX_LENGTH_FOR_SUBSCRIPTION = 5000
POST_INVOICEITEMS_VALID_VALUES_FOR_TAX_BEHAVIOR = String.static_array("exclusive", "inclusive", "unspecified")

Constructors

Instance Method Summary

Constructor Detail

def self.new(api_client : Stripe::ApiClient = ApiClient.default) #

[View source]

Instance Method Detail

def api_client : ApiClient #

[View source]
def api_client=(api_client : ApiClient) #

[View source]
def build_api_request_for_delete_invoiceitems_invoiceitem(*, invoiceitem : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_get_invoiceitems(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, invoice : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, pending : Bool | Nil = nil, expand : Array(Array(String)) | Nil = nil, customer : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_get_invoiceitems_invoiceitem(*, invoiceitem : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_invoiceitems(*, customer : String | Nil = nil, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, discountable : Bool | Nil = nil, discounts : Stripe::PostInvoiceitemsRequestDiscounts | Nil = nil, expand : Array(String) | Nil = nil, invoice : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, period : Stripe::Period | Nil = nil, price : String | Nil = nil, price_data : Stripe::OneTimePriceData | Nil = nil, quantity : Int64 | Nil = nil, subscription : String | Nil = nil, tax_behavior : String | Nil = nil, tax_code : Stripe::PostInvoiceitemsRequestTaxCode | Nil = nil, tax_rates : Array(String) | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_invoiceitems_invoiceitem(*, invoiceitem : String | Nil = nil, amount : Int64 | Nil = nil, description : String | Nil = nil, discountable : Bool | Nil = nil, discounts : Stripe::PostInvoiceitemsInvoiceitemRequestDiscounts | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, period : Stripe::Period | Nil = nil, price : String | Nil = nil, price_data : Stripe::OneTimePriceData | Nil = nil, quantity : Int64 | Nil = nil, tax_behavior : String | Nil = nil, tax_code : Stripe::PostInvoiceitemsRequestTaxCode | Nil = nil, tax_rates : Stripe::PostInvoiceitemsInvoiceitemRequestTaxRates | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def client_side_validation?(*args, **options) #

[View source]
def client_side_validation?(*args, **options, &) #

[View source]
def debugging?(*args, **options) #

[View source]
def debugging?(*args, **options, &) #

[View source]
def delete_invoiceitems_invoiceitem(*, invoiceitem : String | Nil = nil) : Stripe::DeletedInvoiceitem #

Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.

@required @param invoiceitem [String?] @return [Stripe::DeletedInvoiceitem]

[View source]
def delete_invoiceitems_invoiceitem(*, invoiceitem : String | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.</p> @required @param invoiceitem [String?] @return nil


[View source]
def delete_invoiceitems_invoiceitem_with_http_info(*, invoiceitem : String | Nil = nil) : Tuple(Stripe::DeletedInvoiceitem, Int32, Hash(String, Array(String) | String)) #

<p>Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.</p> @required @param invoiceitem [String?] @return [Tuple(Stripe::DeletedInvoiceitem, Integer, Hash)] Stripe::DeletedInvoiceitem, response status code and response headers


[View source]
def get_invoiceitems(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, invoice : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, pending : Bool | Nil = nil, expand : Array(Array(String)) | Nil = nil, customer : String | Nil = nil) : Stripe::InvoicesItemsList #

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

@optional @param ending_before [String?] A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param invoice [String?] Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. @optional @param created [Stripe::GetAccountsCreatedParameter?] Only return invoice items that were created during the given date interval. @optional @param pending [Bool?] Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @optional @param customer [String?] The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. @return [Stripe::InvoicesItemsList]

[View source]
def get_invoiceitems(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, invoice : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, pending : Bool | Nil = nil, expand : Array(Array(String)) | Nil = nil, customer : String | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.</p> @optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param invoice [String?] Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. @optional @param created [Stripe::GetAccountsCreatedParameter?] Only return invoice items that were created during the given date interval. @optional @param pending [Bool?] Set to true to only show pending invoice items, which are not yet attached to any invoices. Set to false to only show invoice items already attached to invoices. If unspecified, no filter is applied. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @optional @param customer [String?] The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. @return nil


[View source]
def get_invoiceitems_invoiceitem(*, invoiceitem : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::Invoiceitem #

Retrieves the invoice item with the given ID.

@required @param invoiceitem [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::Invoiceitem]

[View source]
def get_invoiceitems_invoiceitem(*, invoiceitem : String | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Retrieves the invoice item with the given ID.</p> @required @param invoiceitem [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil


[View source]
def get_invoiceitems_invoiceitem_with_http_info(*, invoiceitem : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::Invoiceitem, Int32, Hash(String, Array(String) | String)) #

<p>Retrieves the invoice item with the given ID.</p> @required @param invoiceitem [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::Invoiceitem, Integer, Hash)] Stripe::Invoiceitem, response status code and response headers


[View source]
def get_invoiceitems_with_http_info(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, invoice : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, pending : Bool | Nil = nil, expand : Array(Array(String)) | Nil = nil, customer : String | Nil = nil) : Tuple(Stripe::InvoicesItemsList, Int32, Hash(String, Array(String) | String)) #

<p>Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.</p> @optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param invoice [String?] Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. @optional @param created [Stripe::GetAccountsCreatedParameter?] Only return invoice items that were created during the given date interval. @optional @param pending [Bool?] Set to true to only show pending invoice items, which are not yet attached to any invoices. Set to false to only show invoice items already attached to invoices. If unspecified, no filter is applied. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @optional @param customer [String?] The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. @return [Tuple(Stripe::InvoicesItemsList, Integer, Hash)] Stripe::InvoicesItemsList, response status code and response headers


[View source]
def post_invoiceitems(*, customer : String | Nil = nil, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, discountable : Bool | Nil = nil, discounts : Stripe::PostInvoiceitemsRequestDiscounts | Nil = nil, expand : Array(String) | Nil = nil, invoice : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, period : Stripe::Period | Nil = nil, price : String | Nil = nil, price_data : Stripe::OneTimePriceData | Nil = nil, quantity : Int64 | Nil = nil, subscription : String | Nil = nil, tax_behavior : String | Nil = nil, tax_code : Stripe::PostInvoiceitemsRequestTaxCode | Nil = nil, tax_rates : Array(String) | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil) : Stripe::Invoiceitem #

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

@required @param customer [String?] The ID of the customer who will be billed when this invoice item is billed. @optional @param amount [Int32?] The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. @optional @param currency [String?] Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @optional @param description [String?] An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. @optional @param discountable [Bool?] Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. @optional @param discounts [Stripe::PostInvoiceitemsRequestDiscounts?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param invoice [String?] The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param period [Stripe::Period?] @optional @param price [String?] The ID of the price object. One of `price` or `price_data` is required. @optional @param price_data [Stripe::OneTimePriceData?] @optional @param quantity [Int32?] Non-negative integer. The quantity of units for the invoice item. @optional @param subscription [String?] The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. @optional @param tax_behavior [String?] Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. @optional @param tax_code [Stripe::PostInvoiceitemsRequestTaxCode?] @optional @param tax_rates [Array(String)?] The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. @optional @param unit_amount [Int32?] The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. @optional @param unit_amount_decimal [BigDecimal?] Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. @return [Stripe::Invoiceitem]

[View source]
def post_invoiceitems(*, customer : String | Nil = nil, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, discountable : Bool | Nil = nil, discounts : Stripe::PostInvoiceitemsRequestDiscounts | Nil = nil, expand : Array(String) | Nil = nil, invoice : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, period : Stripe::Period | Nil = nil, price : String | Nil = nil, price_data : Stripe::OneTimePriceData | Nil = nil, quantity : Int64 | Nil = nil, subscription : String | Nil = nil, tax_behavior : String | Nil = nil, tax_code : Stripe::PostInvoiceitemsRequestTaxCode | Nil = nil, tax_rates : Array(String) | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.</p> @required @param customer [String?] The ID of the customer who will be billed when this invoice item is billed. @optional @param amount [Int32?] The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative amount will reduce the amount_due on the invoice. @optional @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency. @optional @param description [String?] An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. @optional @param discountable [Bool?] Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. @optional @param discounts [Stripe::PostInvoiceitemsRequestDiscounts?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param invoice [String?] The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param period [Stripe::Period?] @optional @param price [String?] The ID of the price object. One of price or price_data is required. @optional @param price_data [Stripe::OneTimePriceData?] @optional @param quantity [Int32?] Non-negative integer. The quantity of units for the invoice item. @optional @param subscription [String?] The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. @optional @param tax_behavior [String?] Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed. @optional @param tax_code [Stripe::PostInvoiceitemsRequestTaxCode?] @optional @param tax_rates [Array(String)?] The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item. @optional @param unit_amount [Int32?] The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. Passing in a negative unit_amount will reduce the amount_due on the invoice. @optional @param unit_amount_decimal [BigDecimal?] Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set. @return nil


[View source]
def post_invoiceitems_invoiceitem(*, invoiceitem : String | Nil = nil, amount : Int64 | Nil = nil, description : String | Nil = nil, discountable : Bool | Nil = nil, discounts : Stripe::PostInvoiceitemsInvoiceitemRequestDiscounts | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, period : Stripe::Period | Nil = nil, price : String | Nil = nil, price_data : Stripe::OneTimePriceData | Nil = nil, quantity : Int64 | Nil = nil, tax_behavior : String | Nil = nil, tax_code : Stripe::PostInvoiceitemsRequestTaxCode | Nil = nil, tax_rates : Stripe::PostInvoiceitemsInvoiceitemRequestTaxRates | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil) : Stripe::Invoiceitem #

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

@required @param invoiceitem [String?] @optional @param amount [Int32?] The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. @optional @param description [String?] An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. @optional @param discountable [Bool?] Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. @optional @param discounts [Stripe::PostInvoiceitemsInvoiceitemRequestDiscounts?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param period [Stripe::Period?] @optional @param price [String?] The ID of the price object. One of `price` or `price_data` is required. @optional @param price_data [Stripe::OneTimePriceData?] @optional @param quantity [Int32?] Non-negative integer. The quantity of units for the invoice item. @optional @param tax_behavior [String?] Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. @optional @param tax_code [Stripe::PostInvoiceitemsRequestTaxCode?] @optional @param tax_rates [Stripe::PostInvoiceitemsInvoiceitemRequestTaxRates?] @optional @param unit_amount [Int32?] The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. @optional @param unit_amount_decimal [BigDecimal?] Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. @return [Stripe::Invoiceitem]

[View source]
def post_invoiceitems_invoiceitem(*, invoiceitem : String | Nil = nil, amount : Int64 | Nil = nil, description : String | Nil = nil, discountable : Bool | Nil = nil, discounts : Stripe::PostInvoiceitemsInvoiceitemRequestDiscounts | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, period : Stripe::Period | Nil = nil, price : String | Nil = nil, price_data : Stripe::OneTimePriceData | Nil = nil, quantity : Int64 | Nil = nil, tax_behavior : String | Nil = nil, tax_code : Stripe::PostInvoiceitemsRequestTaxCode | Nil = nil, tax_rates : Stripe::PostInvoiceitemsInvoiceitemRequestTaxRates | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.</p> @required @param invoiceitem [String?] @optional @param amount [Int32?] The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. @optional @param description [String?] An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. @optional @param discountable [Bool?] Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. @optional @param discounts [Stripe::PostInvoiceitemsInvoiceitemRequestDiscounts?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param period [Stripe::Period?] @optional @param price [String?] The ID of the price object. One of price or price_data is required. @optional @param price_data [Stripe::OneTimePriceData?] @optional @param quantity [Int32?] Non-negative integer. The quantity of units for the invoice item. @optional @param tax_behavior [String?] Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed. @optional @param tax_code [Stripe::PostInvoiceitemsRequestTaxCode?] @optional @param tax_rates [Stripe::PostInvoiceitemsInvoiceitemRequestTaxRates?] @optional @param unit_amount [Int32?] The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. @optional @param unit_amount_decimal [BigDecimal?] Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set. @return nil


[View source]
def post_invoiceitems_invoiceitem_with_http_info(*, invoiceitem : String | Nil = nil, amount : Int64 | Nil = nil, description : String | Nil = nil, discountable : Bool | Nil = nil, discounts : Stripe::PostInvoiceitemsInvoiceitemRequestDiscounts | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, period : Stripe::Period | Nil = nil, price : String | Nil = nil, price_data : Stripe::OneTimePriceData | Nil = nil, quantity : Int64 | Nil = nil, tax_behavior : String | Nil = nil, tax_code : Stripe::PostInvoiceitemsRequestTaxCode | Nil = nil, tax_rates : Stripe::PostInvoiceitemsInvoiceitemRequestTaxRates | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil) : Tuple(Stripe::Invoiceitem, Int32, Hash(String, Array(String) | String)) #

<p>Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.</p> @required @param invoiceitem [String?] @optional @param amount [Int32?] The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. @optional @param description [String?] An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. @optional @param discountable [Bool?] Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. @optional @param discounts [Stripe::PostInvoiceitemsInvoiceitemRequestDiscounts?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param period [Stripe::Period?] @optional @param price [String?] The ID of the price object. One of price or price_data is required. @optional @param price_data [Stripe::OneTimePriceData?] @optional @param quantity [Int32?] Non-negative integer. The quantity of units for the invoice item. @optional @param tax_behavior [String?] Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed. @optional @param tax_code [Stripe::PostInvoiceitemsRequestTaxCode?] @optional @param tax_rates [Stripe::PostInvoiceitemsInvoiceitemRequestTaxRates?] @optional @param unit_amount [Int32?] The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. @optional @param unit_amount_decimal [BigDecimal?] Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set. @return [Tuple(Stripe::Invoiceitem, Integer, Hash)] Stripe::Invoiceitem, response status code and response headers


[View source]
def post_invoiceitems_with_http_info(*, customer : String | Nil = nil, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, discountable : Bool | Nil = nil, discounts : Stripe::PostInvoiceitemsRequestDiscounts | Nil = nil, expand : Array(String) | Nil = nil, invoice : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, period : Stripe::Period | Nil = nil, price : String | Nil = nil, price_data : Stripe::OneTimePriceData | Nil = nil, quantity : Int64 | Nil = nil, subscription : String | Nil = nil, tax_behavior : String | Nil = nil, tax_code : Stripe::PostInvoiceitemsRequestTaxCode | Nil = nil, tax_rates : Array(String) | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | Nil = nil) : Tuple(Stripe::Invoiceitem, Int32, Hash(String, Array(String) | String)) #

<p>Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.</p> @required @param customer [String?] The ID of the customer who will be billed when this invoice item is billed. @optional @param amount [Int32?] The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative amount will reduce the amount_due on the invoice. @optional @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency. @optional @param description [String?] An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. @optional @param discountable [Bool?] Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. @optional @param discounts [Stripe::PostInvoiceitemsRequestDiscounts?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param invoice [String?] The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param period [Stripe::Period?] @optional @param price [String?] The ID of the price object. One of price or price_data is required. @optional @param price_data [Stripe::OneTimePriceData?] @optional @param quantity [Int32?] Non-negative integer. The quantity of units for the invoice item. @optional @param subscription [String?] The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. @optional @param tax_behavior [String?] Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed. @optional @param tax_code [Stripe::PostInvoiceitemsRequestTaxCode?] @optional @param tax_rates [Array(String)?] The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item. @optional @param unit_amount [Int32?] The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. Passing in a negative unit_amount will reduce the amount_due on the invoice. @optional @param unit_amount_decimal [BigDecimal?] Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set. @return [Tuple(Stripe::Invoiceitem, Integer, Hash)] Stripe::Invoiceitem, response status code and response headers


[View source]