mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-07-14 00:00:44 -04:00
Compare commits
3 Commits
fba1349bcb
...
fc4bada04a
Author | SHA1 | Date | |
---|---|---|---|
|
fc4bada04a | ||
|
3b38c42445 | ||
|
fe73975f07 |
@ -1 +1 @@
|
|||||||
v262
|
v268
|
@ -23,6 +23,15 @@ module Stripe
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def collect_inputs(params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def process_payment_intent(params = {}, opts = {})
|
def process_payment_intent(params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
@ -68,6 +77,15 @@ module Stripe
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.collect_inputs(reader, params = {}, opts = {})
|
||||||
|
request_stripe_object(
|
||||||
|
method: :post,
|
||||||
|
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
|
||||||
|
params: params,
|
||||||
|
opts: opts
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def self.process_payment_intent(reader, params = {}, opts = {})
|
def self.process_payment_intent(reader, params = {}, opts = {})
|
||||||
request_stripe_object(
|
request_stripe_object(
|
||||||
method: :post,
|
method: :post,
|
||||||
|
@ -1543,6 +1543,12 @@ module Stripe
|
|||||||
assert_requested :get, "#{Stripe.api_base}/v1/quotes?limit=3"
|
assert_requested :get, "#{Stripe.api_base}/v1/quotes?limit=3"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
context "Quote.preview_invoice_lines" do
|
||||||
|
should "support requests with args: quote, preview_invoice" do
|
||||||
|
Stripe::Quote.preview_invoice_lines("qt_xyz", "in_xyz")
|
||||||
|
assert_requested :get, "#{Stripe.api_base}/v1/quotes/qt_xyz/preview_invoices/in_xyz/lines?"
|
||||||
|
end
|
||||||
|
end
|
||||||
context "Quote.retrieve" do
|
context "Quote.retrieve" do
|
||||||
should "support requests with args: id" do
|
should "support requests with args: id" do
|
||||||
Stripe::Quote.retrieve("qt_xxxxxxxxxxxxx")
|
Stripe::Quote.retrieve("qt_xxxxxxxxxxxxx")
|
||||||
@ -2020,6 +2026,14 @@ module Stripe
|
|||||||
assert_requested :post, "#{Stripe.api_base}/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"
|
assert_requested :post, "#{Stripe.api_base}/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
context "Tax.Transaction.create_from_calculation" do
|
||||||
|
should "support requests with args: calculation, reference" do
|
||||||
|
Stripe::Tax::Transaction.create_from_calculation(
|
||||||
|
{ calculation: "xxx", reference: "yyy" }
|
||||||
|
)
|
||||||
|
assert_requested :post, "#{Stripe.api_base}/v1/tax/transactions/create_from_calculation"
|
||||||
|
end
|
||||||
|
end
|
||||||
context "TaxCode.list" do
|
context "TaxCode.list" do
|
||||||
should "support requests with args: limit" do
|
should "support requests with args: limit" do
|
||||||
Stripe::TaxCode.list({ limit: 3 })
|
Stripe::TaxCode.list({ limit: 3 })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user