package com.neusoft.smart.pos.payment.service;

import com.neusoft.smart.pos.dto.card.request.*;
import com.neusoft.smart.pos.dto.card.response.CardTradeCreateResponse;
import com.neusoft.smart.pos.dto.card.response.CardTradeQueryResponse;
import com.neusoft.smart.pos.dto.card.response.CardTradeRefundResponse;
import com.neusoft.smart.pos.dto.member.request.*;
import com.neusoft.smart.pos.dto.member.response.DetailedMemberResponse;
import com.neusoft.smart.pos.dto.member.response.MemberLevelResponse;
import com.neusoft.smart.pos.framework.dto.ResponseData;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

@FeignClient(value = "service-member")
public interface RemoteCardTradeService {

	@PostMapping("/cardtrade/recharge/{snCode}")
	ResponseData<Long> recharge(@PathVariable("snCode") String snCode, @RequestBody RechargeRequest rechargeRequest) ;

	@PostMapping("/cardtrade/transfer/{snCode}")
	ResponseData<?> transfer(@PathVariable("snCode") String snCode, @RequestBody TransferRequest transferRequest);

	@PostMapping("/cardtrade/createOrder/{snCode}")
	ResponseData<CardTradeCreateResponse> createOrder(@PathVariable("snCode") String snCode, @RequestBody CardTradeCreateRequest cardTradeCreateRequest);

	@PostMapping("/cardtrade/cancelOrder")
	ResponseData<?> cancelOrder(@RequestBody CardTradeCancelRequest cardTradeCancelRequest);

	@PostMapping("/cardtrade/reverseOrder")
	ResponseData<?> reverseOrder(@RequestBody CardTradeReverseRequest cardTradeReverseRequest);

	@PostMapping("/cardtrade/refundOrder")
	ResponseData<CardTradeRefundResponse> refundOrder(@RequestBody CardTradeRefundRequest cardTradeRefundRequest);

	@PostMapping("/cardtrade/queryOrder")
	ResponseData<CardTradeQueryResponse> queryOrder(@RequestBody CardTradeQueryRequest cardTradeQueryRequest);

	@GetMapping("/card/balance")
	ResponseData<Long> balance(
			@RequestParam(value = "cardNum", defaultValue = "", required = false) String cardNum,
			@RequestParam(value = "cardAnotherId", required = false) String cardAnotherId,
			@RequestParam(value = "cardOtherId", defaultValue = "", required = false) String cardOtherId);
}
