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 Blueprint Documentation for Stripe Customer #401

Merged
merged 4 commits into from
Oct 27, 2016

Conversation

amyschools
Copy link
Contributor

@amyschools amyschools commented Oct 27, 2016

Added Endpoints and Data structures for Stripe Customer.

References

Closes #389

Progress on: #245

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 95.082% when pulling ca5a23c on 389-apiblueprint-stripecustomer into 98b3bbd on develop.


A Stripe customer can have many subscriptions.

## Stripe Customer [/stripe-customers]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one should be "Stripe Customers"


+ Attributes (Forbidden Response)

## Stripe Customers [/stripe-customers/{id}]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one should be "Stripe Customer"

## Stripe Customer (object)
+ data(Stripe Customer Resource)
+ include JSON API Version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this one is necessary. I don't see where it is being used.

## Stripe Customer Resource Identifier (object)
+ id: `1` (string, required)
+ type: `stripe-customer`

## Stripe Customer Attributes (object)
+ created: `1477586543` (string)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want this to be the date/time format like the other ones.

+ currency: `usd` (string)
+ delinquent: `true` (boolean) - Whether or not the latest charge for the customer’s latest invoice has failed
+ email: `johndoe@email.com` (string)
+ id-from-stripe: `cus_9SBK9vXBkZEdfe` (string) - This is the ID that Stripe assigned the customer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does id-from-stripe need to be in ticks--> ``?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 95.082% when pulling b2b293a on 389-apiblueprint-stripecustomer into 98b3bbd on develop.

Copy link
Contributor

@joshsmith joshsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good @amyschools! Minor points of feedback here.

@mackenziehicks great job on that review, by the way. Really thorough. 👍

@@ -2612,11 +2608,11 @@ This endpoint allows you to check whether a username is valid (by running a vali
+ type: `stripe-customer`

## Stripe Customer Attributes (object)
+ created: `1477586543` (string)
+ created: `016-07-08T03:03:51.967Z` (string) - A timestamp, indicating when the customer was created by Stripe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This timestamp looks like it got cut off.


This resource identifies a customer created on the [Stripe API](https://stripe.com/docs/api#customers).

A Stripe customer can have many subscriptions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would explain a tad more about what we mean by subscriptions, just in the sense that they're a donation to a project.

## Stripe Customers [/stripe-customers]

### List all Stripe customers [GET]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe make this a filter rather than list. See #396 for further discussion around this.

+ created: `016-07-08T03:03:51.967Z` (string) - A timestamp, indicating when the customer was created by Stripe
+ currency: `usd` (string)
+ delinquent: `true` (boolean) - Whether or not the latest charge for the customer’s latest invoice has failed.
+ email: `johndoe@email.com` (string)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What email is this? Think could use a description.

+ currency: `usd` (string)
+ delinquent: `true` (boolean) - Whether or not the latest charge for the customer’s latest invoice has failed.
+ email: `johndoe@email.com` (string)
+ `id-from-stripe`: `cus_9SBK9vXBkZEdfe` (string) - The ID that Stripe assigned the customer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing created-at and inserted-at.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It already has created, should it be created-at instead or should it have both inserted-at and created-at? Created at being when it was created by stripe and inserted being when it was received by the code corps database?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I meant inserted-at and updated-at. In Phoenix the timestamps() yields you those fields.


## Stripe Customers Response (object)
+ data(array[Stripe Customer Resource])
+ include JSON API Version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your alpha ordering is a little off here. I think Attributes => Resource => Resource Identifier => Response(s).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 95.082% when pulling d11438b on 389-apiblueprint-stripecustomer into 98b3bbd on develop.

@joshsmith
Copy link
Contributor

👍 just rebase and squash!

@amyschools amyschools merged commit d166136 into develop Oct 27, 2016
@amyschools amyschools deleted the 389-apiblueprint-stripecustomer branch October 27, 2016 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants