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 remaining types, endpoints, and params #266

Closed
joshsmith opened this issue Nov 13, 2017 · 16 comments
Closed

Add remaining types, endpoints, and params #266

joshsmith opened this issue Nov 13, 2017 · 16 comments

Comments

@joshsmith
Copy link
Contributor

joshsmith commented Nov 13, 2017

For each of the following resources, we need to:

  • Clean up the types.
    • Look through the Stripe openapi v3 spec line-by-line and ensure the types match our types, including | nil for all nullable: true fields.
  • Add the endpoints.
    • Write tests for each endpoint, if they're currently missing.
    • Implement the endpoints.
    • Add from_json macros
  • Clean up the params.
    • For each endpoint we'll want to use optional(:key) => val for the optional params and :key => val for the required params.

The types we use are:

  • Stripe.id | Stripe.Entity.id for any expandable id
    • where Entity is the given module
    • marked in v3 spec with x-expansionResources referencing their schema
    • can be Stripe.id | Stripe.Entity.id | nil when nullable
  • String.t for most strings
  • a String.t for any "enum" value
    • e.g. Stripe.Charge has risk_level: String.t
    • include | nil when nullable
  • pos_integer when Stripe indicates value is > 0
  • non_neg_integer when Stripe indicates value is >= 0
  • boolean for all boolean values
  • %{} for empty map values
  • [] for empty list values
  • Stripe.List.of(Stripe.Entity.t) for lists of Stripe objects
    • where Entity is the given module
    • marked in v3 spec typically with data: items:
  • map for undefined maps
  • metadata becomes %{ optional(String.t) => String.t }
  • id is Stripe.id
  • object is String.t

CORE RESOURCES

  • Balance
    • clean up types
    • add endpoints
    • clean up params
  • Balance transaction
    • clean up types
    • add endpoints
    • clean up params
  • Charges
    • clean up types
    • add endpoints
    • clean up params
  • Customers
    • clean up types
    • add endpoints
    • clean up params
  • Disputes
    • clean up types
    • add endpoints
    • clean up params
  • Events
    • clean up types
    • add endpoints
    • clean up params
  • File Uploads
    • clean up types
    • add endpoints
    • clean up params
  • Payouts
    • clean up types
    • add endpoints
    • clean up params
  • Refunds
    • clean up types
    • add endpoints
    • clean up params
  • Tokens
    • clean up types
    • add endpoints
    • clean up params

PAYMENT METHODS

  • Bank Accounts
    • clean up types
    • add endpoints
    • clean up params
  • Cards
    • clean up types
    • add endpoints
    • clean up params
  • Sources
    • clean up types
    • add endpoints
    • clean up params

SUBSCRIPTIONS

  • Coupons
  • Discounts
    • clean up types
    • add endpoints
    • clean up params
  • Invoices
    • clean up types
    • add endpoints
    • clean up params
  • Invoice Items
    • clean up types
    • add endpoints
    • clean up params
  • Invoice line items
    • clean up types
    • add endpoints
    • clean up params
  • Plans
    • clean up types
    • add endpoints
    • clean up params
  • Product
    • clean up types
    • add endpoints
    • clean up params
  • Subscriptions
    • clean up types
    • add endpoints
    • clean up params
  • Subscription Items
    • clean up types
    • add endpoints
    • clean up params

CONNECT

  • Account
    • clean up types
    • add endpoints
    • clean up params
  • Application Fee Refunds
    • clean up types
    • add endpoints
    • clean up params
  • Application Fees
    • clean up types
    • add endpoints
    • clean up params
  • Country Specs
    • clean up types
    • add endpoints
    • clean up params
  • External Accounts
    • clean up types
    • add endpoints
    • clean up params
  • Recipients
    • clean up types
    • add endpoints
    • clean up params
  • Transfers
    • clean up types
    • add endpoints
    • clean up params
  • Transfer Reversals
    • clean up types
    • add endpoints
    • clean up params

RADAR

  • Reviews
    • clean up types
    • add endpoints
    • clean up params

RELAY

  • Orders
    • clean up types
    • add endpoints
    • clean up params
  • Order Items
    • clean up types
    • add endpoints
    • clean up params
  • Products
    • clean up types
    • add endpoints
    • clean up params
  • Returns
    • clean up types
    • add endpoints
    • clean up params
  • SKUs
    • clean up types
    • add endpoints
    • clean up params
@joshsmith
Copy link
Contributor Author

Working on Event types now.

@joshsmith
Copy link
Contributor Author

Working on Token types now.

@joshsmith
Copy link
Contributor Author

joshsmith commented Nov 18, 2017

Working on BankAccount, Card and Sources types next as part of #273.

@joshsmith
Copy link
Contributor Author

joshsmith commented Nov 18, 2017

Working on Invoice Plan and Subscription types next.

@joshsmith joshsmith added this to the 2.0.0-beta.1 milestone Nov 18, 2017
@joshsmith
Copy link
Contributor Author

I'm going to work on Account endpoints now.

@joshsmith
Copy link
Contributor Author

Going to work on Charge endpoints right now.

@joshsmith
Copy link
Contributor Author

Working on the rest of Customer now.

@joshsmith
Copy link
Contributor Author

Moving onto Account.

@joshsmith
Copy link
Contributor Author

Just did Token. Now doing Event.

@joshsmith
Copy link
Contributor Author

Working on Card now.

@snewcomer
Copy link
Collaborator

Working on Plan now.

@snewcomer
Copy link
Collaborator

snewcomer commented Nov 21, 2017

Tackling FileUpload

@snewcomer
Copy link
Collaborator

Tackling Payouts

@snewcomer
Copy link
Collaborator

Hey everybody! All of the Resources have been updated to the current spec! 2.0.0-beta is really close. However, we need to ensure we have parity with the 2.0.0-alpha branch. I'm not sure I'm the best person to ask since I use the beta branch in my projects.

Does anybody have any concerns on making the 2.0.0-beta branch the final 2.0 for stripity_stripe? The only commit on the alpha branch was ephemeral key creation since we branched off of master, which was added here. Otherwise, the beta branch is MUCH improved over both master and alpha....

@begedin
Copy link
Contributor

begedin commented May 24, 2018

As I mentioned in #344 I support releasing the beta as full 2.0.0 and going from there. We can keep the alpha branch around in case we've missed anything for the sake of parity, but beta should be the template going forward.

@begedin
Copy link
Contributor

begedin commented Jun 5, 2018

With the release of 2.0 and all items here being checked off, we can finally close this!

@begedin begedin closed this as completed Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants