说明:
本帖主要是介绍说明原开放平台下的SDK如何调用跨境报关接口
方法:
##maven仓库:- <dependency>
- <groupId>com.youzan</groupId>
- <artifactId>open-sdk-client</artifactId>
- <version>2.5.3-RELEASE</version>
- </dependency>
- <dependency>
- <groupId>com.youzan</groupId>
- <artifactId>open-sdk-gen</artifactId>
- <version>2.8.4-RELEASE</version>
- </dependency>
复制代码
##私服地址:
- <repository>
- <id>baymax-releases</id>
- <name>Nexus Release Repository</name>
- <url>http://maven.youzanyun.com/repository/maven-releases/</url>
- </repository>
复制代码
#实例:--####youzan.pay.customs.declaration.reportpayment.query- YouzanPayCustomsDeclarationReportpaymentQueryParams youzanPayCustomsDeclarationReportpaymentQueryParams = new YouzanPayCustomsDeclarationReportpaymentQueryParams();
- youzanPayCustomsDeclarationReportpaymentQueryParams.setTid("E20190401154338080300013");
- youzanPayCustomsDeclarationReportpaymentQueryParams.setKdtId(42587152L);
- youzanPayCustomsDeclarationReportpaymentQueryParams.setTransaction("190401154341000067");
- YouzanPayCustomsDeclarationReportpaymentQuery youzanPayCustomsDeclarationReportpaymentQuery = new YouzanPayCustomsDeclarationReportpaymentQuery();
- youzanPayCustomsDeclarationReportpaymentQuery.setAPIParams(youzanPayCustomsDeclarationReportpaymentQueryParams);
- YouzanPayCustomsDeclarationReportpaymentQueryResult result = client.invoke(youzanPayCustomsDeclarationReportpaymentQuery);
- result.getCustomsInfo();
- result.getCustomsStatus();
- result.getCustomsTime();
- result.getSubOrderNo();
- result.getTid();
- result.getTransaction();
-
复制代码
#实例 --####youzan.pay.customs.declaration.reportpayment.report
- YZClient client = new DefaultYZClient(new Token("token"));
- YouzanPayCustomsDeclarationReportpaymentReportParams youzanPayCustomsDeclarationReportpaymentReportParams = new YouzanPayCustomsDeclarationReportpaymentReportParams();
- youzanPayCustomsDeclarationReportpaymentReportParams.setTid("E20190401154338080300013");
- youzanPayCustomsDeclarationReportpaymentReportParams.setKdtId(42587152L);
- youzanPayCustomsDeclarationReportpaymentReportParams.setCustomsCode("HZ");
- youzanPayCustomsDeclarationReportpaymentReportParams.setCurrency("CNY");
- youzanPayCustomsDeclarationReportpaymentReportParams.setActionType(1L);
- youzanPayCustomsDeclarationReportpaymentReportParams.setTransaction("190401154341000067");
- YouzanPayCustomsDeclarationReportpaymentReport youzanPayCustomsDeclarationReportpaymentReport = new YouzanPayCustomsDeclarationReportpaymentReport();
- youzanPayCustomsDeclarationReportpaymentReport.setAPIParams(youzanPayCustomsDeclarationReportpaymentReportParams);
- YouzanPayCustomsDeclarationReportpaymentReportResult invoke = client.invoke(youzanPayCustomsDeclarationReportpaymentReport);
- invoke.getCustomsStatus();
- invoke.getKdtId();
- invoke.getSubOrderNo();
- invoke.getTid();
- invoke.getTransaction();
-
-
复制代码
本帖最后由 有赞-妮子 于 2019-4-23 19:18 编辑
|