Skip to content

Commit 9668676

Browse files
sagarp337NagendraNigade
authored andcommitted
Auto-generated seed code for DEXREQ-3103
1 parent 3282e43 commit 9668676

10 files changed

+61
-49
lines changed

internal/integrationtest/usage_proxy_subscription_product_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ func TestUsageProxySubscriptionProductResource_basic(t *testing.T) {
7777
resource.TestCheckResourceAttrSet(singularDatasourceName, "subscription_id"),
7878
resource.TestCheckResourceAttrSet(singularDatasourceName, "tenancy_id"),
7979
resource.TestCheckResourceAttr(singularDatasourceName, "usage_period_key", "1890"),
80-
81-
resource.TestCheckResourceAttr(singularDatasourceName, "items.#", "5"),
8280
),
8381
},
8482
})

internal/service/usage_proxy/usage_proxy_subscription_reward_data_source.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ func UsageProxySubscriptionRewardDataSource() *schema.Resource {
101101
Type: schema.TypeString,
102102
Computed: true,
103103
},
104+
"redemption_code": {
105+
Type: schema.TypeString,
106+
Computed: true,
107+
},
104108
"rewards_rate": {
105109
Type: schema.TypeFloat,
106110
Computed: true,

internal/service/usage_proxy/usage_proxy_subscription_rewards_data_source.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ func UsageProxySubscriptionRewardsDataSource() *schema.Resource {
116116
Type: schema.TypeString,
117117
Computed: true,
118118
},
119+
"redemption_code": {
120+
Type: schema.TypeString,
121+
Computed: true,
122+
},
119123
"rewards_rate": {
120124
Type: schema.TypeFloat,
121125
Computed: true,
@@ -290,6 +294,10 @@ func RewardDetailsToMap(obj *oci_usage_proxy.RewardDetails) map[string]interface
290294
result["currency"] = string(*obj.Currency)
291295
}
292296

297+
if obj.RedemptionCode != nil {
298+
result["redemption_code"] = string(*obj.RedemptionCode)
299+
}
300+
293301
if obj.RewardsRate != nil {
294302
result["rewards_rate"] = float64(*obj.RewardsRate)
295303
}

website/docs/d/usage_proxy_subscription_product.html.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_usage_proxy_subscription_product
1111
This data source provides details about a specific Subscription Product resource in Oracle Cloud Infrastructure Usage Proxy service.
1212

13-
This API provides usage period specific product and its usage details.
13+
Provides product information that is specific to a reward usage period and its usage details.
1414

1515

1616
## Example Usage
@@ -32,7 +32,7 @@ data "oci_usage_proxy_subscription_product" "test_subscription_product" {
3232
The following arguments are supported:
3333

3434
* `producttype` - (Optional) The field to specify the type of product.
35-
* `subscription_id` - (Required) The subscriptionId for which rewards information is requested for.
35+
* `subscription_id` - (Required) The subscription ID for which rewards information is requested for.
3636
* `tenancy_id` - (Required) The OCID of the tenancy.
3737
* `usage_period_key` - (Required) The SPM Identifier for the usage period.
3838

@@ -43,8 +43,8 @@ The following attributes are exported:
4343

4444
* `items` - The list of product rewards summaries.
4545
* `earned_rewards` - The earned rewards for the product.
46-
* `is_eligible_to_earn_rewards` - The boolean flag to tell if the product is eligible for earning rewards.
47-
* `product_name` - The ratecard product Name.
48-
* `product_number` - The ratecard product number.
49-
* `usage_amount` - The ratecard product usage amount.
46+
* `is_eligible_to_earn_rewards` - The boolean parameter to indicate if the product is eligible to earn rewards.
47+
* `product_name` - The rate card product name.
48+
* `product_number` - The rate card product number.
49+
* `usage_amount` - The rate card product usage amount.
5050

website/docs/d/usage_proxy_subscription_products.html.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_usage_proxy_subscription_products
1111
This data source provides the list of Subscription Products in Oracle Cloud Infrastructure Usage Proxy service.
1212

13-
This API provides usage period specific product and its usage details.
13+
Provides product information that is specific to a reward usage period and its usage details.
1414

1515

1616
## Example Usage
@@ -32,7 +32,7 @@ data "oci_usage_proxy_subscription_products" "test_subscription_products" {
3232
The following arguments are supported:
3333

3434
* `producttype` - (Optional) The field to specify the type of product.
35-
* `subscription_id` - (Required) The subscriptionId for which rewards information is requested for.
35+
* `subscription_id` - (Required) The subscription ID for which rewards information is requested for.
3636
* `tenancy_id` - (Required) The OCID of the tenancy.
3737
* `usage_period_key` - (Required) The SPM Identifier for the usage period.
3838

@@ -49,8 +49,8 @@ The following attributes are exported:
4949

5050
* `items` - The list of product rewards summaries.
5151
* `earned_rewards` - The earned rewards for the product.
52-
* `is_eligible_to_earn_rewards` - The boolean flag to tell if the product is eligible for earning rewards.
53-
* `product_name` - The ratecard product Name.
54-
* `product_number` - The ratecard product number.
55-
* `usage_amount` - The ratecard product usage amount.
52+
* `is_eligible_to_earn_rewards` - The boolean parameter to indicate if the product is eligible to earn rewards.
53+
* `product_name` - The rate card product name.
54+
* `product_number` - The rate card product number.
55+
* `usage_amount` - The rate card product usage amount.
5656

website/docs/d/usage_proxy_subscription_redeemable_user.html.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_usage_proxy_subscription_redeemable_user
1111
This data source provides details about a specific Subscription Redeemable User resource in Oracle Cloud Infrastructure Usage Proxy service.
1212

13-
Provides emailids of redeemable users for the given subscriptionId
13+
Provides the email IDs of users that can redeem rewards for the given subscription ID.
1414

1515

1616
## Example Usage
@@ -27,14 +27,14 @@ data "oci_usage_proxy_subscription_redeemable_user" "test_subscription_redeemabl
2727

2828
The following arguments are supported:
2929

30-
* `subscription_id` - (Required) The subscriptionId for which rewards information is requested for.
30+
* `subscription_id` - (Required) The subscription ID for which rewards information is requested for.
3131
* `tenancy_id` - (Required) The OCID of the tenancy.
3232

3333

3434
## Attributes Reference
3535

3636
The following attributes are exported:
3737

38-
* `items` - The list of redeemable users email Ids.
39-
* `email_id` - The email Id of Redeemable User.
38+
* `items` - The list of user email IDs that can redeem rewards.
39+
* `email_id` - The email ID of a user that can redeem rewards.
4040

website/docs/d/usage_proxy_subscription_redeemable_users.html.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_usage_proxy_subscription_redeemable_users
1111
This data source provides the list of Subscription Redeemable Users in Oracle Cloud Infrastructure Usage Proxy service.
1212

13-
Provides emailids of redeemable users for the given subscriptionId
13+
Provides the email IDs of users that can redeem rewards for the given subscription ID.
1414

1515

1616
## Example Usage
@@ -27,7 +27,7 @@ data "oci_usage_proxy_subscription_redeemable_users" "test_subscription_redeemab
2727

2828
The following arguments are supported:
2929

30-
* `subscription_id` - (Required) The subscriptionId for which rewards information is requested for.
30+
* `subscription_id` - (Required) The subscription ID for which rewards information is requested for.
3131
* `tenancy_id` - (Required) The OCID of the tenancy.
3232

3333

@@ -41,6 +41,6 @@ The following attributes are exported:
4141

4242
The following attributes are exported:
4343

44-
* `items` - The list of redeemable users email Ids.
45-
* `email_id` - The email Id of Redeemable User.
44+
* `items` - The list of user email IDs that can redeem rewards.
45+
* `email_id` - The email ID of a user that can redeem rewards.
4646

website/docs/d/usage_proxy_subscription_reward.html.markdown

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_usage_proxy_subscription_reward
1111
This data source provides details about a specific Subscription Reward resource in Oracle Cloud Infrastructure Usage Proxy service.
1212

13-
This API returns list of rewards for a subscription Id
13+
Returns the list of rewards for a subscription ID.
1414

1515

1616
## Example Usage
@@ -27,7 +27,7 @@ data "oci_usage_proxy_subscription_reward" "test_subscription_reward" {
2727

2828
The following arguments are supported:
2929

30-
* `subscription_id` - (Required) The subscriptionId for which rewards information is requested for.
30+
* `subscription_id` - (Required) The subscription ID for which rewards information is requested for.
3131
* `tenancy_id` - (Required) The OCID of the tenancy.
3232

3333

@@ -39,19 +39,20 @@ The following attributes are exported:
3939
* `available_rewards` - The number of rewards available for a specific usage period.
4040
* `earned_rewards` - The number of rewards earned for the specific usage period.
4141
* `eligible_usage_amount` - The eligible usage amount for the usage period.
42-
* `ineligible_usage_amount` - The in eligible usage amount for the usage period.
43-
* `is_manual` - The boolean flag to tell if the available rewards are posted manually or not.
42+
* `ineligible_usage_amount` - The ineligible usage amount for the usage period.
43+
* `is_manual` - The boolean parameter to indicate whether or not the available rewards are manually posted.
4444
* `redeemed_rewards` - The number of rewards redeemed for a specific month.
45-
* `time_rewards_earned` - The date and time on which rewards are accrued.
46-
* `time_rewards_expired` - The date and time on which rewards are expired.
45+
* `time_rewards_earned` - The date and time when rewards accrue.
46+
* `time_rewards_expired` - The date and time when rewards expire.
4747
* `time_usage_ended` - The end date and time for the usage period.
4848
* `time_usage_started` - The start date and time for the usage period.
4949
* `usage_amount` - The usage amount for the usage period.
50-
* `usage_period_key` - The id for the usage period.
51-
* `summary` - The overrall reward summary of the monthly summary rewards.
50+
* `usage_period_key` - The usage period ID.
51+
* `summary` - The overall monthly reward summary.
5252
* `currency` - The currency unit for the reward amount.
53+
* `redemption_code` - The redemption code used in the billing center during the reward redemption process
5354
* `rewards_rate` - The current Rewards percentage in decimal format.
54-
* `subscription_id` - The entitlement id from MQS and it is same as subcription id.
55+
* `subscription_id` - The entitlement ID from MQS, which is the same as the subcription ID.
5556
* `tenancy_id` - The OCID of the target tenancy.
56-
* `total_rewards_available` - The total number of available rewards for a given subscription Id.
57+
* `total_rewards_available` - The total number of available rewards for a given subscription ID.
5758

website/docs/d/usage_proxy_subscription_rewards.html.markdown

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_usage_proxy_subscription_rewards
1111
This data source provides the list of Subscription Rewards in Oracle Cloud Infrastructure Usage Proxy service.
1212

13-
This API returns list of rewards for a subscription Id
13+
Returns the list of rewards for a subscription ID.
1414

1515

1616
## Example Usage
@@ -27,7 +27,7 @@ data "oci_usage_proxy_subscription_rewards" "test_subscription_rewards" {
2727

2828
The following arguments are supported:
2929

30-
* `subscription_id` - (Required) The subscriptionId for which rewards information is requested for.
30+
* `subscription_id` - (Required) The subscription ID for which rewards information is requested for.
3131
* `tenancy_id` - (Required) The OCID of the tenancy.
3232

3333

@@ -45,19 +45,20 @@ The following attributes are exported:
4545
* `available_rewards` - The number of rewards available for a specific usage period.
4646
* `earned_rewards` - The number of rewards earned for the specific usage period.
4747
* `eligible_usage_amount` - The eligible usage amount for the usage period.
48-
* `ineligible_usage_amount` - The in eligible usage amount for the usage period.
49-
* `is_manual` - The boolean flag to tell if the available rewards are posted manually or not.
48+
* `ineligible_usage_amount` - The ineligible usage amount for the usage period.
49+
* `is_manual` - The boolean parameter to indicate whether or not the available rewards are manually posted.
5050
* `redeemed_rewards` - The number of rewards redeemed for a specific month.
51-
* `time_rewards_earned` - The date and time on which rewards are accrued.
52-
* `time_rewards_expired` - The date and time on which rewards are expired.
51+
* `time_rewards_earned` - The date and time when rewards accrue.
52+
* `time_rewards_expired` - The date and time when rewards expire.
5353
* `time_usage_ended` - The end date and time for the usage period.
5454
* `time_usage_started` - The start date and time for the usage period.
5555
* `usage_amount` - The usage amount for the usage period.
56-
* `usage_period_key` - The id for the usage period.
57-
* `summary` - The overrall reward summary of the monthly summary rewards.
56+
* `usage_period_key` - The usage period ID.
57+
* `summary` - The overall monthly reward summary.
5858
* `currency` - The currency unit for the reward amount.
59+
* `redemption_code` - The redemption code used in the billing center during the reward redemption process
5960
* `rewards_rate` - The current Rewards percentage in decimal format.
60-
* `subscription_id` - The entitlement id from MQS and it is same as subcription id.
61+
* `subscription_id` - The entitlement ID from MQS, which is the same as the subcription ID.
6162
* `tenancy_id` - The OCID of the target tenancy.
62-
* `total_rewards_available` - The total number of available rewards for a given subscription Id.
63+
* `total_rewards_available` - The total number of available rewards for a given subscription ID.
6364

website/docs/r/usage_proxy_subscription_redeemable_user.html.markdown

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# oci_usage_proxy_subscription_redeemable_user
1111
This resource provides the Subscription Redeemable User resource in Oracle Cloud Infrastructure Usage Proxy service.
1212

13-
Add list of redeemable user email ids for a subscription Id
13+
Adds the list of redeemable user email IDs for a subscription ID.
1414

1515

1616
## Example Usage
@@ -34,11 +34,11 @@ resource "oci_usage_proxy_subscription_redeemable_user" "test_subscription_redee
3434

3535
The following arguments are supported:
3636

37-
* `items` - (Optional) The list of email ids to be added to the redeemable users list.
38-
* `email_id` - (Required) The Email Id for redeemable user.
39-
* `subscription_id` - (Required) The subscriptionId for which rewards information is requested for.
37+
* `items` - (Optional) The list of email IDs to be added to the list of users that can redeem rewards.
38+
* `email_id` - (Required) The email ID for a user that can redeem rewards.
39+
* `subscription_id` - (Required) The subscription ID for which rewards information is requested for.
4040
* `tenancy_id` - (Required) The OCID of the tenancy.
41-
* `user_id` - (Optional) The user Id of the person whose email we cc
41+
* `user_id` - (Optional) The user ID of the person to send a copy of an email.
4242

4343

4444
** IMPORTANT **
@@ -48,8 +48,8 @@ Any change to a property that does not support update will force the destruction
4848

4949
The following attributes are exported:
5050

51-
* `items` - The list of redeemable users email Ids.
52-
* `email_id` - The email Id of Redeemable User.
51+
* `items` - The list of user email IDs that can redeem rewards.
52+
* `email_id` - The email ID of a user that can redeem rewards.
5353

5454
## Timeouts
5555

0 commit comments

Comments
 (0)