Skip to content

moeadham/dwolla-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dwolla-java-sdk v0.1

Build Status

Java and Android SDK for Dwolla's API

Requirements

Quick Start

This wrapper uses the Retrofit REST client. See the DwollaService class for the supported endpoints and Retrofit's sample for more details.

Create a callback that extends DwollaCallback with the correct Response object:

private class BasicInformationCallback extends DwollaCallback<BasicAccountInformationResponse> {
      @Override
      public void success(BasicAccountInformationResponse response) {
         if (!response.Success || response.Response == null) {
            super.failure(response.Message);
         } else {
            // Operate on response
         }
      }

      @Override
      public void failure(RetrofitError error) {
         super.failure(error);
      }
   }

Then create the service and make the API call:

DwollaService service = new RestAdapter.Builder().setServer(
   new Server("https://www.dwolla.com/oauth/rest")).build().create(DwollaService.class);
service.getBasicAccountInformation(accountId, mEncodedKey, mEncodedSecret, 
   new BasicInformationCallback());

Post requests are just as simple. After creating a callback and DwollaService as shown above, make the API call:

service.send(new DwollaTypedBytes(new Gson(), 
   new SendRequest(mToken, pin, destinationId, amount)), new SendCallback());

API Documentation

http://developers.dwolla.com/dev

Support

License

(MIT License)

Copyright (c) 2012 Dwolla

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Official Java Wrapper for Dwolla's API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published