Amend

From API Documentation

Jump to: navigation, search

Amend() allows you to amend a subscription in a single call, and replaces the need to use create() with an Amendment object. See Amendment Use Cases for more information about using the various methods for creating Amendments.

Note: amend() is only available in versions 29.0+ of the API.

Syntax and Argument

You must pass an AmendRequest object to amend() call. The AmendRequest object is a wrapper that takes:

  • An Amendment object to be created
  • An AmendOptions object
  • A PreviewOptions object

Please see Amendment Use Cases for specific examples of the amend() call.

You can only pass a single amendment to the amend() call.

The AmendOptions allows you to specify billing options, such as whether to generate an invoice and process payments immediately upon the amendment being created.

The PreviewOptions allows to specify that the amendment is not to be created, but rather to display what the results of the Amendment, including new charges, will be.

You can call amend on an array of Amendment, but you can specify only a single amendment. AmendResult should be in the Response section of the amend() call.

Response

AmendResult