import { get, post } from "./http";

const prefix = 'devicesApi/wallet/';

export default wallet = {
  getTopUpAmountList: () => {
    return get(prefix + 'getTopUpAmountList', {});
  },
  getTopUpAmountListV2: () => {
    return get('devicesApi/purchase/top-up-amounts', {});
  },
  getTempAmountListV2: () => {
    return [{
      "currency": "CNY",
      "amount": 20.00
    }, {
      "currency": "CNY",
      "amount": 50.00
    }, {
      "currency": "CNY",
      "amount": 100.00
    }]
  },
  addCreditCard: (params) => {
    return post(prefix + 'addCard', params);
  },
  getCardList: () => {
    return get(prefix + 'getCardList', {});
  },
  getPayTypeList: () => {
    return get(prefix + 'getPayWithList', {});
  },
  doPayment: (params) => {
    return post(prefix + 'doPayment', params);
  },
  doPaymentV2: (params) => {
    return post(prefix + 'v2/doPayment', params);
  },
  getOverviewData: () => {
    return get(prefix + 'getTransactionsOverview', {});
  },
  getTransactionList: (params) => {
    return get(prefix + 'getTransactionsHistory', params);
  }
}