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

Update payment sessions schemas #408

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
19 changes: 19 additions & 0 deletions src/CheckoutSdk/Common/AccountChangeIndicatorType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System.Runtime.Serialization;

namespace Checkout.Common
{
public enum AccountChangeIndicatorType
{
[EnumMember(Value = "this_transaction")]
ThisTransaction,

[EnumMember(Value = "less_than_thirty_days")]
LessThanThirtyDays,

[EnumMember(Value = "thirty_to_sixty_days")]
ThirtyToSixtyDays,

[EnumMember(Value = "more_than_sixty_days")]
MoreThanSixtyDays
}
}
22 changes: 22 additions & 0 deletions src/CheckoutSdk/Common/AccountPasswordChangeIndicatorType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Runtime.Serialization;

namespace Checkout.Common
{
public enum AccountPasswordChangeIndicatorType
{
[EnumMember(Value = "no_change")]
NoChange,

[EnumMember(Value = "this_transaction")]
ThisTransaction,

[EnumMember(Value = "less_than_thirty_days")]
LessThanThirtyDays,

[EnumMember(Value = "thirty_to_sixty_days")]
ThirtyToSixtyDays,

[EnumMember(Value = "more_than_sixty_days")]
MoreThanSixtyDays
}
}
11 changes: 11 additions & 0 deletions src/CheckoutSdk/Common/AccountTypeCardProductType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.Serialization;

namespace Checkout.Common
{
public enum AccountTypeCardProductType
{
[EnumMember(Value = "credit")] Credit,
[EnumMember(Value = "debit")] Debit,
[EnumMember(Value = "not_applicable")] NotApplicable
}
}
22 changes: 16 additions & 6 deletions src/CheckoutSdk/Common/ActionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,25 @@ namespace Checkout.Common
{
public enum ActionType
{
[EnumMember(Value = "Authorization")] Authorization,
[EnumMember(Value = "Authorization")]
Authorization,

[EnumMember(Value = "Card Verification")]
CardVerification,

[EnumMember(Value = "Void")] Void,
[EnumMember(Value = "Capture")] Capture,
[EnumMember(Value = "Refund")] Refund,
[EnumMember(Value = "Payout")] Payout,
[EnumMember(Value = "Return")] Return
[EnumMember(Value = "Void")]
Void,

[EnumMember(Value = "Capture")]
Capture,

[EnumMember(Value = "Refund")]
Refund,

[EnumMember(Value = "Payout")]
Payout,

[EnumMember(Value = "Return")]
Return
}
}
6 changes: 3 additions & 3 deletions src/CheckoutSdk/Common/CardCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ namespace Checkout.Common
{
public enum CardCategory
{
[EnumMember(Value = "consumer")] Consumer,
[EnumMember(Value = "commercial")] Commercial,
[EnumMember(Value = "all")] All,
[EnumMember(Value = "other")] Other,
[EnumMember(Value = "commercial")] Commercial,
[EnumMember(Value = "consumer")] Consumer,
[EnumMember(Value = "NotSet")] NotSet,
[EnumMember(Value = "other")] Other
}
}
4 changes: 2 additions & 2 deletions src/CheckoutSdk/Common/CardType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ namespace Checkout.Common
{
public enum CardType
{
[EnumMember(Value = "Charge")] Charge,
[EnumMember(Value = "Credit")] Credit,
[EnumMember(Value = "Debit")] Debit,
[EnumMember(Value = "Prepaid")] Prepaid,
[EnumMember(Value = "Charge")] Charge,
[EnumMember(Value = "Deferred Debit")] DeferredDebit,
[EnumMember(Value = "Prepaid")] Prepaid
}
}
22 changes: 22 additions & 0 deletions src/CheckoutSdk/Common/CardholderAccountAgeIndicatorType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Runtime.Serialization;

namespace Checkout.Common
{
public enum CardholderAccountAgeIndicatorType
{
[EnumMember(Value = "less_than_thirty_days")]
LessThanThirtyDays,

[EnumMember(Value = "more_than_sixty_days")]
MoreThanSixtyDays,

[EnumMember(Value = "no_account")]
NoAccount,

[EnumMember(Value = "thirty_to_sixty_days")]
ThirtyToSixtyDays,

[EnumMember(Value = "this_transaction")]
ThisTransaction
}
}
30 changes: 26 additions & 4 deletions src/CheckoutSdk/Common/ChallengeIndicatorType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,31 @@ namespace Checkout.Common
{
public enum ChallengeIndicatorType
{
[EnumMember(Value = "no_preference")] NoPreference,
[EnumMember(Value = "no_challenge_requested")] NoChallengeRequested,
[EnumMember(Value = "challenge_requested")] ChallengeRequested,
[EnumMember(Value = "challenge_requested_mandate")] ChallengeRequestedMandate
[EnumMember(Value = "challenge_requested")]
ChallengeRequested,

[EnumMember(Value = "challenge_requested_mandate")]
ChallengeRequestedMandate,

[EnumMember(Value = "data_share")]
DataShare,

[EnumMember(Value = "low_value")]
LowValue,

[EnumMember(Value = "no_challenge_requested")]
NoChallengeRequested,

[EnumMember(Value = "no_preference")]
NoPreference,

[EnumMember(Value = "transaction_risk_assessment")]
TransactionRiskAssessment,

[EnumMember(Value = "trusted_listing")]
TrustedListing,

[EnumMember(Value = "trusted_listing_prompt")]
TrustedListingPrompt
}
}
9 changes: 6 additions & 3 deletions src/CheckoutSdk/Common/DocumentType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@ namespace Checkout.Common
{
public enum DocumentType
{
[EnumMember(Value = "passport")] Passport,
[EnumMember(Value = "passport")]
Passport,

[EnumMember(Value = "national_identity_card")]
NationalIdentityCard,

[EnumMember(Value = "driving_license")]
DrivingLicense,

[EnumMember(Value = "citizen_card")] CitizenCard,
[EnumMember(Value = "citizen_card")]
CitizenCard,

[EnumMember(Value = "residence_permit")]
ResidencePermit,

[EnumMember(Value = "electoral_id")] ElectoralId
[EnumMember(Value = "electoral_id")]
ElectoralId
}
}
32 changes: 15 additions & 17 deletions src/CheckoutSdk/Common/Exemption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,30 @@ namespace Checkout.Common
{
public enum Exemption
{
[EnumMember(Value = "none")] None,
[EnumMember(Value = "3ds_outage")] ThreeDsOutage,

[EnumMember(Value = "low_risk_program")]
LowRiskProgram,

[EnumMember(Value = "low_value")] LowValue,
[EnumMember(Value = "none")] None,
[EnumMember(Value = "other")] Other,

[EnumMember(Value = "out_of_sca_scope")]
OutOfScaScope,

[EnumMember(Value = "recurring_operation")]
RecurringOperation,

[EnumMember(Value = "transaction_risk_assessment")]
TransactionRiskAssessment,

[EnumMember(Value = "sca_delegation")] ScaDelegation,

[EnumMember(Value = "secure_corporate_payment")]
SecureCorporatePayment,

[EnumMember(Value = "trusted_listing")]
TrustedListing,

[EnumMember(Value = "3ds_outage")] ThreeDsOutage,

[EnumMember(Value = "sca_delegation")] ScaDelegation,

[EnumMember(Value = "out_of_sca_scope")]
OutOfScaScope,

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

[EnumMember(Value = "low_risk_program")]
LowRiskProgram,
[EnumMember(Value = "trusted_listing")]
TrustedListing
}
}
18 changes: 13 additions & 5 deletions src/CheckoutSdk/Sessions/AuthenticationMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ namespace Checkout.Sessions
{
public enum AuthenticationMethod
{
[EnumMember(Value = "no_authentication")] NoAuthentication,
[EnumMember(Value = "own_credentials")] OwnCredentials,
[EnumMember(Value = "federated_id")] FederatedId,
[EnumMember(Value = "issuer_credentials")] IssuerCredentials,
[EnumMember(Value = "third_party_authentication")] ThirdPartyAuthentication,
[EnumMember(Value = "fido")] Fido
[EnumMember(Value = "fido")] Fido,

[EnumMember(Value = "issuer_credentials")]
IssuerCredentials,

[EnumMember(Value = "no_authentication")]
NoAuthentication,

[EnumMember(Value = "own_credentials")]
OwnCredentials,

[EnumMember(Value = "third_party_authentication")]
ThirdPartyAuthentication
}
}
6 changes: 3 additions & 3 deletions src/CheckoutSdk/Sessions/AuthenticationType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ namespace Checkout.Sessions
{
public enum AuthenticationType
{
[EnumMember(Value = "regular")] Regular,
[EnumMember(Value = "recurring")] Recurring,
[EnumMember(Value = "add_card")] AddCard,
[EnumMember(Value = "installment")] Installment,
[EnumMember(Value = "maintain_card")] MaintainCard,
[EnumMember(Value = "add_card")] AddCard,
[EnumMember(Value = "recurring")] Recurring,
[EnumMember(Value = "regular")] Regular
}
}
2 changes: 1 addition & 1 deletion src/CheckoutSdk/Sessions/CardInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public class CardInfo

