Skip to content

Commit 5a1657f

Browse files
chandrasekaranragothamanMaxrovr
authored andcommitted
Added - Support for OSP OCI integration service: Fraud changes
1 parent 6b7c09a commit 5a1657f

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed

internal/integrationtest/osp_gateway_subscription_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ func TestOspGatewaySubscriptionResource_basic(t *testing.T) {
8181
resource.TestCheckResourceAttrSet(singularDatasourceName, "currency_code"),
8282
resource.TestCheckResourceAttrSet(singularDatasourceName, "gsi_org_code"),
8383
resource.TestCheckResourceAttrSet(singularDatasourceName, "id"),
84+
resource.TestCheckResourceAttrSet(singularDatasourceName, "is_corporate_conversion_allowed"),
8485
resource.TestCheckResourceAttrSet(singularDatasourceName, "is_intent_to_pay"),
8586
resource.TestCheckResourceAttrSet(singularDatasourceName, "language_code"),
8687
resource.TestCheckResourceAttrSet(singularDatasourceName, "organization_id"),

internal/service/osp_gateway/osp_gateway_subscription_data_source.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ func (s *OspGatewaySubscriptionDataSourceCrud) SetData() error {
104104
s.D.Set("gsi_org_code", *s.Res.GsiOrgCode)
105105
}
106106

107+
if s.Res.IsCorporateConversionAllowed != nil {
108+
s.D.Set("is_corporate_conversion_allowed", *s.Res.IsCorporateConversionAllowed)
109+
}
110+
107111
if s.Res.IsIntentToPay != nil {
108112
s.D.Set("is_intent_to_pay", *s.Res.IsIntentToPay)
109113
}

internal/service/osp_gateway/osp_gateway_subscription_resource.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ func OspGatewaySubscriptionResource() *schema.Resource {
230230
Optional: true,
231231
Computed: true,
232232
},
233+
"is_corporate_conversion_allowed": {
234+
Type: schema.TypeBool,
235+
Optional: true,
236+
Computed: true,
237+
},
233238
"is_intent_to_pay": {
234239
Type: schema.TypeBool,
235240
Optional: true,
@@ -592,6 +597,10 @@ func OspGatewaySubscriptionResource() *schema.Resource {
592597
Type: schema.TypeString,
593598
Computed: true,
594599
},
600+
"is_corporate_conversion_allowed": {
601+
Type: schema.TypeBool,
602+
Computed: true,
603+
},
595604
"is_intent_to_pay": {
596605
Type: schema.TypeBool,
597606
Computed: true,
@@ -962,6 +971,10 @@ func (s *OspGatewaySubscriptionResourceCrud) SetData() error {
962971
s.D.Set("gsi_org_code", *s.Res.GsiOrgCode)
963972
}
964973

974+
if s.Res.IsCorporateConversionAllowed != nil {
975+
s.D.Set("is_corporate_conversion_allowed", *s.Res.IsCorporateConversionAllowed)
976+
}
977+
965978
if s.Res.IsIntentToPay != nil {
966979
s.D.Set("is_intent_to_pay", *s.Res.IsIntentToPay)
967980
}
@@ -1502,6 +1515,11 @@ func (s *OspGatewaySubscriptionResourceCrud) mapToSubscription(fieldKeyFormat st
15021515
result.Id = &tmp
15031516
}
15041517

1518+
if isCorporateConversionAllowed, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_corporate_conversion_allowed")); ok {
1519+
tmp := isCorporateConversionAllowed.(bool)
1520+
result.IsCorporateConversionAllowed = &tmp
1521+
}
1522+
15051523
if isIntentToPay, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_intent_to_pay")); ok {
15061524
tmp := isIntentToPay.(bool)
15071525
result.IsIntentToPay = &tmp
@@ -1666,6 +1684,10 @@ func SubscriptionToMap(obj *oci_osp_gateway.Subscription) map[string]interface{}
16661684
result["id"] = string(*obj.Id)
16671685
}
16681686

1687+
if obj.IsCorporateConversionAllowed != nil {
1688+
result["is_corporate_conversion_allowed"] = bool(*obj.IsCorporateConversionAllowed)
1689+
}
1690+
16691691
if obj.IsIntentToPay != nil {
16701692
result["is_intent_to_pay"] = bool(*obj.IsIntentToPay)
16711693
}
@@ -1750,6 +1772,10 @@ func SubscriptionSummaryToMap(obj oci_osp_gateway.SubscriptionSummary) map[strin
17501772
result["id"] = string(*obj.Id)
17511773
}
17521774

1775+
if obj.IsCorporateConversionAllowed != nil {
1776+
result["is_corporate_conversion_allowed"] = bool(*obj.IsCorporateConversionAllowed)
1777+
}
1778+
17531779
if obj.IsIntentToPay != nil {
17541780
result["is_intent_to_pay"] = bool(*obj.IsIntentToPay)
17551781
}

website/docs/d/osp_gateway_subscription.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ The following attributes are exported:
6868
* `currency_code` - Currency code
6969
* `gsi_org_code` - GSI Subscription external code.
7070
* `id` - Subscription id identifier (OCID).
71+
* `is_corporate_conversion_allowed` - Corporate conversion allowed status
7172
* `is_intent_to_pay` - Payment intension.
7273
* `language_code` - Language short code (en, de, hu, etc)
7374
* `organization_id` - GSI organization external identifier.

website/docs/d/osp_gateway_subscriptions.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ The following attributes are exported:
7272
* `currency_code` - Currency code
7373
* `gsi_org_code` - GSI Subscription external code.
7474
* `id` - Subscription id identifier (OCID).
75+
* `is_corporate_conversion_allowed` - Corporate conversion allowed status
7576
* `is_intent_to_pay` - Payment intension.
7677
* `language_code` - Language short code (en, de, hu, etc)
7778
* `organization_id` - GSI organization external identifier.

website/docs/r/osp_gateway_subscription.html.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ resource "oci_osp_gateway_subscription" "test_subscription" {
6060
currency_code = var.subscription_subscription_currency_code
6161
gsi_org_code = var.subscription_subscription_gsi_org_code
6262
id = var.subscription_subscription_id
63+
is_corporate_conversion_allowed = var.subscription_subscription_is_corporate_conversion_allowed
6364
is_intent_to_pay = var.subscription_subscription_is_intent_to_pay
6465
language_code = var.subscription_subscription_language_code
6566
organization_id = oci_osp_gateway_organization.test_organization.id
@@ -151,6 +152,7 @@ The following arguments are supported:
151152
* `currency_code` - (Optional) (Updatable) Currency code
152153
* `gsi_org_code` - (Optional) (Updatable) GSI Subscription external code.
153154
* `id` - (Optional) (Updatable) Subscription id identifier (OCID).
155+
* `is_corporate_conversion_allowed` - (Optional) (Updatable) Corporate conversion allowed status
154156
* `is_intent_to_pay` - (Optional) (Updatable) Payment intension.
155157
* `language_code` - (Optional) (Updatable) Language short code (en, de, hu, etc)
156158
* `organization_id` - (Optional) (Updatable) GSI organization external identifier.
@@ -227,6 +229,7 @@ The following attributes are exported:
227229
* `currency_code` - Currency code
228230
* `gsi_org_code` - GSI Subscription external code.
229231
* `id` - Subscription id identifier (OCID).
232+
* `is_corporate_conversion_allowed` - Corporate conversion allowed status
230233
* `is_intent_to_pay` - Payment intension.
231234
* `language_code` - Language short code (en, de, hu, etc)
232235
* `organization_id` - GSI organization external identifier.

0 commit comments

Comments
 (0)