stripe-perl
stripe-perl copied to clipboard
create new() objects before passing to _post()
in some methods we _post()
passed arguments directly:
https://github.com/lukec/stripe-perl/blob/646861d829729d6d2c649ae1b426618d50f84914/lib/Net/Stripe.pm#L481-L492
but in doing so, we are unable to take advantage of any magic that happens during objectification: https://github.com/lukec/stripe-perl/blob/646861d829729d6d2c649ae1b426618d50f84914/lib/Net/Stripe/Resource.pm#L22-L26
and therefore have to duplicate it in the method: https://github.com/lukec/stripe-perl/blob/646861d829729d6d2c649ae1b426618d50f84914/lib/Net/Stripe.pm#L475-L477
where feasible, i think that we should use a pattern similar to post_subscription()
:
https://github.com/lukec/stripe-perl/blob/646861d829729d6d2c649ae1b426618d50f84914/lib/Net/Stripe.pm#L781-L799