-
Notifications
You must be signed in to change notification settings - Fork 86
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
Conversation
|
||
A Stripe customer can have many subscriptions. | ||
|
||
## Stripe Customer [/stripe-customers] |
There was a problem hiding this comment.
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}] |
There was a problem hiding this comment.
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 | ||
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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--> ``?
There was a problem hiding this 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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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] | ||
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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).
👍 just rebase and squash! |
Added Endpoints and Data structures for Stripe Customer.
References
Closes #389
Progress on: #245