Skip to content

Commit

Permalink
Several updates in properties, APMs and Disputes endpoint (#451)
Browse files Browse the repository at this point in the history
* Update account holder apm

* Update payment responses and add new apms

* Update account holder schema

* Update disputes endpoints and properties
  • Loading branch information
armando-rodriguez-cko authored Dec 3, 2024
1 parent f574901 commit c6cf94e
Show file tree
Hide file tree
Showing 59 changed files with 1,013 additions and 132 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/checkout/GsonSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.checkout.issuing.controls.responses.create.VelocityCardControlResponse;
import com.checkout.payments.PaymentDestinationType;
import com.checkout.payments.previous.PaymentAction;
import com.checkout.payments.PaymentPlanType;
import com.checkout.payments.sender.Sender;
import com.checkout.payments.sender.SenderType;
import com.checkout.webhooks.previous.WebhookResponse;
Expand Down Expand Up @@ -100,7 +99,9 @@ public class GsonSerializer implements Serializer {
// Payment Contexts
.registerTypeAdapterFactory(RuntimeTypeAdapterFactory.of(com.checkout.payments.response.source.contexts.ResponseSource.class, CheckoutUtils.TYPE, true, com.checkout.payments.response.source.contexts.AlternativePaymentSourceResponse.class)
.registerSubtype(com.checkout.payments.response.source.contexts.PaymentContextsPayPalResponseSource.class, identifier(PaymentSourceType.PAYPAL))
.registerSubtype(com.checkout.payments.response.source.contexts.PaymentContextsKlarnaResponseSource.class, identifier(PaymentSourceType.KLARNA)))
.registerSubtype(com.checkout.payments.response.source.contexts.PaymentContextsKlarnaResponseSource.class, identifier(PaymentSourceType.KLARNA))
.registerSubtype(com.checkout.payments.response.source.contexts.PaymentContextsStcpayResponseSource.class, identifier(PaymentSourceType.STCPAY))
.registerSubtype(com.checkout.payments.response.source.contexts.PaymentContextsTabbyResponseSource.class, identifier(PaymentSourceType.TABBY)))
// Payments - destination
.registerTypeAdapterFactory(RuntimeTypeAdapterFactory.of(com.checkout.payments.response.destination.PaymentResponseDestination.class, CheckoutUtils.TYPE, true, com.checkout.payments.response.destination.PaymentResponseAlternativeDestination.class)
.registerSubtype(com.checkout.payments.response.destination.PaymentResponseBankAccountDestination.class, identifier(PaymentDestinationType.BANK_ACCOUNT)))
Expand Down
77 changes: 30 additions & 47 deletions src/main/java/com/checkout/common/AccountHolder.java
Original file line number Diff line number Diff line change
@@ -1,55 +1,38 @@
package com.checkout.common;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public final class AccountHolder {

private AccountHolderType type;

@SerializedName("full_name")
private String fullName;

@SerializedName("first_name")
private String firstName;

@SerializedName("middle_name")
private String middleName;

@SerializedName("last_name")
private String lastName;

private String email;

private String gender;

@SerializedName("company_name")
private String companyName;

@SerializedName("tax_id")
private String taxId;

@SerializedName("date_of_birth")
private String dateOfBirth;

@SerializedName("country_of_birth")
private CountryCode countryOfBirth;

@SerializedName("residential_status")
private String residentialStatus;

@SerializedName("billing_address")
private Address billingAddress;

private Phone phone;

private AccountHolderIdentification identification;
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public final class AccountHolder extends AccountHolderBase {

private Boolean accountNameInquiry;

@Builder
private AccountHolder(
final AccountHolderType type,
final String fullName,
final String firstName,
final String middleName,
final String lastName,
final String email,
final String gender,
final String companyName,
final String taxId,
final String dateOfBirth,
final CountryCode countryOfBirth,
final String residentialStatus,
final Address billingAddress,
final Phone phone,
final AccountHolderIdentification identification,
final Boolean accountNameInquiry
) {
super(type, fullName, firstName, middleName, lastName, email, gender, companyName, taxId, dateOfBirth, countryOfBirth, residentialStatus, billingAddress, phone, identification);
this.accountNameInquiry = accountNameInquiry;
}

}
53 changes: 53 additions & 0 deletions src/main/java/com/checkout/common/AccountHolderBase.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package com.checkout.common;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AccountHolderBase {

private AccountHolderType type;

@SerializedName("full_name")
private String fullName;

@SerializedName("first_name")
private String firstName;

@SerializedName("middle_name")
private String middleName;

@SerializedName("last_name")
private String lastName;

private String email;

private String gender;

@SerializedName("company_name")
private String companyName;

@SerializedName("tax_id")
private String taxId;

@SerializedName("date_of_birth")
private String dateOfBirth;

@SerializedName("country_of_birth")
private CountryCode countryOfBirth;

@SerializedName("residential_status")
private String residentialStatus;

@SerializedName("billing_address")
private Address billingAddress;

private Phone phone;

private AccountHolderIdentification identification;

}
14 changes: 14 additions & 0 deletions src/main/java/com/checkout/common/AccountHolderResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.checkout.common;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public final class AccountHolderResponse extends AccountHolderBase {

private AccountNameInquiryType accountNameInquiry;

}
22 changes: 22 additions & 0 deletions src/main/java/com/checkout/common/AccountNameInquiryType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.checkout.common;

import com.google.gson.annotations.SerializedName;

public enum AccountNameInquiryType {

@SerializedName("full_match")
FULL_MATCH,

@SerializedName("partial_match")
PARTIAL_MATCH,

@SerializedName("no_match")
NO_MATCH,

@SerializedName("not_performed")
NOT_PERFORMED,

@SerializedName("not_supported")
NOT_SUPPORTED

}
15 changes: 13 additions & 2 deletions src/main/java/com/checkout/common/PaymentSourceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public enum PaymentSourceType {
NETWORK_TOKEN,
@SerializedName("token")
TOKEN,
@SerializedName("ach")
ACH,
@SerializedName("customer")
CUSTOMER,
@SerializedName("applepay")
Expand Down Expand Up @@ -52,6 +54,10 @@ public enum PaymentSourceType {
PAYPAL,
@SerializedName("multibanco")
MULTIBANCO,
@SerializedName("octopus")
OCTOPUS,
@SerializedName("plaid")
PLAID,
@SerializedName("eps")
EPS,
@SerializedName("illicado")
Expand All @@ -62,6 +68,8 @@ public enum PaymentSourceType {
P24,
@SerializedName("benefitpay")
BENEFITPAY,
@SerializedName("bizum")
BIZUM,
@SerializedName("bancontact")
BANCONTACT,
@SerializedName("tamara")
Expand Down Expand Up @@ -105,6 +113,9 @@ public enum PaymentSourceType {
@SerializedName("trustly")
TRUSTLY,
@SerializedName("cvconnect")
CV_CONNECT

CV_CONNECT,
@SerializedName("sequra")
SEQURA,
@SerializedName("tabby")
TABBY
}
37 changes: 37 additions & 0 deletions src/main/java/com/checkout/disputes/CompellingEvidence.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.checkout.disputes;

import com.google.gson.annotations.SerializedName;

import java.time.Instant;
import java.util.List;

public class CompellingEvidence {

@SerializedName("merchandise_or_service")
private String merchandiseOrService;

@SerializedName("merchandise_or_service_desc")
private String merchandiseOrServiceDesc;

@SerializedName("merchandise_or_service_provided_date")
private Instant merchandiseOrServiceProvidedDate;

@SerializedName("shipping_delivery_status")
private ShippingDeliveryStatusType shippingDeliveryStatus;

@SerializedName("tracking_information")
private TrackingInformationType trackingInformation;

@SerializedName("user_id")
private String userId;

@SerializedName("ip_address")
private String ipAddress;

@SerializedName("shipping_address")
private ShippingAddress shippingAddress;

@SerializedName("historical_transactions")
private List<HistoricalTransactions> historicalTransactions;

}
14 changes: 14 additions & 0 deletions src/main/java/com/checkout/disputes/DisputeDetailsResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,18 @@ public final class DisputeDetailsResponse extends Resource {
@SerializedName("sub_entity_id")
private String subEntityId;

private String reference;

@SerializedName("is_ce_candidate")
private Boolean isCeCandidate;

@SerializedName("evidence_list")
private List<EvidenceList> evidenceList;

@SerializedName("evidence_bundle")
private List<EvidenceBundle> evidenceBundle;

@SerializedName("segment_id")
private String segmentId;

}
22 changes: 17 additions & 5 deletions src/main/java/com/checkout/disputes/DisputeEvidenceRequest.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.checkout.disputes;

import com.checkout.common.Link;
import com.checkout.common.Resource;
import com.google.gson.annotations.SerializedName;
import lombok.Builder;
import lombok.Data;

import javax.validation.constraints.Size;
import java.util.Map;
import java.util.List;

@Data
@Builder
public final class DisputeEvidenceRequest {
public final class DisputeEvidenceRequest extends Resource {

@SerializedName("proof_of_delivery_or_service_file")
private String proofOfDeliveryOrServiceFile;
Expand Down Expand Up @@ -67,7 +67,19 @@ public final class DisputeEvidenceRequest {
@SerializedName("proof_of_delivery_or_service_date_text")
private String proofOfDeliveryOrServiceDateText;

@SerializedName("_links")
private Map<String, Link> links;
@SerializedName("arbitration_no_review_text")
private String arbitrationNoReviewText;

@SerializedName("arbitration_no_review_files")
private List<String> arbitrationNoReviewFiles;

@SerializedName("arbitration_review_required_text")
private String arbitrationReviewRequiredText;

@SerializedName("arbitration_review_required_files")
private List<String> arbitrationReviewRequiredFiles;

@SerializedName("compelling_evidence")
private CompellingEvidence compellingEvidence;

}
20 changes: 19 additions & 1 deletion src/main/java/com/checkout/disputes/DisputeEvidenceResponse.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
package com.checkout.disputes;

import com.checkout.HttpMetadata;
import com.checkout.common.Resource;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public final class DisputeEvidenceResponse extends Resource {
public final class DisputeEvidenceResponse extends HttpMetadata {

@SerializedName("proof_of_delivery_or_service_file")
private String proofOfDeliveryOrServiceFile;
Expand Down Expand Up @@ -59,4 +62,19 @@ public final class DisputeEvidenceResponse extends Resource {
@SerializedName("proof_of_delivery_or_service_date_text")
private String proofOfDeliveryOrServiceDateText;

@SerializedName("arbitration_no_review_text")
private String arbitrationNoReviewText;

@SerializedName("arbitration_no_review_files")
private List<String> arbitrationNoReviewFiles;

@SerializedName("arbitration_review_required_text")
private String arbitrationReviewRequiredText;

@SerializedName("arbitration_review_required_files")
private List<String> arbitrationReviewRequiredFiles;

@SerializedName("compelling_evidence")
private CompellingEvidence compellingEvidence;

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public enum DisputeRelevantEvidence {
RECURRING_TRANSACTION_AGREEMENT,

@SerializedName("additional_evidence")
ADDITIONAL_EVIDENCE
ADDITIONAL_EVIDENCE,

@SerializedName("arbitration_no_review")
ARBITRATION_NO_REVIEW,

@SerializedName("arbitration_review_required")
ARBITRATION_REVIEW_REQUIRED

}
Loading

0 comments on commit c6cf94e

Please sign in to comment.