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

Versioned Controllers #11

Open
calebkleveter opened this issue Mar 6, 2019 · 0 comments
Open

Versioned Controllers #11

calebkleveter opened this issue Mar 6, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@calebkleveter
Copy link
Contributor

PayPal has started rolling out version 2 of their REST API, so we should handle both version 1 and version 2. The current structure doesn't allow for this, so we basically need to redesign how we handle API resources.

In the past, we have done something like this:

let payments = try request.make(Payments.self)
let authorization = payments.get(authorization: id)

Now we will do something like this:

let authorizations = try request.make(PayPal.API.self).v2.payments.authorizations
let authorization = authorizations.details(for: id)
@calebkleveter calebkleveter added the enhancement New feature or request label Mar 6, 2019
@calebkleveter calebkleveter self-assigned this Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant