diff --git a/.github/workflows/build-with-bal-test-graalvm.yml b/.github/workflows/build-with-bal-test-graalvm.yml index 4f69d4d..374d64f 100644 --- a/.github/workflows/build-with-bal-test-graalvm.yml +++ b/.github/workflows/build-with-bal-test-graalvm.yml @@ -13,5 +13,5 @@ jobs: call_stdlib_workflow: name: Run StdLib Workflow if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }} - uses: ballerina-platform/ballerina-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@main + uses: ballerina-platform/ballerina-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@2201.10.x secrets: inherit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f0c24f..606e654 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: call_workflow: name: Run Connector Build Workflow if: ${{ github.repository_owner == 'ballerina-platform' }} - uses: ballerina-platform/ballerina-library/.github/workflows/build-connector-template.yml@main + uses: ballerina-platform/ballerina-library/.github/workflows/build-connector-template.yml@2201.10.x secrets: inherit with: repo-name: module-ballerinax-hubspot.crm.object.leads diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index 24942a3..f1839f3 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -8,7 +8,7 @@ jobs: call_workflow: name: Run Daily Build Workflow if: ${{ github.repository_owner == 'ballerina-platform' }} - uses: ballerina-platform/ballerina-library/.github/workflows/daily-build-connector-template.yml@main + uses: ballerina-platform/ballerina-library/.github/workflows/daily-build-connector-template.yml@2201.10.x secrets: inherit with: repo-name: module-ballerinax-hubspot.crm.object.leads diff --git a/.github/workflows/dev-stg-release.yml b/.github/workflows/dev-stg-release.yml index b85c07c..eb03f9a 100644 --- a/.github/workflows/dev-stg-release.yml +++ b/.github/workflows/dev-stg-release.yml @@ -15,7 +15,7 @@ jobs: call_workflow: name: Run Dev\Stage Central Publish Workflow if: ${{ github.repository_owner == 'ballerina-platform' }} - uses: ballerina-platform/ballerina-library/.github/workflows/dev-stage-central-publish-connector-template.yml@main + uses: ballerina-platform/ballerina-library/.github/workflows/dev-stage-central-publish-connector-template.yml@2201.10.x secrets: inherit with: environment: ${{ github.event.inputs.environment }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4d40baf..ceb22fd 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -10,7 +10,7 @@ jobs: call_workflow: name: Run PR Build Workflow if: ${{ github.repository_owner == 'ballerina-platform' }} - uses: ballerina-platform/ballerina-library/.github/workflows/pr-build-connector-template.yml@main + uses: ballerina-platform/ballerina-library/.github/workflows/pr-build-connector-template.yml@2201.10.x secrets: inherit with: additional-test-flags: ${{ github.event.pull_request.head.repo.full_name != github.repository && '-x test' || ''}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a442e2..467d701 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: call_workflow: name: Run Release Workflow if: ${{ github.repository_owner == 'ballerina-platform' }} - uses: ballerina-platform/ballerina-library/.github/workflows/release-package-connector-template.yml@main + uses: ballerina-platform/ballerina-library/.github/workflows/release-package-connector-template.yml@2201.10.x secrets: inherit with: package-name: hubspot.crm.object.leads diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml index c02c8ff..c29d8f2 100644 --- a/.github/workflows/trivy-scan.yml +++ b/.github/workflows/trivy-scan.yml @@ -9,5 +9,5 @@ jobs: call_workflow: name: Run Trivy Scan Workflow if: ${{ github.repository_owner == 'ballerina-platform' }} - uses: ballerina-platform/ballerina-library/.github/workflows/trivy-scan-template.yml@main + uses: ballerina-platform/ballerina-library/.github/workflows/trivy-scan-template.yml@2201.10.x secrets: inherit diff --git a/README.md b/README.md index 86b1cf9..67afcfa 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [HubSpot](https://www.hubspot.com) is an AI-powered customer relationship management (CRM) platform. -The `ballerinax/hubspot.crm.object.leads` package offers APIs to connect and interact with the [HubSpot CRM Leads API](https://developers.hubspot.com/docs/reference/api/crm/objects/leads) endpoints, specifically based on the [HubSpot REST API v3](https://developers.hubspot.com/docs/reference/api/overview). +The `ballerinax/hubspot.crm.obj.leads` package offers APIs to connect and interact with the [HubSpot CRM Leads API](https://developers.hubspot.com/docs/reference/api/crm/objects/leads) endpoints, specifically based on the [HubSpot REST API v3](https://developers.hubspot.com/docs/reference/api/overview). ## Setup guide @@ -135,37 +135,37 @@ To use the `HubSpot CRM Leads Connector` in your Ballerina application, update t Import the `hubspot.crm.obj.leads` module and `oauth2` module. ```ballerina -import ballerinax/hubspot.crm.obj.leads as leads; +import ballerinax/hubspot.crm.obj.leads as hsleads; import ballerina/oauth2; ``` ### Step 2: Instantiate a new connector -1. Create a `Config.toml` file and, configure the obtained credentials in the above steps as follows: - - ```toml - clientId = "" - clientSecret = "" - refreshToken = "" - ``` - -2. Instantiate a `hsLeads:ConnectionConfig` with the obtained credentials and initialize the connector with it. +1. Instantiate a `hsLeads:ConnectionConfig` with the obtained credentials and initialize the connector with it. ```ballerina configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; - final leads:ConnectionConfig auth = { + final hsleads:ConnectionConfig auth = { clientId, clientSecret, refreshToken, credentialBearer: oauth2:POST_BODY_BEARER }; - final leads:Client hsLeads = check new ({auth}); + final hsleads:Client hsLeads = check new ({auth}); ``` +2. Create a `Config.toml` file and, configure the obtained credentials in the above steps as follows: + + ```toml + clientId = "" + clientSecret = "" + refreshToken = "" + ``` + ### Step 3: Invoke the connector operation Now, utilize the available connector operations. A sample usecase is shown below. @@ -174,7 +174,7 @@ Now, utilize the available connector operations. A sample usecase is shown below ```ballerina public function main() returns error? { - hsLeads:SimplePublicObjectInputForCreate payload = { + hsleads:SimplePublicObjectInputForCreate payload = { { "associations": [ { @@ -194,7 +194,7 @@ public function main() returns error? { } } } - hsLeads:SimplePublicObject createLead = check hsLeads->/.post(payload); + hsleads:SimplePublicObject hsLeads = check hsLeads->/.post(payload); } ``` @@ -299,7 +299,7 @@ All the contributors are encouraged to read the [Ballerina Code of Conduct](http ## Useful links -* For more information go to the [`hubspot.crm.object.leads` package](https://central.ballerina.io/ballerinax/hubspot.crm.object.leads/latest). +* For more information go to the [`hubspot.crm.obj.leads` package](https://central.ballerina.io/ballerinax/hubspot.crm.obj.leads/latest). * For example demonstrations of the usage, go to [Ballerina By Examples](https://ballerina.io/learn/by-example/). * Chat live with us via our [Discord server](https://discord.gg/ballerinalang). * Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag. diff --git a/ballerina/Module.md b/ballerina/Module.md index ac8d5ca..73dfa54 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -127,37 +127,37 @@ To use the `HubSpot CRM Leads Connector` in your Ballerina application, update t Import the `hubspot.crm.obj.leads` module and `oauth2` module. ```ballerina -import ballerinax/hubspot.crm.obj.leads as leads; +import ballerinax/hubspot.crm.obj.leads as hsleads; import ballerina/oauth2; ``` ### Step 2: Instantiate a new connector -1. Create a `Config.toml` file and, configure the obtained credentials in the above steps as follows: - - ```toml - clientId = "" - clientSecret = "" - refreshToken = "" - ``` - -2. Instantiate a `hsLeads:ConnectionConfig` with the obtained credentials and initialize the connector with it. +1. Instantiate a `hsLeads:ConnectionConfig` with the obtained credentials and initialize the connector with it. ```ballerina configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; - final leads:ConnectionConfig auth = { + final hsleads:ConnectionConfig auth = { clientId, clientSecret, refreshToken, credentialBearer: oauth2:POST_BODY_BEARER }; - final leads:Client hsLeads = check new ({auth}); + final hsleads:Client hsLeads = check new ({auth}); ``` +2. Create a `Config.toml` file and, configure the obtained credentials in the above steps as follows: + + ```toml + clientId = "" + clientSecret = "" + refreshToken = "" + ``` + ### Step 3: Invoke the connector operation Now, utilize the available connector operations. A sample usecase is shown below. @@ -166,7 +166,7 @@ Now, utilize the available connector operations. A sample usecase is shown below ```ballerina public function main() returns error? { - hsLeads:SimplePublicObjectInputForCreate payload = { + hsleads:SimplePublicObjectInputForCreate payload = { { "associations": [ { @@ -186,7 +186,7 @@ public function main() returns error? { } } } - hsLeads:SimplePublicObject createLead = check hsLeads->/.post(payload); + hsleads:SimplePublicObject hsLeads = check hsLeads->/.post(payload); } ``` diff --git a/ballerina/Package.md b/ballerina/Package.md index ac8d5ca..73dfa54 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -127,37 +127,37 @@ To use the `HubSpot CRM Leads Connector` in your Ballerina application, update t Import the `hubspot.crm.obj.leads` module and `oauth2` module. ```ballerina -import ballerinax/hubspot.crm.obj.leads as leads; +import ballerinax/hubspot.crm.obj.leads as hsleads; import ballerina/oauth2; ``` ### Step 2: Instantiate a new connector -1. Create a `Config.toml` file and, configure the obtained credentials in the above steps as follows: - - ```toml - clientId = "" - clientSecret = "" - refreshToken = "" - ``` - -2. Instantiate a `hsLeads:ConnectionConfig` with the obtained credentials and initialize the connector with it. +1. Instantiate a `hsLeads:ConnectionConfig` with the obtained credentials and initialize the connector with it. ```ballerina configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; - final leads:ConnectionConfig auth = { + final hsleads:ConnectionConfig auth = { clientId, clientSecret, refreshToken, credentialBearer: oauth2:POST_BODY_BEARER }; - final leads:Client hsLeads = check new ({auth}); + final hsleads:Client hsLeads = check new ({auth}); ``` +2. Create a `Config.toml` file and, configure the obtained credentials in the above steps as follows: + + ```toml + clientId = "" + clientSecret = "" + refreshToken = "" + ``` + ### Step 3: Invoke the connector operation Now, utilize the available connector operations. A sample usecase is shown below. @@ -166,7 +166,7 @@ Now, utilize the available connector operations. A sample usecase is shown below ```ballerina public function main() returns error? { - hsLeads:SimplePublicObjectInputForCreate payload = { + hsleads:SimplePublicObjectInputForCreate payload = { { "associations": [ { @@ -186,7 +186,7 @@ public function main() returns error? { } } } - hsLeads:SimplePublicObject createLead = check hsLeads->/.post(payload); + hsleads:SimplePublicObject hsLeads = check hsLeads->/.post(payload); } ``` diff --git a/ballerina/build.gradle b/ballerina/build.gradle index e6c262b..f4dce44 100644 --- a/ballerina/build.gradle +++ b/ballerina/build.gradle @@ -24,7 +24,7 @@ plugins { description = 'Ballerina HubSpot CRM Leads Connector - Ballerina' -def packageName = "hubspot.crm.object.leads" +def packageName = "hubspot.crm.obj.leads" def packageOrg = "ballerinax" def tomlVersion = stripBallerinaExtensionVersion("${project.version}") def ballerinaTomlFilePlaceHolder = new File("${project.rootDir}/build-config/resources/Ballerina.toml") diff --git a/build.gradle b/build.gradle index 36c041d..09f1ad9 100644 --- a/build.gradle +++ b/build.gradle @@ -58,7 +58,7 @@ allprojects { def moduleVersion = project.version.replace("-SNAPSHOT", "") task build { - dependsOn(':hubspot.crm.object.leads-ballerina:build') + dependsOn(':hubspot.crm.obj.leads-ballerina:build') } release { diff --git a/settings.gradle b/settings.gradle index ad3ef83..8332beb 100644 --- a/settings.gradle +++ b/settings.gradle @@ -29,9 +29,9 @@ plugins { rootProject.name = 'module-ballerinax-hubspot.crm.object.leads' -include ':hubspot.crm.object.leads-ballerina' +include ':hubspot.crm.obj.leads-ballerina' -project(':hubspot.crm.object.leads-ballerina').projectDir = file("ballerina") +project(':hubspot.crm.obj.leads-ballerina').projectDir = file("ballerina") gradleEnterprise { buildScan {