Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment contexts and accounts updates #449

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: 5 additions & 0 deletions src/main/java/com/checkout/accounts/AccountPhone.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.checkout.accounts;

import com.checkout.common.CountryCode;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -11,6 +13,9 @@
@AllArgsConstructor
public final class AccountPhone {

@SerializedName("country_code")
private CountryCode countryCode;

private String number;

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

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

private String front;

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

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

private String field1;

private String field2;

private String field3;

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

import com.google.gson.annotations.SerializedName;

public enum ArticlesOfAssociationType {

@SerializedName("memorandum_of_association")
MEMORANDUM_OF_ASSOCIATION,

@SerializedName("articles_of_association")
ARTICLES_OF_ASSOCIATION

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

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

private BankVerificationType type;

private String front;

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

import com.google.gson.annotations.SerializedName;

public enum BankVerificationType {

@SerializedName("bank_statement")
BANK_STATEMENT

}
19 changes: 15 additions & 4 deletions src/main/java/com/checkout/accounts/Capabilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,32 @@ public final class Capabilities {

private Payouts payouts;

private IssuingCapabilities issuing;

@Data
public static class Payments {

private boolean available;
private Boolean available;

private boolean enabled;
private Boolean enabled;

}

@Data
public static class Payouts {

private boolean available;
private Boolean available;

private Boolean enabled;

}

@Data
public static class IssuingCapabilities {

private Boolean available;

private boolean enabled;
private Boolean enabled;

}

Expand Down
26 changes: 18 additions & 8 deletions src/main/java/com/checkout/accounts/Company.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,48 @@

import com.checkout.common.Address;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

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

@SerializedName("business_registration_number")
private String businessRegistrationNumber;

@SerializedName("business_type")
private BusinessType businessType;

@SerializedName("legal_name")
private String legalName;

@SerializedName("trading_name")
private String tradingName;

@SerializedName("business_registration_number")
private String businessRegistrationNumber;

@SerializedName("date_of_incorporation")
private DateOfIncorporation dateOfIncorporation;

@SerializedName("regulatory_licence_number")
private String regulatoryLicenceNumber;

@SerializedName("principal_address")
private Address principalAddress;

@SerializedName("registered_address")
private Address registeredAddress;

private EntityDocument document;

private List<Representative> representatives;

private EntityDocument document;

@SerializedName("financial_details")
private EntityFinancialDetails financialDetails;

@SerializedName("business_type")
private BusinessType businessType;

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

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

private Integer month;

private Integer year;

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

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

private FinancialVerificationType type;

private String front;

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

import com.google.gson.annotations.SerializedName;

public enum FinancialVerificationType {

@SerializedName("financial_statement")
FINANCIAL_STATEMENT

}
13 changes: 11 additions & 2 deletions src/main/java/com/checkout/accounts/OnboardEntityRequest.java
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
package com.checkout.accounts;

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

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

private String reference;

@SerializedName("is_draft")
private boolean isDraft;

private Profile profile;

@SerializedName("contact_details")
private ContactDetails contactDetails;

private Profile profile;

private Company company;

private ProcessingDetails processingDetails;

private Individual individual;

private OnboardSubEntityDocuments documents;

@SerializedName("additional_info")
private AdditionalInfo additionalInfo;

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.checkout.accounts;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -9,11 +10,42 @@
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OnboardSubEntityDocuments {
public final class OnboardSubEntityDocuments {

@SerializedName("identity_verification")
private Document identityVerification;

@SerializedName("company_verification")
private CompanyVerification companyVerification;

@SerializedName("articles_of_association")
private ArticlesOfAssociationType articlesOfAssociation;

@SerializedName("bank_verification")
private BankVerification bankVerification;

@SerializedName("shareholder_structure")
private ShareholderStructure shareholderStructure;

@SerializedName("proof_of_legality")
private ProofOfLegality proofOfLegality;

@SerializedName("proof_of_principal_address")
private ProofOfPrincipalAddress proofOfPrincipalAddress;

@SerializedName("additional_document_1")
private AdditionalDocument additionalDocument1;

@SerializedName("additional_document_2")
private AdditionalDocument additionalDocument2;

@SerializedName("additional_document_3")
private AdditionalDocument additionalDocument3;

@SerializedName("tax_verification")
private TaxVerification taxVerification;

@SerializedName("financial_verification")
private FinancialVerification financialVerification;

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

import com.checkout.common.Currency;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

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

@SerializedName("settlement_country")
private String settlementCountry;

@SerializedName("target_countries")
private List<String> targetCountries;

@SerializedName("annual_processing_volume")
private Integer annualProcessingVolume;

@SerializedName("average_transaction_value")
private Integer averageTransactionValue;

@SerializedName("highest_transaction_value")
private Integer highestTransactionValue;

private Currency currency;

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

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

private ProofOfLegalityType type;

private String front;

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

import com.google.gson.annotations.SerializedName;

public enum ProofOfLegalityType {

@SerializedName("proof_of_legality")
PROOF_OF_LEGALITY

}
Loading
Loading