Skip to content

Commit

Permalink
Merge pull request #844 from alice-financial/invoice-number
Browse files Browse the repository at this point in the history
Support invoice number
  • Loading branch information
alexmamonchik committed Oct 24, 2023
2 parents 4ebca49 + ffbbf96 commit f2bfb3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/stripe_mock/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ def self.mock_invoice(lines, params={})
next_payment_attempt: 1349825350,
charge: nil,
discount: nil,
subscription: nil
subscription: nil,
number: "6C41730-0001"
}.merge(params)
if invoice[:discount]
invoice[:total] = [0, invoice[:subtotal] - invoice[:discount][:coupon][:amount_off]].max if invoice[:discount][:coupon][:amount_off]
Expand Down
5 changes: 5 additions & 0 deletions spec/shared_stripe_examples/invoice_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
expect(data[invoice.id]).to_not be_nil
expect(data[invoice.id][:id]).to eq(invoice.id)
end

it "supports invoice number" do
original = Stripe::Invoice.create
expect(original.number).to be
end
end

context "retrieving an invoice" do
Expand Down

0 comments on commit f2bfb3d

Please sign in to comment.