taxamo-java

Taxamo API client bindings for Java.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования
Группа

Группа

com.taxamo
Идентификатор

Идентификатор

taxamo-java
Последняя версия

Последняя версия

1.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

taxamo-java
Taxamo API client bindings for Java.
Ссылка на сайт

Ссылка на сайт

http://github.com/taxamo
Организация-разработчик

Организация-разработчик

Taxamo
Система контроля версий

Система контроля версий

https://github.com/taxamo/taxamo-java

Скачать taxamo-java

Как подключить последнюю версию

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.owlike : genson jar 1.3
com.mashape.unirest : unirest-java jar 1.4.7

test (3)

Идентификатор библиотеки Тип Версия
org.scala-lang : scala-library jar 2.9.1-1
org.scalatest : scalatest_2.9.1 jar 1.6.1
junit : junit jar 4.8.1

Модули Проекта

Данный проект не имеет модулей.

Taxamo Java bindings

This package provides Taxamo Java bindings.

Example implementation

There is an example project for integration with Taxamo and PayPal Express Checkout at https://github.com/taxamo/java-paypal-express-checkout-example, that can be used as a template, regardless if PayPal EC support is needed or not.

Installation

If using Maven, just add the following dependency to your module's pom.xml file:

<dependency>
  <groupId>com.taxamo</groupId>
  <artifactId>taxamo-java</artifactId>
  <version>1.1.1</version>
</dependency>

Usage

The TaxamoExample.java file provides example of most common operations - transaction storage, retrieval and confirmation.

import com.taxamo.client.api.TaxamoApi;
import com.taxamo.client.common.ApiException;
import com.taxamo.client.model.*;

import java.math.BigDecimal;
import java.util.Arrays;

public class TaxamoExample {

    public static void main(String[] args) throws ApiException {

        //initialize API object, provide your private token here!
        TaxamoApi api = new TaxamoApi("SamplePrivateTestKey1");

        long t = System.currentTimeMillis();
        CreateTransactionOut createTransactionOut = api.createTransaction(new CreateTransactionIn()
                .setTransaction(new InputTransaction()
                        .setCurrencyCode("USD")
                        .setBuyerIp("127.0.0.1")
                        .setBillingCountryCode("IE")
                        .setForceCountryCode("FR")
                        .setOrderDate("2014-06-01")
                        .setTransactionLines(Arrays.asList(
                                new InputTransactionLine()
                                        .setAmount(new BigDecimal(200))
                                        .setCustomId("line1"),
                                new InputTransactionLine()
                                        .setAmount(new BigDecimal(100))
                                        .setCustomId("line2")
                                        .setProductType("e-book")))));

        //first API call will take longer due to SSL handshake
        String key = createTransactionOut.getTransaction().getKey();
        System.out.println("Created transaction with key: " + key + " in " + (System.currentTimeMillis() - t) + "ms,\n" +
                           "Total amount: " + createTransactionOut.getTransaction().getTotalAmount());

        t = System.currentTimeMillis();

        //retrieve transaction details
        GetTransactionOut getTransactionOut = api.getTransaction(key);
        System.out.println("Retrieved transaction in " + (System.currentTimeMillis() - t) + "ms: " + getTransactionOut.getTransaction().getKey());


        t = System.currentTimeMillis();

        //confirm a transaction for it to appear in VAT settlement
        api.confirmTransaction(key, new ConfirmTransactionIn());
        System.out.println("Confirmed transaction with key: " + key + " in " + (System.currentTimeMillis() - t) + "ms");

    }
}
com.taxamo

Taxamo

Taxamo - EU VAT Compliance

Версии библиотеки

Версия
1.1.1
1.1.0
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2