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

Update() public method

Update information in a previously saved card. Only the modified fields need to be passed in the request.
public Update ( APIContext apiContext, PatchRequest patchRequest ) : CreditCard
apiContext APIContext APIContext used for the API call.
patchRequest PatchRequest PatchRequest
return CreditCard
        public CreditCard Update(APIContext apiContext, PatchRequest patchRequest)
        {
            // Validate the arguments to be used in the request
            ArgumentValidator.ValidateAndSetupAPIContext(apiContext);
            ArgumentValidator.Validate(this.id, "Id");
            ArgumentValidator.Validate(patchRequest, "patchRequest");

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

Same methods

CreditCard::Update ( APIContext apiContext, string creditCardId, PatchRequest patchRequest ) : CreditCard