Skip to content

Commit

Permalink
upd: listing
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdev01 committed Dec 8, 2024
1 parent 277c174 commit 6fae320
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 23 deletions.
2 changes: 2 additions & 0 deletions src/main/java/io/github/jpdev/asaassdk/http/Domain.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public enum Domain {
CUSTOMER_ACCOUNT_NOTIFICATIONS("customers/$id/notifications"),
PAYMENT_STATUS("payments/$id/status"),
PAYMENT_RESTORE("payments/$id/restore"),
PAYMENT_SPLIT_RECEIVED("payments/splits/received"),
PAYMENT_SPLIT_PAID("payments/splits/paid"),
INSTALLMENT("installments"),
FINANCE_BALANCE("finance/balance"),
PAYMENT_LINK("paymentLinks"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import io.github.jpdev.asaassdk.rest.payment.delete.PaymentDeleter;
import io.github.jpdev.asaassdk.rest.payment.identificationfield.PaymentIdentificationFieldFetcher;
import io.github.jpdev.asaassdk.rest.payment.restore.PaymentRestorer;
import io.github.jpdev.asaassdk.rest.payment.split.Split;
import io.github.jpdev.asaassdk.rest.paymentsplit.Split;
import io.github.jpdev.asaassdk.rest.payment.status.PaymentStatusFetcher;
import io.github.jpdev.asaassdk.utils.BillingType;
import io.github.jpdev.asaassdk.rest.payment.enums.PaymentStatus;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.github.jpdev.asaassdk.rest.paymentsplit;

import io.github.jpdev.asaassdk.http.Domain;
import io.github.jpdev.asaassdk.rest.action.Reader;

public class PaymentSplitPaidReader extends Reader<Split> {

@Override
public String getResourceUrl() {
return Domain.PAYMENT_SPLIT_PAID.toString();
}

@Override
public Class<Split> getResourceClass() {
return Split.class;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.github.jpdev.asaassdk.rest.paymentsplit;

import io.github.jpdev.asaassdk.http.Domain;
import io.github.jpdev.asaassdk.rest.action.Reader;

public class PaymentSplitReceivedReader extends Reader<Split> {

@Override
public String getResourceUrl() {
return Domain.PAYMENT_SPLIT_RECEIVED.toString();
}

@Override
public Class<Split> getResourceClass() {
return Split.class;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package io.github.jpdev.asaassdk.rest.paymentsplit;

import java.math.BigDecimal;

public class Split {

String id;
String walletId;
BigDecimal fixedValue;
BigDecimal percentualValue;
BigDecimal totalValue;
SplitCancellationReason cancellationReason;
SplitStatus status;
String externalReference;
String description;

public static PaymentSplitPaidReader paidReader() {
return new PaymentSplitPaidReader();
}

public static PaymentSplitReceivedReader receivedReader() {
return new PaymentSplitReceivedReader();
}

public String getId() {
return id;
}

public String getWalletId() {
return walletId;
}

public BigDecimal getFixedValue() {
return fixedValue;
}

public BigDecimal getPercentualValue() {
return percentualValue;
}

public BigDecimal getTotalValue() {
return totalValue;
}

public SplitCancellationReason getCancellationReason() {
return cancellationReason;
}

public SplitStatus getStatus() {
return status;
}

public String getExternalReference() {
return externalReference;
}

public String getDescription() {
return description;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.jpdev.asaassdk.rest.payment.split;
package io.github.jpdev.asaassdk.rest.paymentsplit;

public enum SplitCancellationReason {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.jpdev.asaassdk.rest.payment.split;
package io.github.jpdev.asaassdk.rest.paymentsplit;

public enum SplitStatus {

Expand Down

0 comments on commit 6fae320

Please sign in to comment.