File tree Expand file tree Collapse file tree 6 files changed +73
-1
lines changed 
main/java/com/stripe/model Expand file tree Collapse file tree 6 files changed +73
-1
lines changed Original file line number Diff line number Diff line change 11package  com .stripe .model ;
22
33import  java .util .Map ;
4+ import  java .util .List ;
45
56import  com .stripe .exception .APIConnectionException ;
67import  com .stripe .exception .APIException ;
@@ -24,6 +25,7 @@ public class Charge extends APIResource {
2425	Integer  amountRefunded ;
2526	String  customer ;
2627	String  invoice ;
28+ 	List <Refund > refunds ;
2729	Card  card ;
2830	Dispute  dispute ;
2931	String  balanceTransaction ;
@@ -156,6 +158,22 @@ public void setDispute(Dispute dispute) {
156158		this .dispute  = dispute ;
157159	}
158160
161+ 	public  List <Refund > getRefunds () {
162+ 		return  refunds ;
163+ 	}
164+ 
165+ 	public  void  setRefunds (List <Refund > refunds ) {
166+ 		this .refunds  = refunds ;
167+ 	}
168+ 
169+ 	public  String  getBalanceTransaction () {
170+ 		return  balanceTransaction ;
171+ 	}
172+ 
173+ 	public  void  setBalanceTransaction (String  balanceTransaction ) {
174+ 		this .balanceTransaction  = balanceTransaction ;
175+ 	}
176+ 
159177	public  static  Charge  create (Map <String , Object > params )
160178			throws  AuthenticationException , InvalidRequestException ,
161179			APIConnectionException , CardException , APIException  {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public class Dispute extends StripeObject {
1010	String  evidence ;
1111	Long  evidenceDueBy ;
1212	String  reason ;
13+ 	String  balanceTransaction ;
1314
1415	public  Integer  getAmount () {
1516		return  amount ;
@@ -65,4 +66,10 @@ public String getReason() {
6566	public  void  setReason (String  reason ) {
6667		this .reason  = reason ;
6768	}
68- }
69+ 	public  String  getBalanceTransaction () {
70+ 		return  balanceTransaction ;
71+ 	}
72+ 	public  void  setBalanceTransaction (String  balanceTransaction ) {
73+ 		this .balanceTransaction  = balanceTransaction ;
74+ 	}
75+ }
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ public class EventDataDeserializer implements JsonDeserializer<EventData> {
3131        objectMap .put ("coupon" , Coupon .class );
3232        objectMap .put ("transfer" , Transfer .class );
3333        objectMap .put ("dispute" , Dispute .class );
34+         objectMap .put ("refund" , Refund .class );
3435        objectMap .put ("recipient" , Recipient .class );
3536        objectMap .put ("summary" , Summary .class );
3637        objectMap .put ("fee" , Fee .class );
Original file line number Diff line number Diff line change 1+ package  com .stripe .model ;
2+ 
3+ public  class  Refund  extends  StripeObject  {
4+ 	Integer  amount ;
5+ 	String  currency ;
6+ 	Long  created ;
7+ 	String  balanceTransaction ;
8+ 
9+ 	public  Integer  getAmount () {
10+ 		return  amount ;
11+ 	}
12+ 	public  void  setAmount (Integer  amount ) {
13+ 		this .amount  = amount ;
14+ 	}
15+ 	public  String  getCurrency () {
16+ 		return  currency ;
17+ 	}
18+ 	public  void  setCurrency (String  currency ) {
19+ 		this .currency  = currency ;
20+ 	}
21+ 	public  Long  getCreated () {
22+ 		return  created ;
23+ 	}
24+ 	public  void  setCreated (Long  created ) {
25+ 		this .created  = created ;
26+ 	}
27+ 	public  String  getBalanceTransaction () {
28+ 		return  balanceTransaction ;
29+ 	}
30+ 	public  void  setBalanceTransaction (String  balanceTransaction ) {
31+ 		this .balanceTransaction  = balanceTransaction ;
32+ 	}
33+ }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public class Transfer extends APIResource {
2323	List <String > otherTransfers ;
2424	String  recipient ;
2525	BankAccount  account ;
26+ 	String  balanceTransaction ;
2627
2728	public  String  getId () {
2829		return  id ;
@@ -120,6 +121,14 @@ public void setOtherTransfers(List<String> otherTransfers) {
120121		this .otherTransfers  = otherTransfers ;
121122	}
122123
124+ 	public  String  getBalanceTransaction () {
125+ 		return  balanceTransaction ;
126+ 	}
127+ 
128+ 	public  void  setBalanceTransaction (String  balanceTransaction ) {
129+ 		this .balanceTransaction  = balanceTransaction ;
130+ 	}
131+ 
123132	public  static  Transfer  create (Map <String , Object > params )
124133			throws  AuthenticationException , InvalidRequestException ,
125134			APIConnectionException , CardException , APIException  {
Original file line number Diff line number Diff line change 4242import  com .stripe .model .Transfer ;
4343import  com .stripe .model .Recipient ;
4444import  com .stripe .model .DeletedRecipient ;
45+ import  com .stripe .model .Refund ;
4546
4647public  class  StripeTest  {
4748	static  HashMap <String , Object > defaultCardParams  = new  HashMap <String , Object >();
@@ -204,6 +205,9 @@ public void testChargeRefund() throws StripeException {
204205		Charge  createdCharge  = Charge .create (defaultChargeParams );
205206		Charge  refundedCharge  = createdCharge .refund ();
206207		assertTrue (refundedCharge .getRefunded ());
208+ 		assertTrue (refundedCharge .getRefunds () instanceof  List );
209+ 		assertEquals (1 , refundedCharge .getRefunds ().size ());
210+ 		assertTrue (refundedCharge .getRefunds ().get (0 ) instanceof  Refund );
207211	}
208212
209213	@ Test 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments