mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-07-04 00:00:45 -04:00
Compare commits
5 Commits
be2efb7d25
...
cb53c3b14a
Author | SHA1 | Date | |
---|---|---|---|
|
cb53c3b14a | ||
|
73324f2ce6 | ||
|
c5af3ad4f2 | ||
|
7bb5a3582c | ||
|
77cc0b1554 |
@ -44,6 +44,11 @@ Metrics/ModuleLength:
|
|||||||
Style/AccessModifierDeclarations:
|
Style/AccessModifierDeclarations:
|
||||||
EnforcedStyle: inline
|
EnforcedStyle: inline
|
||||||
|
|
||||||
|
Style/AsciiComments:
|
||||||
|
AllowedChars:
|
||||||
|
- ’
|
||||||
|
- €
|
||||||
|
|
||||||
Style/FrozenStringLiteralComment:
|
Style/FrozenStringLiteralComment:
|
||||||
EnforcedStyle: always
|
EnforcedStyle: always
|
||||||
|
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 7.1.0 - 2022-08-19
|
||||||
|
* [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
|
||||||
|
* Add support for new resource `CustomerCashBalanceTransaction`
|
||||||
|
* [#1118](https://github.com/stripe/stripe-ruby/pull/1118) Update AllowedChars in rubocop config
|
||||||
|
* [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
|
||||||
|
* [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
|
||||||
|
|
||||||
## 7.0.0 - 2022-08-02
|
## 7.0.0 - 2022-08-02
|
||||||
|
|
||||||
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
|
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
|
||||||
|
@ -1 +1 @@
|
|||||||
v174
|
v183
|
@ -34,6 +34,7 @@ module Stripe
|
|||||||
CreditNoteLineItem::OBJECT_NAME => CreditNoteLineItem,
|
CreditNoteLineItem::OBJECT_NAME => CreditNoteLineItem,
|
||||||
Customer::OBJECT_NAME => Customer,
|
Customer::OBJECT_NAME => Customer,
|
||||||
CustomerBalanceTransaction::OBJECT_NAME => CustomerBalanceTransaction,
|
CustomerBalanceTransaction::OBJECT_NAME => CustomerBalanceTransaction,
|
||||||
|
CustomerCashBalanceTransaction::OBJECT_NAME => CustomerCashBalanceTransaction,
|
||||||
Discount::OBJECT_NAME => Discount,
|
Discount::OBJECT_NAME => Discount,
|
||||||
Dispute::OBJECT_NAME => Dispute,
|
Dispute::OBJECT_NAME => Dispute,
|
||||||
EphemeralKey::OBJECT_NAME => EphemeralKey,
|
EphemeralKey::OBJECT_NAME => EphemeralKey,
|
||||||
|
@ -23,6 +23,7 @@ require "stripe/resources/credit_note"
|
|||||||
require "stripe/resources/credit_note_line_item"
|
require "stripe/resources/credit_note_line_item"
|
||||||
require "stripe/resources/customer"
|
require "stripe/resources/customer"
|
||||||
require "stripe/resources/customer_balance_transaction"
|
require "stripe/resources/customer_balance_transaction"
|
||||||
|
require "stripe/resources/customer_cash_balance_transaction"
|
||||||
require "stripe/resources/discount"
|
require "stripe/resources/discount"
|
||||||
require "stripe/resources/dispute"
|
require "stripe/resources/dispute"
|
||||||
require "stripe/resources/ephemeral_key"
|
require "stripe/resources/ephemeral_key"
|
||||||
|
@ -14,6 +14,8 @@ module Stripe
|
|||||||
|
|
||||||
nested_resource_class_methods :balance_transaction,
|
nested_resource_class_methods :balance_transaction,
|
||||||
operations: %i[create retrieve update list]
|
operations: %i[create retrieve update list]
|
||||||
|
nested_resource_class_methods :cash_balance_transaction,
|
||||||
|
operations: %i[retrieve list]
|
||||||
nested_resource_class_methods :tax_id,
|
nested_resource_class_methods :tax_id,
|
||||||
operations: %i[create retrieve delete list]
|
operations: %i[create retrieve delete list]
|
||||||
|
|
||||||
|
10
lib/stripe/resources/customer_cash_balance_transaction.rb
Normal file
10
lib/stripe/resources/customer_cash_balance_transaction.rb
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# File generated from our OpenAPI spec
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module Stripe
|
||||||
|
class CustomerCashBalanceTransaction < APIResource
|
||||||
|
extend Stripe::APIOperations::List
|
||||||
|
|
||||||
|
OBJECT_NAME = "customer_cash_balance_transaction"
|
||||||
|
end
|
||||||
|
end
|
@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Stripe
|
module Stripe
|
||||||
VERSION = "7.0.0"
|
VERSION = "7.1.0"
|
||||||
end
|
end
|
||||||
|
@ -1070,63 +1070,6 @@ module Stripe
|
|||||||
assert_requested :get, "#{Stripe.api_base}/v1/mandates/mandate_xxxxxxxxxxxxx?"
|
assert_requested :get, "#{Stripe.api_base}/v1/mandates/mandate_xxxxxxxxxxxxx?"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
context "Order.cancel" do
|
|
||||||
should "support requests with args: order" do
|
|
||||||
Stripe::Order.cancel("order_xyz")
|
|
||||||
assert_requested :post, "#{Stripe.api_base}/v1/orders/order_xyz/cancel?"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
context "Order.create" do
|
|
||||||
should "support requests with args: description, currency, line_items" do
|
|
||||||
Stripe::Order.create(
|
|
||||||
{
|
|
||||||
description: "description",
|
|
||||||
currency: "usd",
|
|
||||||
line_items: [{ description: "my line item" }],
|
|
||||||
}
|
|
||||||
)
|
|
||||||
assert_requested :post, "#{Stripe.api_base}/v1/orders"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
context "Order.list" do
|
|
||||||
should "support requests with args: limit" do
|
|
||||||
Stripe::Order.list({ limit: 3 })
|
|
||||||
assert_requested :get, "#{Stripe.api_base}/v1/orders?limit=3"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
context "Order.list_line_items" do
|
|
||||||
should "support requests with args: order" do
|
|
||||||
Stripe::Order.list_line_items("order_xyz")
|
|
||||||
assert_requested :get, "#{Stripe.api_base}/v1/orders/order_xyz/line_items?"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
context "Order.reopen" do
|
|
||||||
should "support requests with args: order" do
|
|
||||||
Stripe::Order.reopen("order_xyz")
|
|
||||||
assert_requested :post, "#{Stripe.api_base}/v1/orders/order_xyz/reopen?"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
context "Order.retrieve" do
|
|
||||||
should "support requests with args: order" do
|
|
||||||
Stripe::Order.retrieve("order_xyz")
|
|
||||||
assert_requested :get, "#{Stripe.api_base}/v1/orders/order_xyz?"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
context "Order.submit" do
|
|
||||||
should "support requests with args: order, expected_total" do
|
|
||||||
Stripe::Order.submit("order_xyz", { expected_total: 100 })
|
|
||||||
assert_requested :post, "#{Stripe.api_base}/v1/orders/order_xyz/submit"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
context "Order.update" do
|
|
||||||
should "support requests with args: order, metadata, ip_address" do
|
|
||||||
Stripe::Order.update(
|
|
||||||
"order_xyz",
|
|
||||||
{ metadata: { reference_number: "123" }, ip_address: "0.0.0.0" }
|
|
||||||
)
|
|
||||||
assert_requested :post, "#{Stripe.api_base}/v1/orders/order_xyz"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
context "PaymentIntent.apply_customer_balance" do
|
context "PaymentIntent.apply_customer_balance" do
|
||||||
should "support requests with args: id" do
|
should "support requests with args: id" do
|
||||||
Stripe::PaymentIntent.apply_customer_balance("pi_xxxxxxxxxxxxx")
|
Stripe::PaymentIntent.apply_customer_balance("pi_xxxxxxxxxxxxx")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user