<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Automatic Recurring Billing (ARB) End Dates in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Automatic-Recurring-Billing-ARB-End-Dates/m-p/61653#M36069</link>
    <description>&lt;P&gt;How do you determin the end date of a ARB subscription (or if the subscription has no end date)?&amp;nbsp; The &lt;EM&gt;ARBGetSubscriptionRespone contains the start date - but no end date?&amp;nbsp; The interface to manually create the ARB subscription provides three GUI elements to control the end date: "no end date", "end date", "end after XX occurances".&amp;nbsp; So using the API, how do we determine if a subscription has no end date or a specific end date?&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2018 23:06:23 GMT</pubDate>
    <dc:creator>ptlapa</dc:creator>
    <dc:date>2018-02-12T23:06:23Z</dc:date>
    <item>
      <title>Automatic Recurring Billing (ARB) End Dates</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Automatic-Recurring-Billing-ARB-End-Dates/m-p/61653#M36069</link>
      <description>&lt;P&gt;How do you determin the end date of a ARB subscription (or if the subscription has no end date)?&amp;nbsp; The &lt;EM&gt;ARBGetSubscriptionRespone contains the start date - but no end date?&amp;nbsp; The interface to manually create the ARB subscription provides three GUI elements to control the end date: "no end date", "end date", "end after XX occurances".&amp;nbsp; So using the API, how do we determine if a subscription has no end date or a specific end date?&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 23:06:23 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Automatic-Recurring-Billing-ARB-End-Dates/m-p/61653#M36069</guid>
      <dc:creator>ptlapa</dc:creator>
      <dc:date>2018-02-12T23:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic Recurring Billing (ARB) End Dates</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Automatic-Recurring-Billing-ARB-End-Dates/m-p/61656#M36072</link>
      <description>&lt;P&gt;One way is to use a simple calculation based on the results of the ARBGetSubscriptionRequest:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  &amp;lt;interval&amp;gt;
  &amp;lt;length&amp;gt;7&amp;lt;/length&amp;gt;
  &amp;lt;unit&amp;gt;days&amp;lt;/unit&amp;gt;
  &amp;lt;/interval&amp;gt;
  &amp;lt;startDate&amp;gt;2018-02-01&amp;lt;/startDate&amp;gt;
  &amp;lt;totalOccurrences&amp;gt;10&amp;lt;/totalOccurrences&amp;gt;&lt;/PRE&gt;&lt;P&gt;The &lt;STRONG&gt;startDate&lt;/STRONG&gt; and &lt;STRONG&gt;int&lt;/STRONG&gt; variables would of course be&amp;nbsp;retrieved by your application by parsing the XML or JSON, passed to a function, something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;func calcEndDate(sDate string, toc int, length int) {
	startDate, _ := time.Parse("2006-01-02", sDate)
	subTotal := length * toc
	endDate := startDate.AddDate(0, 0, subTotal)
	fmt.Println("Subscription End Date will be : ", endDate.Format("2006-01-02"))

}

func main() {
	calcEndDate("2018-02-01", 10, 7)
}&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;Subscription End Date will be : 2018-04-12&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 01:09:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Automatic-Recurring-Billing-ARB-End-Dates/m-p/61656#M36072</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2018-02-13T01:09:36Z</dc:date>
    </item>
  </channel>
</rss>

