-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not iterate through line items for an upcoming invoice #646
Comments
brandur-stripe
pushed a commit
that referenced
this issue
May 7, 2018
If specifying both query parameters in a path/URL down to Faraday (e.g., `/v1/invoices/upcoming?coupon=25OFF`) _and_ query parameters in a hash (e.g., `{ customer: "cus_123" }`), it will silently overwrite the ones in the path with the ones in the hash. This can cause problems where some critical parameters are discarded and causes an error, as seen in issue #646. This patch modifies `#execute_request` so that before going out to Faraday we check whether the incoming path has query parameters. If it does, we decode them and add them to our `query_params` hash so that all parameters from either place are preserved. Fixes #646.
brandur-stripe
pushed a commit
that referenced
this issue
May 7, 2018
If specifying both query parameters in a path/URL down to Faraday (e.g., `/v1/invoices/upcoming?coupon=25OFF`) _and_ query parameters in a hash (e.g., `{ customer: "cus_123" }`), it will silently overwrite the ones in the path with the ones in the hash. This can cause problems where some critical parameters are discarded and causes an error, as seen in issue #646. This patch modifies `#execute_request` so that before going out to Faraday we check whether the incoming path has query parameters. If it does, we decode them and add them to our `query_params` hash so that all parameters from either place are preserved. Fixes #646.
brandur-stripe
pushed a commit
that referenced
this issue
May 7, 2018
If specifying both query parameters in a path/URL down to Faraday (e.g., `/v1/invoices/upcoming?coupon=25OFF`) _and_ query parameters in a hash (e.g., `{ customer: "cus_123" }`), it will silently overwrite the ones in the path with the ones in the hash. This can cause problems where some critical parameters are discarded and causes an error, as seen in issue #646. This patch modifies `#execute_request` so that before going out to Faraday we check whether the incoming path has query parameters. If it does, we decode them and add them to our `query_params` hash so that all parameters from either place are preserved. Fixes #646.
brandur-stripe
pushed a commit
that referenced
this issue
May 7, 2018
If specifying both query parameters in a path/URL down to Faraday (e.g., `/v1/invoices/upcoming?coupon=25OFF`) _and_ query parameters in a hash (e.g., `{ customer: "cus_123" }`), it will silently overwrite the ones in the path with the ones in the hash. This can cause problems where some critical parameters are discarded and causes an error, as seen in issue #646. This patch modifies `#execute_request` so that before going out to Faraday we check whether the incoming path has query parameters. If it does, we decode them and add them to our `query_params` hash so that all parameters from either place are preserved. Fixes #646.
brandur-stripe
pushed a commit
that referenced
this issue
May 7, 2018
If specifying both query parameters in a path/URL down to Faraday (e.g., `/v1/invoices/upcoming?coupon=25OFF`) _and_ query parameters in a hash (e.g., `{ customer: "cus_123" }`), it will silently overwrite the ones in the path with the ones in the hash. This can cause problems where some critical parameters are discarded and causes an error, as seen in issue #646. This patch modifies `#execute_request` so that before going out to Faraday we check whether the incoming path has query parameters. If it does, we decode them and add them to our `query_params` hash so that all parameters from either place are preserved. Fixes #646.
brandur-stripe
pushed a commit
that referenced
this issue
May 7, 2018
If specifying both query parameters in a path/URL down to Faraday (e.g., `/v1/invoices/upcoming?coupon=25OFF`) _and_ query parameters in a hash (e.g., `{ customer: "cus_123" }`), it will silently overwrite the ones in the path with the ones in the hash. This can cause problems where some critical parameters are discarded and causes an error, as seen in issue #646. This patch modifies `#execute_request` so that before going out to Faraday we check whether the incoming path has query parameters. If it does, we decode them and add them to our `query_params` hash so that all parameters from either place are preserved. Fixes #646.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
NOTE: This issue does NOT occur when iterating through line items for past invoices. It ONLY occurs on
upcoming_invoice
.Ruby: 2.3.3p222
Stripe: 3.13.0
Code:
The call to:
triggers the error.
Backtrace:
The text was updated successfully, but these errors were encountered: