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

Use id for single positional arguments #611

Merged
merged 2 commits into from
May 7, 2019

Conversation

irace-stripe
Copy link

Use id for single resource method positional arguments, e.g.:

cancel: stripeMethod({
  method: 'POST',
  path: '{id}/cancel',
  urlParams: ['id'],
})

Instead of:

cancel: stripeMethod({
  method: 'POST',
  path: '{paymentIntentId}/cancel',
  urlParams: ['paymentIntentId'],
})

This PR does not:

  1. Modify argument names for methods with multiple positional arguments, e.g.
updateRefund: stripeMethod({
  method: 'POST',
  path: '/{chargeId}/refunds/{refundId}',
  urlParams: ['chargeId', 'refundId'],
}),
  1. Modify argument names in resource paths, e.g.
module.exports = StripeResource.extend({
  path: 'application_fees/{feeId}/refunds',
  includeBasic: ['create', 'list', 'retrieve', 'update'],
});

@stripe-ci stripe-ci assigned irace-stripe and unassigned ob-stripe May 7, 2019
@irace-stripe irace-stripe merged commit c88fc91 into v7.0.0 May 7, 2019
@irace-stripe irace-stripe deleted the irace-use-id-for-single-positional-arguments branch May 7, 2019 20:00
@rattrayalex-stripe rattrayalex-stripe mentioned this pull request May 7, 2019
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants