Skip to content

Commit 4989e5c

Browse files
committed
Switch to code generated by the pgc-java-client
1 parent 2393282 commit 4989e5c

File tree

145 files changed

+1892
-3581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+1892
-3581
lines changed

.gitignore

+18-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ classes/
169169
hs_err_pid*
170170
### Gradle template
171171
.gradle
172-
/build/
173172

174173
# Ignore Gradle GUI config
175174
gradle-app.setting
@@ -182,3 +181,21 @@ gradle-app.setting
182181

183182
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
184183
# gradle/wrapper/gradle-wrapper.properties
184+
185+
# from `man gitignore`:
186+
# An optional prefix "!" which negates the pattern; any matching file
187+
# excluded by a previous pattern will become included again. It is
188+
# not possible to re-include a file if a parent directory of that
189+
# file is excluded. Git doesn't list excluded directories for
190+
# performance reasons, so any patterns on contained files have no
191+
# effect, no matter where they are defined. Put a backslash ("\") in
192+
# front of the first "!" for patterns that begin with a literal "!",
193+
# for example, "\!important!.txt".
194+
195+
# ignore directory build but not the generated xjc sources
196+
build/*
197+
!build/generated/
198+
build/generated/*
199+
!build/generated/sources/
200+
build/generated/sources/*
201+
!build/generated/sources/xjc

BUILD.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
* Copy up-to-date xsd's to src/main/resource/schemas
77
* run `./gradlew xjc`
8-
* results are in `src/main/java`
8+
* results are in `build/generated/sources/xjc`
99

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# README
33

4-
[![Release](https://jitpack.io/v/IXOPAY/java-ixopay.svg)](https://jitpack.io/#IXOPAY/java-ixopay)
4+
[![Release](https://jitpack.io/v/ixopay/java-ixopay.svg)](https://jitpack.io/#ixopay/java-ixopay)
55

66
## Using the library
77

build.gradle

+32-41
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
buildscript {
2-
repositories {
3-
jcenter()
4-
mavenCentral()
5-
}
61

7-
dependencies {
8-
classpath "com.github.jacobono:gradle-jaxb-plugin:1.3.6"
9-
}
2+
plugins {
3+
id 'java'
4+
id 'maven'
5+
id "com.github.bjornvester.xjc" version "1.3"
106
}
117

12-
apply plugin: "java"
13-
apply plugin: "maven"
14-
apply plugin: "com.github.jacobono.jaxb"
15-
168
group = "com.ixopay"
9+
version = "2.1"
1710

1811
sourceCompatibility = 1.8
1912
targetCompatibility = 1.8
2013

2114
repositories {
2215
mavenCentral()
23-
// maven { url "https://jitpack.io" } only needed for unused xjc plugin
2416
}
2517

26-
def xjcVersion = "2.2.7"
18+
def xjcVersion_ = "2.3.1"
2719

2820
sourceSets {
2921
example {
@@ -34,44 +26,43 @@ sourceSets {
3426
}
3527
}
3628

37-
dependencies {
38-
jaxb("org.jvnet.jaxb2_commons:jaxb2-basics-ant:0.6.5")
39-
jaxb("org.jvnet.jaxb2_commons:jaxb2-basics:0.6.4")
40-
jaxb("org.jvnet.jaxb2_commons:jaxb2-basics-annotate:0.6.4")
41-
42-
jaxb("com.sun.xml.bind:jaxb-xjc:$xjcVersion")
43-
jaxb("com.sun.xml.bind:jaxb-impl:$xjcVersion")
44-
jaxb("javax.xml.bind:jaxb-api:$xjcVersion")
29+
configurations {
30+
exampleCompile.extendsFrom compile
31+
exampleRuntime.extendsFrom runtime
32+
}
4533

46-
jaxb("org.jvnet.jaxb2_commons:jaxb2-value-constructor:3.0")
34+
dependencies {
35+
xjcPlugins("org.jvnet.jaxb2_commons:jaxb2-basics:0.12.0")
36+
xjcPlugins("org.jvnet.jaxb2_commons:jaxb2-basics-annotate:1.1.0")
37+
xjcPlugins("org.jvnet.jaxb2_commons:jaxb2-value-constructor:3.0")
4738

48-
compile("javax.xml.bind:jaxb-api:$xjcVersion")
39+
compile("javax.xml.bind:jaxb-api:$xjcVersion_")
4940
}
5041

51-
jaxb {
52-
System.setProperty('javax.xml.accessExternalSchema', 'all')
53-
54-
xsdDir = "src/main/resources/schemas/"
55-
episodesDir = "src/main/resources/episodes"
56-
bindingsDir = "src/main/resources/bindings"
57-
bindings = ["ixopay.xjb"]
42+
xjc {
43+
xsdDir = file("$projectDir/src/main/resources/com/ixopay/client/schemas")
44+
xjcVersion = xjcVersion_
45+
generateEpisode = true
46+
markGenerated = false
47+
bindingFiles = files("$projectDir/src/main/resources/com/ixopay/client/bindings/java-ixopay.xjb")
48+
options = ["-Xannotate", "-Xinheritance", "-Xvalue-constructor"]
49+
}
5850

59-
xjc {
60-
taskClassname = "org.jvnet.jaxb2_commons.xjc.XJC2Task"
61-
args = ["-Xannotate", "-Xinheritance", "-Xvalue-constructor"]
62-
}
51+
javadoc {
52+
options.addStringOption('Xdoclint:none', '-quiet')
6353
}
6454

65-
configurations {
66-
exampleCompile.extendsFrom compile
67-
exampleRuntime.extendsFrom runtime
55+
task sourcesJar(type: Jar) {
56+
archiveClassifier.set('sources')
57+
from(sourceSets.main.allSource)
6858
}
6959

70-
task sourcesJar(type: Jar, dependsOn: classes) {
71-
classifier = 'sources'
72-
from sourceSets.main.allSource
60+
task javadocJar(type: Jar) {
61+
archiveClassifier.set('javadoc')
62+
from(javadoc.destinationDir)
7363
}
7464

7565
artifacts {
7666
archives sourcesJar
67+
archives javadocJar
7768
}

src/main/java/com/ixopay/client/model/callback/OriginalCallbackType.java renamed to build/generated/sources/xjc/java/com/ixopay/client/model/callback/CallbackType.java

+34-41
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
//
2-
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
3-
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
4-
// Any modifications to this file will be lost upon recompilation of the source schema.
5-
// Generated on: 2019.05.21 at 03:44:38 PM CEST
6-
//
7-
81

92
package com.ixopay.client.model.callback;
103

@@ -15,7 +8,7 @@
158
import javax.xml.bind.annotation.XmlAccessorType;
169
import javax.xml.bind.annotation.XmlElement;
1710
import javax.xml.bind.annotation.XmlRootElement;
18-
import javax.xml.bind.annotation.XmlSeeAlso;
11+
import javax.xml.bind.annotation.XmlSchemaType;
1912
import javax.xml.bind.annotation.XmlType;
2013

2114

@@ -25,38 +18,38 @@
2518
* <p>The following schema fragment specifies the expected content contained within this class.
2619
*
2720
* <pre>
28-
* &lt;complexType name="callbackType">
29-
* &lt;complexContent>
30-
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
31-
* &lt;sequence>
32-
* &lt;element name="result" type="{http://gateway.ixopay.com/Schema/V2/Callback}resultType"/>
33-
* &lt;element name="referenceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
34-
* &lt;element name="transactionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
35-
* &lt;element name="purchaseId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
36-
* &lt;element name="transactionType" type="{http://gateway.ixopay.com/Schema/V2/Callback}transactionMethodType" minOccurs="0"/>
37-
* &lt;element name="paymentMethod" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
38-
* &lt;element name="amount" type="{http://gateway.ixopay.com/Schema/V2/Callback}amountType" minOccurs="0"/>
39-
* &lt;element name="currency" type="{http://gateway.ixopay.com/Schema/V2/Callback}currencyType" minOccurs="0"/>
40-
* &lt;element name="scheduleId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
41-
* &lt;element name="scheduleStatus" type="{http://gateway.ixopay.com/Schema/V2/Callback}scheduleStatusType" minOccurs="0"/>
42-
* &lt;element name="customerProfile" type="{http://gateway.ixopay.com/Schema/V2/Callback}customerProfileDataType" minOccurs="0"/>
43-
* &lt;element name="errors" type="{http://gateway.ixopay.com/Schema/V2/Callback}errorsType" minOccurs="0"/>
44-
* &lt;element name="chargebackData" type="{http://gateway.ixopay.com/Schema/V2/Callback}chargebackDataType" minOccurs="0"/>
45-
* &lt;element name="chargebackReversalData" type="{http://gateway.ixopay.com/Schema/V2/Callback}chargebackReversalDataType" minOccurs="0"/>
46-
* &lt;element name="extraData" type="{http://gateway.ixopay.com/Schema/V2/Callback}extraDataType" maxOccurs="unbounded" minOccurs="0"/>
47-
* &lt;element name="merchantMetaData" type="{http://gateway.ixopay.com/Schema/V2/Callback}merchantMetaDataType" minOccurs="0"/>
48-
* &lt;element name="returnData" type="{http://gateway.ixopay.com/Schema/V2/Callback}returnDataType" minOccurs="0"/>
49-
* &lt;element name="customerData" type="{http://gateway.ixopay.com/Schema/V2/Callback}customerDataType" minOccurs="0"/>
50-
* &lt;/sequence>
51-
* &lt;/restriction>
52-
* &lt;/complexContent>
53-
* &lt;/complexType>
21+
* &lt;complexType name="callbackType"&gt;
22+
* &lt;complexContent&gt;
23+
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
24+
* &lt;sequence&gt;
25+
* &lt;element name="result" type="{http://gateway.ixopay.com/Schema/V2/Callback}resultType"/&gt;
26+
* &lt;element name="referenceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
27+
* &lt;element name="transactionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
28+
* &lt;element name="purchaseId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
29+
* &lt;element name="transactionType" type="{http://gateway.ixopay.com/Schema/V2/Callback}transactionMethodType" minOccurs="0"/&gt;
30+
* &lt;element name="paymentMethod" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
31+
* &lt;element name="amount" type="{http://gateway.ixopay.com/Schema/V2/Callback}amountType" minOccurs="0"/&gt;
32+
* &lt;element name="currency" type="{http://gateway.ixopay.com/Schema/V2/Callback}currencyType" minOccurs="0"/&gt;
33+
* &lt;element name="scheduleId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
34+
* &lt;element name="scheduleStatus" type="{http://gateway.ixopay.com/Schema/V2/Callback}scheduleStatusType" minOccurs="0"/&gt;
35+
* &lt;element name="customerProfile" type="{http://gateway.ixopay.com/Schema/V2/Callback}customerProfileDataType" minOccurs="0"/&gt;
36+
* &lt;element name="errors" type="{http://gateway.ixopay.com/Schema/V2/Callback}errorsType" minOccurs="0"/&gt;
37+
* &lt;element name="chargebackData" type="{http://gateway.ixopay.com/Schema/V2/Callback}chargebackDataType" minOccurs="0"/&gt;
38+
* &lt;element name="chargebackReversalData" type="{http://gateway.ixopay.com/Schema/V2/Callback}chargebackReversalDataType" minOccurs="0"/&gt;
39+
* &lt;element name="extraData" type="{http://gateway.ixopay.com/Schema/V2/Callback}extraDataType" maxOccurs="unbounded" minOccurs="0"/&gt;
40+
* &lt;element name="merchantMetaData" type="{http://gateway.ixopay.com/Schema/V2/Callback}merchantMetaDataType" minOccurs="0"/&gt;
41+
* &lt;element name="returnData" type="{http://gateway.ixopay.com/Schema/V2/Callback}returnDataType" minOccurs="0"/&gt;
42+
* &lt;element name="customerData" type="{http://gateway.ixopay.com/Schema/V2/Callback}customerDataType" minOccurs="0"/&gt;
43+
* &lt;/sequence&gt;
44+
* &lt;/restriction&gt;
45+
* &lt;/complexContent&gt;
46+
* &lt;/complexType&gt;
5447
* </pre>
5548
*
5649
*
5750
*/
5851
@XmlAccessorType(XmlAccessType.FIELD)
59-
@XmlType(name = "", propOrder = {
52+
@XmlType(name = "callbackType", propOrder = {
6053
"result",
6154
"referenceId",
6255
"transactionId",
@@ -76,22 +69,22 @@
7669
"returnData",
7770
"customerData"
7871
})
79-
@XmlSeeAlso({
80-
CallbackType.class
81-
})
8272
@XmlRootElement(name = "callback")
83-
public class OriginalCallbackType {
73+
public class CallbackType {
8474

8575
@XmlElement(required = true)
76+
@XmlSchemaType(name = "string")
8677
protected ResultType result;
8778
protected String referenceId;
8879
protected String transactionId;
8980
protected String purchaseId;
81+
@XmlSchemaType(name = "string")
9082
protected TransactionMethodType transactionType;
9183
protected String paymentMethod;
9284
protected BigDecimal amount;
9385
protected String currency;
9486
protected String scheduleId;
87+
@XmlSchemaType(name = "string")
9588
protected ScheduleStatusType scheduleStatus;
9689
protected CustomerProfileDataType customerProfile;
9790
protected ErrorsType errors;
@@ -106,15 +99,15 @@ public class OriginalCallbackType {
10699
* Default no-arg constructor
107100
*
108101
*/
109-
public OriginalCallbackType() {
102+
public CallbackType() {
110103
super();
111104
}
112105

113106
/**
114107
* Fully-initialising value constructor
115108
*
116109
*/
117-
public OriginalCallbackType(final ResultType result, final String referenceId, final String transactionId, final String purchaseId, final TransactionMethodType transactionType, final String paymentMethod, final BigDecimal amount, final String currency, final String scheduleId, final ScheduleStatusType scheduleStatus, final CustomerProfileDataType customerProfile, final ErrorsType errors, final ChargebackDataType chargebackData, final ChargebackReversalDataType chargebackReversalData, final List<ExtraDataType> extraData, final String merchantMetaData, final ReturnDataType returnData, final CustomerDataType customerData) {
110+
public CallbackType(final ResultType result, final String referenceId, final String transactionId, final String purchaseId, final TransactionMethodType transactionType, final String paymentMethod, final BigDecimal amount, final String currency, final String scheduleId, final ScheduleStatusType scheduleStatus, final CustomerProfileDataType customerProfile, final ErrorsType errors, final ChargebackDataType chargebackData, final ChargebackReversalDataType chargebackReversalData, final List<ExtraDataType> extraData, final String merchantMetaData, final ReturnDataType returnData, final CustomerDataType customerData) {
118111
this.result = result;
119112
this.referenceId = referenceId;
120113
this.transactionId = transactionId;

src/main/java/com/ixopay/client/model/callback/ChargebackDataType.java renamed to build/generated/sources/xjc/java/com/ixopay/client/model/callback/ChargebackDataType.java

+14-21
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
//
2-
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
3-
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
4-
// Any modifications to this file will be lost upon recompilation of the source schema.
5-
// Generated on: 2019.05.21 at 03:44:38 PM CEST
6-
//
7-
81

92
package com.ixopay.client.model.callback;
103

@@ -22,20 +15,20 @@
2215
* <p>The following schema fragment specifies the expected content contained within this class.
2316
*
2417
* <pre>
25-
* &lt;complexType name="chargebackDataType">
26-
* &lt;complexContent>
27-
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
28-
* &lt;sequence>
29-
* &lt;element name="originalReferenceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
30-
* &lt;element name="originalTransactionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
31-
* &lt;element name="amount" type="{http://gateway.ixopay.com/Schema/V2/Callback}amountType" minOccurs="0"/>
32-
* &lt;element name="currency" type="{http://gateway.ixopay.com/Schema/V2/Callback}currencyType" minOccurs="0"/>
33-
* &lt;element name="reason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
34-
* &lt;element name="chargebackDateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
35-
* &lt;/sequence>
36-
* &lt;/restriction>
37-
* &lt;/complexContent>
38-
* &lt;/complexType>
18+
* &lt;complexType name="chargebackDataType"&gt;
19+
* &lt;complexContent&gt;
20+
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
21+
* &lt;sequence&gt;
22+
* &lt;element name="originalReferenceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
23+
* &lt;element name="originalTransactionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
24+
* &lt;element name="amount" type="{http://gateway.ixopay.com/Schema/V2/Callback}amountType" minOccurs="0"/&gt;
25+
* &lt;element name="currency" type="{http://gateway.ixopay.com/Schema/V2/Callback}currencyType" minOccurs="0"/&gt;
26+
* &lt;element name="reason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
27+
* &lt;element name="chargebackDateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/&gt;
28+
* &lt;/sequence&gt;
29+
* &lt;/restriction&gt;
30+
* &lt;/complexContent&gt;
31+
* &lt;/complexType&gt;
3932
* </pre>
4033
*
4134
*

src/main/java/com/ixopay/client/model/callback/ChargebackReversalDataType.java renamed to build/generated/sources/xjc/java/com/ixopay/client/model/callback/ChargebackReversalDataType.java

+15-22
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
//
2-
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
3-
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
4-
// Any modifications to this file will be lost upon recompilation of the source schema.
5-
// Generated on: 2019.05.21 at 03:44:38 PM CEST
6-
//
7-
81

92
package com.ixopay.client.model.callback;
103

@@ -22,21 +15,21 @@
2215
* <p>The following schema fragment specifies the expected content contained within this class.
2316
*
2417
* <pre>
25-
* &lt;complexType name="chargebackReversalDataType">
26-
* &lt;complexContent>
27-
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
28-
* &lt;sequence>
29-
* &lt;element name="originalReferenceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
30-
* &lt;element name="originalTransactionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
31-
* &lt;element name="chargebackReferenceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
32-
* &lt;element name="amount" type="{http://gateway.ixopay.com/Schema/V2/Callback}amountType" minOccurs="0"/>
33-
* &lt;element name="currency" type="{http://gateway.ixopay.com/Schema/V2/Callback}currencyType" minOccurs="0"/>
34-
* &lt;element name="reason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
35-
* &lt;element name="reversalDateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
36-
* &lt;/sequence>
37-
* &lt;/restriction>
38-
* &lt;/complexContent>
39-
* &lt;/complexType>
18+
* &lt;complexType name="chargebackReversalDataType"&gt;
19+
* &lt;complexContent&gt;
20+
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
21+
* &lt;sequence&gt;
22+
* &lt;element name="originalReferenceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
23+
* &lt;element name="originalTransactionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
24+
* &lt;element name="chargebackReferenceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
25+
* &lt;element name="amount" type="{http://gateway.ixopay.com/Schema/V2/Callback}amountType" minOccurs="0"/&gt;
26+
* &lt;element name="currency" type="{http://gateway.ixopay.com/Schema/V2/Callback}currencyType" minOccurs="0"/&gt;
27+
* &lt;element name="reason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
28+
* &lt;element name="reversalDateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/&gt;
29+
* &lt;/sequence&gt;
30+
* &lt;/restriction&gt;
31+
* &lt;/complexContent&gt;
32+
* &lt;/complexType&gt;
4033
* </pre>
4134
*
4235
*

0 commit comments

Comments
 (0)