984 Commits

Author SHA1 Message Date
Richard Marmorstein
c641c3ab19
Codegen for openapi a285624 (#1032) 2022-02-15 17:50:41 -05:00
Richard Marmorstein
faeb0cae4e Bump version to 5.43.0 2022-01-20 09:29:15 -08:00
Richard Marmorstein
917e512c10
API Updates (#1031)
* Codegen for openapi 4d2f301
2022-01-20 11:22:53 -05:00
Dominic Charley-Roy
ced92764ed Bump version to 5.42.0 2021-12-13 13:13:34 -05:00
Dominic Charley-Roy
234a9611a6
Add connection manager logging and include object IDs in logging. (#1022) 2021-12-13 12:55:40 -05:00
Yejia Chen
c1e4e879fb Bump version to 5.41.0 2021-11-16 11:05:02 -05:00
yejia-stripe
d4d282d14d
API Updates (#1017) 2021-11-16 10:04:38 -05:00
Richard Marmorstein
59657673fc Bump version to 5.40.0 2021-11-11 16:13:17 -05:00
Richard Marmorstein
3db855d309
Codegen for openapi 21065d4 (#1015) 2021-11-11 15:55:13 -05:00
Richard Marmorstein
d0defa6e3f
Codegen methodless resources (#1011) 2021-10-12 09:51:38 -04:00
Richard Marmorstein
30dd671e3e Bump version to 5.39.0 2021-10-11 11:42:35 -04:00
Richard Marmorstein
4c36bacd41
API Updates (#1010) 2021-10-11 10:58:59 -04:00
Richard Marmorstein
b86671acba Bump version to 5.38.0 2021-08-10 07:42:52 -04:00
DJ Patterson
85c7f52c3a
Add request_id to RequestEndEvent (#993)
Co-authored-by: Richard Marmorstein <52928443+richardm-stripe@users.noreply.github.com>
2021-08-09 19:47:46 -04:00
Richard Marmorstein
378c71dec7
Codegen more files (#991) 2021-07-27 12:50:38 -04:00
Dominic Charley-Roy
ad7104adc1
Remove unused API error types from docs. (#989) 2021-07-15 09:56:08 -04:00
Dominic Charley-Roy
c46e8fcaea Bump version to 5.37.0 2021-07-14 13:25:43 -04:00
Richard Marmorstein
cbecb42185
API Updates (#988) 2021-07-14 12:14:41 -04:00
Richard Marmorstein
5cbd8d9af7 Bump version to 5.36.0 2021-07-09 15:55:06 -04:00
Dominic Charley-Roy
d8b3ddf595
API Updates (#987) 2021-07-09 15:36:24 -04:00
Dominic Charley-Roy
01146ac6b0 Bump version to 5.35.0 2021-06-30 09:53:29 -04:00
Dominic Charley-Roy
90223fa06b
Update normalize_opts to use dup instead of clone. (#985) 2021-06-29 17:04:56 -04:00
Dominic Charley-Roy
59eb8d06cf
Add support for making a request and receiving the response as a stream. (#983) 2021-06-24 10:24:11 -04:00
Richard Marmorstein
28e6d19a90 Bump version to 5.34.0 2021-06-04 13:37:56 -04:00
Richard Marmorstein
faf84198c6
API Updates (#981) 2021-06-04 12:35:25 -04:00
Sean Gottschalk
df7d3f58e5 Bump version to 5.33.0 2021-05-19 12:03:45 -07:00
Richard Marmorstein
0ba9307bdb
API Updates (#979) 2021-05-19 10:13:22 -04:00
Brandur
218292aa15 Bump version to 5.32.1 2021-04-05 15:07:34 -07:00
Brandur
a415fa8aad Bump version to 5.32.0 2021-04-05 14:58:58 -07:00
Brandur
75e744f4a2 Bump version to 5.31.0 2021-04-02 13:27:33 -07:00
Brandur Leach
16a094cf34
Rename Stripe.configuration to Stripe.config (#972)
This is just a cosmetic change that renames `Stripe.configuration` to
just `Stripe.config`. We use the shorter "config" in most other places
including `StripeClient#config`, so I feel that this is overall more
consistent.

This change is backwards compatible because the new accessor came in
with #968, and that hasn't been given a formal release yet.

I've left the class name as `StripeConfiguration` which IMO is fine. The
class uses the expanded form of the name while vars and accessors use
the shorter `config`. Also, `StripeConfiguration` has been around a
little bit longer, so renaming it is somewhat backwards incompatible
too.
2021-04-02 13:24:37 -07:00
Brandur
3e26570fcd
On config change, only clear connection managers for changed config (#971)
Follows up #968.

As a relic from when we had global configuration, anytime any config
value is changed on any client, we still clear all connection managers
everywhere on every thread, even though this is not necessary. This
means that we lose all open connections, etc.

Here, we make changes so that if a configuration is changed, we only
clear the configuration managers pertaining to that one particular
configuration, thus conserving resources globally.

Co-authored-by: Brandur <brandur@brandur.org>
2021-04-02 13:13:26 -07:00
Brandur Leach
b9c7afd5fe
Reserve some critical field names when adding StripeObject accessors (#970)
When populating `StripeObject`s, we add accessors to them so that people
can access fields like `obj.currency`.

This was probably only meant to apply to API resources, but through
what might have been an accident of history, we've also traditionally
unmarshaled any hash that comes back from the API as a `StripeObject`,
including `metadata` fields. This allows some convenience because users
can access values like `obj.metadata.my_field`, but is also obviously a
minefield for potential problems.

In issue #969, what's essentially happening is that because there's a
metadata field named `class`, we've overwritten the object's normal
`class` method with our own custom one that accesses the metadata value.
Amazingly, the object can still marshal/unmarshal mostly properly, but
fails on this line as we try to access `obj.class` and that turns out to
be a metadata value instead of a class:

``` ruby
when StripeObject
  obj.class.construct_from(
    ...
```

Here I solve the problem by banning accessors added with the name
`class`. This has a slight risk of backward incompatibility in that
users that previously had metadata named "class" will now have to use
square bracket accessors instead like `obj.metadata[:class]`, but
honestly, I just can't see anything good in allowing "class" to be used
as an accessor.

An alternative solution might be to alias `class` in `StripeObject` and
then make sure we always use that in places like `initialize_from` and
`deep_copy`.

The best long term solution would be to stop add accessors to metadata
objects. This just seems like a bad idea given that there are still
myriads of Ruby built-ins that could potentially be overwritten. This is
definitely a considerably-sized breaking change though, so we'd have to
do it on a major.
2021-04-02 11:08:56 -07:00
Joel Taylor
21643f0716
Allow StripeClient to be configured per instance (#968)
This changes allows for each instance of StripeClient to have its own
configuration object instead of relying on the global config. Each
instance can be configured to override any global config values
previously set.
2021-04-01 14:19:38 -07:00
Richard Marmorstein
5c5c0a82ba Bump version to 5.30.0 2021-02-22 09:28:24 -05:00
Richard Marmorstein
f59ba8cae0
Add billing portal configuration (#965) 2021-02-19 20:32:33 -05:00
Brandur
512f5464d0 Bump version to 5.29.1 2021-02-09 09:51:31 -08:00
Brandur
c28ee66a14
Fix return value of Customer#delete_discount (#964)
`Customer#delete_discount` has been broken for some time in that it
tries to re-initialize `self` (which is a customer) with a received
discount response. This is incorrect and leads to various problems.

Here, we redefine the return value of `delete_discount` as a discount,
and have it no longer mutate the object on which is was called. We add a
comment as well just to help flag some of the behavior which could
potentially be confusing.

Fixes #963.
2021-02-09 09:50:07 -08:00
Brandur
7d460450cc Bump version to 5.29.0 2021-01-05 13:38:23 -08:00
Joel Taylor
06bcc863b0
Allow client_id configuration on instance config (#952)
It's necessary to allow `client_id` to be configured in order to move
towards supporting `StripeClient` instances.
2021-01-05 13:35:46 -08:00
Brandur
9787913b35 Bump version to 5.28.0 2020-10-14 11:44:42 -07:00
Bart de Water
085e08142d
Allow setting write_timeout for connections on Ruby 2.6+ (#950) 2020-10-14 11:43:32 -07:00
Remi Jannel
259cd1ce9c Bump version to 5.27.0 2020-10-14 07:56:33 -07:00
remi-stripe
db24334b9e
Add support for the Payout Reverse API (#951)
* Codegen for openapi 4bd4c01

* Add test
2020-10-14 07:51:16 -07:00
Remi Jannel
f3b83f132e Bump version to 5.26.0 2020-09-29 22:55:27 -07:00
remi-stripe
29f321b224
Add support for the SetupAttempt resource and List API (#949)
* Codegen for openapi 3854362

* Fix and add tests
2020-09-29 22:54:58 -07:00
Remi Jannel
0620436d63 Bump version to 5.25.0 2020-09-02 13:57:09 -07:00
remi-stripe
683b10140e
Add support for the Issuing Dispute Submit API (#944)
* Codegen for openapi 474461f

* Add and fix tests for the latest stripe-mock

Some of the tests had to be changed/mocked because stripe-mock has a bug
where the includable sub-lists it returns have the wrong url set.
Because of this, when you call create/list/etc. on one of those sub-lists
the calls fails due to that URL being incorrect.
Moved one test to use charge+refund (auto-expanded) and another used a
mock to have the right URL returned.
2020-09-02 13:56:24 -07:00
Brandur
5d9039731b Bump version to 5.24.0 2020-08-26 13:01:23 -07:00
Joel Taylor
23a0ee2dbe
Extract configurations into separate object (#939)
Adds a `Stripe::StripeConfiguration` object to manage internal and user
supplied configuration options.

This is primarily motivated by #921 in order to provide a way to set
options on for an instance of `StripeClient`.
2020-08-26 12:58:59 -07:00