Browse Source

消费记录接口

qianyi
shanji 3 years ago
parent
commit
a745e2c827
  1. 32
      BBWY.JDSDK/Domain/OpenApiPageVo.cs
  2. 32
      BBWY.JDSDK/Domain/OpenApiResDto.cs
  3. 22
      BBWY.JDSDK/Domain/QueryCostDetailsVo.cs
  4. 84
      BBWY.JDSDK/Request/DspPlatformFinanceOpenapiQuerycostdetailsRequest.cs
  5. 16
      BBWY.JDSDK/Response/DspPlatformFinanceOpenapiQuerycostdetailsResponse.cs
  6. 17
      BBWY.Test/Program.cs

32
BBWY.JDSDK/Domain/OpenApiPageVo.cs

@ -0,0 +1,32 @@
using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using Newtonsoft.Json;
using Jd.Api.Domain;
namespace Jd.Api.Domain
{
[Serializable]
public class OpenApiPageVo:JdObject{
[JsonProperty("total")]
public long
total
{ get; set; }
[JsonProperty("pageNo")]
public int
pageNo
{ get; set; }
[JsonProperty("pageSize")]
public int
pageSize
{ get; set; }
[JsonProperty("data")]
public List<string>
data
{ get; set; }
}
}

32
BBWY.JDSDK/Domain/OpenApiResDto.cs

@ -0,0 +1,32 @@
using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using Newtonsoft.Json;
using Jd.Api.Domain;
namespace Jd.Api.Domain
{
[Serializable]
public class OpenApiResDto:JdObject{
[JsonProperty("msg")]
public string
msg
{ get; set; }
[JsonProperty("traceId")]
public string
traceId
{ get; set; }
[JsonProperty("code")]
public int
code
{ get; set; }
[JsonProperty("data")]
public QueryCostDetailsVo
data
{ get; set; }
}
}

22
BBWY.JDSDK/Domain/QueryCostDetailsVo.cs

@ -0,0 +1,22 @@
using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using Newtonsoft.Json;
using Jd.Api.Domain;
namespace Jd.Api.Domain
{
[Serializable]
public class QueryCostDetailsVo:JdObject{
[JsonProperty("totalAmount")]
public string
totalAmount
{ get; set; }
[JsonProperty("page")]
public OpenApiPageVo
page
{ get; set; }
}
}

84
BBWY.JDSDK/Request/DspPlatformFinanceOpenapiQuerycostdetailsRequest.cs

@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using Jd.Api.Response;
using Jd.Api.Util;
namespace Jd.Api.Request
{
public class DspPlatformFinanceOpenapiQuerycostdetailsRequest : JdRequestBase<DspPlatformFinanceOpenapiQuerycostdetailsResponse>
{
public string
accessPin
{ get; set; }
public string
authType
{ get; set; }
public string
operatorPin
{ get; set; }
public string
beginDate
{ get; set; }
public string
endDate
{ get; set; }
public string
orderType
{ get; set; }
public Nullable<int>
pageNo
{ get; set; }
public Nullable<int>
moneyType
{ get; set; }
public Nullable<int>
pageSize
{ get; set; }
public string
subPin
{ get; set; }
public override string ApiName
{
get { return "jingdong.dsp.platform.finance.openapi.querycostdetails"; }
}
protected override void PrepareParam(IDictionary<String, Object> parameters)
{
parameters.Add("accessPin", this.accessPin
);
parameters.Add("authType", this.authType
);
parameters.Add("operatorPin", this.operatorPin
);
parameters.Add("beginDate", this.beginDate
);
parameters.Add("endDate", this.endDate
);
parameters.Add("orderType", this.orderType
);
parameters.Add("pageNo", this.pageNo
);
parameters.Add("moneyType", this.moneyType
);
parameters.Add("pageSize", this.pageSize
);
parameters.Add("subPin", this.subPin
);
}
}
}

16
BBWY.JDSDK/Response/DspPlatformFinanceOpenapiQuerycostdetailsResponse.cs

@ -0,0 +1,16 @@
using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using Newtonsoft.Json;
using Jd.Api.Domain;
namespace Jd.Api.Response
{
public class DspPlatformFinanceOpenapiQuerycostdetailsResponse:JdResponse{
[JsonProperty("returnType")]
public OpenApiResDto
returnType
{ get; set; }
}
}

17
BBWY.Test/Program.cs

@ -27,8 +27,21 @@ namespace BBWY.Test
var appSecret = "866a9877f5f24b03b537483b4defe75d";
var token = "2ace3023200c4ea9aa682bbf8bffee18jztm";
var jdClient = GetJdClient(appkey, appSecret);
var req = new DspPlatformFinanceOpenapiQuerycostdetailsRequest();
//req.accessPin = "abc";
//req.authType = "abc";
//req.operatorPin = "abc";
req.beginDate = "2022-09-21";
req.endDate = "2022-09-27";
req.pageNo = 1;
req.pageSize = 100;
req.moneyType = 1;
//req.subPin = "abc";
DspPlatformFinanceOpenapiQuerycostdetailsResponse response = jdClient.Execute(req, token, DateTime.Now.ToLocalTime());
Console.WriteLine(JsonConvert.SerializeObject(response));
Console.ReadKey();
}
}

Loading…
Cancel
Save