Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
distribution = "2201.8.6"
distribution = "2201.12.2"
org = "ballerinax"
name = "guidewire.insnow"
version = "0.1.0"
version = "0.2.0"
license = ["Apache-2.0"]
authors = ["Ballerina"]
keywords = ["Insurance", "Guidewire", "Cloud API"]
Expand All @@ -11,6 +11,3 @@ repository = "https://github.com/ballerina-platform/module-ballerinax-guidewire.

[build-options]
observabilityIncluded = false

[platform.java17]
graalvmCompatible = true
55 changes: 36 additions & 19 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.8.6"
distribution-version = "2201.12.2"

[[package]]
org = "ballerina"
name = "auth"
version = "2.10.0"
version = "2.14.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -22,7 +22,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "cache"
version = "3.7.1"
version = "3.10.0"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -33,24 +33,36 @@ dependencies = [
[[package]]
org = "ballerina"
name = "constraint"
version = "1.5.0"
version = "1.7.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "crypto"
version = "2.6.2"
version = "2.9.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
]

[[package]]
org = "ballerina"
name = "data.jsondata"
version = "1.1.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.object"}
]
modules = [
{org = "ballerina", packageName = "data.jsondata", moduleName = "data.jsondata"}
]

[[package]]
org = "ballerina"
name = "file"
version = "1.9.0"
version = "1.12.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -61,12 +73,13 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.10.12"
version = "2.14.0"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "data.jsondata"},
{org = "ballerina", name = "file"},
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -93,7 +106,7 @@ modules = [
[[package]]
org = "ballerina"
name = "io"
version = "1.6.0"
version = "1.8.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
Expand All @@ -107,10 +120,11 @@ version = "0.0.0"
[[package]]
org = "ballerina"
name = "jwt"
version = "2.10.0"
version = "2.15.0"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "lang.string"},
Expand Down Expand Up @@ -204,7 +218,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "log"
version = "2.9.0"
version = "2.12.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -218,17 +232,18 @@ modules = [
[[package]]
org = "ballerina"
name = "mime"
version = "2.9.0"
version = "2.12.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.int"}
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "log"}
]

