Support specifying Adjustment state for fetch requests

I've made a few small changes to support specifying Adjustment state for fetch requests. 

I also increased the visibility of doGET because with this visibility I would have been able to append the state parameter to a fetch URL without modifying the client code at all. 
Just updated my PR to fix that issue and add an integration test.

Cheers,


On Sun, Jul 13, 2014 at 12:30 PM, Pierre-Alexandre Meyer <
notifications@github.com> wrote:

> In src/main/java/com/ning/billing/recurly/RecurlyClient.java:
>
> > @@ -683,7 +687,7 @@ public Invoice fetchInvoice(final String recurlyToken) {
> >
> >      ///////////////////////////////////////////////////////////////////////////
> >
> > -    private <T> T doGET(final String resource, final Class<T> clazz) {
> > +    public <T> T doGET(final String resource, final Class<T> clazz) {
>
> The code:
>
> .append((type != null ? "?type=" + type.getType() : "")).append((state != null ? "&state=" + state.getState() : ""))
>
> is actually incorrect. If type is null, but not state, the url will be
> &state=pending instead of ?state=pending.
>
> 23:35:13,610 WARN ~ Recurly error whilst calling:
>
> https://api.recurly.com:443/v2/accounts/32/adjustments?type=charge%3Fstate%3Dpending&&per_page=20
>
> Looking at your request, it is decoded as ?type=charge?state=pending
> instead of ?type=charge&state=pending. I can't see where that could be
> set from the patch you sent. Are you using the same code? Could you
> check-in the test your are running?
>
> That's why in a previous email I inquired whether you could think of
> any build time tasks in Maven that perhaps would result in the source being
> encoded for some reason
>
> I didn't see that email but there is no encoding done at build time.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/killbilling/recurly-java-library/pull/38/files#r14859180>
> .
>



-- 
Eric Simmerman
President | Tempest Strings Enterprises, Inc.
ets@tempeststrings.com
US Tollfree: (888) 568-8585