示例#1
0
    def fetch_items(self, options = {}):
        """Get all the items linked to the payout.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/payouts/" + quote_plus(self.id) + "/items"
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        a    = []
        body = response.body
        for v in body['items']:
            tmp = processout.PayoutItem(self._client)
            tmp.fill_with_data(v)
            a.append(tmp)

        return_values.append(a)
            

        
        return return_values[0]
示例#2
0
    def find(self, invoice_id, options = {}):
        """Find an invoice by its ID.
        Keyword argument:
        invoice_id -- ID of the invoice
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/invoices/" + quote_plus(invoice_id) + ""
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        body = response.body
        body = body["invoice"]
                
                
        obj = processout.Invoice(self._client)
        return_values.append(obj.fill_with_data(body))
                

        
        return return_values[0]
示例#3
0
    def all(self, options = {}):
        """Get all the gateway configurations.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/gateway-configurations"
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        a    = []
        body = response.body
        for v in body['gateway_configurations']:
            tmp = processout.GatewayConfiguration(self._client)
            tmp.fill_with_data(v)
            a.append(tmp)

        return_values.append(a)
            

        
        return return_values[0]
示例#4
0
    def find(self, subscription_id, discount_id, options = {}):
        """Find a subscription's discount by its ID.
        Keyword argument:
        subscription_id -- ID of the subscription on which the discount was applied
        discount_id -- ID of the discount
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/subscriptions/" + quote_plus(subscription_id) + "/discounts/" + quote_plus(discount_id) + ""
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        body = response.body
        body = body["discount"]
                
                
        obj = processout.Discount(self._client)
        return_values.append(obj.fill_with_data(body))
                

        
        return return_values[0]
示例#5
0
    def find(self, authorization_request_id, options = {}):
        """Find an authorization request by its ID.
        Keyword argument:
        authorization_request_id -- ID of the authorization request
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/authorization-requests/" + quote_plus(authorization_request_id) + ""
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        body = response.body
        body = body["authorization_request"]
                
                
        obj = processout.AuthorizationRequest(self._client)
        return_values.append(obj.fill_with_data(body))
                

        
        return return_values[0]
示例#6
0
    def fetch_subscription_discounts(self, subscription_id, options = {}):
        """Get the discounts applied to the subscription.
        Keyword argument:
        subscription_id -- ID of the subscription
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/subscriptions/" + quote_plus(subscription_id) + "/discounts"
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        a    = []
        body = response.body
        for v in body['discounts']:
            tmp = processout.Discount(self._client)
            tmp.fill_with_data(v)
            a.append(tmp)

        return_values.append(a)
            

        
        return return_values[0]
示例#7
0
    def find(self, coupon_id, options = {}):
        """Find a coupon by its ID.
        Keyword argument:
        coupon_id -- ID of the coupon
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/coupons/" + quote_plus(coupon_id) + ""
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        body = response.body
        body = body["coupon"]
                
                
        obj = processout.Coupon(self._client)
        return_values.append(obj.fill_with_data(body))
                

        
        return return_values[0]
示例#8
0
    def fetch(self, iin, options = {}):
        """Fetch card information from the IIN.
        Keyword argument:
        iin -- IIN of the card (first 6 digits)
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/iins/" + quote_plus(iin) + ""
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        body = response.body
        body = body["card_information"]
                
                
        obj = processout.CardInformation(self._client)
        return_values.append(obj.fill_with_data(body))
                

        
        return return_values[0]
示例#9
0
    def fetch_webhooks(self, options = {}):
        """Get all the webhooks of the event.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/events/" + quote_plus(self.id) + "/webhooks"
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        a    = []
        body = response.body
        for v in body['webhooks']:
            tmp = processout.Webhook(self._client)
            tmp.fill_with_data(v)
            a.append(tmp)

        return_values.append(a)
            

        
        return return_values[0]
示例#10
0
    def find(self, event_id, options = {}):
        """Find an event by its ID.
        Keyword argument:
        event_id -- ID of the event
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/events/" + quote_plus(event_id) + ""
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        body = response.body
        body = body["event"]
                
                
        obj = processout.Event(self._client)
        return_values.append(obj.fill_with_data(body))
                

        
        return return_values[0]
示例#11
0
    def all(self, options = {}):
        """Get all the invoices.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/invoices"
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        a    = []
        body = response.body
        for v in body['invoices']:
            tmp = processout.Invoice(self._client)
            tmp.fill_with_data(v)
            a.append(tmp)

        return_values.append(a)
            

        
        return return_values[0]
示例#12
0
    def fetch_customer(self, options={}):
        """Get the customer owning the subscription.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/subscriptions/" + quote_plus(self.id) + "/customers"
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        body = response.body
        body = body["customer"]
        customer = processout.Customer(self._client)
        return_values.append(customer.fill_with_data(body))

        return return_values[0]
示例#13
0
    def fetch(self, options={}):
        """Fetch the current project information.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/projects/" + quote_plus(self.id) + ""
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        body = response.body
        body = body["project"]

        return_values.append(self.fill_with_data(body))

        return return_values[0]
示例#14
0
    def find_addon(self, addon_id, options={}):
        """Find a subscription's addon by its ID.
        Keyword argument:
        addon_id -- ID of the addon
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/subscriptions/" + quote_plus(
            self.id) + "/addons/" + quote_plus(addon_id) + ""
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        body = response.body
        body = body["addon"]
        addon = processout.Addon(self._client)
        return_values.append(addon.fill_with_data(body))

        return return_values[0]
示例#15
0
    def find(self, activity_id, options={}):
        """Find a specific activity and fetch its data.
        Keyword argument:
        activity_id -- ID of the activity
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/activities/" + quote_plus(activity_id) + ""
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        body = response.body
        body = body["activity"]

        obj = processout.Activity(self._client)
        return_values.append(obj.fill_with_data(body))

        return return_values[0]
示例#16
0
    def find_token(self, token_id, options={}):
        """Find a customer's token by its ID.
        Keyword argument:
        token_id -- ID of the token
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/customers/" + quote_plus(
            self.id) + "/tokens/" + quote_plus(token_id) + ""
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        body = response.body
        body = body["token"]
        token = processout.Token(self._client)
        return_values.append(token.fill_with_data(body))

        return return_values[0]
示例#17
0
    def find(self, api_request_id, options={}):
        """Find an API request by its ID.
        Keyword argument:
        api_request_id -- ID of the API request
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/api-requests/{request_id}"
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        body = response.body
        body = body["api_request"]

        obj = processout.APIRequest(self._client)
        return_values.append(obj.fill_with_data(body))

        return return_values[0]
示例#18
0
    def find_refund(self, refund_id, options={}):
        """Find a transaction's refund by its ID.
        Keyword argument:
        refund_id -- ID of the refund
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/transactions/" + quote_plus(
            self.id) + "/refunds/" + quote_plus(refund_id) + ""
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        body = response.body
        body = body["refund"]
        refund = processout.Refund(self._client)
        return_values.append(refund.fill_with_data(body))

        return return_values[0]
示例#19
0
    def fetch_transaction(self, options = {}):
        """Get the transaction of the invoice.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path    = "/invoices/" + quote_plus(self.id) + "/transactions"
        data    = {

        }

        response = Response(request.get(path, data, options))
        return_values = []
        
        body = response.body
        body = body["transaction"]
        transaction = processout.Transaction(self._client)
        return_values.append(transaction.fill_with_data(body))

        
        return return_values[0]
示例#20
0
    def fetch_addons(self, options={}):
        """Get the addons applied to the subscription.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/subscriptions/" + quote_plus(self.id) + "/addons"
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        a = []
        body = response.body
        for v in body['addons']:
            tmp = processout.Addon(self._client)
            tmp.fill_with_data(v)
            a.append(tmp)

        return_values.append(a)

        return return_values[0]
示例#21
0
    def fetch_transactions(self, options={}):
        """Get the transactions belonging to the customer.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/customers/" + quote_plus(self.id) + "/transactions"
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        a = []
        body = response.body
        for v in body['transactions']:
            tmp = processout.Transaction(self._client)
            tmp.fill_with_data(v)
            a.append(tmp)

        return_values.append(a)

        return return_values[0]
示例#22
0
    def fetch_transaction_refunds(self, transaction_id, options={}):
        """Get the transaction's refunds.
        Keyword argument:
        transaction_id -- ID of the transaction
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/transactions/" + quote_plus(transaction_id) + "/refunds"
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        a = []
        body = response.body
        for v in body['refunds']:
            tmp = processout.Refund(self._client)
            tmp.fill_with_data(v)
            a.append(tmp)

        return_values.append(a)

        return return_values[0]
示例#23
0
    def fetch_supervised(self, options={}):
        """Get all the supervised projects.
        Keyword argument:
        
        options -- Options for the request"""
        self.fill_with_data(options)

        request = Request(self._client)
        path = "/supervised-projects"
        data = {}

        response = Response(request.get(path, data, options))
        return_values = []

        a = []
        body = response.body
        for v in body['projects']:
            tmp = processout.Project(self._client)
            tmp.fill_with_data(v)
            a.append(tmp)

        return_values.append(a)

        return return_values[0]