-
Notifications
You must be signed in to change notification settings - Fork 817
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature:1.0.11 支持tokens、增加新的余额查询、BUG修复
- Loading branch information
guorutao
committed
Apr 9, 2023
1 parent
0cb60db
commit 622cbbf
Showing
9 changed files
with
239 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/com/unfbx/chatgpt/entity/billing/BillingUsage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.unfbx.chatgpt.entity.billing; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.List; | ||
|
||
/** | ||
* 描述:金额消耗信息 | ||
* | ||
* @author https:www.unfbx.com | ||
* @since 2023-04-08 | ||
*/ | ||
@Data | ||
public class BillingUsage { | ||
|
||
@JsonProperty("object") | ||
private String object; | ||
/** | ||
* 账号金额消耗明细 | ||
*/ | ||
@JsonProperty("daily_costs") | ||
private List<DailyCost> dailyCosts; | ||
/** | ||
* 总使用金额:美分 | ||
*/ | ||
@JsonProperty("total_usage") | ||
private BigDecimal totalUsage; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/com/unfbx/chatgpt/entity/billing/DailyCost.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.unfbx.chatgpt.entity.billing; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* 描述:金额消耗列表 | ||
* | ||
* @author https:www.unfbx.com | ||
* @since 2023-04-08 | ||
*/ | ||
@Data | ||
public class DailyCost { | ||
/** | ||
* 时间戳 | ||
*/ | ||
@JsonProperty("timestamp") | ||
private long timestamp; | ||
/** | ||
* 模型消耗金额详情 | ||
*/ | ||
@JsonProperty("line_items") | ||
private List<LineItem> lineItems; | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/com/unfbx/chatgpt/entity/billing/LineItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.unfbx.chatgpt.entity.billing; | ||
|
||
import lombok.Data; | ||
|
||
import java.math.BigDecimal; | ||
|
||
/** | ||
* 描述:金额消耗列表 | ||
* | ||
* @author https:www.unfbx.com | ||
* @since 2023-04-08 | ||
*/ | ||
@Data | ||
public class LineItem { | ||
/** | ||
* 模型名称 | ||
*/ | ||
private String name; | ||
/** | ||
* 消耗金额 | ||
*/ | ||
private BigDecimal cost; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.unfbx.chatgpt.entity.billing; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* 描述: | ||
* | ||
* @author https:www.unfbx.com | ||
* @since 2023-04-08 | ||
*/ | ||
@Data | ||
public class Plan { | ||
private String title; | ||
private String id; | ||
} |
52 changes: 52 additions & 0 deletions
52
src/main/java/com/unfbx/chatgpt/entity/billing/Subscription.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.unfbx.chatgpt.entity.billing; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
/** | ||
* 描述:账户信息 | ||
* | ||
* @author https:www.unfbx.com | ||
* @since 2023-04-08 | ||
*/ | ||
@Data | ||
public class Subscription { | ||
@JsonProperty("object") | ||
private String object; | ||
@JsonProperty("has_payment_method") | ||
private boolean hasPaymentMethod; | ||
@JsonProperty("canceled") | ||
private boolean canceled; | ||
@JsonProperty("canceled_at") | ||
private Object canceledAt; | ||
@JsonProperty("delinquent") | ||
private Object delinquent; | ||
@JsonProperty("access_until") | ||
private long accessUntil; | ||
@JsonProperty("soft_limit") | ||
private long softLimit; | ||
@JsonProperty("hard_limit") | ||
private long hardLimit; | ||
@JsonProperty("system_hard_limit") | ||
private long systemHardLimit; | ||
@JsonProperty("soft_limit_usd") | ||
private double softLimitUsd; | ||
@JsonProperty("hard_limit_usd") | ||
private double hardLimitUsd; | ||
@JsonProperty("system_hard_limit_usd") | ||
private double systemHardLimitUsd; | ||
@JsonProperty("plan") | ||
private Plan plan; | ||
@JsonProperty("account_name") | ||
private String accountName; | ||
@JsonProperty("po_number") | ||
private Object poNumber; | ||
@JsonProperty("billing_email") | ||
private Object billingEmail; | ||
@JsonProperty("tax_ids") | ||
private Object taxIds; | ||
@JsonProperty("billing_address") | ||
private Object billingAddress; | ||
@JsonProperty("business_address") | ||
private Object businessAddress; | ||
} |