Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
bailuntec-api
Commits
e723fa90
Commit
e723fa90
authored
May 19, 2021
by
liyanlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ebay api
parent
f3f6cbd0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
168 additions
and
0 deletions
+168
-0
EbayTransactionApi.java
...ava/com/bailuntec/api/ebay/seller/EbayTransactionApi.java
+24
-0
EbayTransactionRes.java
...ailuntec/api/ebay/seller/response/EbayTransactionRes.java
+137
-0
EbayApiTest.java
src/test/java/com/bailuntec/api/ebay/EbayApiTest.java
+7
-0
No files found.
src/main/java/com/bailuntec/api/ebay/seller/EbayTransactionApi.java
0 → 100644
View file @
e723fa90
package
com
.
bailuntec
.
api
.
ebay
.
seller
;
import
com.bailuntec.api.ebay.seller.response.EbayTransactionRes
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestParam
;
/**
* @Author: li.yanlin
* @Description:
* @Date: Created in 2021-05-19
* @Modified by:
*/
@FeignClient
(
name
=
"ebayTransactionApi"
,
url
=
"https://apiz.ebay.com/sell/finances/v1"
)
public
interface
EbayTransactionApi
{
@GetMapping
(
"/transaction"
)
EbayTransactionRes
getTransactions
(
@RequestHeader
(
"Authorization"
)
String
authorization
,
@RequestParam
(
"filter"
)
String
filter
,
@RequestParam
(
name
=
"limit"
,
defaultValue
=
"1000"
)
Integer
limit
,
@RequestParam
(
name
=
"offset"
,
defaultValue
=
"0"
)
Integer
offset
);
}
src/main/java/com/bailuntec/api/ebay/seller/response/EbayTransactionRes.java
0 → 100644
View file @
e723fa90
package
com
.
bailuntec
.
api
.
ebay
.
seller
.
response
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @Author: li.yanlin
* @Description:
* @Date: Created in 2021-05-19
* @Modified by:
*/
@Data
public
class
EbayTransactionRes
{
/*api响应字段*/
private
String
href
;
private
Integer
limit
;
private
String
next
;
private
Integer
offset
;
private
String
prev
;
private
Integer
total
;
private
List
<
Transaction
>
transactions
;
}
/**
* 交易
*/
@Data
class
Transaction
{
private
Amount
amount
;
@ApiModelProperty
(
"在此字段中返回的枚举值指示货币交易金额是卖方帐户的(CREDIT)还是(DEBIT)。 通常,SALE和CREDIT交易类型记入卖方帐户,而REFUND,DISPUTE,SHIPPING_LABEL和TRANSFER交易类型记入卖方帐户的借方。"
)
private
String
bookingEntry
;
private
Buyer
buyer
;
private
String
feeType
;
private
String
orderId
;
private
List
<
OrderLineItem
>
orderLineItems
;
@ApiModelProperty
(
"此字符串值指示正在处理付款的实体。"
)
private
String
paymentsEntity
;
private
String
payoutId
;
private
List
<
Reference
>
references
;
@ApiModelProperty
(
"与销售订单关联的销售记录号。销售记录号是在结帐时创建的Selling Manager / Selling Manager Pro标识符。"
)
private
String
salesRecordReference
;
@ApiModelProperty
(
"该金额是在从与订单相关的卖方付款中扣除销售费用之前的订单总金额。要确定将通过卖方付款支付的订单的实际金额,请从basePayoutAmount中减去totalFeeAmount。"
)
private
Amount
totalFeeBasisAmount
;
private
Amount
totalFeeAmount
;
private
String
transactionDate
;
private
String
transactionId
;
private
String
transactionMemo
;
private
String
transactionStatus
;
private
String
transactionType
;
}
/**
* 货币
*/
@Data
class
Amount
{
private
String
currency
;
@ApiModelProperty
(
"转换前币种"
)
private
String
convertedFromCurrency
;
private
String
convertedFromValue
;
private
String
exchangeRate
;
private
String
value
;
}
/**
* 买家
*/
@Data
class
Buyer
{
private
String
username
;
}
/**
* sku行
*/
@Data
class
OrderLineItem
{
private
Amount
amount
;
private
String
lineItemId
;
private
List
<
Fee
>
marketplaceFees
;
}
/**
* 费用项
*/
@Data
class
Fee
{
private
Amount
amount
;
private
String
feeMemo
;
private
String
feeType
;
}
/**
*
*/
@Data
class
Reference
{
private
String
referenceId
;
private
String
referenceType
;
}
\ No newline at end of file
src/test/java/com/bailuntec/api/ebay/EbayApiTest.java
0 → 100644
View file @
e723fa90
package
com
.
bailuntec
.
api
.
ebay
;
/**
* @Author: li.yanlin
* @Description:
* @Date: Created in
* @Modified by:
*/
public
class
EbayApiTest
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment