Skip to content

0.41 Massive update

Latest
Compare
Choose a tag to compare
@sherrardb sherrardb released this 12 Mar 19:58
· 4 commits to master since this release

#201 get_invoiceitems() not passing customer id

  • pass customer id in get_invoiceitems()
  • add failing unit tests

#199 add PaymentMethod and PaymentIntent

  • added PaymentMethod object, methods and unit tests
  • added PaymentIntent object, methods and unit tests

fix oversight in _get_all()

  • _get_all() throws an error attempting to get the next/prev page if the first page of results is empty
  • ensure that we only process the looping code if there are results in the first page

#197 re-add customer to Invoice

  • re-add customer attribute accidentally removed during 30a702b
  • update unit tests to detect this regression

#130 allow API pinning for Net::Stripe object

  • allow users to specify the API version when creating a new Net::Stripe object, per https://stripe.com/docs/api/versioning#versioning
  • add api_version argument and method for Net::Stripe object
  • add force_api_version argument and method for Net::Stripe object

#191 add Product

#192 add _get_all()

  • allow for retrieval of all objects of a given type without local pagination code
  • add unit tests for related utility methods
  • update existing list-retrieval methods

#195 update Invoice

#194 update post_subscription()

  • add 'cancel_at_period_end' to post_subscription()
  • add 'cancel_at_period_end' to form_fields() for Subscription object
  • update unit tests to use 'cancel_at_period_end' for pending cancelations

#193 add balance for Customer

update t/local.t

  • remove temporary naming for static encoding tests, per #189
  • add hashref tests for convert_to_form_fields()
  • label object tests for convert_to_form_fields()

#188 add source for Charge and Customer

  • add Source object, methods and unit tests
  • add backward-compatible source attributes and parameters for Charge and Customer
  • update unit tests to pass 'source' instead of 'card' where the calling form is not germane to the test

#175 remove manual serialization in _get_collections() and _get_with_args()

  • update convert_to_form_fields() to handle objects
  • use convert_to_form_fields() for processing passed data and URI for encoding, elminating _get_collections() and _get_with_args()
  • remove manual serialization in _delete()
  • add unit tests for code path to be deprecated later

move static unit tests to t/local.t

#185 add metadata for Coupon

  • clean up and augment unit tests

#184 add metadata for Plan

  • clean up and augment unit tests

#182 add unit tests for TypeConstraints

#181 default_card not updating in post_customer()

  • add default_card to form_fields()
  • update attribute to 'rw'

#180 remove unnecessary token object creation

  • pass the test token directly where there is no further introspection of $token
  • remove cases where introspection of $token is not germane to the current unit test
  • leave cases where we are expressly testing passing of a token object or where $token is needed for other reasons

#179 capture partial charge

  • update capture_charge() to allow for partial capture
  • add refunds attribute to charge object
  • add unit tests for partial capture

#178 add unit tests for delete_card()

#177 remove duplicate post_charge() tests

#176 update Token attributes

  • add type attribute and add test
  • add client_ip attribute
  • fix typo in token retrieval test

#164 remove card hash handling code in post_card()

  • fix oversight from 5ad870c
  • this conditional is not needed since card no longer accepts HashRef

#161 deprecate direct handling of PANs:

  • Stripe strongly discourages direct handling of PANs (primary account numbers), even in test mode
  • accounts created after October 2017 return an invalid_request_error when passing PANs
  • removed the methods and parameter constraints that allow direct handling of PANs and their associated unit tests
  • updated the unit tests to use test tokens instead of card numbers

fix typo in Net::Stripe::Resource::form_fields_for_hashref()

  • correct incomplete transition of method name after copying code
  • add trivial unit test as a placeholder

create release notes sub-sections in README.pod

#160 consolidate logic for serializing form fields

#159 update unit tests for Charge->status:

update dist.ini:

#153 fix post_customer() arguments:

  • updated Kavorka signature to remove non-functional or illegitimate argument types
  • removed Net::Stripe::Card and disallowed card id for card, as neither form is valid conceptually #138
  • always create a Net::Stripe::Customer object before _post() to take advantage of argument coercion during objectification #148
  • include omitted arguments in object creation
  • clean up and centralize Net::Stripe:Token coercion code, since we always need the token id
  • added unit tests to exercise all allowed argument forms for customer creation and customer update #139

#151 cleanup post_card():

  • remove invalid argument types from post_card(), per #138
  • remove dead code paths from post_card() and make conditional structure more explicit, per discussion in #133
  • add unit tests for all calling forms, per #139

Update README.pod

  • remove the hyperlink formatting markers from our custom Moose TypeConstraints
  • add capture_charge()
  • update POD oversights from fd8e79e

#150 allow updates to existing cards:

  • add update_card() method to allow updates to card address, expiration, metadata, etc for existing customer cards
  • update convert_to_form_fields() to handle customer card metadata
  • add unit tests to confirm card metdata update
  • correct errant 'rw' on metadata attribute in Net::Stripe::Card

#147 fix post_charge() arguments

  • updated Kavorka signature to remove non-functional argument types
  • removed Net::Stripe::Customer and HashRef for customer, as neither form was being serialized correctly for passing to the API call
  • removed Net::Stripe::Card and Net::Stripe::Token for card, as neither form was being serialized correctly for passing to the API call
  • added in-method validation and unit tests for the different combinations of the allowed argument types
  • updated and reorganized failing unit tests

#143 _defined_arguments() is unnecessary

  • only called in post_customer() for hashref argument to _post()
  • _post() calls convert_to_form_fields() for hashrefs
  • convert_to_form_fields() skips hashref keys with undefined values

#142 remove redundant Token tests

  • tests on $no_amount became redundant when the Token tests were reworked
    Merge pull request from sherrardb/coerce-old-lists

#131 make Net::Stripe compatible with API back to 2011-06-21

  • coerce old-style lists and collections into Net::Stripe::List format

#132 update statement_description to statement_descriptor

  • add failing test to detect ignored attribute statement_descriptor in Net::Stripe::Charge
  • add missing statement_descriptor attribute in Net::Stripe::Charge
  • update statement_description to statement_descriptor Net::Stripe::Plan
  • API docs https://stripe.com/docs/upgrades#2014-12-17 indicate that this change is backwards-compatible

#141 add RELEASE NOTES section to POD

#140 fix POD oversights

  • add encoding declaration to POD to fix unsafe character warning
  • add missing section for Discount methods in weaver.ini
  • remove trailing period from copyright_holder in dist.ini, since it is automatically added by dzil when regenerating README.pod

#122 create abstract methods for handling boolean form fields

#123 encode Net::Stripe::Charge->capture using abstract methods

#124 encode Net::Stripe::Invoice->closed using abstract methods

#125 encode Net::Stripe::Subscription->prorate using abstract methods