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

Get() public static method

Shows details for a specified invoice, by ID.
public static Get ( APIContext apiContext, string invoiceId ) : Invoice
apiContext APIContext APIContext used for the API call.
invoiceId string The ID of the invoice for which to show details.
return Invoice
        public static Invoice Get(APIContext apiContext, string invoiceId)
        {
            // Validate the arguments to be used in the request
            ArgumentValidator.ValidateAndSetupAPIContext(apiContext);
            ArgumentValidator.Validate(invoiceId, "invoiceId");

            // Configure and send the request
            var pattern = "v1/invoicing/invoices/{0}";
            var resourcePath = SDKUtil.FormatURIPath(pattern, new object[] { invoiceId });
            return PayPalResource.ConfigureAndExecute<Invoice>(apiContext, HttpMethod.GET, resourcePath);
        }