Skip to content

Commit b8d64cd

Browse files
author
glondhe
committed
Adding client code
1 parent 824ff72 commit b8d64cd

File tree

533 files changed

+59302
-0
lines changed

Some content is hidden

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

533 files changed

+59302
-0
lines changed

build.gradle

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
apply plugin: 'idea'
2+
apply plugin: 'eclipse'
3+
4+
group = 'io.swagger'
5+
version = '1.0.0'
6+
7+
buildscript {
8+
repositories {
9+
jcenter()
10+
}
11+
dependencies {
12+
classpath 'com.android.tools.build:gradle:2.3.+'
13+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
14+
}
15+
}
16+
17+
repositories {
18+
jcenter()
19+
}
20+
21+
22+
if(hasProperty('target') && target == 'android') {
23+
24+
apply plugin: 'com.android.library'
25+
apply plugin: 'com.github.dcendents.android-maven'
26+
27+
android {
28+
compileSdkVersion 25
29+
buildToolsVersion '25.0.2'
30+
defaultConfig {
31+
minSdkVersion 14
32+
targetSdkVersion 25
33+
}
34+
compileOptions {
35+
sourceCompatibility JavaVersion.VERSION_1_7
36+
targetCompatibility JavaVersion.VERSION_1_7
37+
}
38+
39+
// Rename the aar correctly
40+
libraryVariants.all { variant ->
41+
variant.outputs.each { output ->
42+
def outputFile = output.outputFile
43+
if (outputFile != null && outputFile.name.endsWith('.aar')) {
44+
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
45+
output.outputFile = new File(outputFile.parent, fileName)
46+
}
47+
}
48+
}
49+
50+
dependencies {
51+
provided 'javax.annotation:jsr250-api:1.0'
52+
}
53+
}
54+
55+
afterEvaluate {
56+
android.libraryVariants.all { variant ->
57+
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
58+
task.description = "Create jar artifact for ${variant.name}"
59+
task.dependsOn variant.javaCompile
60+
task.from variant.javaCompile.destinationDir
61+
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
62+
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
63+
artifacts.add('archives', task);
64+
}
65+
}
66+
67+
task sourcesJar(type: Jar) {
68+
from android.sourceSets.main.java.srcDirs
69+
classifier = 'sources'
70+
}
71+
72+
artifacts {
73+
archives sourcesJar
74+
}
75+
76+
} else {
77+
78+
apply plugin: 'java'
79+
apply plugin: 'maven'
80+
81+
sourceCompatibility = JavaVersion.VERSION_1_7
82+
targetCompatibility = JavaVersion.VERSION_1_7
83+
84+
install {
85+
repositories.mavenInstaller {
86+
pom.artifactId = 'swagger-java-client'
87+
}
88+
}
89+
90+
task execute(type:JavaExec) {
91+
main = System.getProperty('mainClass')
92+
classpath = sourceSets.main.runtimeClasspath
93+
}
94+
}
95+
96+
dependencies {
97+
compile 'io.swagger:swagger-annotations:1.5.15'
98+
compile 'com.squareup.okhttp:okhttp:2.7.5'
99+
compile 'com.squareup.okhttp:logging-interceptor:2.7.5'
100+
compile 'com.google.code.gson:gson:2.8.1'
101+
compile 'joda-time:joda-time:2.9.9'
102+
testCompile 'junit:junit:4.12'
103+
}

build.sbt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
lazy val root = (project in file(".")).
2+
settings(
3+
organization := "io.swagger",
4+
name := "swagger-java-client",
5+
version := "1.0.0",
6+
scalaVersion := "2.11.4",
7+
scalacOptions ++= Seq("-feature"),
8+
javacOptions in compile ++= Seq("-Xlint:deprecation"),
9+
publishArtifact in (Compile, packageDoc) := false,
10+
resolvers += Resolver.mavenLocal,
11+
libraryDependencies ++= Seq(
12+
"io.swagger" % "swagger-annotations" % "1.5.15",
13+
"com.squareup.okhttp" % "okhttp" % "2.7.5",
14+
"com.squareup.okhttp" % "logging-interceptor" % "2.7.5",
15+
"com.google.code.gson" % "gson" % "2.8.1",
16+
"joda-time" % "joda-time" % "2.9.9" % "compile",
17+
"junit" % "junit" % "4.12" % "test",
18+
"com.novocode" % "junit-interface" % "0.10" % "test"
19+
)
20+
)

