Skip to content
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

Generated Hubspot CRM object products connector for Ballerina #2

Merged
merged 42 commits into from
Jan 16, 2025

Conversation

DinithiLiyanage
Copy link
Contributor

The Hubspot CRM object products connector was generated using the OpenAPI spec and the package.md file was updated.

Checklist

  • Created OpenAPI.json file using OpenAPI spec.
  • Generated the code for the connector.
  • Created the package.md file.
  • Added snapshots to the package.md file.

@CLAassistant
Copy link

CLAassistant commented Dec 24, 2024

CLA assistant check
All committers have signed the CLA.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
docs/spec/sanitations.md Outdated Show resolved Hide resolved
docs/spec/sanitations.md Outdated Show resolved Hide resolved
@ayeshLK
Copy link
Member

ayeshLK commented Jan 9, 2025

@DinithiLiyanage please sign the contributor license agreement.

configurable string serviceUrl = ?;
final string final_serviceUrl = isLiveServer ? serviceUrl : "http://localhost:9091";

Client hubSpotProducts = test:mock(Client);
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done:8074f65

ballerina/utils.bal Outdated Show resolved Hide resolved
Comment on lines 30 to 50
string newId = "";
string[] batchIds = [];
SimplePublicObjectId[] inputs = [];

@test:BeforeSuite
function initClient() returns Client|error {
if isLiveServer {
OAuth2RefreshTokenGrantConfig auth = {
clientId: clientId,
clientSecret: clientSecret,
refreshToken: refreshToken,
credentialBearer: oauth2:POST_BODY_BEARER
};
return check new ({auth}, serviceUrl);
}
return check new ({
auth: {
token: "test-token"
}
}, serviceUrl);
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
string newId = "";
string[] batchIds = [];
SimplePublicObjectId[] inputs = [];
@test:BeforeSuite
function initClient() returns Client|error {
if isLiveServer {
OAuth2RefreshTokenGrantConfig auth = {
clientId: clientId,
clientSecret: clientSecret,
refreshToken: refreshToken,
credentialBearer: oauth2:POST_BODY_BEARER
};
return check new ({auth}, serviceUrl);
}
return check new ({
auth: {
token: "test-token"
}
}, serviceUrl);
}
function initClient() returns Client|error {
if isLiveServer {
OAuth2RefreshTokenGrantConfig auth = {
clientId: clientId,
clientSecret: clientSecret,
refreshToken: refreshToken,
credentialBearer: oauth2:POST_BODY_BEARER
};
return check new ({auth}, serviceUrl);
}
return check new ({
auth: {
token: "test-token"
}
}, serviceUrl);
}
string newId = "";
string[] batchIds = [];
SimplePublicObjectId[] inputs = [];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done:45005d9

README.md Outdated

```ballerina
import ballerina/oauth2;
mport ballerinax/hubspot.crm.obj.products as hsproducts;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
mport ballerinax/hubspot.crm.obj.products as hsproducts;
import ballerinax/hubspot.crm.obj.products as hsproducts;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done:3c1fff3


final Client hubSpotProducts = check initClient();

@test:BeforeSuite
Copy link
Member

Choose a reason for hiding this comment

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

No need of the annotation.

Suggested change
@test:BeforeSuite

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done:0514e52

ayeshLK
ayeshLK previously approved these changes Jan 14, 2025
Copy link
Member

@ayeshLK ayeshLK left a comment

Choose a reason for hiding this comment

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

LGTM

@ayeshLK ayeshLK merged commit ad8eb65 into ballerina-platform:main Jan 16, 2025
2 checks passed
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.

3 participants