protected override void RunSample() { // ### Api Context // Pass in a `APIContext` object to authenticate // the call and to send a unique request id // (that ensures idempotency). The SDK generates // a request id if you do not pass one explicitly. // See [Configuration.cs](/Source/Configuration.html) to know more about APIContext. var apiContext = Configuration.GetAPIContext(); // ### Batch Payout Item ID // The ID of the batch payout item to lookup. var payoutItemId = "Q7DWNN5Y733CQ"; // ^ Ignore workflow code segment #region Track Workflow this.flow.AddNewRequest("Retrieve payout item details", description: "ID: " + payoutItemId); #endregion // ### PayoutItemDetails.Get() // Retrieves the details of the specified batch payout item. var payoutItemDetails = PayoutItemDetails.Get(apiContext, payoutItemId); // ^ Ignore workflow code segment #region Track Workflow this.flow.RecordResponse(payoutItemDetails); #endregion // For more information, please visit [PayPal Developer REST API Reference](https://developer.paypal.com/docs/api/). }
public void PayoutItemDetailsGetTest() { var payoutItemId = "G2CFT8SJRB7RN"; var payoutItemDetails = PayoutItemDetails.Get(TestingUtil.GetApiContext(), payoutItemId); Assert.IsNotNull(payoutItemDetails); Assert.AreEqual(payoutItemId, payoutItemDetails.payout_item_id); Assert.AreEqual("8NX77PFLN255E", payoutItemDetails.payout_batch_id); }