Class BaseCreditCard
Represents a base credit card information.
Inherited Members
Namespace: Innovt.Domain
Assembly: Innovt.Domain.dll
Syntax
public class BaseCreditCard : ValueObject
Constructors
| Edit this page View SourceBaseCreditCard()
Initializes a new instance of the BaseCreditCard class.
Declaration
public BaseCreditCard()
BaseCreditCard(string, string)
Initializes a new instance of the BaseCreditCard class with a token and security code.
Declaration
public BaseCreditCard(string token, string securityCode)
Parameters
Type | Name | Description |
---|---|---|
string | token | The token associated with the credit card. |
string | securityCode | The security code of the credit card. |
BaseCreditCard(string, string, DateTime, string)
Initializes a new instance of the BaseCreditCard class with credit card details.
Declaration
public BaseCreditCard(string number, string holder, DateTime expiration, string securityCode)
Parameters
Type | Name | Description |
---|---|---|
string | number | The credit card number. |
string | holder | The cardholder's name. |
DateTime | expiration | The expiration date of the credit card. |
string | securityCode | The security code of the credit card. |
Properties
| Edit this page View SourceExpiration
Gets or sets the expiration date of the credit card.
Declaration
public DateTime Expiration { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Holder
Gets or sets the cardholder's name.
Declaration
public string Holder { get; set; }
Property Value
Type | Description |
---|---|
string |
MaskedNumber
Gets the masked credit card number with only the last four digits visible.
Declaration
public string MaskedNumber { get; }
Property Value
Type | Description |
---|---|
string |
Number
Gets or sets the credit card number.
Declaration
public string Number { get; set; }
Property Value
Type | Description |
---|---|
string |
SecurityCode
Gets or sets the security code of the credit card.
Declaration
public string SecurityCode { get; set; }
Property Value
Type | Description |
---|---|
string |
Token
Gets or sets the token associated with the credit card.
Declaration
public string Token { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceGetMaskedCreditCard(string)
Generates a masked credit card number with only the first six and last four digits visible.
Declaration
public static string GetMaskedCreditCard(string number)
Parameters
Type | Name | Description |
---|---|---|
string | number | The original credit card number. |
Returns
Type | Description |
---|---|
string | The masked credit card number. |