Skip to content

Commit

Permalink
0.3.0 (#11)
Browse files Browse the repository at this point in the history
* Add missing methods to attachment resource
* Rename HttpClientWrapper to HttpClientImpl
* Cleanup HttpClientImpl
* Add toCopy Method for document resource
* @SuppressFBWarnings to suppress mutability issues with httpclient interface
  • Loading branch information
BolZer authored Sep 13, 2023
1 parent af4ba4e commit 2a8480d
Show file tree
Hide file tree
Showing 42 changed files with 1,308 additions and 539 deletions.
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog

**2023-09-13 - Version 0.3.0**
- Finalize Attachment Resource
- Add missing copy method in Document Resource
- Cleanup HttpClientImpl

**2023-09-05 - Version 0.2.1**
- Fix Release

Expand Down
12 changes: 6 additions & 6 deletions easybill-java-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import java.net.URI

version = "0.2.1"
version = "0.3.0"

java {
withJavadocJar()
Expand All @@ -18,10 +18,10 @@ plugins {
id("java-library")
id("maven-publish")
id("signing")
id("com.diffplug.spotless") version "6.20.0"
id("com.github.spotbugs") version "5.1.0"
id("org.checkerframework") version "0.6.30"
id("io.freefair.lombok") version "8.1.0"
id("com.diffplug.spotless") version "6.21.0"
id("com.github.spotbugs") version "5.1.3"
id("org.checkerframework") version "0.6.33"
id("io.freefair.lombok") version "8.3"
}

dependencies {
Expand Down Expand Up @@ -51,7 +51,7 @@ publishing {
create<MavenPublication>("maven") {
groupId = "io.github.bolzer"
artifactId = "easybill-java-sdk"
version = "0.2.1"
version = "0.3.0"

from(components["java"])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public final class Client {

@NonNull
public static final String USER_AGENT = "easybill-JAVA-REST-SDK-0.2.1";
public static final String USER_AGENT = "easybill-JAVA-REST-SDK-0.3.0";

@NonNull
@SuppressFBWarnings
Expand All @@ -17,82 +17,102 @@ public final class Client {
@NonNull
private final HttpClient httpClient;

/** @param bearerToken the bearer token for authentication purpose*/
public Client(@NonNull String bearerToken) {
this.httpClient = new HttpClientWrapper(bearerToken);
this.httpClient = new HttpClientImpl(bearerToken);
}

/** Returns an object that holds methods to interact with the document endpoint of the easybill REST API */
public @NonNull DocumentResource getDocumentsResource() {
return new DocumentResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the customer endpoint of the easybill REST API */
public @NonNull CustomerResource getCustomerResource() {
return new CustomerResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the position endpoint of the easybill REST API */
public @NonNull PositionResource getPositionResource() {
return new PositionResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the position group endpoint of the easybill REST API */
public @NonNull PositionGroupResource getPositionGroupResource() {
return new PositionGroupResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the customer group endpoint of the easybill REST API */
public @NonNull CustomerGroupResource getCustomerGroupResource() {
return new CustomerGroupResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the login endpoint of the easybill REST API*/
public @NonNull LoginResource getLoginResource() {
return new LoginResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the pdf template endpoint of the easybill REST API */
public @NonNull PdfTemplateResource getPdfTemplateResource() {
return new PdfTemplateResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the text template endpoint of the easybill REST API */
public @NonNull TextTemplateResource getTextTemplateResource() {
return new TextTemplateResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the document payment endpoint of the easybill REST API */
public @NonNull DocumentPaymentResource getDocumentPaymentResource() {
return new DocumentPaymentResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the postbox endpoint of the easybill REST API */
public @NonNull PostBoxResource getPostBoxResource() {
return new PostBoxResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the webhook endpoint of the easybill REST API */
public @NonNull WebhookResource getWebhookResource() {
return new WebhookResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the stock endpoint of the easybill REST API */
public @NonNull StockResource getStockResource() {
return new StockResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the serialnumber endpoint of the easybill REST API */
public @NonNull SerialNumberResource getSerialNumberResource() {
return new SerialNumberResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the sepa payment endpoint of the easybill REST API */
public @NonNull SepaPaymentResource getSepaPaymentResource() {
return new SepaPaymentResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the project endpoint of the easybill REST API */
public @NonNull ProjectResource getProjectResource() {
return new ProjectResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the time tracking endpoint of the easybill REST API */
public @NonNull TimeTrackingResource getTimeTrackingResource() {
return new TimeTrackingResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the discount endpoint of the easybill REST API */
public @NonNull DiscountResource getDiscountResource() {
return new DiscountResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the contact endpoint of the easybill REST API */
public @NonNull ContactResource getContactResource() {
return new ContactResource(this.httpClient);
}

/** Returns an object that holds methods to interact with the attachment endpoint of the easybill REST API */
public @NonNull AttachmentResource getAttachmentResource() {
return new AttachmentResource(this.httpClient);
}
Expand Down
Loading

0 comments on commit 2a8480d

Please sign in to comment.