Skip to content
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

Add API to create a file upload #154

Closed
joshsmith opened this issue Dec 12, 2016 · 10 comments
Closed

Add API to create a file upload #154

joshsmith opened this issue Dec 12, 2016 · 10 comments
Milestone

Comments

@joshsmith
Copy link
Contributor

We need to write an interface to file uploads. We can just do create for now:

API docs: https://stripe.com/docs/api/curl#create_file_upload

@snewcomer
Copy link
Collaborator

I can take a wack at this.

@snewcomer
Copy link
Collaborator

snewcomer@26e0197

So what are we using for testing. Still trying to figure that out?

@joshsmith
Copy link
Contributor Author

@snewcomer can follow progress on code-corps/stripity_stripe_testing#1 but @DavidAntaramian is trying to have some time free up on this one.

For now, just test manually and push.

@joshsmith
Copy link
Contributor Author

We won't be using VCR or anything like that. The interface has changed some for 2.0, too.

@snewcomer
Copy link
Collaborator

WIP
snewcomer@58622f6

One last thing is to get the header right with multipart/form-data

@joshsmith
Copy link
Contributor Author

@snewcomer awesome! What's the reason for the header?

@snewcomer
Copy link
Collaborator

@joshsmith looks like the request type needs a Content-Type of multipart/form-data

https://stripe.com/docs/api#create_file_upload

I think this line (https://github.com/code-corps/stripity_stripe/blob/2.0/lib/stripe.ex#L229) needs to also have the option of merging in a different Content-Type multipart/form-data as well. Lmk if that is not the case.

@joshsmith
Copy link
Contributor Author

@snewcomer you're right, in which case it might make sense to have a different kind of request here for the create. See how there's a different oauth_request? Think there should be one for multipart form data.

@joshsmith
Copy link
Contributor Author

@snewcomer this especially makes sense because the base URL differs, too: https://uploads.stripe.com instead of the normal API URL.

@joshsmith
Copy link
Contributor Author

Closed by #160.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants