Пример #1
0
 public void AddDispute()
 {
     ItemType item = this.AddItem();
     Assert.IsNotNull(item, "Failed because no item available -- requires successful AddItem test");
     //
     AddDisputeCall api = new AddDisputeCall(this.apiContext);
     //api.DisputeExplanation = DisputeExplanationCodeType.BuyerHasNotResponded;
     api.DisputeReason = DisputeReasonCodeType.BuyerHasNotPaid;
     api.ItemID = item.ItemID;
     api.TransactionID = "0";
     // Make API call.
     ApiException gotException = null;
     try
     {
     /* String disputeId = */ api.Execute();
     }
     catch(ApiException ex)
     {
         gotException = ex;
     }
     Assert.IsNotNull(gotException);
 }
Пример #2
0
		private void BtnAddDispute_Click(object sender, System.EventArgs e)
		{
			try
			{
				TxtDisputeId.Text = "";

				AddDisputeCall apicall = new AddDisputeCall(Context);
				
			
				string DisputeId = apicall.AddDispute(TxtItemId.Text, TxtTransactionId.Text,  (DisputeReasonCodeType) Enum.Parse(typeof(DisputeReasonCodeType), CboReason.SelectedItem.ToString()), (DisputeExplanationCodeType) Enum.Parse(typeof(DisputeExplanationCodeType), CboExplanation.SelectedItem.ToString()));
	
				TxtDisputeId.Text = DisputeId;

			}
			catch(Exception ex)
			{
				MessageBox.Show(ex.Message);
			}

		}