Skip to content

Commit 8466f9d

Browse files
committed
Add getInventoryStatesChanges method
1 parent 1f65afe commit 8466f9d

Some content is hidden

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

48 files changed

+493
-137
lines changed

.github/settings.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
5+
https://maven.apache.org/xsd/settings-1.0.0.xsd">
6+
<servers>
7+
<server>
8+
<id>github</id>
9+
<username>${env.MAVEN_USERNAME}</username>
10+
<password>${env.MAVEN_PASSWORD}</password>
11+
</server>
12+
<server>
13+
<id>central</id>
14+
<username>${{env.OSSRH_USERNAME_TOKEN }}</username>
15+
<password>${{env.OSSRH_PASSWORD_TOKEN }}</password>
16+
</server>
17+
</servers>
18+
19+
</settings>
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Publish to Maven Central
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- 'feature/release-*'
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '17'
23+
distribution: 'temurin'
24+
cache: maven
25+
26+
- name: Setup GPG
27+
env:
28+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
29+
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
30+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
31+
run: |
32+
echo "Setting up GPG..."
33+
mkdir -p ~/.gnupg
34+
chmod 700 ~/.gnupg
35+
36+
# Debug: Sprawdź długość klucza
37+
echo "GPG_PRIVATE_KEY length: ${#GPG_PRIVATE_KEY}"
38+
39+
# Debug: Sprawdź początek klucza (bez ujawniania tajemnicy)
40+
echo "GPG_KEYNAME: $GPG_KEYNAME"
41+
echo "GPG_PASSPHRASE length: ${#GPG_PASSPHRASE}"
42+
echo "First 10 chars of GPG_PRIVATE_KEY: ${GPG_PRIVATE_KEY:0:10}"
43+
44+
# Tepporary write key for debug
45+
echo "$GPG_PRIVATE_KEY" > private.tmp
46+
echo "File content (first line): $(head -1 private.tmp)"
47+
48+
# Import key
49+
echo "Importing GPG key..."
50+
gpg --batch --import private.tmp || echo "Import failed!"
51+
rm private.tmp
52+
53+
- name: Configure Maven
54+
run: |
55+
mkdir -p ~/.m2
56+
cat > ~/.m2/settings.xml << EOF
57+
<settings>
58+
<servers>
59+
<server>
60+
<id>central</id>
61+
<username>${{ secrets.OSSRH_USERNAME_TOKEN }}</username>
62+
<password>${{ secrets.OSSRH_PASSWORD_TOKEN }}</password>
63+
</server>
64+
</servers>
65+
<profiles>
66+
<profile>
67+
<id>central</id>
68+
<activation>
69+
<activeByDefault>true</activeByDefault>
70+
</activation>
71+
<properties>
72+
<gpg.executable>gpg</gpg.executable>
73+
<gpg.passphrase>${{ secrets.GPG_PASSPHRASE }}</gpg.passphrase>
74+
</properties>
75+
</profile>
76+
</profiles>
77+
</settings>
78+
EOF
79+
80+
- name: Build and Publish
81+
env:
82+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME_TOKEN }}
83+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD_TOKEN }}
84+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
85+
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
86+
run: |
87+
echo "Starting Maven build and deploy..."
88+
mvn clean deploy -P release \
89+
-Dmaven.javadoc.skip=false \
90+
-Dmaven.deploy.skip=false \
91+
-Dgpg.keyname=$GPG_KEYNAME \
92+
-Dgpg.useagent=false \
93+
-Dgpg.passphrase=$GPG_PASSPHRASE \
94+
-Dmaven.test.failure.ignore=false \
95+
-DaltDeploymentRepository=ossrh::default::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \
96+
-DrepositoryId=ossrh \
97+
-Dusername=$OSSRH_USERNAME \
98+
-Dpassword=$OSSRH_PASSWORD

.github/workflows/maven.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Publish
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
packages: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '17'
23+
distribution: 'temurin'
24+
cache: 'maven'
25+
- name: Build
26+
run: mvn clean install -Dmaven.javadoc.skip=true
27+
- name: Create Release
28+
if: startsWith(github.ref, 'refs/tags/')
29+
uses: softprops/action-gh-release@v1
30+
with:
31+
files: |
32+
target/*.jar
33+
target/*.pom
34+
target/*.asc
35+
target/*.md5
36+
target/*.sha1
37+
generate_release_notes: true
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: '17'
22+
distribution: 'temurin'
23+
cache: 'maven'
24+
25+
- name: Build with Maven
26+
run: |
27+
mvn -B clean package -DskipTests
28+
mvn -B javadoc:javadoc
29+
mvn -B source:jar
30+
31+
- name: Create Release
32+
uses: softprops/action-gh-release@v1
33+
with:
34+
name:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Ten klient API zapewnia interfejsy Java dla Symfonia WebAPI, umożliwiając pły
6060
6161
## 📦 Informacje o wersji
6262

63-
- **Aktualna wersja**: `0.1.0`
63+
- **Aktualna wersja**: `0.1.1`
6464
- **Wymagana wersja Java**: Java 17+
6565

6666
## 🔓 Licencja
@@ -89,7 +89,7 @@ Następnie dodaj zbudowany artefakt do swojego projektu:
8989
<dependency>
9090
<groupId>pl.wtx.symfonia</groupId>
9191
<artifactId>symfonia-erp-webapi-client</artifactId>
92-
<version>0.1.0</version>
92+
<version>0.1.1</version>
9393
</dependency>
9494
```
9595

@@ -168,6 +168,7 @@ Klient udostępnia następujące główne interfejsy API:
168168
### API stanów magazynowych
169169
- `getInventoryStates()` - Pobranie wszystkich stanów magazynowych
170170
- `getInventoryStatesByProduct(id, code)` - Pobranie stanów magazynowych dla towaru
171+
- `getInventoryStatesChanges(date)` - Pobranie zmian stanów magazynowych
171172

172173
### API zamówień
173174
- `getOrder(number)` - Pobranie szczegółów zamówienia

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>pl.wtx.symfonia</groupId>
77
<artifactId>symfonia-erp-webapi-client</artifactId>
8-
<version>0.1.0</version>
8+
<version>0.1.1</version>
99
<packaging>jar</packaging>
1010

1111
<name>Symfonia ERP WebAPI Client</name>

src/main/java/pl/wtx/symfonia/api/client/ContractorsApi.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
package pl.wtx.symfonia.api.client;
1515

16-
import com.google.gson.reflect.TypeToken;
17-
1816
import pl.wtx.symfonia.api.client.invoker.ApiCallback;
1917
import pl.wtx.symfonia.api.client.invoker.ApiClient;
2018
import pl.wtx.symfonia.api.client.invoker.ApiException;
@@ -23,10 +21,15 @@
2321
import pl.wtx.symfonia.api.client.invoker.Pair;
2422
import pl.wtx.symfonia.api.client.invoker.ProgressRequestBody;
2523
import pl.wtx.symfonia.api.client.invoker.ProgressResponseBody;
24+
25+
import com.google.gson.reflect.TypeToken;
26+
27+
import java.io.IOException;
28+
29+
2630
import pl.wtx.symfonia.api.client.model.ApiError;
2731
import pl.wtx.symfonia.api.client.model.Contractor;
2832

29-
import java.io.IOException;
3033
import java.lang.reflect.Type;
3134
import java.util.ArrayList;
3235
import java.util.HashMap;

0 commit comments

Comments
 (0)