本文整理汇总了C#中Braintree.SubscriptionSearchRequest.ToXml方法的典型用法代码示例。如果您正苦于以下问题:C# SubscriptionSearchRequest.ToXml方法的具体用法?C# SubscriptionSearchRequest.ToXml怎么用?C# SubscriptionSearchRequest.ToXml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Braintree.SubscriptionSearchRequest
的用法示例。
在下文中一共展示了SubscriptionSearchRequest.ToXml方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToXML_EscapesGeneratedXMLForArrayElements
public void ToXML_EscapesGeneratedXMLForArrayElements()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().
Ids.IncludedIn("<active");
TestHelper.AssertIncludes("<ids type=\"array\"><item><active</item></ids>", request.ToXml());
}
示例2: ToXml_BillingCyclesRemainingLessThanOrEqualTo
public void ToXml_BillingCyclesRemainingLessThanOrEqualTo()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().BillingCyclesRemaining.LessThanOrEqualTo(12.34);
var xml = "<search><billing-cycles-remaining><max>12.34</max></billing-cycles-remaining></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例3: ToXml_PriceLessThanOrEqualTo
public void ToXml_PriceLessThanOrEqualTo()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().Price.LessThanOrEqualTo(12.34M);
var xml = "<search><price><max>12.34</max></price></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例4: ToXml_PriceBetween
public void ToXml_PriceBetween()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().Price.Between(1M, 2M);
var xml = "<search><price><min>1</min><max>2</max></price></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例5: ToXml_PriceIs
public void ToXml_PriceIs()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().Price.Is(1M);
var xml = "<search><price><is>1</is></price></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例6: ToXml_BillingCyclesRemainingBetween
public void ToXml_BillingCyclesRemainingBetween()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().BillingCyclesRemaining.Between(1, 2);
var xml = "<search><billing-cycles-remaining><min>1</min><max>2</max></billing-cycles-remaining></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例7: ToXML_EscapesGeneratedXMLForSearchCriteria
public void ToXML_EscapesGeneratedXMLForSearchCriteria()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().
PlanId.Is("<my-id");
TestHelper.AssertIncludes("<plan-id><is><my-id</is></plan-id>", request.ToXml());
}
示例8: ToXml_IdContains
public void ToXml_IdContains()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().Id.Contains("30");
var xml = "<search><id><contains>30</contains></id></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例9: ToXml_DaysPastDueBetween
public void ToXml_DaysPastDueBetween()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().DaysPastDue.Between(2, 3);
var xml = "<search><days-past-due><min>2</min><max>3</max></days-past-due></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例10: ToXml_DaysPastDueIs
public void ToXml_DaysPastDueIs()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().DaysPastDue.Is("30");
var xml = "<search><days-past-due><is>30</is></days-past-due></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例11: ToXml_PlanIdIncludedIn
public void ToXml_PlanIdIncludedIn()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().PlanId.IncludedIn("abc", "def");
var xml = "<search><plan-id type=\"array\"><item>abc</item><item>def</item></plan-id></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例12: ToXml_PlanIdStartsWith
public void ToXml_PlanIdStartsWith()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().PlanId.StartsWith("30");
var xml = "<search><plan-id><starts-with>30</starts-with></plan-id></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例13: ToXml_PlanIdIs
public void ToXml_PlanIdIs()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().PlanId.Is("abc");
var xml = "<search><plan-id><is>abc</is></plan-id></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例14: ToXml_BillingCyclesRemainingIs
public void ToXml_BillingCyclesRemainingIs()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().BillingCyclesRemaining.Is(1);
var xml = "<search><billing-cycles-remaining><is>1</is></billing-cycles-remaining></search>";
Assert.AreEqual(xml, request.ToXml());
}
示例15: ToXML_DefaultsNullCriteriaToEmptyString
public void ToXML_DefaultsNullCriteriaToEmptyString()
{
SubscriptionSearchRequest request = new SubscriptionSearchRequest().
PlanId.Is(null);
TestHelper.AssertIncludes("<plan-id><is></is></plan-id>", request.ToXml());
}