mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-12-06 00:00:29 -05:00
Update generated code for v828
This commit is contained in:
parent
a7d998ab2d
commit
6e62bca84a
@ -1 +1 @@
|
||||
v827
|
||||
v828
|
||||
@ -24,6 +24,9 @@ module Stripe
|
||||
nested_resource_class_methods :capability,
|
||||
operations: %i[retrieve update list],
|
||||
resource_plural: "capabilities"
|
||||
nested_resource_class_methods :external_account,
|
||||
operations: %i[create retrieve update delete list]
|
||||
nested_resource_class_methods :login_link, operations: %i[create]
|
||||
nested_resource_class_methods :person, operations: %i[create retrieve update delete list]
|
||||
|
||||
# Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
|
||||
@ -72,10 +75,6 @@ module Stripe
|
||||
|
||||
save_nested_resource :external_account
|
||||
|
||||
nested_resource_class_methods :external_account,
|
||||
operations: %i[create retrieve update delete list]
|
||||
nested_resource_class_methods :login_link, operations: %i[create]
|
||||
|
||||
def resource_url
|
||||
if self["id"]
|
||||
super
|
||||
|
||||
@ -20,8 +20,9 @@ module Stripe
|
||||
|
||||
nested_resource_class_methods :balance_transaction, operations: %i[create retrieve update list]
|
||||
nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
|
||||
nested_resource_class_methods :entitlement, operations: %i[list]
|
||||
nested_resource_class_methods :source, operations: %i[create retrieve update delete list]
|
||||
nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
|
||||
nested_resource_class_methods :entitlement, operations: %i[list]
|
||||
|
||||
# Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
|
||||
# funding instructions will be created. If funding instructions have already been created for a given customer, the same
|
||||
@ -108,8 +109,6 @@ module Stripe
|
||||
end
|
||||
|
||||
save_nested_resource :source
|
||||
nested_resource_class_methods :source,
|
||||
operations: %i[create retrieve update delete list]
|
||||
|
||||
# The API request for deleting a card or bank account and for detaching a
|
||||
# source object are the same.
|
||||
|
||||
@ -482,6 +482,14 @@ module Stripe
|
||||
Stripe::Customer.search({ query: "name:'fakename' AND metadata['foo']:'bar'" })
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/customers/search?query=name:'fakename' AND metadata['foo']:'bar'"
|
||||
end
|
||||
should "Test customers sources delete" do
|
||||
Stripe::Customer.delete_source("cus_xxxxxxxxxxxxx", "ba_xxxxxxxxxxxxx")
|
||||
assert_requested :delete, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/ba_xxxxxxxxxxxxx?"
|
||||
end
|
||||
should "Test customers sources delete 2" do
|
||||
Stripe::Customer.delete_source("cus_xxxxxxxxxxxxx", "card_xxxxxxxxxxxxx")
|
||||
assert_requested :delete, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx?"
|
||||
end
|
||||
should "Test customers sources get" do
|
||||
Stripe::Customer.list_sources(
|
||||
"cus_xxxxxxxxxxxxx",
|
||||
@ -510,6 +518,10 @@ module Stripe
|
||||
Stripe::Customer.retrieve_source("cus_xxxxxxxxxxxxx", "card_xxxxxxxxxxxxx")
|
||||
assert_requested :get, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx?"
|
||||
end
|
||||
should "Test customers sources post" do
|
||||
Stripe::Customer.update_source("cus_123", "card_123", { account_holder_name: "Kamil" })
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_123/sources/card_123"
|
||||
end
|
||||
should "Test customers sources post 2" do
|
||||
Stripe::Customer.create_source("cus_xxxxxxxxxxxxx", { source: "btok_xxxxxxxxxxxxx" })
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources"
|
||||
@ -518,6 +530,22 @@ module Stripe
|
||||
Stripe::Customer.create_source("cus_xxxxxxxxxxxxx", { source: "tok_xxxx" })
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources"
|
||||
end
|
||||
should "Test customers sources post 4" do
|
||||
Stripe::Customer.update_source(
|
||||
"cus_xxxxxxxxxxxxx",
|
||||
"ba_xxxxxxxxxxxxx",
|
||||
{ metadata: { order_id: "6735" } }
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/ba_xxxxxxxxxxxxx"
|
||||
end
|
||||
should "Test customers sources post 5" do
|
||||
Stripe::Customer.update_source(
|
||||
"cus_xxxxxxxxxxxxx",
|
||||
"card_xxxxxxxxxxxxx",
|
||||
{ name: "Jenny Rosen" }
|
||||
)
|
||||
assert_requested :post, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/sources/card_xxxxxxxxxxxxx"
|
||||
end
|
||||
should "Test customers tax ids delete" do
|
||||
Stripe::Customer.delete_tax_id("cus_xxxxxxxxxxxxx", "txi_xxxxxxxxxxxxx")
|
||||
assert_requested :delete, "#{Stripe.api_base}/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx?"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user