Add product catalog with tariffs endpoint
CHANGELOG:
### Added
- [#518](https://gitlab.com/coopdevs/odoo-somconnexio/-/merge_requests/518) Add `product-catalog` endpoint to our API to check the product catalog with their prices, according to different taxes.
curl -XGET -H 'Api-Key: xxxx' http://odoo-sc.local:8069/api/product-catalog?code=0IVA | jq -r '.'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3496 100 3496 0 0 13656 0 --:--:-- --:--:-- --:--:-- 13709
{
"pricelists": [
{
"code": "0IVA",
"products": [
{
"code": "SE_SC_REC_BA_F_600",
"name": "Fibra 600Mb",
"price": 35.54,
"category": "fiber",
"minutes": null,
"data": null,
"bandwidth": 600,
"available_for": [
"member"
]
},
{
"code": "SE_SC_REC_MOBILE_T_0_0",
"name": "0 min 0 MB",
"price": 1.6500000000000001,
"category": "mobile",
"minutes": 0,
"data": 0,
"bandwidth": null,
"available_for": [
"member",
"coop_agreement",
"sponsored"
]
},
{
"code": "SE_SC_REC_MOBILE_T_0_1024",
"name": "0 min 1 GB",
"price": 3.72,
"category": "mobile",
"minutes": 0,
"data": 1024,
"bandwidth": null,
"available_for": [
"member",
"coop_agreement",
"sponsored"
]
},
...
},
...
]
}
Edited by Pelayo García