Skip to content

v4 API: Sequences #77

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

Merged
merged 6 commits into from
Mar 22, 2024
Merged

v4 API: Sequences #77

merged 6 commits into from
Mar 22, 2024

Conversation

n7studios
Copy link
Contributor

Summary

Adds support for endpoints in the sequences section of the v4 API.

Testing

  • testGetSequencesPagination: Test that get_sequences() returns the expected data when pagination parameters and per_page limits are specified.
  • testGetSequenceSubscriptionsWithBouncedSubscriberState: Test that get_sequence_subscriptions() returns the expected data when a valid Sequence ID is specified and the subscription status is cancelled.
  • testGetSequenceSubscriptionsWithAddedAfterParam: Test that get_sequence_subscriptions() returns the expected data when a valid Sequence ID is specified and the added_after parameter is used.
  • testGetSequenceSubscriptionsWithAddedBeforeParam: Test that get_sequence_subscriptions() returns the expected data when a valid Sequence ID is specified and the added_before parameter is used.
  • testGetSequenceSubscriptionsWithCreatedAfterParam: Test that get_sequence_subscriptions() returns the expected data when a valid Sequence ID is specified and the created_after parameter is used.
  • testGetSequenceSubscriptionsWithCreatedBeforeParam: Test that get_sequence_subscriptions() returns the expected data when a valid Sequence ID is specified and the created_before parameter is used.
  • testGetSequenceSubscriptionsPagination: Test that get_sequence_subscriptions() returns the expected data when a valid Sequence ID is specified and pagination parameters and per_page limits are specified.
  • testGetSequenceSubscriptionsWithInvalidSequenceID: Test that get_sequence_subscriptions() throws a ClientException when an invalid Sequence ID is specified.
  • testGetSequenceSubscriptionsWithInvalidSubscriberState: Test that get_sequence_subscriptions() throws a ClientException when an invalid subscriber state is specified.
  • testGetSequenceSubscriptionsWithInvalidPagination: Test that get_sequence_subscriptions() throws a ClientException when invalid pagination parameters are specified.
  • testAddSubscriberToSequenceByID: Test that add_subscriber_to_sequence_by_subscriber_id() returns the expected data.
  • testAddSubscriberToSequenceByIDWithInvalidSequenceID: Test that add_subscriber_to_sequence_by_subscriber_id() throws a ClientException when an invalid Sequence ID is specified.
  • testAddSubscriberToSequenceByIDWithInvalidSubscriberID: Test that add_subscriber_to_sequence_by_subscriber_id() throws a ClientException when an invalid email address is specified.

Removed Tests:

  • testAddSubscriberToSequenceWithFirstName
  • testAddSubscriberToSequenceWithCustomFields
  • testAddSubscriberToSequenceWithTagID

v4 API has no concept of adding a new subscriber to a sequence with data; a separate PR will be added to add support for the new Create a subscriber endpoint (https://developers.convertkit.com/v4.html#create-a-subscriber), which supports this.

Checklist

@n7studios n7studios added this to the 2.0 milestone Mar 21, 2024
@n7studios n7studios self-assigned this Mar 21, 2024
@n7studios n7studios requested review from a team, noelherrick and jenessawhite and removed request for a team March 21, 2024 10:38
@n7studios n7studios marked this pull request as ready for review March 21, 2024 10:39
Copy link

@noelherrick noelherrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, same comment around existing vs. new subscriber applies here.

@n7studios n7studios mentioned this pull request Mar 21, 2024
5 tasks
@n7studios
Copy link
Contributor Author

Looks good, same comment around existing vs. new subscriber applies here.

This PR exposes the response object, allowing the consumer to inspect the HTTP status code.

@n7studios n7studios merged commit 37a29f5 into v4-api-oauth Mar 22, 2024
@n7studios n7studios deleted the v4-api-sequences branch June 26, 2024 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants