lib/recurly/requests/invoice_refund.rb in recurly-4.53.0 vs lib/recurly/requests/invoice_refund.rb in recurly-4.54.0

- old
+ new

@@ -5,11 +5,11 @@ module Recurly module Requests class InvoiceRefund < Request # @!attribute amount - # @return [Float] The amount to be refunded. The amount will be split between the line items. If no amount is specified, it will default to refunding the total refundable amount on the invoice. + # @return [Float] The amount to be refunded. The amount will be split between the line items. If `type` is "amount" and no amount is specified, it will default to refunding the total refundable amount on the invoice. Can only be present if `type` is "amount". define_attribute :amount, Float # @!attribute credit_customer_notes # @return [String] Used as the Customer Notes on the credit invoice. This field can only be include when the Credit Invoices feature is enabled. define_attribute :credit_customer_notes, String @@ -19,9 +19,13 @@ define_attribute :external_refund, :ExternalRefund # @!attribute line_items # @return [Array[LineItemRefund]] The line items to be refunded. This is required when `type=line_items`. define_attribute :line_items, Array, { :item_type => :LineItemRefund } + + # @!attribute percentage + # @return [Integer] The percentage of the remaining balance to be refunded. The percentage will be split between the line items. If `type` is "percentage" and no percentage is specified, it will default to refunding 100% of the refundable amount on the invoice. Can only be present if `type` is "percentage". + define_attribute :percentage, Integer # @!attribute refund_method # @return [String] Indicates how the invoice should be refunded when both a credit and transaction are present on the invoice: - `transaction_first` – Refunds the transaction first, then any amount is issued as credit back to the account. Default value when Credit Invoices feature is enabled. - `credit_first` – Issues credit back to the account first, then refunds any remaining amount back to the transaction. Default value when Credit Invoices feature is not enabled. - `all_credit` – Issues credit to the account for the entire amount of the refund. Only available when the Credit Invoices feature is enabled. - `all_transaction` – Refunds the entire amount back to transactions, using transactions from previous invoices if necessary. Only available when the Credit Invoices feature is enabled. define_attribute :refund_method, String