Skip to content

Commit

Permalink
Merge pull request #168 from cardano-foundation/chore/split_organisat…
Browse files Browse the repository at this point in the history
…ion_endpoint

chore: split organisation endpoint in create and update
  • Loading branch information
M4rc0Russ0 authored Mar 3, 2025
2 parents 342a750 + 3069706 commit dcefe47
Show file tree
Hide file tree
Showing 11 changed files with 406 additions and 201 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AccountingCoreEventHandlerDuplicateEventsTest {
private TransactionReconcilationRepository transactionReconcilationRepository;

@BeforeEach
public void clearDatabase(@Autowired Flyway flyway){
void clearDatabase(@Autowired Flyway flyway){
flyway.clean();
flyway.migrate();
}
Expand Down

This file was deleted.

4 changes: 0 additions & 4 deletions organisation/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
plugins {
id("org.sonarqube")
}

dependencies {

implementation("org.springframework.modulith:spring-modulith-api")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ public class Organisation extends CommonEntity implements Persistable<String> {
@Column(name = "province", nullable = false)
private String province;

@Column(name = "country", nullable = false)
private String country;

@Column(name = "address", nullable = false)
private String address;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class OrganisationUpsert {
public class OrganisationCreate {

@Schema(example = "My company name")
private String name;
Expand All @@ -25,9 +25,6 @@ public class OrganisationUpsert {
@Schema(example = "Co. Wexford")
private String province;

@Schema(example = "Ireland")
private String country;

@Schema(example = "IE")
private String countryCode;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package org.cardanofoundation.lob.app.organisation.domain.request;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import io.swagger.v3.oas.annotations.media.Schema;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class OrganisationUpdate {

@Schema(example = "My company name")
private String name;

@Schema(example = "Ballyhealy")
private String city;

@Schema(example = "Y35 C6KC")
private String postCode;

@Schema(example = "Co. Wexford")
private String province;

@Schema(example = "Ballyhealy Cottage")
private String address;

@Schema(example = "0035863286566")
private String phoneNumber;

@Schema(example = "[email protected]")
private String adminEmail;

@Schema(example = "http://cardanofoundation.org")
private String websiteUrl;

@Schema(example = "ISO_4217:CHF")
private String currencyId;

@Schema(example = "ISO_4217:CHF")
private String reportCurrencyId;

}
Loading

0 comments on commit dcefe47

Please sign in to comment.