Class: Stripe::CreditNotePreviewParams::Refund

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/credit_note_preview_params.rb

Defined Under Namespace

Classes: PaymentRecordRefund

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount_refunded: nil, payment_record_refund: nil, refund: nil, type: nil) ⇒ Refund

Returns a new instance of Refund.



84
85
86
87
88
89
# File 'lib/stripe/params/credit_note_preview_params.rb', line 84

def initialize(amount_refunded: nil, payment_record_refund: nil, refund: nil, type: nil)
  @amount_refunded = amount_refunded
  @payment_record_refund = payment_record_refund
  @refund = refund
  @type = type
end

Instance Attribute Details

#amount_refundedObject

Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.



76
77
78
# File 'lib/stripe/params/credit_note_preview_params.rb', line 76

def amount_refunded
  @amount_refunded
end

#payment_record_refundObject

The PaymentRecord refund details to link to this credit note. Required when ‘type` is `payment_record_refund`.



78
79
80
# File 'lib/stripe/params/credit_note_preview_params.rb', line 78

def payment_record_refund
  @payment_record_refund
end

#refundObject

ID of an existing refund to link this credit note to. Required when ‘type` is `refund`.



80
81
82
# File 'lib/stripe/params/credit_note_preview_params.rb', line 80

def refund
  @refund
end

#typeObject

Type of the refund, one of ‘refund` or `payment_record_refund`. Defaults to `refund`.



82
83
84
# File 'lib/stripe/params/credit_note_preview_params.rb', line 82

def type
  @type
end