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: 5 additions & 0 deletions src/CheckoutSdk/Accounts/AccountsAccountHolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ public abstract class AccountsAccountHolder
public AccountHolderIdentification Identification { get; set; }

public string Email { get; set; }

protected AccountsAccountHolder(AccountHolderType type)
{
Type = type;
}
}
}
4 changes: 4 additions & 0 deletions src/CheckoutSdk/Accounts/AccountsCorporateAccountHolder.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
using Checkout.Common;

namespace Checkout.Accounts
{
public class AccountsCorporateAccountHolder : AccountsAccountHolder
{
public AccountsCorporateAccountHolder() : base(AccountHolderType.Corporate) { }

public string CompanyName { get; set; }
}
}
3 changes: 3 additions & 0 deletions src/CheckoutSdk/Accounts/AccountsIndividualAccountHolder.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using Checkout.Common;

namespace Checkout.Accounts
{
public class AccountsIndividualAccountHolder : AccountsAccountHolder
{
public AccountsIndividualAccountHolder() : base(AccountHolderType.Individual) { }
public string FirstName { get; set; }

public string LastName { get; set; }
Expand Down
2 changes: 0 additions & 2 deletions src/CheckoutSdk/Common/CustomerRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
{
public class CustomerRequest
{
public string Id { get; set; }

public string Email { get; set; }

public string Name { get; set; }
Expand Down
4 changes: 3 additions & 1 deletion src/CheckoutSdk/Common/PaymentSourceType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public enum PaymentSourceType
[EnumMember(Value = "cvconnect")] Cvconnect,
[EnumMember(Value = "sepa")] Sepa,
[EnumMember(Value = "sequra")] Sequra,
[EnumMember(Value = "tabby")] Tabby
[EnumMember(Value = "tabby")] Tabby,
[EnumMember(Value = "applepay")] Applepay,
[EnumMember(Value = "googlepay")] Googlepay
}
}
2 changes: 2 additions & 0 deletions src/CheckoutSdk/Common/Product.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ public class Product
public long? Quantity { get; set; }

public long? Price { get; set; }

public string Reference { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Checkout.Instruments.Previous
{
public class InstrumentCustomerRequest : CustomerRequest
{
public string Id { get; set; }
public bool Default { get; set; }
}
}
12 changes: 12 additions & 0 deletions src/CheckoutSdk/Payments/Applepay.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Checkout.Common;
using Checkout.Payments.Sessions;

namespace Checkout.Payments
{
public class Applepay
{
public AccountHolder AccountHolder { get; set; }

public StorePaymentDetailsType? StorePaymentDetails { get; set; }
}
}
2 changes: 0 additions & 2 deletions src/CheckoutSdk/Payments/BillingDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ public class BillingDescriptor

public string City { get; set; }

//Not available on Previous

public string Reference { get; set; }
}
}
12 changes: 12 additions & 0 deletions src/CheckoutSdk/Payments/Card.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Checkout.Common;
using Checkout.Payments.Sessions;

namespace Checkout.Payments
{
public class Card
{
public AccountHolder AccountHolder { get; set; }

public StorePaymentDetailsType? StorePaymentDetails { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/CheckoutSdk/Payments/Contexts/PaymentContexts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class PaymentContexts

public bool? Capture { get; set; }

public CustomerRequest Customer { get; set; }
public PaymentContextsCustomerRequest Customer { get; set; }

public ShippingDetails Shipping { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Checkout.Common;

namespace Checkout.Payments.Contexts
{
public class PaymentContextsCustomerRequest : CustomerRequest
{
public bool? EmailVerified { get; set; }

public PaymentContextsCustomerSummary Summary { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;

namespace Checkout.Payments.Contexts
{
public class PaymentContextsCustomerSummary
{
public DateTime? RegistrationDate { get; set; }

public DateTime? FirstTransactionDate { get; set; }

public DateTime? LastPaymentDate { get; set; }

public long? TotalOrderCount { get; set; }

public double? LastPaymentAmount { get; set; }
}
}
12 changes: 12 additions & 0 deletions src/CheckoutSdk/Payments/Googleplay.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Checkout.Common;
using Checkout.Payments.Sessions;

namespace Checkout.Payments
{
public class Googlepay
{
public AccountHolder AccountHolder { get; set; }

public StorePaymentDetailsType? StorePaymentDetails { get; set; }
}
}
20 changes: 10 additions & 10 deletions src/CheckoutSdk/Payments/Hosted/HostedPaymentDetailsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ public class HostedPaymentDetailsResponse : Resource

public HostedPaymentStatus? Status { get; set; }

public string PaymentId { get; set; }

public long? Amount { get; set; }

public Currency? Currency { get; set; }

public BillingInformation Billing { get; set; }

public string SuccessUrl { get; set; }

public string CancelUrl { get; set; }

public string FailureUrl { get; set; }

public string PaymentId { get; set; }

public string Reference { get; set; }

public string Description { get; set; }

public CustomerResponse Customer { get; set; }

public BillingInformation Billing { get; set; }

public IList<Product> Products { get; set; }

public IDictionary<string, object> Metadata { get; set; }

public string SuccessUrl { get; set; }

public string CancelUrl { get; set; }

public string FailureUrl { get; set; }

public IList<AmountAllocations> AmountAllocations { get; set; }
}
Expand Down
7 changes: 7 additions & 0 deletions src/CheckoutSdk/Payments/Hosted/HostedPaymentInstruction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Checkout.Payments.Hosted
{
public class HostedPaymentInstruction
{
public PaymentPurposeType Purpose { get; set; }
}
}
43 changes: 23 additions & 20 deletions src/CheckoutSdk/Payments/Hosted/HostedPaymentRequest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Checkout.Common;
using Checkout.Payments.Request;
using Checkout.Payments.Sender;
using Checkout.Payments.Sessions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
Expand All @@ -10,10 +11,17 @@ namespace Checkout.Payments.Hosted
{
public class HostedPaymentRequest
{
public long? Amount { get; set; }

public Currency? Currency { get; set; }

public BillingInformation Billing { get; set; }

public string SuccessUrl { get; set; }

public string CancelUrl { get; set; }

public string FailureUrl { get; set; }
public long? Amount { get; set; }

public PaymentType? PaymentType { get; set; }

public string PaymentIp { get; set; }
Expand All @@ -25,16 +33,22 @@ public class HostedPaymentRequest
public string Description { get; set; }

public string DisplayName { get; set; }

public string ProcessingChannelId { get; set; }

public IList<AmountAllocations> AmountAllocations { get; set; }

public CustomerRequest Customer { get; set; }

public ShippingDetails Shipping { get; set; }

public BillingInformation Billing { get; set; }


public PaymentRecipient Recipient { get; set; }

public ProcessingSettings Processing { get; set; }

public IList<PaymentSourceType> AllowPaymentMethods { get; set; }

public IList<PaymentSourceType> DisabledPaymentMethods { get; set; }

public IList<Product> Products { get; set; }

Expand All @@ -44,30 +58,19 @@ public class HostedPaymentRequest

public PaymentSender Sender { get; set; }

public string SuccessUrl { get; set; }

public string CancelUrl { get; set; }

public string FailureUrl { get; set; }

public IDictionary<string, object> Metadata { get; set; }

public string Locale { get; set; }
public Locale Locale { get; set; }

[JsonProperty(PropertyName = "3ds")] public ThreeDsRequest ThreeDs { get; set; }

public bool Capture { get; set; }

public DateTime? CaptureOn { get; set; }

public IList<PaymentSourceType> AllowPaymentMethods { get; set; }

//Not available on Previous

public IList<PaymentSourceType> DisabledPaymentMethods { get; set; }

public string ProcessingChannelId { get; set; }
public HostedPaymentInstruction Instruction { get; set; }

public PaymentMethodConfiguration PaymentMethodConfiguration { get; set; }

public IList<AmountAllocations> AmountAllocations { get; set; }
}
}
64 changes: 64 additions & 0 deletions src/CheckoutSdk/Payments/Hosted/PaymentPurposeType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using System.Runtime.Serialization;

namespace Checkout.Payments.Hosted
{
public enum PaymentPurposeType
{
[EnumMember(Value = "donations")]
Donations,

[EnumMember(Value = "education")]
Education,

[EnumMember(Value = "emergency_need")]
EmergencyNeed,

[EnumMember(Value = "expatriation")]
Expatriation,

[EnumMember(Value = "family_support")]
FamilySupport,

[EnumMember(Value = "financial_services")]
FinancialServices,

[EnumMember(Value = "gifts")]
Gifts,

[EnumMember(Value = "income")]
Income,

[EnumMember(Value = "insurance")]
Insurance,

[EnumMember(Value = "investment")]
Investment,

[EnumMember(Value = "it_services")]
ItServices,

[EnumMember(Value = "leisure")]
Leisure,

[EnumMember(Value = "loan_payment")]
LoanPayment,

[EnumMember(Value = "medical_treatment")]
MedicalTreatment,

[EnumMember(Value = "other")]
Other,

[EnumMember(Value = "pension")]
Pension,

[EnumMember(Value = "royalties")]
Royalties,

[EnumMember(Value = "savings")]
Savings,

[EnumMember(Value = "travel_and_tourism")]
TravelAndTourism
}
}
Loading
Loading