Class: Stripe::CreditNote::PreviewParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::CreditNote::PreviewParams
- Defined in:
- lib/stripe/resources/credit_note.rb
Defined Under Namespace
Classes: Line, Refund, ShippingCost
Instance Attribute Summary collapse
-
#amount ⇒ Object
The integer amount in cents (or local equivalent) representing the total amount of the credit note.
-
#credit_amount ⇒ Object
The integer amount in cents (or local equivalent) representing the amount to credit the customer’s balance, which will be automatically applied to their next invoice.
-
#effective_at ⇒ Object
The date when this credit note is in effect.
-
#email_type ⇒ Object
Type of email to send to the customer, one of ‘credit_note` or `none` and the default is `credit_note`.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#invoice ⇒ Object
ID of the invoice.
-
#lines ⇒ Object
Line items that make up the credit note.
-
#memo ⇒ Object
The credit note’s memo appears on the credit note PDF.
-
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#out_of_band_amount ⇒ Object
The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
-
#reason ⇒ Object
Reason for issuing this credit note, one of ‘duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`.
-
#refund_amount ⇒ Object
The integer amount in cents (or local equivalent) representing the amount to refund.
-
#refunds ⇒ Object
Refunds to link to this credit note.
-
#shipping_cost ⇒ Object
When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
Instance Method Summary collapse
-
#initialize(amount: nil, credit_amount: nil, effective_at: nil, email_type: nil, expand: nil, invoice: nil, lines: nil, memo: nil, metadata: nil, out_of_band_amount: nil, reason: nil, refund_amount: nil, refunds: nil, shipping_cost: nil) ⇒ PreviewParams
constructor
A new instance of PreviewParams.
Methods inherited from RequestParams
Constructor Details
#initialize(amount: nil, credit_amount: nil, effective_at: nil, email_type: nil, expand: nil, invoice: nil, lines: nil, memo: nil, metadata: nil, out_of_band_amount: nil, reason: nil, refund_amount: nil, refunds: nil, shipping_cost: nil) ⇒ PreviewParams
Returns a new instance of PreviewParams.
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/stripe/resources/credit_note.rb', line 461 def initialize( amount: nil, credit_amount: nil, effective_at: nil, email_type: nil, expand: nil, invoice: nil, lines: nil, memo: nil, metadata: nil, out_of_band_amount: nil, reason: nil, refund_amount: nil, refunds: nil, shipping_cost: nil ) @amount = amount @credit_amount = credit_amount @effective_at = effective_at @email_type = email_type @expand = @invoice = invoice @lines = lines @memo = memo @metadata = @out_of_band_amount = out_of_band_amount @reason = reason @refund_amount = refund_amount @refunds = refunds @shipping_cost = shipping_cost end |
Instance Attribute Details
#amount ⇒ Object
The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of ‘amount`, `lines`, or `shipping_cost` must be provided.
433 434 435 |
# File 'lib/stripe/resources/credit_note.rb', line 433 def amount @amount end |
#credit_amount ⇒ Object
The integer amount in cents (or local equivalent) representing the amount to credit the customer’s balance, which will be automatically applied to their next invoice.
435 436 437 |
# File 'lib/stripe/resources/credit_note.rb', line 435 def credit_amount @credit_amount end |
#effective_at ⇒ Object
The date when this credit note is in effect. Same as ‘created` unless overwritten. When defined, this value replaces the system-generated ’Date of issue’ printed on the credit note PDF.
437 438 439 |
# File 'lib/stripe/resources/credit_note.rb', line 437 def effective_at @effective_at end |
#email_type ⇒ Object
Type of email to send to the customer, one of ‘credit_note` or `none` and the default is `credit_note`.
439 440 441 |
# File 'lib/stripe/resources/credit_note.rb', line 439 def email_type @email_type end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
441 442 443 |
# File 'lib/stripe/resources/credit_note.rb', line 441 def @expand end |
#invoice ⇒ Object
ID of the invoice.
443 444 445 |
# File 'lib/stripe/resources/credit_note.rb', line 443 def invoice @invoice end |
#lines ⇒ Object
Line items that make up the credit note. One of ‘amount`, `lines`, or `shipping_cost` must be provided.
445 446 447 |
# File 'lib/stripe/resources/credit_note.rb', line 445 def lines @lines end |
#memo ⇒ Object
The credit note’s memo appears on the credit note PDF.
447 448 449 |
# File 'lib/stripe/resources/credit_note.rb', line 447 def memo @memo end |
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.
449 450 451 |
# File 'lib/stripe/resources/credit_note.rb', line 449 def @metadata end |
#out_of_band_amount ⇒ Object
The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
451 452 453 |
# File 'lib/stripe/resources/credit_note.rb', line 451 def out_of_band_amount @out_of_band_amount end |
#reason ⇒ Object
Reason for issuing this credit note, one of ‘duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
453 454 455 |
# File 'lib/stripe/resources/credit_note.rb', line 453 def reason @reason end |
#refund_amount ⇒ Object
The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
455 456 457 |
# File 'lib/stripe/resources/credit_note.rb', line 455 def refund_amount @refund_amount end |
#refunds ⇒ Object
Refunds to link to this credit note.
457 458 459 |
# File 'lib/stripe/resources/credit_note.rb', line 457 def refunds @refunds end |
#shipping_cost ⇒ Object
When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of ‘amount`, `lines`, or `shipping_cost` must be provided.
459 460 461 |
# File 'lib/stripe/resources/credit_note.rb', line 459 def shipping_cost @shipping_cost end |