PayPal.Api.CreditCard.Get C# (CSharp) Method

Get() public static method

Obtain the Credit Card resource for the given identifier.
public static Get ( APIContext apiContext, string creditCardId ) : CreditCard
apiContext APIContext APIContext used for the API call.
creditCardId string Identifier of the credit card resource to obtain the data for.
return CreditCard
        public static CreditCard Get(APIContext apiContext, string creditCardId)
        {
            // Validate the arguments to be used in the request
            ArgumentValidator.ValidateAndSetupAPIContext(apiContext);
            ArgumentValidator.Validate(creditCardId, "creditCardId");

            // Configure and send the request
            var pattern = "v1/vault/credit-cards/{0}";
            var resourcePath = SDKUtil.FormatURIPath(pattern, new object[] { creditCardId });
            return PayPalResource.ConfigureAndExecute<CreditCard>(apiContext, HttpMethod.GET, resourcePath);
        }