donor-tools-api-java

donor-tools-api-java provides a Java client for the Donor Tools (donortools.com) API

License

License

GNU LESSER GENERAL PUBLIC LICENSE V3
Categories

Categories

Java Languages
GroupId

GroupId

org.threeriverdev
ArtifactId

ArtifactId

donor-tools-api-java
Last Version

Last Version

1.0.2.Final
Release Date

Release Date

Type

Type

jar
Description

Description

donor-tools-api-java
donor-tools-api-java provides a Java client for the Donor Tools (donortools.com) API
Project URL

Project URL

https://github.com/3RiverDevelopment/donor-tools-api-java
Source Code Management

Source Code Management

https://github.com/3RiverDevelopment/donor-tools-api-java

Download donor-tools-api-java

How to add to project

<!-- https://jarcasting.com/artifacts/org.threeriverdev/donor-tools-api-java/ -->
<dependency>
    <groupId>org.threeriverdev</groupId>
    <artifactId>donor-tools-api-java</artifactId>
    <version>1.0.2.Final</version>
</dependency>
// https://jarcasting.com/artifacts/org.threeriverdev/donor-tools-api-java/
implementation 'org.threeriverdev:donor-tools-api-java:1.0.2.Final'
// https://jarcasting.com/artifacts/org.threeriverdev/donor-tools-api-java/
implementation ("org.threeriverdev:donor-tools-api-java:1.0.2.Final")
'org.threeriverdev:donor-tools-api-java:jar:1.0.2.Final'
<dependency org="org.threeriverdev" name="donor-tools-api-java" rev="1.0.2.Final">
  <artifact name="donor-tools-api-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.threeriverdev', module='donor-tools-api-java', version='1.0.2.Final')
)
libraryDependencies += "org.threeriverdev" % "donor-tools-api-java" % "1.0.2.Final"
[org.threeriverdev/donor-tools-api-java "1.0.2.Final"]

Dependencies

compile (4)

Group / Artifact Type Version
org.codehaus.jackson : jackson-mapper-asl jar 1.9.13
org.glassfish.jersey.core : jersey-client jar 2.25
org.jdom : jdom2 jar 2.0.6
commons-io : commons-io jar 2.4

Project Modules

There are no modules declared in this project.

Donor Tools Java Client

donor-tools-api-java provides a Java client for the Donor Tools API

Impact Upgrade

Nonprofits often struggle with 1) constant distractions, 2) a tangled mess of data and tools that hold them back, and 3) really big ideas on the backburner. Impact Upgrade is a software and consulting company, solely focused on closing these gaps. We upgrade your impact and get you back to your mission!

Usage

Add the following Maven dependency:

<dependency>
    <groupId>com.impactupgrade.integration</groupId>
    <artifactId>donor-tools-api-java</artifactId>
    <version>1.0.3.Final</version>
</dependency>

Code example:

import com.impactupgrade.integration.donortools.*;

...

DonorToolsClient client = new DonorToolsClient("https://[USERNAME].donortools.com", "username", "password");

// create Persona

Persona persona = new Persona();
Persona.Name name = new Persona.Name(firstName, lastName);
persona.addName(name);

Persona.Address address = new Persona.Address();
address.setStreetAddress(streetAddress);
address.setCity(city);
address.setState(state);
address.setPostalCode(zip);
persona.addAddress(address);

Persona.EmailAddress emailAddress = new Persona.EmailAddress(email);
persona.addEmailAddress(emailAddress);

personaId = donorToolsClient.create(persona);

// store the personaId for re-use

// create Donation

Donation donation = new Donation();

donation.setDonationTypeId(14); // Donor Tools built-in donation type: Online Donation
donation.setPersonaId(personaId);
donation.setSourceId(sourceId);
donation.setAmountInCents(amountInCents);
donation.setMemo("This is a test.");

// Splits allow you to split a single donation up into multiple target funds.
Donation.Split split = new Donation.Split();
split.setAmountInCents(splitAmountInCents);
split.setFundId(fundId);
donation.addSplit(split);

donorToolsClient.create(donation);

// list all Personas
List<Persona> personas = client.listPersonas();

How to Deploy a Snapshot

  1. Add the following to ~/.m2/settings.xml
<server>
  <id>ossrh</id>
  <username>USERNAME</username>
  <password>PASSWORD</password>
</server>
  1. mvn clean deploy

How to Deploy a Release

  1. Add the following to ~/.m2/settings.xml
<server>
  <id>ossrh</id>
  <username>USERNAME</username>
  <password>PASSWORD</password>
</server>
  1. mvn versions:set -DnewVersion=1.2.3.Final
  2. git add .
  3. git commit -m "1.2.3.Final release"
  4. git tag 1.2.3.Final
  5. mvn clean deploy -P release
  6. mvn versions:set -DnewVersion=1.2.4-SNAPSHOT
  7. git add .
  8. git commit -m "1.2.4-SNAPSHOT"
  9. git push origin master 1.2.3.Final

License

Licensed under the Apache License, Version 2.0. See LICENSE-2.0.txt for more information.

Versions

Version
1.0.2.Final
1.0.1.Final
1.0.0.Final