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

exposing card iin #286

Closed
wants to merge 4 commits into from
Closed

exposing card iin #286

wants to merge 4 commits into from

Conversation

bninja
Copy link
Contributor

@bninja bninja commented Mar 22, 2013

address #136

@bninja
Copy link
Contributor Author

bninja commented Mar 25, 2013

@mahmoudimus ready and waiting

@mahmoudimus
Copy link
Contributor

Will get to this when I can

@mahmoudimus
Copy link
Contributor

First issue I see here is that there's an endpoint called IIN that's a sub-resource of the card identifier. Without this endpoint having an identifier, I think this breaks the HATEOAS principle.

@bninja
Copy link
Contributor Author

bninja commented Mar 25, 2013

@mahmoudimus added the uri for that sub-resource here https://github.com/balanced/balanced-api/pull/286/files#L3R9

@mahmoudimus
Copy link
Contributor

@bninja - I understand that is an index operation, now a show operation. This is the first resource of its kind in our system, so it breaks our consistency.

For example, here's an example:

curl https://api.balancedpayments.com/

Our server responds:

{
  "first_uri": "/?limit=10&offset=0",
  "items": [
    {
      "uri": "/v1"
    }
  ],
  "previous_uri": null,
  "uri": "/?limit=10&offset=0",
  "limit": 10,
  "offset": 0,
  "total": 1,
  "next_uri": null,
  "last_uri": "/?limit=10&offset=0"
}

However, this pagination breaks if we do it on an ``iin_uri`. There's nothing identifying this resource. Essentially, it is not addressable and this breaks HATEOAS.

@quellhorst
Copy link

Why not include the IIN information when you retrieve a card?

@bninja
Copy link
Contributor Author

bninja commented Mar 28, 2013

@quellhorst i was thinking most wouldnt need it so i didn't bother inlining the subresource (client lazy fetches on .iin access).

@quellhorst
Copy link

@bninja makes sense, will keep things clean.

@mahmoudimus
Copy link
Contributor

We will not do this right now.

@mahmoudimus mahmoudimus closed this Apr 3, 2013
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

Successfully merging this pull request may close these issues.

None yet

3 participants