Issue:
refactor(mandate): allow merchant to pass the mandate details and customer acceptance separately



## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description

**Current Implementation**
In order to create a mandate, the merchant has to provide both `mandate_type` and `customer_acceptance` together and is only allowed during the confirm call.
**Requirements**
As per the SDK requirements and the data availability. Both of these data fields won't be available together on either the merchant side or the SDK side. This compels us to make a mechanism which will provide a way for the merchant to provide the `mandate_type` and the SDK to provide `customer_acceptance`.
**Change**
The PR aims to solve the current limitations and provide a way for the merchant to provide/update the mandate type, and they allow the customer during the confirm call to provide the customer_acceptance to create & activate the mandate.
The PR also provides a entry flag in the `payment_method_list` to let the customer know, that this payment is a create mandate payment. This is done by looking for any mandate details in the payment_attempt when the customer tries to get the list of the payment methods

<!-- Describe your changes in detail -->


### Additional Changes

- [x] This PR modifies the API contract
adding an extra field in the payment_method_list response
```json
{
    mandate_payment: "new_mandate_txn",
}
```
Currently, this field will only be visible if it's a new mandate payment with the above mention addition in the payment_method_list API

- [x] This PR modifies the database schema
the following migration is done
```sql
ALTER TABLE payment_attempt ADD COLUMN mandate_details JSONB;
```

<!-- 
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
Customer critical 
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?
![Screenshot 2023-05-17 at 7 08 08 PM](https://github.com/juspay/hyperswitch/assets/51093026/ddb9e158-3093-4747-8d19-6953e05403c9)
This is the initial payment with `confirm: false`
![Screenshot 2023-05-17 at 7 09 04 PM](https://github.com/juspay/hyperswitch/assets/51093026/6f6d69e8-f0a7-4ef6-9970-eeaf4aabadff)
This is the following confirm call, which creates the mandate
![Screenshot 2023-05-17 at 7 09 35 PM](https://github.com/juspay/hyperswitch/assets/51093026/2dcc1c07-cd2d-489b-aef8-b47eca93b672)
And this is the recurring payment, which provides a proof, that the mandate was successfully created

<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->


## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable


Resolution:
<think>
PR Context:
- Title: fix(list): add mandate type in payment_method_list
- Merged: 2023-05-23T11:29:25Z
- Files changed: 3 files
- Commits: 2 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description

This builds over #1188 , due to a change of requirement, the customer side mandate information must not only indicate that it's a mandate payment but also the information about the mandate.

<!-- Describe your changes in detail -->


### Additional Changes

- [ ] This PR modi
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** fix(list): add mandate type in payment_method_list (#1238)
Files to modify:


**crates/api_models/src/payment_methods.rs**
  Modify existing code

**crates/router/src/core/payment_methods/cards.rs**
  Modify existing code