Skip to content

Commit

Permalink
dtos
Browse files Browse the repository at this point in the history
  • Loading branch information
felixojiambo committed Dec 15, 2024
1 parent 0580f81 commit 7d76bd1
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.finpay.payment_service.dtos;

import lombok.Data;

import java.math.BigDecimal;
import java.util.UUID;

@Data
public class InvoiceResponse {
private UUID id;
private UUID userId;
private BigDecimal totalAmount;
private String currency;
private String status;
// Add other relevant fields as necessary
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.finpay.payment_service.dtos;

import lombok.Data;

import java.math.BigDecimal;
import java.util.UUID;

@Data
public class PaymentRequest {
private BigDecimal amount;
private String currency;
private String paymentMethod; // e.g., CREDIT_CARD, BANK_TRANSFER
private UUID invoiceId; // Reference to Invoice managed by Invoice Service
private String paymentGateway; // e.g., Stripe, PayPal
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.finpay.payment_service.dtos;

import com.finpay.payment_service.models.PaymentStatus;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.math.BigDecimal;
import java.util.UUID;

@Data
@AllArgsConstructor
public class PaymentResponse {
private UUID id;
private String paymentReference;
private BigDecimal amount;
private String currency;
private PaymentStatus status;
private UUID invoiceId;
private String paymentGateway;
private String message;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.finpay.payment_service.dtos;

import lombok.Data;

import java.math.BigDecimal;
import java.util.UUID;

@Data
public class RefundRequest {
private UUID paymentId;
private BigDecimal amount;
private String reason;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.finpay.payment_service.dtos;

import com.finpay.payment_service.models.RefundStatus;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.UUID;

@Data
@AllArgsConstructor
public class RefundResponse {
private UUID id;
private String refundReference;
private RefundStatus status;
private BigDecimal amount;
private String reason;
private LocalDateTime createdAt;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.finpay.payment_service.dtos;

import lombok.Data;

import java.math.BigDecimal;

@Data
public class TransactionRequest {
private String transactionType;
private BigDecimal amount;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.finpay.payment_service.dtos;

import com.finpay.payment_service.models.TransactionStatus;
import com.finpay.payment_service.models.TransactionType;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.UUID;

@Data
@AllArgsConstructor
public class TransactionResponse {
private UUID id;
private String transactionReference;
private TransactionType type;
private TransactionStatus status;
private BigDecimal amount;
private LocalDateTime createdAt;
}

0 comments on commit 7d76bd1

Please sign in to comment.