instacrate / instacrate-api

1 stars 0 forks source link

Shipping/Stripe Endpoint return data for particular id #58

Closed jasgan closed 7 years ago

jasgan commented 7 years ago

For http://api.instacrate.me/customers?shipping=true & http://api.instacrate.me/customers?stripe=true, can I append a shipping_id / stripe_id to the URL and get information only for that particular shipping_id / stripe_id?

hhanesand commented 7 years ago

For the stripe id, do you mean you want to get a user's stripe information based on their stripe id, or do you want to be able to get one payment method at a time?

jasgan commented 7 years ago

Scratch my previous response lol...could I get the credit card information for a particular credit card (e.g. expiration date, last 4 digits, etc.) based on the credit card id?

hhanesand commented 7 years ago

ok when I push changes to the server you can do the following

to get one card : /customers?type[]=stripe&card=card_1231kjnkjn213(stripetoken) to get all stripe information /customers?type[]=stripe to get all shipping info /customers?type[]=shipping to get stripe and shipping /customers?type[]=shipping&type[]=stripe

what we're basically doing here is telling the framework that type is an array by putting [] after it

jasgan commented 7 years ago

Great! Thanks!