Class: Recurly::Requests::InvoiceRefund

Inherits:
Recurly::Request show all
Defined in:
lib/recurly/requests/invoice_refund.rb

Instance Attribute Summary collapse

Attributes inherited from Recurly::Request

#attributes

Method Summary

Methods inherited from Recurly::Request

#==, #to_s

Methods included from Schema::ResourceCaster

#cast

Methods included from Schema::RequestCaster

#cast_request

Methods included from Schema::SchemaFactory

#schema

Methods included from Schema::SchemaValidator

#get_did_you_mean, #validate!, #validate_attribute!

Instance Attribute Details

#amountFloat

Returns 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.

Returns:

  • (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.


11
# File 'lib/recurly/requests/invoice_refund.rb', line 11

define_attribute :amount, Float

#credit_customer_notesString

Returns Used as the Customer Notes on the credit invoice. This field can only be include when the Credit Invoices feature is enabled.

Returns:

  • (String)

    Used as the Customer Notes on the credit invoice. This field can only be include when the Credit Invoices feature is enabled.


15
# File 'lib/recurly/requests/invoice_refund.rb', line 15

define_attribute :credit_customer_notes, String

#external_refundExternalRefund

Returns Indicates that the refund was settled outside of Recurly, and a manual transaction should be created to track it in Recurly. Required when: - refunding a manually collected charge invoice, and `refund_method` is not `all_credit` - refunding a credit invoice that refunded manually collecting invoices - refunding a credit invoice for a partial amount This field can only be included when the Credit Invoices feature is enabled.

Returns:

  • (ExternalRefund)

    Indicates that the refund was settled outside of Recurly, and a manual transaction should be created to track it in Recurly. Required when: - refunding a manually collected charge invoice, and `refund_method` is not `all_credit` - refunding a credit invoice that refunded manually collecting invoices - refunding a credit invoice for a partial amount This field can only be included when the Credit Invoices feature is enabled.


19
# File 'lib/recurly/requests/invoice_refund.rb', line 19

define_attribute :external_refund, :ExternalRefund

#line_itemsArray[LineItemRefund]

Returns The line items to be refunded. This is required when `type=line_items`.

Returns:

  • (Array[LineItemRefund])

    The line items to be refunded. This is required when `type=line_items`.


23
# File 'lib/recurly/requests/invoice_refund.rb', line 23

define_attribute :line_items, Array, { :item_type => :LineItemRefund }

#refund_methodString

Returns 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.

Returns:

  • (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.


27
# File 'lib/recurly/requests/invoice_refund.rb', line 27

define_attribute :refund_method, String

#typeString

Returns The type of refund. Amount and line items cannot both be specified in the request.

Returns:

  • (String)

    The type of refund. Amount and line items cannot both be specified in the request.


31
# File 'lib/recurly/requests/invoice_refund.rb', line 31

define_attribute :type, String