Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ lombok.config
.vscode/
.cursor
.github/SKILL.md
.github/copilot-instructions.md
swagger-spec.json
swagger.*
swagger.*
.claude/
CLAUDE.md
7 changes: 5 additions & 2 deletions src/main/java/com/checkout/GsonSerializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ public final class GsonSerializer implements Serializer {
// Payments - source
.registerTypeAdapterFactory(RuntimeTypeAdapterFactory.of(com.checkout.payments.response.source.ResponseSource.class, CheckoutUtils.TYPE, true, com.checkout.payments.response.source.AlternativePaymentSourceResponse.class)
.registerSubtype(com.checkout.payments.response.source.CardResponseSource.class, identifier(PaymentSourceType.CARD))
.registerSubtype(com.checkout.payments.response.source.CurrencyAccountResponseSource.class, identifier(PaymentSourceType.CURRENCY_ACCOUNT)))
.registerSubtype(com.checkout.payments.response.source.CurrencyAccountResponseSource.class, identifier(PaymentSourceType.CURRENCY_ACCOUNT))
.registerSubtype(com.checkout.payments.response.source.PayPalResponseSource.class, identifier(PaymentSourceType.PAYPAL)))
// 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))
Expand All @@ -187,7 +188,9 @@ public final class GsonSerializer implements Serializer {
.registerSubtype(com.checkout.instruments.get.GetSepaInstrumentResponse.class, identifier(InstrumentType.SEPA)))
.registerTypeAdapterFactory(RuntimeTypeAdapterFactory.of(com.checkout.instruments.update.UpdateInstrumentResponse.class, CheckoutUtils.TYPE)
.registerSubtype(com.checkout.instruments.update.UpdateInstrumentBankAccountResponse.class, identifier(InstrumentType.BANK_ACCOUNT))
.registerSubtype(com.checkout.instruments.update.UpdateInstrumentCardResponse.class, identifier(InstrumentType.CARD)))
.registerSubtype(com.checkout.instruments.update.UpdateInstrumentCardResponse.class, identifier(InstrumentType.CARD))
.registerSubtype(com.checkout.instruments.update.UpdateInstrumentSepaResponse.class, identifier(InstrumentType.SEPA))
.registerSubtype(com.checkout.instruments.update.UpdateInstrumentAchResponse.class, identifier(InstrumentType.ACH)))
// Workflows CS2
.registerTypeAdapterFactory(RuntimeTypeAdapterFactory.of(com.checkout.workflows.actions.response.WorkflowActionResponse.class, CheckoutUtils.TYPE)
.registerSubtype(com.checkout.workflows.actions.response.WebhookWorkflowActionResponse.class, identifier(WorkflowActionType.WEBHOOK)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public final class UpdatePaymentInstrumentRequest extends Headers{
public final class UpdatePaymentInstrumentRequest extends Headers {

/**
* A reference that you can use to identify the payment instrument.
* [Optional]
*/
private String label;

/**
* Whether the payment instrument should be set as the default payout destination.
* For ad-hoc payouts the instrument is specified explicitly; for scheduled payouts the first instrument
* created for a currency is used. To change the instrument for a payout schedule, update the schedule.
* [Optional]
* @deprecated Update the payout schedule instead.
*/
@Deprecated
@SerializedName("default")
private Boolean defaultDestination;

Check warning on line 28 in src/main/java/com/checkout/accounts/UpdatePaymentInstrumentRequest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Do not forget to remove this deprecated code someday.

See more on https://sonarcloud.io/project/issues?id=checkout_checkout-sdk-java&issues=AZ2xE1hIqLW5PDanD4xC&open=AZ2xE1hIqLW5PDanD4xC&pullRequest=588
}
5 changes: 4 additions & 1 deletion src/main/java/com/checkout/common/InstrumentType.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public enum InstrumentType {
CARD_TOKEN,

@SerializedName("sepa")
SEPA
SEPA,

@SerializedName("ach")
ACH

}
26 changes: 25 additions & 1 deletion src/main/java/com/checkout/common/Link.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,34 @@
@Data
public final class Link {

/**
* The link URL.
* [Optional]
*/
private final String href;

/**
* The link title.
* [Optional]
*/
private final String title;

/**
* The link relation type.
* [Optional]
*/
private final String link;

}
/**
* Mobile deep-link redirect URLs for Android and iOS redirect payments.
* [Optional]
*/
private MobileRedirectLink mobile;

/**
* QR code data for redirect payments.
* [Optional]
*/
private QrCode qrCode;

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

import lombok.Data;

/**
* Mobile deep-link redirect URLs returned in 202 payment response _links.redirect.
*/
@Data
public final class MobileRedirectLink {

/**
* The Android deep-link redirect URL.
* [Optional]
*/
private PlatformLink android;

/**
* The iOS deep-link redirect URL.
* [Optional]
*/
private PlatformLink ios;

@Data
public static final class PlatformLink {

/**
* The deep-link URL.
* [Optional]
*/
private String href;
}

}
24 changes: 24 additions & 0 deletions src/main/java/com/checkout/common/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,41 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
* The name of the product.
* [Optional]
*/
private String name;

/**
* The quantity of the product.
* [Optional]
*/
private Long quantity;

/**
* The price of the product in minor currency units.
* [Optional]
*/
private Long price;

/**
* A reference you can use to identify the product.
* [Optional]
*/
private String reference;

/**
* The URL of the product.
* [Optional]
*/
private String url;
}
23 changes: 23 additions & 0 deletions src/main/java/com/checkout/common/QrCode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.checkout.common;

import lombok.Data;

/**
* QR code data returned for payment methods that require a QR code scan, in 202 responses.
*/
@Data
public final class QrCode {

/**
* The QR code as a base64-encoded image.
* [Optional]
*/
private String image;

/**
* The raw text encoded in the QR code.
* [Optional]
*/
private String text;

}
60 changes: 49 additions & 11 deletions src/main/java/com/checkout/disputes/CompellingEvidence.java
Original file line number Diff line number Diff line change
@@ -1,37 +1,75 @@
package com.checkout.disputes;

import com.google.gson.annotations.SerializedName;

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

public final class CompellingEvidence {

@SerializedName("merchandise_or_service")
/**
* Whether the evidence concerns merchandise or services.
* [Required]
* Enum: "Merchandise" "Services"
*/
private String merchandiseOrService;

@SerializedName("merchandise_or_service_desc")
/**
* A description of the merchandise or service provided.
* [Required]
* min 1 character, max 5000 characters
*/
private String merchandiseOrServiceDesc;

@SerializedName("merchandise_or_service_provided_date")
/**
* The date the merchandise or service was provided to the customer.
* [Required]
* Format: date-time (RFC 3339)
*/
private Instant merchandiseOrServiceProvidedDate;

@SerializedName("shipping_delivery_status")
/**
* The shipping or delivery status of the merchandise.
* [Optional]
*/
private ShippingDeliveryStatusType shippingDeliveryStatus;

@SerializedName("tracking_information")
/**
* The tracking number for the shipment.
* [Optional]
* max 50 characters
*/
private TrackingInformationType trackingInformation;

@SerializedName("user_id")
/**
* The customer's account or login identifier.
* [Optional]
* max 50 characters
*/
private String userId;

@SerializedName("ip_address")
/**
* The IP address used for the transaction (IPv4 or IPv6).
* [Optional]
*/
private String ipAddress;

@SerializedName("shipping_address")
/**
* The device identifier used for the transaction.
* [Optional]
* min 15 characters, max 64 characters
*/
private String deviceId;

/**
* The shipping address used for the transaction.
* [Optional]
*/
private ShippingAddress shippingAddress;

@SerializedName("historical_transactions")
/**
* Prior undisputed transactions between the merchant and the same customer.
* At least 2 items required.
* [Required]
*/
private List<HistoricalTransactions> historicalTransactions;

}
Loading
Loading