mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-04 00:00:47 -04:00
Allow params when retrieve customer objects
* Permit easy pagination for example * ruby 2 syntax for hash
This commit is contained in:
parent
5e3474c70c
commit
467109d588
@ -10,20 +10,24 @@ module Stripe
|
||||
InvoiceItem.create(params.merge(:customer => id), opts)
|
||||
end
|
||||
|
||||
def invoices
|
||||
Invoice.all({ :customer => id }, @opts)
|
||||
def invoices(params={}, opts={})
|
||||
opts = @opts.merge(Util.normalize_opts(opts))
|
||||
Invoice.all(params.merge(:customer => id), opts)
|
||||
end
|
||||
|
||||
def invoice_items
|
||||
InvoiceItem.all({ :customer => id }, @opts)
|
||||
def invoice_items(params={}, opts={})
|
||||
opts = @opts.merge(Util.normalize_opts(opts))
|
||||
InvoiceItem.all(params.merge(:customer => id), opts)
|
||||
end
|
||||
|
||||
def upcoming_invoice
|
||||
Invoice.upcoming({ :customer => id }, @opts)
|
||||
def upcoming_invoice(params={}, opts={})
|
||||
opts = @opts.merge(Util.normalize_opts(opts))
|
||||
Invoice.upcoming(params.merge(:customer => id), opts)
|
||||
end
|
||||
|
||||
def charges
|
||||
Charge.all({ :customer => id }, @opts)
|
||||
def charges(params={}, opts={})
|
||||
opts = @opts.merge(Util.normalize_opts(opts))
|
||||
Charge.all(params.merge(:customer => id), opts)
|
||||
end
|
||||
|
||||
def create_upcoming_invoice(params={}, opts={})
|
||||
|
Loading…
x
Reference in New Issue
Block a user