1003 Commits

Author SHA1 Message Date
Brandur
d71cda7adf Better error message when passing non-string to custom method
Raises a slightly more helpful error message when passing a non-string
to a custom method (currently, it reads "no implicit conversion of Hash
into String", which is terrible).

This a partial remediation for the problem encountered in #809.
2019-07-15 16:38:05 -07:00
Brandur
267eae5e85 Bump version to 4.21.2 2019-07-05 10:48:52 -07:00
Alex Rattray (Stripe)
d1ccff025e Revert back to initialize_from from Util.convert_to_stripe_object (#806)
* Revert "Use Util.convert_to_stripe_object instead of initialize_from"

This reverts commit ea736eba1b8f33d8febbf0b1be0957f34f7b04db.

* Make SetupIntents use initialize_from instead of Util.convert_to_stripe_object

* Fix issuing card details, which must have been broken prior to ea736eb
2019-07-05 10:47:32 -07:00
Olivier Bellone
cb1bd30cf6
Bump version to 4.21.1 2019-07-04 15:48:56 -07:00
Remi Jannel
431124356f Bump version to 4.21.0 2019-06-28 11:09:51 -07:00
remi-stripe
737dd5f593
Merge pull request #803 from stripe/remi-setupintents
Add support for SetupIntent
2019-06-28 11:08:23 -07:00
Brandur
5b5b0f5722 Bump version to 4.20.1 2019-06-28 08:21:24 -07:00
Jakob Cosoroabă
212ca4bb0a
Fix formatting in ConnectionFailed error message
Add space at the end of the second line so the complete message separates the word `not` and `working`

message before
```
Stripe::APIConnectionError: Unexpected error communicating when trying to connect to Stripe. You may be seeing this message because your DNS is notworking.  To check, try running `host stripe.com` from the command line.
```
message after
```
Stripe::APIConnectionError: Unexpected error communicating when trying to connect to Stripe. You may be seeing this message because your DNS is not working.  To check, try running `host stripe.com` from the command line.
```
2019-06-28 13:19:57 +03:00
Remi Jannel
a993e892b3 Add support for the SetupIntent resource and APIs 2019-06-27 12:55:35 -07:00
Olivier Bellone
2cc77147d2
Bump version to 4.20.0 2019-06-24 18:07:50 -07:00
Olivier Bellone
47686d844b
Enable request latency telemetry by default (#800) 2019-06-24 18:07:28 -07:00
Remi Jannel
f25d080e3b Bump version to 4.19.0 2019-06-17 11:50:18 -07:00
Remi Jannel
abef09ef6e Add support for CustomerBalanceTransaction resource and APIs 2019-06-16 10:49:47 -07:00
Alex Rattray
bc9fed3635 Some small changes to object_types for codegen 2019-05-30 17:44:52 -04:00
Alex Rattray
d998c3342e Only ignore line-length on resources 2019-05-29 21:07:34 -04:00
Alex Rattray
64571bee75 Move resources to their own folder 2019-05-29 21:03:37 -04:00
Alex Rattray
58d47e96f8 Move resource requires into their own file 2019-05-29 18:45:57 -04:00
Alex Rattray
01c5776b06 Add some private methods back to Order 2019-05-29 18:24:56 -04:00
Alex Rattray
ea736eba1b Use Util.convert_to_stripe_object instead of initialize_from 2019-05-29 18:24:42 -04:00
Alex Rattray
0d465ce91c More reordering and hopefully-safe formatting changes 2019-05-29 18:16:29 -04:00
Alex Rattray
91cfc0f748 Deprecate Transfer#cancel_url 2019-05-29 12:55:24 -04:00
Alex Rattray
9a21c99966 Move object types map to its own file 2019-05-29 11:36:07 -04:00
Alex Rattray
eff920662e Some safe transformations from codegen 2019-05-29 11:34:16 -04:00
Olivier Bellone
4c95b992cf
Bump version to 4.18.1 2019-05-27 17:38:19 -07:00
mbianco-stripe
41538b3970 Order#pay without arguments (#789)
* Don't require params in order.pay

* Test for order#pay without arguments
2019-05-27 17:36:43 -07:00
Olivier Bellone
ec91de6849
Upgrade Rubocop and fix a bunch of issues (#786)
* Bump Rubocop to 0.57.2

* Style/StderrPuts: Use warn instead of .puts

* Style/ExpandPathArguments: Use expand_path('../test_helper', __dir__) instead of expand_path('../../test_helper', __FILE__)

* Style/Encoding: Unnecessary utf-8 encoding comment

* Style/StringLiterals: Prefer double-quoted strings

* Style/AccessModifierDeclarations

* Style/FormatStringToken: Prefer annotated tokens

* Naming/UncommunicativeMethodParamName

* Metrics/LineLength: set maximum line length to 100 characters

* Style/IfUnlessModifier: Favor modifier if usage when having a single-line body

* Style/ClassVars

* Metrics/LineLength: set maximum line length to 80 characters (default)

* Style/AccessModifierDeclarations: EnforcedStyle: inline
2019-05-24 10:43:42 -07:00
Olivier Bellone
7fa3585e82
Bump version to 4.18.0 2019-05-23 17:41:31 -07:00
Olivier Bellone
f68fb25b83
Add support for radar.early_fraud_warning resource (#783) 2019-05-23 17:40:54 -07:00
Olivier Bellone
b26d57c90e
Bump version to 4.17.0 2019-05-14 11:52:53 -07:00
remi-stripe
270e88b169 Add support for the Capability resource and APIs (#779) 2019-05-14 11:52:04 -07:00
Pavel Pravosud
793a61ccfb Apply safe transformations from current codegen (#777) 2019-05-08 16:09:53 -07:00
Pavel Pravosud
b13fc8465f Remove explicit Util.normalize_opts calls (#778) 2019-05-07 18:20:07 -07:00
Pavel Pravosud
cd05d363f8 More simplifying inheritance (#775) 2019-05-06 17:34:23 -07:00
Pavel Pravosud
14d6a4e6bf More method sorting for Topup class (#776) 2019-05-06 17:26:51 -07:00
Pavel Pravosud
044aa5286e Sort includes by method name for consistency (#773) 2019-05-06 13:15:58 -07:00
Pavel Pravosud
9832c5354f Simplify inheritance for nested classes (#769) 2019-05-06 11:19:53 -07:00
Remi Jannel
93deaef626 Bump version to 4.16.0 2019-04-24 14:26:18 -07:00
Remi Jannel
962538b149 Add support for TaxRate resource and APIs 2019-04-23 09:56:03 -07:00
Remi Jannel
b5b15f390e Bump version to 4.15.0 2019-04-22 16:42:48 -07:00
Remi Jannel
b5cd9e3682 Add support for TaxId resource and APIs 2019-04-19 10:13:57 -07:00
Remi Jannel
5416f020d8 Bump version to 4.14.0 2019-04-18 12:29:34 -07:00
remi-stripe
06498dbe14
Merge pull request #758 from stripe/remi-add-creditnote
Add support for CreditNote
2019-04-18 12:24:05 -07:00
Brandur
d915cd6284 Bump version to 4.13.0 2019-04-16 11:50:37 -07:00
Brandur
81b7cb3ca8 Relax constraints on objects that we'll accept as a file
When uploading a file, we previously made a check on whether it
supported both `#read` and `#path` before wrapping it in a
`Faraday::UploadIO` and sending it off. The second check on `#path`
isn't strictly necessary, and as reported in #761 can prevent objects
created by `open-uri` from being compatible with file upload.

Here we remove the check `#path` so that we just require that objects
support `#read`, and in addition error when an object is passed that's
not file-compatible and not a string. This should prevent users from
seeing the very confusing "Invalid hash" error in these situations.

Fixes #761.
2019-04-16 08:33:42 -07:00
Remi Jannel
0233deb5c6 Add support for CreditNote 2019-04-07 09:47:43 -07:00
Olivier Bellone
51d167aa29
Bump version to 4.12.0 2019-04-02 10:28:11 -07:00
Olivier Bellone
0790bb4154
Static methods for delete (#752)
New `.delete` class method on deletable API resources
2019-04-02 10:25:05 -07:00
Olivier Bellone
160028ada1
New custom_method DSL for defining custom API request methods as static methods (#754)
New `custom_method` DSL for defining custom API request methods as static methods
2019-04-02 10:06:40 -07:00
Olivier Bellone
bb25d09052 Bump version to 4.11.0 2019-03-26 09:06:55 -07:00
Olivier Bellone
6e95bf45f9 Add a global proxy configuration parameter 2019-03-25 18:34:12 -07:00