Class: Stripe::CreditNote::ListPreviewLineItemsParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/credit_note.rb

Defined Under Namespace

Classes: Line, Refund, ShippingCost

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, credit_amount: nil, effective_at: nil, email_type: nil, ending_before: nil, expand: nil, invoice: nil, limit: nil, lines: nil, memo: nil, metadata: nil, out_of_band_amount: nil, reason: nil, refund: nil, refund_amount: nil, refunds: nil, shipping_cost: nil, starting_after: nil) ⇒ ListPreviewLineItemsParams

Returns a new instance of ListPreviewLineItemsParams.



560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
# File 'lib/stripe/resources/credit_note.rb', line 560

def initialize(
  amount: nil,
  credit_amount: nil,
  effective_at: nil,
  email_type: nil,
  ending_before: nil,
  expand: nil,
  invoice: nil,
  limit: nil,
  lines: nil,
  memo: nil,
  metadata: nil,
  out_of_band_amount: nil,
  reason: nil,
  refund: nil,
  refund_amount: nil,
  refunds: nil,
  shipping_cost: nil,
  starting_after: nil
)
  @amount = amount
  @credit_amount = credit_amount
  @effective_at = effective_at
  @email_type = email_type
  @ending_before = ending_before
  @expand = expand
  @invoice = invoice
  @limit = limit
  @lines = lines
  @memo = memo
  @metadata = 
  @out_of_band_amount = out_of_band_amount
  @reason = reason
  @refund = refund
  @refund_amount = refund_amount
  @refunds = refunds
  @shipping_cost = shipping_cost
  @starting_after = starting_after
end

Instance Attribute Details

#amountObject

The integer amount in cents (or local equivalent) representing the total amount of the credit note.



524
525
526
# File 'lib/stripe/resources/credit_note.rb', line 524

def amount
  @amount
end

#credit_amountObject

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.



526
527
528
# File 'lib/stripe/resources/credit_note.rb', line 526

def credit_amount
  @credit_amount
end

#effective_atObject

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.



528
529
530
# File 'lib/stripe/resources/credit_note.rb', line 528

def effective_at
  @effective_at
end

#email_typeObject

Type of email to send to the customer, one of ‘credit_note` or `none` and the default is `credit_note`.



530
531
532
# File 'lib/stripe/resources/credit_note.rb', line 530

def email_type
  @email_type
end

#ending_beforeObject

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.



532
533
534
# File 'lib/stripe/resources/credit_note.rb', line 532

def ending_before
  @ending_before
end

#expandObject

Specifies which fields in the response should be expanded.



534
535
536
# File 'lib/stripe/resources/credit_note.rb', line 534

def expand
  @expand
end

#invoiceObject

ID of the invoice.



536
537
538
# File 'lib/stripe/resources/credit_note.rb', line 536

def invoice
  @invoice
end

#limitObject

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.



538
539
540
# File 'lib/stripe/resources/credit_note.rb', line 538

def limit
  @limit
end

#linesObject

Line items that make up the credit note.



540
541
542
# File 'lib/stripe/resources/credit_note.rb', line 540

def lines
  @lines
end

#memoObject

The credit note’s memo appears on the credit note PDF.



542
543
544
# File 'lib/stripe/resources/credit_note.rb', line 542

def memo
  @memo
end

#metadataObject

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



544
545
546
# File 'lib/stripe/resources/credit_note.rb', line 544

def 
  @metadata
end

#out_of_band_amountObject

The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.



546
547
548
# File 'lib/stripe/resources/credit_note.rb', line 546

def out_of_band_amount
  @out_of_band_amount
end

#reasonObject

Reason for issuing this credit note, one of ‘duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`



548
549
550
# File 'lib/stripe/resources/credit_note.rb', line 548

def reason
  @reason
end

#refundObject

ID of an existing refund to link this credit note to.



550
551
552
# File 'lib/stripe/resources/credit_note.rb', line 550

def refund
  @refund
end

#refund_amountObject

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.



552
553
554
# File 'lib/stripe/resources/credit_note.rb', line 552

def refund_amount
  @refund_amount
end

#refundsObject

Refunds to link to this credit note.



554
555
556
# File 'lib/stripe/resources/credit_note.rb', line 554

def refunds
  @refunds
end

#shipping_costObject

When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.



556
557
558
# File 'lib/stripe/resources/credit_note.rb', line 556

def shipping_cost
  @shipping_cost
end

#starting_afterObject

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.



558
559
560
# File 'lib/stripe/resources/credit_note.rb', line 558

def starting_after
  @starting_after
end