Alp Water code,Uncategorized banking-spend-post-qualification.feature

banking-spend-post-qualification.feature

Feature: Banking Spend Post Qualification
Scenario: Spend that qualifies for both transaction_threshold & deposit_threshold where the current_balance exceeds threshold
Given I have a “banking-spend/post-qualification” rewards event “banking-spend_welcome_bonus”
And I set the ledger owner states to
| book_type | product_id | feature_id | bucket_id | unit_of_value |
| accrual | welcome_bonus_product_id | transaction_threshold_feature_id | 0 | TXN |
| accrual | welcome_bonus_product_id | deposit_threshold_feature_id | 0 | USD |
And I set the ledger book states to
| book_type | product_id | feature_id | bucket_id | unit_of_value | balance | entry_count | status |
| “accrual” | “welcome_bonus_product_id” | “transaction_threshold_feature_id” | “0” | “TXN” | 11 | 1 | |
| “accrual” | “welcome_bonus_product_id” | “deposit_threshold_feature_id” | “0” | “USD” | 5001 | 1 | |
And I send that event to the virtual topic “qualification-outcomes”
Then I receive an event from the virtual topic “post-qualification-outcomes”
And the event has “4” array values in “data.ledger_request”
And the event contains the following ledger requests
| request.add_entry.amount | request.feature_id | request.product_id | request.book_type | request.unit_of_value | outcome.balance | request.add_entry.metadata.goal_met |
| 0 | “transaction_threshold_feature_id” | “welcome_bonus_product_id” | “accrual” | “TXN” | “11” | true |
| 0 | “deposit_threshold_feature_id” | “welcome_bonus_product_id” | “accrual” | “USD” | “5001” | true |
And no errors occur

Scenario: Spend that qualifies for both transaction_threshold & deposit_threshold where the current_balance is less than threshold
Given I have a “banking-spend/post-qualification” rewards event “banking-spend_welcome_bonus”
And I set the ledger owner states to
| book_type | product_id | feature_id | bucket_id | unit_of_value |
| accrual | welcome_bonus_product_id | transaction_threshold_feature_id | 0 | TXN |
| accrual | welcome_bonus_product_id | deposit_threshold_feature_id | 0 | USD |
And I set the ledger book states to
| book_type | product_id | feature_id | bucket_id | unit_of_value | balance | entry_count | status |
| “accrual” | “welcome_bonus_product_id” | “transaction_threshold_feature_id” | “0” | “TXN” | 9 | 1 | |
| “accrual” | “welcome_bonus_product_id” | “deposit_threshold_feature_id” | “0” | “USD” | 10 | 1 | |
And I send that event to the virtual topic “qualification-outcomes”
Then I receive an event from the virtual topic “post-qualification-outcomes”
And the event has “2” array values in “data.ledger_request”
And no errors occur

Scenario: Spend that qualifies for both transaction_threshold & deposit_threshold where the book_status is already QUALIFIED
Given I have a “banking-spend/post-qualification” rewards event “banking-spend_welcome_bonus”
And I set the ledger owner states to
| book_type | product_id | feature_id | bucket_id | unit_of_value |
| accrual | welcome_bonus_product_id | transaction_threshold_feature_id | 0 | TXN |
| accrual | welcome_bonus_product_id | deposit_threshold_feature_id | 0 | USD |
And I set the ledger book states to
| book_type | product_id | feature_id | bucket_id | unit_of_value | balance | entry_count | status |
| “accrual” | “welcome_bonus_product_id” | “transaction_threshold_feature_id” | “0” | “TXN” | 11 | 1 | “QUALIFIED” |
| “accrual” | “welcome_bonus_product_id” | “deposit_threshold_feature_id” | “0” | “USD” | 5001 | 1 | “QUALIFIED” |
And I send that event to the virtual topic “qualification-outcomes”
Then I receive an event from the virtual topic “post-qualification-outcomes”
And the event has “2” array values in “data.ledger_request”
And no errors occur

Scenario: Spend that qualifies only for transaction_threshold but not for deposit_threshold
Given I have a “banking-spend/post-qualification” rewards event “banking-spend_welcome_bonus”
And I set the ledger owner states to
| book_type | product_id | feature_id | bucket_id | unit_of_value |
| accrual | welcome_bonus_product_id | transaction_threshold_feature_id | 0 | TXN |
| accrual | welcome_bonus_product_id | deposit_threshold_feature_id | 0 | USD |
And I set the ledger book states to
| book_type | product_id | feature_id | bucket_id | unit_of_value | balance | entry_count | status |
| “accrual” | “welcome_bonus_product_id” | “transaction_threshold_feature_id” | “0” | “TXN” | 11 | 1 | |
| “accrual” | “welcome_bonus_product_id” | “deposit_threshold_feature_id” | “0” | “USD” | 5001 | 1 | “QUALIFIED” |
And I send that event to the virtual topic “qualification-outcomes”
Then I receive an event from the virtual topic “post-qualification-outcomes”
And the event has “3” array values in “data.ledger_request”
And the event contains the following ledger requests
| request.add_entry.amount | request.feature_id | request.product_id | request.book_type | request.unit_of_value | outcome.balance | request.add_entry.metadata.goal_met |
| 0 | “transaction_threshold_feature_id” | “welcome_bonus_product_id” | “accrual” | “TXN” | “11” | true |
And no errors occur

Scenario: Spend that qualifies only for deposit_threshold but not for transaction_threshold
Given I have a “banking-spend/post-qualification” rewards event “banking-spend_welcome_bonus”
And I set the ledger owner states to
| book_type | product_id | feature_id | bucket_id | unit_of_value |
| accrual | welcome_bonus_product_id | transaction_threshold_feature_id | 0 | TXN |
| accrual | welcome_bonus_product_id | deposit_threshold_feature_id | 0 | USD |
And I set the ledger book states to
| book_type | product_id | feature_id | bucket_id | unit_of_value | balance | entry_count | status |
| “accrual” | “welcome_bonus_product_id” | “transaction_threshold_feature_id” | “0” | “TXN” | 11 | 1 | “QUALIFIED” |
| “accrual” | “welcome_bonus_product_id” | “deposit_threshold_feature_id” | “0” | “USD” | 5001 | 1 | |
And I send that event to the virtual topic “qualification-outcomes”
Then I receive an event from the virtual topic “post-qualification-outcomes”
And the event has “3” array values in “data.ledger_request”
And the event contains the following ledger requests
| request.add_entry.amount | request.feature_id | request.product_id | request.book_type | request.unit_of_value | outcome.balance | request.add_entry.metadata.goal_met |
| 0 | “deposit_threshold_feature_id” | “welcome_bonus_product_id” | “accrual” | “USD” | “5001” | true |
And no errors occur

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

complaint…complaint…

శ్రీయుత గౌరవ నీయులైన మున్సిపల్ కమిషనగర్, కరీంనగర్ గారికి విషయము : మా భూమిని కబ్జా చేసి ఇంటిని నిర్మించుకున్న వారిపై చర్యలు తీసుకొవడం గురించి అయ్యా ! నా మనవి ఏమనగా నేను అనగా వేముల సరిత భర్త :