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

Get() public static method

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

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