public string Fingerprint { get; set; }

public IDictionary<string, string> Metadata { get; set; }
public SessionsCardMetadataResponse Metadata { get; set; }
}
}
28 changes: 28 additions & 0 deletions src/CheckoutSdk/Sessions/CardholderAccountInfo.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using Checkout.Common;
using System;

namespace Checkout.Sessions
{
public class CardholderAccountInfo
Expand All @@ -16,6 +19,31 @@ public class CardholderAccountInfo

public long? TransactionsToday { get; set; }

[Obsolete("This property will be removed in the future, and should not be used.")]
public AuthenticationMethod? AuthenticationMethod { get; set; }

public CardholderAccountAgeIndicatorType? CardholderAccountAgeIndicator { get; set; }

public DateTime? AccountChange { get; set; }

public AccountChangeIndicatorType? AccountChangeIndicator { get; set; }

public DateTime? AccountDate { get; set; }

public string AccountPasswordChange { get; set; }

public AccountPasswordChangeIndicatorType? AccountPasswordChangeIndicator { get; set; }

public int? TransactionsPerYear { get; set; }

public DateTime? PaymentAccountAge { get; set; }

public DateTime? ShippingAddressUsage { get; set; }

public AccountTypeCardProductType? AccountType { get; set; }

public string AccountId { get; set; }

public ThreeDsRequestorAuthenticationInfo ThreeDsRequestorAuthenticationInfo { get; set; }
}
}
9 changes: 9 additions & 0 deletions src/CheckoutSdk/Sessions/Certificates.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Checkout.Sessions
{
public class Certificates
{
public string DsPublic { get; set; }

public string CaPublic { get; set; }
}
}
14 changes: 9 additions & 5 deletions src/CheckoutSdk/Sessions/ChallengeCancelReason.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ public enum ChallengeCancelReason
[EnumMember(Value = "cardholder_cancel")]
CardholderCancel,

[EnumMember(Value = "transaction_timed_out")]
TransactionTimedOut,

[EnumMember(Value = "challenge_timed_out")]
ChallengeTimedOut,

[EnumMember(Value = "sdk_timed_out")]
SdkTimedOut,

[EnumMember(Value = "transaction_error")]
TransactionError,
[EnumMember(Value = "sdk_timed_out")] SdkTimedOut,
[EnumMember(Value = "unknown")] Unknown

[EnumMember(Value = "transaction_timed_out")]
TransactionTimedOut,

[EnumMember(Value = "unknown")]
Unknown
}
}
5 changes: 3 additions & 2 deletions src/CheckoutSdk/Sessions/Channel/BrowserSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
{
public class BrowserSession : ChannelData
{
public ThreeDsMethodCompletion? ThreeDsMethodCompletion { get; set; }
public ThreeDsMethodCompletion? ThreeDsMethodCompletion { get; set; } =
Sessions.Channel.ThreeDsMethodCompletion.U;

public string AcceptHeader { get; set; }

public bool? JavaEnabled { get; set; }

public bool? JavascriptEnabled { get; set; }

public string Language { get; set; }
Expand Down
Loading
Loading