Skip to content

Comments

Add Manage Premium Subscription Example and Update Examples Section#9

Merged
ThisaruGuruge merged 2 commits intoballerina-platform:mainfrom
RNViththagan:example-update
Jul 1, 2025
Merged

Add Manage Premium Subscription Example and Update Examples Section#9
ThisaruGuruge merged 2 commits intoballerina-platform:mainfrom
RNViththagan:example-update

Conversation

@RNViththagan
Copy link
Member

Purpose

This PR introduces a new manage-premium-subscription example for the ballerinax/paypal.subscriptions connector, showcasing a real-world SaaS scenario where a subscription plan is created, a customer is enrolled, and subscription details are retrieved. It also updates the examples section in .github/README.md to include a link to the new example, enhancing the connector's documentation.

Examples

  • Added examples/manage-premium-subscription/ directory with:
    • main.bal: Implements logic to create a "Premium Membership" plan ($1 trial, $15/month), subscribe a customer (Jane Smith), and retrieve subscription details (ID, plan ID, status, subscriber name, start time).
    • manage-premium-subscription.md: Documents the scenario, prerequisites, configuration, and expected output for the example.
    • Config.toml: Configures PayPal credentials (clientId, clientSecret) and productId.
  • Updated .github/README.md to include the manage-premium-subscription example as the third item in the examples list, linking to its directory.

Checklist

  • Updated the changelog
  • Checked native-image compatibility

@codecov
Copy link

codecov bot commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.43%. Comparing base (2701f14) to head (8a06f4c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #9   +/-   ##
=======================================
  Coverage   68.43%   68.43%           
=======================================
  Files           3        3           
  Lines         320      320           
  Branches       57       57           
=======================================
  Hits          219      219           
  Misses        101      101           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RNViththagan RNViththagan marked this pull request as ready for review July 1, 2025 05:37
@ThisaruGuruge ThisaruGuruge merged commit 4440ec9 into ballerina-platform:main Jul 1, 2025
4 checks passed
@RNViththagan RNViththagan deleted the example-update branch July 1, 2025 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants