def get_active_subscriptions(self):
     """ Get All ACTIVE Subscriptions """
     search_results = braintree.Subscription.search([
                             braintree.SubscriptionSearch.status == braintree.Subscription.Status.Active
                             ])
     subscriptions = []
     for subscription in search_results.items:
         subscriptions.append(subscription)
     return subscriptions
Esempio n. 2
0
 def get_active_subscriptions(self):
     """ Get All ACTIVE Subscriptions """
     search_results = braintree.Subscription.search([
                             braintree.SubscriptionSearch.status == braintree.Subscription.Status.Active
                             ])
     subscriptions = []
     for subscription in search_results.items:
         subscriptions.append(subscription)
     return subscriptions
 def get_all_subscriptions(self):
     """ Get All Subscriptions """
     search_results = braintree.Subscription.search(
                             braintree.SubscriptionSearch.status.in_list(
                                             braintree.Subscription.Status.Active,
                                             braintree.Subscription.Status.Canceled,
                                             braintree.Subscription.Status.Expired,
                                             braintree.Subscription.Status.PastDue,
                                             braintree.Subscription.Status.Pending))
     subscriptions = []
     for subscription in search_results.items:
         subscriptions.append(subscription)
     return subscriptions
Esempio n. 4
0
 def get_all_subscriptions(self):
     """ Get All Subscriptions """
     search_results = braintree.Subscription.search(
                             braintree.SubscriptionSearch.status.in_list(
                                             braintree.Subscription.Status.Active,
                                             braintree.Subscription.Status.Canceled,
                                             braintree.Subscription.Status.Expired,
                                             braintree.Subscription.Status.PastDue,
                                             braintree.Subscription.Status.Pending))
     subscriptions = []
     for subscription in search_results.items:
         subscriptions.append(subscription)
     return subscriptions
 def get_past_due_subscriptions(self, days=2):
     """ Get back all subscriptions that were in past due status 'situacion de mora' """
     if days is None:
         search_results = braintree.Subscription.search([
                             braintree.SubscriptionSearch.days_past_due == days
                             ])
     else:
         search_results = braintree.Subscription.search([
                             braintree.SubscriptionSearch.days_past_due == days
                             ])
     subscriptions = []
     for subscription in search_results.items:
         subscriptions.append(subscription)
     return subscriptions
Esempio n. 6
0
 def get_past_due_subscriptions(self, days=2):
     """ Get back all subscriptions that were in past due status 'situacion de mora' """
     if days is None:
         search_results = braintree.Subscription.search([
                             braintree.SubscriptionSearch.days_past_due == days
                             ])
     else:
         search_results = braintree.Subscription.search([
                             braintree.SubscriptionSearch.days_past_due == days
                             ])
     subscriptions = []
     for subscription in search_results.items:
         subscriptions.append(subscription)
     return subscriptions