View Javadoc

1   /*
2    * Copyright (c) 2010 Commsen International. All rights reserved.
3    * 
4    * This file is part of JWebThumb library.
5    *	
6    * JWebThumb library is free software: you can redistribute it and/or modify 
7    * it under the terms of the GNU Lesser General Public License as published by
8    * the Free Software Foundation, either version 2 of the License, or
9    * (at your option) any later version.
10   * 
11   * JWebThumb library is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Lesser General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Lesser General Public License
17   * along with JWebThumb library.  If not, see <http://www.gnu.org/licenses/lgpl.html>.
18   */
19  package com.commsen.jwebthumb;
20  
21  import org.apache.commons.lang.builder.ReflectionToStringBuilder;
22  import org.simpleframework.xml.Element;
23  
24  /***
25   * This class represent webthumb's response to "credits" API call. See <a
26   * href="http://webthumb.bluga.net/apidoc#credits">http://webthumb.bluga.net/apidoc#credits</a> for
27   * details
28   * 
29   * @author <a href="mailto:MilenDyankov@gmail.com">Milen Dyankov</a>
30   * @see http://webthumb.bluga.net/apidoc#credits
31   * 
32   */
33  public class WebThumbCredits {
34  
35  	@Element(required = false, name = "requests-this-month")
36  	Integer requestsThisMonth;
37  
38  	@Element(required = false, name = "used-this-month")
39  	Double usedThisMonth;
40  
41  	@Element(required = false, name = "easythumb-cached-this-month")
42  	Double cachedThisMonth;
43  
44  	@Element(required = false)
45  	Integer subscription;
46  
47  	@Element(required = false, name = "subscription-left")
48  	Integer subscriptionLeft;
49  
50  	@Element(required = false)
51  	Double reserve;
52  
53  
54  	/*
55  	 * (non-Javadoc)
56  	 * @see java.lang.Object#toString()
57  	 */
58  	@Override
59  	public String toString() {
60  		return new ReflectionToStringBuilder(this).toString();
61  	}
62  
63  
64  	/***
65  	 * @return the requestsThisMonth
66  	 */
67  	public Integer getRequestsThisMonth() {
68  		return this.requestsThisMonth;
69  	}
70  
71  
72  	/***
73  	 * @return the usedThisMonth
74  	 */
75  	public Double getUsedThisMonth() {
76  		return this.usedThisMonth;
77  	}
78  
79  
80  	/***
81  	 * @return the cachedThisMonth
82  	 */
83  	public Double getCachedThisMonth() {
84  		return this.cachedThisMonth;
85  	}
86  
87  
88  	/***
89  	 * @return the subscription
90  	 */
91  	public Integer getSubscription() {
92  		return this.subscription;
93  	}
94  
95  
96  	/***
97  	 * @return the subscriptionLeft
98  	 */
99  	public Integer getSubscriptionLeft() {
100 		return this.subscriptionLeft;
101 	}
102 
103 
104 	/***
105 	 * @return the reserve
106 	 */
107 	public Double getReserve() {
108 		return this.reserve;
109 	}
110 
111 }