11package com .stripe .model ;
22
33import java .util .Map ;
4+ import java .util .List ;
45
56import com .stripe .Stripe ;
67import com .stripe .exception .APIConnectionException ;
1112import com .stripe .net .APIResource ;
1213
1314public class BalanceTransaction extends APIResource {
15+ String id ;
1416 String source ;
1517 Integer amount ;
1618 String currency ;
@@ -19,6 +21,17 @@ public class BalanceTransaction extends APIResource {
1921 Long created ;
2022 Long availableOn ;
2123 String status ;
24+ Long fee ;
25+ List <Fee > feeDetails ;
26+ String description ;
27+
28+ public String getId () {
29+ return id ;
30+ }
31+
32+ public void setId (String id ) {
33+ this .id = id ;
34+ }
2235
2336 public String getSource () {
2437 return source ;
@@ -84,16 +97,54 @@ public void setStatus(String status) {
8497 this .status = status ;
8598 }
8699
100+ public Long getFee () {
101+ return fee ;
102+ }
103+
104+ public void setFee (Long fee ) {
105+ this .fee = fee ;
106+ }
107+
108+ public List <Fee > getFeeDetails () {
109+ return feeDetails ;
110+ }
111+
112+ public void setFeeDetails (List <Fee > feeDetails ) {
113+ this .feeDetails = feeDetails ;
114+ }
115+
116+ public String getDescription () {
117+ return description ;
118+ }
119+
120+ public void setDescription (String description ) {
121+ this .description = description ;
122+ }
123+
124+ public static BalanceTransaction retrieve (String id ) throws AuthenticationException ,
125+ InvalidRequestException , APIConnectionException , CardException ,
126+ APIException {
127+ return retrieve (id , null );
128+ }
129+
87130 public static BalanceTransactionCollection all (Map <String , Object > params )
88131 throws AuthenticationException , InvalidRequestException ,
89132 APIConnectionException , CardException , APIException {
90133 return all (params , null );
91134 }
92135
136+ public static BalanceTransaction retrieve (String id , String apiKey )
137+ throws AuthenticationException , InvalidRequestException ,
138+ APIConnectionException , CardException , APIException {
139+ String url = String .format ("%s/%s/%s" , Stripe .API_BASE , "v1/balance/history" , id );
140+ return request (RequestMethod .GET , url , null ,
141+ BalanceTransaction .class , apiKey );
142+ }
143+
93144 public static BalanceTransactionCollection all (Map <String , Object > params , String apiKey )
94145 throws AuthenticationException , InvalidRequestException ,
95146 APIConnectionException , CardException , APIException {
96- String url = String .format ("%s%s" , Stripe .API_BASE , "/ v1/balance/history" );
147+ String url = String .format ("%s/ %s" , Stripe .API_BASE , "v1/balance/history" );
97148 return request (RequestMethod .GET , url , params ,
98149 BalanceTransactionCollection .class , apiKey );
99150 }
0 commit comments