class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get','post'] queryset = BankPaymentLead.objects.all() resource_name = 'bank_payments' serializer = Serializer(formats=['json'])
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get' ,'post'] queryset = ClaimedPromotion.objects.all() resource_name = 'claimed_promotions' serializer = Serializer() exclude = []
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get','post' ] queryset = SmsOutBound.objects.all() resource_name = 'sms_outbound' serializer = Serializer(formats=['json']) exclude = []
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get' ] queryset = SmsInbound.objects.all() resource_name = 'sms_inbox' serializer = Serializer() exclude = []
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get' ] queryset = SimCard.objects.all() resource_name = 'sim_cards' serializer = Serializer(formats=['json']) excludes = ["balance_month","balance_day","sim_no","status","is_active","created"]
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get' ] queryset = Network.objects.all() resource_name = 'networks' serializer = Serializer(formats=['json']) excludes = ["daily_limit","airtime_transfer_limit","is_active","created"]
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['post','get' ] queryset = UniqueIdentifier.objects.all() resource_name = 'identifiers' serializer = Serializer(formats=['json']) excludes = ['is_active']
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get' ] queryset = Promotion.objects.all() resource_name = 'promotions' serializer = Serializer() filtering = {'referrer':ALL_WITH_RELATIONS} exclude = []
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), ApiKeyAuthentication(), BasicAuthentication(), TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get','post' ] queryset = AirtimeDepositLead.objects.all() resource_name = 'airtime_deposits' serializer = Serializer() excludes = ['transactions','identifiers']
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(), TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get', 'post'] queryset = Pocket.objects.all() resource_name = 'pockets' serializer = Serializer(formats=['json']) filtering = {'identifiers': ALL_WITH_RELATIONS, 'transactions': ALL_WITH_RELATIONS, 'name':ALL, 'tag':ALL} exclude = []
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get','post','put' ] queryset = VoucherPaymentLead.objects.all() resource_name = 'voucher_payments' serializer = Serializer() filtering = {'voucher_code':ALL_WITH_RELATIONS,'pocket_from':ALL_WITH_RELATIONS,'pocket_to':ALL_WITH_RELATIONS} ordering = ['created'] exclude = []
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get'] detail_allowed_methods = ['get', 'put'] queryset = Merchant.objects.all() resource_name = 'merchants' serializer = Serializer() exclude = [] filtering = {'default_pocket':ALL_WITH_RELATIONS,'profile':ALL_WITH_RELATIONS,'display_on_website':ALL}
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), ApiKeyAuthentication(), BasicAuthentication(), TokenAuthentication()) authorization = Authorization() always_return_data = True allowed_methods = ['get','post' ] queryset = CrowdcoinPaymentLead.objects.all() resource_name = 'crowdcoin_payments' serializer = Serializer(formats=['json']) filtering = {'status': ALL,'pocket_to': ALL_WITH_RELATIONS,'reference': ALL} exclude = []
class Meta: authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(), TokenAuthentication()) authorization = PocketAuthorization() always_return_data = True allowed_methods = ['get'] queryset = Transaction.objects.all() resource_name = 'transactions' serializer = Serializer(formats=['json']) exclude = [] filtering = {'pocket':ALL_WITH_RELATIONS} ordering = ['datetime']
class Meta: # For authentication, allow both basic and api key so that the key # can be grabbed, if needed. authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = UserAuthorization() always_return_data = True allowed_methods = ['get', 'patch','put' ,'options'] detail_allowed_methods = ['get', 'put'] queryset = UserProfile.objects.all() resource_name = 'profile' filtering = {'user':ALL_WITH_RELATIONS, 'identifier':ALL_WITH_RELATIONS} serializer = Serializer(formats=['json','jsonp'])
class Meta: # For authentication, allow both basic and api key so that the key # can be grabbed, if needed. authentication = MultiAuthentication( InlineBasicAuthentication(), BasicAuthentication(), ApiKeyAuthentication(),TokenAuthentication()) authorization = Authorization() serializer = Serializer(formats=['json']) # Because this can be updated nested under the UserProfile, it needed # 'put'. No idea why, since patch is supposed to be able to handle # partial updates. allowed_methods = ['get', 'put' ] always_return_data = True queryset = User.objects.all().select_related("api_key") resource_name = "users" fields = ['last_name','first_name','username','is_active','email','password','is_staff','is_superuser'] filtering = {'username':ALL_WITH_RELATIONS,'email':ALL}