[[package]]
org = "ballerina"
name = "oauth2"
version = "2.10.0"
version = "2.14.0"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
Expand All @@ -241,15 +256,15 @@ dependencies = [
[[package]]
org = "ballerina"
name = "observe"
version = "1.2.2"
version = "1.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "os"
version = "1.8.0"
version = "1.10.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -261,7 +276,7 @@ modules = [
[[package]]
org = "ballerina"
name = "task"
version = "2.5.0"
version = "2.7.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand All @@ -274,6 +289,7 @@ version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.array"},
{org = "ballerina", name = "lang.error"}
]
modules = [
Expand All @@ -283,15 +299,15 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.4.0"
version = "2.7.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "url"
version = "2.4.0"
version = "2.6.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand All @@ -302,8 +318,9 @@ modules = [
[[package]]
org = "ballerinax"
name = "guidewire.insnow"
version = "0.1.0"
version = "0.2.0"
dependencies = [
{org = "ballerina", name = "data.jsondata"},
{org = "ballerina", name = "http"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "os"},
Expand Down
10 changes: 5 additions & 5 deletions ballerina/tests/guidewire_insnow_mock_backend.bal
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ service / on ep0 {
return http:OK;
}

resource function get applications(string? applicationOrQuoteNumber, string? continuationId, string? createdSinceDate, string? customerId, boolean? includeClosed, boolean? includeDeleted, string? 'limit, string? optionalFields, string? policyId, string? providerId, boolean? recentlyViewed, string? status, string? transactionCd, string? transactionCdGroup, string? 'type) returns ListApplication {
resource function get applications(string? applicationOrQuoteNumber, string? continuationId, string? createdSinceDate, string? customerId, boolean? includeClosed, boolean? includeDeleted, string? 'limit, string? optionalFields, string? policyId, string? providerId, boolean? recentlyViewed, string? status, string? transactionCd, string? transactionCdGroup, string? 'type) returns json {
return {
applicationListItems: [
{
Expand Down Expand Up @@ -300,7 +300,7 @@ service / on ep0 {
return http:CREATED;
}

resource function get applications/[string systemId]/documents() returns ListDocument {
resource function get applications/[string systemId]/documents() returns json {
return {
documentListItems: [
{
Expand Down Expand Up @@ -357,7 +357,7 @@ service / on ep0 {
return payload;
}

resource function get claims/[string systemId]/documents() returns ListDocument {
resource function get claims/[string systemId]/documents() returns json {
return {
documentListItems: [
{
Expand Down Expand Up @@ -418,7 +418,7 @@ service / on ep0 {
return http:CREATED;
}

resource function get policies(string? continuationId, string? createdSinceDate, string? customerId, string? expiredDateAfter, boolean? includePriorTerms, string? 'limit, string? optionalFields, string? policyNumber, string? providerRef, boolean? recentlyViewed, string? status) returns ListPolicy {
resource function get policies(string? continuationId, string? createdSinceDate, string? customerId, string? expiredDateAfter, boolean? includePriorTerms, string? 'limit, string? optionalFields, string? policyNumber, string? providerRef, boolean? recentlyViewed, string? status) returns json {
return {
continuationId: "cont123456789",
policyListItems: [
Expand Down Expand Up @@ -547,7 +547,7 @@ service / on ep0 {
};
}

resource function get policies/[string systemId](string? asOfDate) returns PolicyDetails {
resource function get policies/[string systemId](string? asOfDate) returns json {
return {
_links: [
{
Expand Down
4 changes: 2 additions & 2 deletions ballerina/tests/test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ function testListApplications() returns error? {
}
function testCreateApplication() returns error? {
Quote quote = {
_links: [
links: [
{
href: "/api/resource/123",
rel: "self"
}
],
_revision: "1",
revision: "1",
applicationInfo: {
correctedByTransactionNumber: 12345,
correctionOfTransactionNumber: 12344,
Expand Down
5 changes: 1 addition & 4 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
distribution = "2201.8.6"
distribution = "2201.12.2"
org = "ballerinax"
name = "guidewire.insnow"
version = "@toml.version@"
Expand All @@ -11,6 +11,3 @@ repository = "https://github.com/ballerina-platform/module-ballerinax-guidewire.

[build-options]
observabilityIncluded = false

[platform.java17]
graalvmCompatible = true
16 changes: 10 additions & 6 deletions examples/online-application-portal/service.bal
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ service ApplicationPortal /portal on new http:Listener(9090) {
# + limit - The maximum number of results to return
# + return - List of applications or an error
resource function get applications(string? customerId = (), string? continuationId = (), string? 'limit = ()) returns insnow:ListApplication|error {
return self.insuranceNow->/applications(
customerId = customerId,
continuationId = continuationId,
'limit = 'limit
);
insnow:GetQuotesQueries queries = {
customerId,
continuationId,
'limit
};
return self.insuranceNow->/applications(queries = queries);
}

# Starts a new QuickQuote or Quote.
Expand All @@ -52,7 +53,10 @@ service ApplicationPortal /portal on new http:Listener(9090) {
# + requestedTypeCd - The type of the quote, QuickQuote or Quote
# + return - An error or nil
resource function post applications(insnow:Quote quote, string? requestedTypeCd = ()) returns error? {
_ = check self.insuranceNow->/applications.post(quote, requestedTypeCd);
insnow:CreateQuoteQueries queries = {
requestedTypeCd
};
_ = check self.insuranceNow->/applications.post(quote, queries = queries);
}

# Adds an attachment to a quote or application.
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.caching=true
group=io.ballerina.lib
version=0.1.1-SNAPSHOT
version=0.2.0-SNAPSHOT

checkstylePluginVersion=10.12.0
spotbugsPluginVersion=5.0.14
Expand All @@ -9,5 +9,5 @@ downloadPluginVersion=5.4.0
releasePluginVersion=2.8.0
testngVersion=7.6.1
eclipseLsp4jVersion=0.12.0
ballerinaGradlePluginVersion=2.2.4
ballerinaGradlePluginVersion=3.0.0
ballerinaLangVersion=2201.12.2
Loading