balanced / balanced-api

Balanced API specification.
220 stars 72 forks source link

Spec dispute documents #571

Open remear opened 10 years ago

remear commented 10 years ago

Spec-ing out dispute documents prior to implementation.

@steveklabnik Could you look over this first attempt.

steveklabnik commented 10 years ago

Seems reasonable to me!

tarunc commented 10 years ago

Maybe we should add file_size to dispute document?

One more thing-- should file_type have "other" in the enum if it is not within one of those categories? Or should we even limit it because there are lot of file types that fall under the category of document/image (e.g. docx, odt, txt, rtf, png, tif...)

remear commented 10 years ago

I thought about this earlier today but I omitted it because I couldn't think of a reason we really needed to have it. It certainly doesn't really hurt anything to provide though.

On Apr 16, 2014, at 10:29 PM, Tarun Chaudhry notifications@github.com wrote:

Maybe we should add file_size?

— Reply to this email directly or view it on GitHub.

mjallday commented 10 years ago

providing a file_size attribute would mean that we could display the size of the file in the UI without actually downloading the file.

e.g. file_name.pdf 1.2MB

i think that is a good idea personally.

remear commented 10 years ago

@tarunc Presently we're restricting file types to only: pdf, doc, jpg

I'm going to clarify with @andrewnossiter about the doc vs docx requirement. As deduced from prior conversations, the processors only allow these 3 document types so no other file_type.

mahmoudimus commented 10 years ago

This looks gr8! Great job @remear

remear commented 10 years ago

Added file_size and changed file_type to mime_type with proposed allowed mime types.

remear commented 10 years ago

@balanced/engineers Any other adjustments?

remear commented 10 years ago

Dispute should have a boolean dispute_documentation_submitted field to signify if documents have been submitted to the processor. Since documentation may only be submitted one time, this will provide a simple check.

ping @balanced/engineers Thoughts?

mahmoudimus commented 10 years ago

Would probably have more context, disputed_documentation_submitted_at

remear commented 10 years ago

Yes. That's better.

mahmoudimus commented 10 years ago

Should we create a github team called "spec-patrol" instead of engineers so it's not as noisy?

mjallday commented 10 years ago

disputed_documentation_submitted_at -> documentation_submitted_at. unless the documentation has been disputed.

fangpenlin commented 10 years ago

@mahmoudimus @mjallday I didn't notice we had this spec for dispute document uploading, it looks like this is the spec for the API living in balanced service. But for now, justitia is an independent service. The json schema of justitia can be found here:

https://github.com/balanced/justitia/tree/master/tests/fixtures/schemas

So, should we mount corresponding URL endpoints in balanced API to justitia.balancedpayments.com? And should I modify justitia to make it works like this spec described?

mjallday commented 10 years ago

that's a good question @victorlin

@mahmoudimus how do you envision api and disputes services interacting?

is this disputes service mounted under api.balancedpayments.com/some-endpoint or does it run as a standalone service at disputes.balancedpayments.com?

the spec specifies a relative path for the dispute document - https://github.com/balanced/balanced-api/pull/571/files#diff-d8ae36f8a33d67242bf4cc1510101631R21 - i think we should tweak the pull-request and make those uris absolute instead.

kyungmin commented 9 years ago

ping @mahmoudimus

how do you envision api and disputes services interacting?

What else needs to be done to complete the API spec?