docs/AuthReversalRequest.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
# AuthReversalRequest
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**clientReferenceInformation** | [**V2paymentsidreversalsClientReferenceInformation**](V2paymentsidreversalsClientReferenceInformation.md) | | [optional]
8+
**reversalInformation** | [**V2paymentsidreversalsReversalInformation**](V2paymentsidreversalsReversalInformation.md) | | [optional]
9+
**processingInformation** | [**V2paymentsidreversalsProcessingInformation**](V2paymentsidreversalsProcessingInformation.md) | | [optional]
10+
**orderInformation** | [**V2paymentsidreversalsOrderInformation**](V2paymentsidreversalsOrderInformation.md) | | [optional]
11+
**pointOfSaleInformation** | [**V2paymentsidreversalsPointOfSaleInformation**](V2paymentsidreversalsPointOfSaleInformation.md) | | [optional]
12+
13+
14+

docs/Body.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
# Body
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**links** | [**InstrumentidentifiersLinks**](InstrumentidentifiersLinks.md) | | [optional]
8+
**id** | **String** | Unique identification number assigned by CyberSource to the submitted request. | [optional]
9+
**object** | [**ObjectEnum**](#ObjectEnum) | Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. | [optional]
10+
**state** | [**StateEnum**](#StateEnum) | Current state of the token. | [optional]
11+
**card** | [**InstrumentidentifiersCard**](InstrumentidentifiersCard.md) | | [optional]
12+
**bankAccount** | [**InstrumentidentifiersBankAccount**](InstrumentidentifiersBankAccount.md) | | [optional]
13+
**processingInformation** | [**InstrumentidentifiersProcessingInformation**](InstrumentidentifiersProcessingInformation.md) | | [optional]
14+
**metadata** | [**InstrumentidentifiersMetadata**](InstrumentidentifiersMetadata.md) | | [optional]
15+
16+
17+
<a name="ObjectEnum"></a>
18+
## Enum: ObjectEnum
19+
Name | Value
20+
---- | -----
21+
INSTRUMENTIDENTIFIER | &quot;instrumentIdentifier&quot;
22+
23+
24+
<a name="StateEnum"></a>
25+
## Enum: StateEnum
26+
Name | Value
27+
---- | -----
28+
ACTIVE | &quot;ACTIVE&quot;
29+
CLOSED | &quot;CLOSED&quot;
30+
31+
32+

docs/Body1.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# Body1
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**processingInformation** | [**InstrumentidentifiersProcessingInformation**](InstrumentidentifiersProcessingInformation.md) | | [optional]
8+
9+
10+

docs/Body2.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
# Body2
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**links** | [**InstrumentidentifiersLinks**](InstrumentidentifiersLinks.md) | | [optional]
8+
**id** | **String** | Unique identification number assigned by CyberSource to the submitted request. | [optional]
9+
**object** | [**ObjectEnum**](#ObjectEnum) | Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. | [optional]
10+
**state** | [**StateEnum**](#StateEnum) | Current state of the token. | [optional]
11+
**bankAccount** | [**PaymentinstrumentsBankAccount**](PaymentinstrumentsBankAccount.md) | | [optional]
12+
**card** | [**PaymentinstrumentsCard**](PaymentinstrumentsCard.md) | | [optional]
13+
**buyerInformation** | [**PaymentinstrumentsBuyerInformation**](PaymentinstrumentsBuyerInformation.md) | | [optional]
14+
**billTo** | [**PaymentinstrumentsBillTo**](PaymentinstrumentsBillTo.md) | | [optional]
15+
**processingInformation** | [**PaymentinstrumentsProcessingInformation**](PaymentinstrumentsProcessingInformation.md) | | [optional]
16+
**merchantInformation** | [**PaymentinstrumentsMerchantInformation**](PaymentinstrumentsMerchantInformation.md) | | [optional]
17+
**metaData** | [**InstrumentidentifiersMetadata**](InstrumentidentifiersMetadata.md) | | [optional]
18+
**instrumentIdentifier** | [**PaymentinstrumentsInstrumentIdentifier**](PaymentinstrumentsInstrumentIdentifier.md) | | [optional]
19+
20+
21+
<a name="ObjectEnum"></a>
22+
## Enum: ObjectEnum
23+
Name | Value
24+
---- | -----
25+
PAYMENTINSTRUMENT | &quot;paymentInstrument&quot;
26+
27+
28+
<a name="StateEnum"></a>
29+
## Enum: StateEnum
30+
Name | Value
31+
---- | -----
32+
ACTIVE | &quot;ACTIVE&quot;
33+
CLOSED | &quot;CLOSED&quot;
34+
35+
36+

docs/Body3.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
# Body3
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**links** | [**InstrumentidentifiersLinks**](InstrumentidentifiersLinks.md) | | [optional]
8+
**id** | **String** | Unique identification number assigned by CyberSource to the submitted request. | [optional]
9+
**object** | [**ObjectEnum**](#ObjectEnum) | Describes type of token. For example: customer, paymentInstrument or instrumentIdentifier. | [optional]
10+
**state** | [**StateEnum**](#StateEnum) | Current state of the token. | [optional]
11+
**bankAccount** | [**PaymentinstrumentsBankAccount**](PaymentinstrumentsBankAccount.md) | | [optional]
12+
**card** | [**PaymentinstrumentsCard**](PaymentinstrumentsCard.md) | | [optional]
13+
**buyerInformation** | [**PaymentinstrumentsBuyerInformation**](PaymentinstrumentsBuyerInformation.md) | | [optional]
14+
**billTo** | [**PaymentinstrumentsBillTo**](PaymentinstrumentsBillTo.md) | | [optional]
15+
**processingInformation** | [**PaymentinstrumentsProcessingInformation**](PaymentinstrumentsProcessingInformation.md) | | [optional]
16+
**merchantInformation** | [**PaymentinstrumentsMerchantInformation**](PaymentinstrumentsMerchantInformation.md) | | [optional]
17+
**metaData** | [**InstrumentidentifiersMetadata**](InstrumentidentifiersMetadata.md) | | [optional]
18+
**instrumentIdentifier** | [**PaymentinstrumentsInstrumentIdentifier**](PaymentinstrumentsInstrumentIdentifier.md) | | [optional]
19+
20+
21+
<a name="ObjectEnum"></a>
22+
## Enum: ObjectEnum
23+
Name | Value
24+
---- | -----
25+
PAYMENTINSTRUMENT | &quot;paymentInstrument&quot;
26+
27+
28+
<a name="StateEnum"></a>
29+
## Enum: StateEnum
30+
Name | Value
31+
---- | -----
32+
ACTIVE | &quot;ACTIVE&quot;
33+
CLOSED | &quot;CLOSED&quot;
34+
35+
36+

docs/CaptureApi.md

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# CaptureApi
2+
3+
All URIs are relative to *https://api.cybersource.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**capturePayment**](CaptureApi.md#capturePayment) | **POST** /v2/payments/{id}/captures | Capture a Payment
8+
[**getCapture**](CaptureApi.md#getCapture) | **GET** /v2/captures/{id} | Retrieve a Capture
9+
10+
11+
<a name="capturePayment"></a>
12+
# **capturePayment**
13+
> InlineResponse2012 capturePayment(capturePaymentRequest, id)
14+
15+
Capture a Payment
16+
17+
Include the payment ID in the POST request to capture the payment amount.
18+
19+
### Example
20+
```java
21+
// Import classes:
22+
//import Invokers.ApiException;
23+
//import Api.CaptureApi;
24+
25+
26+
CaptureApi apiInstance = new CaptureApi();
27+
CapturePaymentRequest capturePaymentRequest = new CapturePaymentRequest(); // CapturePaymentRequest |
28+
String id = "id_example"; // String | The payment ID returned from a previous payment request. This ID links the capture to the payment.
29+
try {
30+
InlineResponse2012 result = apiInstance.capturePayment(capturePaymentRequest, id);
31+
System.out.println(result);
32+
} catch (ApiException e) {
33+
System.err.println("Exception when calling CaptureApi#capturePayment");
34+
e.printStackTrace();
35+
}
36+
```
37+
38+
### Parameters
39+
40+
Name | Type | Description | Notes
41+
------------- | ------------- | ------------- | -------------
42+
**capturePaymentRequest** | [**CapturePaymentRequest**](CapturePaymentRequest.md)| |
43+
**id** | **String**| The payment ID returned from a previous payment request. This ID links the capture to the payment. |
44+
45+
### Return type
46+
47+
[**InlineResponse2012**](InlineResponse2012.md)
48+
49+
### Authorization
50+
51+
No authorization required
52+
53+
### HTTP request headers
54+
55+
- **Content-Type**: Not defined
56+
- **Accept**: application/json
57+
58+
<a name="getCapture"></a>
59+
# **getCapture**
60+
> InlineResponse2004 getCapture(id)
61+
62+
Retrieve a Capture
63+
64+
Include the capture ID in the GET request to retrieve the capture details.
65+
66+
### Example
67+
```java
68+
// Import classes:
69+
//import Invokers.ApiException;
70+
//import Api.CaptureApi;
71+
72+
73+
CaptureApi apiInstance = new CaptureApi();
74+
String id = "id_example"; // String | The capture ID returned from a previous capture request.
75+
try {
76+
InlineResponse2004 result = apiInstance.getCapture(id);
77+
System.out.println(result);
78+
} catch (ApiException e) {
79+
System.err.println("Exception when calling CaptureApi#getCapture");
80+
e.printStackTrace();
81+
}
82+
```
83+
84+
### Parameters
85+
86+
Name | Type | Description | Notes
87+
------------- | ------------- | ------------- | -------------
88+
**id** | **String**| The capture ID returned from a previous capture request. |
89+
90+
### Return type
91+
92+
[**InlineResponse2004**](InlineResponse2004.md)
93+
94+
### Authorization
95+
96+
No authorization required
97+
98+
### HTTP request headers
99+
100+
- **Content-Type**: Not defined
101+
- **Accept**: application/json
102+

docs/CapturePaymentRequest.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# CapturePaymentRequest
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**clientReferenceInformation** | [**V2paymentsClientReferenceInformation**](V2paymentsClientReferenceInformation.md) | | [optional]
8+
**processingInformation** | [**V2paymentsidcapturesProcessingInformation**](V2paymentsidcapturesProcessingInformation.md) | | [optional]
9+
**paymentInformation** | [**V2paymentsidcapturesPaymentInformation**](V2paymentsidcapturesPaymentInformation.md) | | [optional]
10+
**orderInformation** | [**V2paymentsidcapturesOrderInformation**](V2paymentsidcapturesOrderInformation.md) | | [optional]
11+
**buyerInformation** | [**V2paymentsidcapturesBuyerInformation**](V2paymentsidcapturesBuyerInformation.md) | | [optional]
12+
**deviceInformation** | [**V2paymentsDeviceInformation**](V2paymentsDeviceInformation.md) | | [optional]
13+
**merchantInformation** | [**V2paymentsidcapturesMerchantInformation**](V2paymentsidcapturesMerchantInformation.md) | | [optional]
14+
**aggregatorInformation** | [**V2paymentsidcapturesAggregatorInformation**](V2paymentsidcapturesAggregatorInformation.md) | | [optional]
15+
**pointOfSaleInformation** | [**V2paymentsidcapturesPointOfSaleInformation**](V2paymentsidcapturesPointOfSaleInformation.md) | | [optional]
16+
**merchantDefinedInformation** | [**List&lt;V2paymentsMerchantDefinedInformation&gt;**](V2paymentsMerchantDefinedInformation.md) | TBD | [optional]
17+
18+
19+

docs/CardInfo.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
# CardInfo
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**cardNumber** | **String** | Encrypted or plain text card number. If the encryption type of “None” was used in the Generate Key request, this value can be set to the plaintext card number/Personal Account Number (PAN). If the encryption type of RsaOaep256 was used in the Generate Key request, this value needs to be the RSA OAEP 256 encrypted card number. The card number should be encrypted on the cardholders’ device. The [WebCrypto API] (https://github.com/CyberSource/cybersource-flex-samples/blob/master/java/spring-boot/src/main/resources/public/flex.js) can be used with the JWK obtained in the Generate Key request. | [optional]
8+
**cardExpirationMonth** | **String** | Two digit expiration month | [optional]
9+
**cardExpirationYear** | **String** | Four digit expiration year | [optional]
10+
**cardType** | **String** | Card Type. This field is required. Refer to the CyberSource Credit Card Services documentation for supported card types. | [optional]
11+
12+
13+

0 commit comments

Comments
 (0)