| | |
| | | val name: String |
| | | ) |
| | | |
| | | // 支付方式接口返回数据类 |
| | | // 支付方式接口返回数据类(旧版本,保留兼容性) |
| | | data class PaymentMethodResponse( |
| | | val itemTotal: Any?, |
| | | val obj: List<PaymentMethod>, |
| | |
| | | val pageTotal: Any? |
| | | ) |
| | | |
| | | // 支付方式列表包装类,用于处理直接返回PaymentMethod数组的接口 |
| | | // 这个类实际上只是一个简单的包装器,让Gson能够正确解析JSON数组 |
| | | class PaymentMethodListResponse : ArrayList<PaymentMethod>() { |
| | | |
| | | companion object { |
| | | // 静态方法,从List<PaymentMethod>创建实例 |
| | | fun from(list: List<PaymentMethod>): PaymentMethodListResponse { |
| | | val response = PaymentMethodListResponse() |
| | | response.addAll(list) |
| | | return response |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 用户信息数据类 |
| | | data class ClientInfo( |
| | | val clientId: String, |