andela-sjames / paystack-python

Python plugin for Paystack
https://pypi.python.org/pypi/paystackapi
MIT License
110 stars 44 forks source link

TransferRecipient throws AttributeError #75

Closed spaceofmiah closed 4 years ago

spaceofmiah commented 4 years ago

Attempts to create TransferRecipient throws attribute error

PAYSTACK_SECRET = settings.PAYSTACK_SECRET_KEY
paystack = Paystack(secret_key=PAYSTACK_SECRET)

paystack.transferrecipient.create(**kwargs)               # Throws attribute error

paystack.transfer_recipient.create(**kwargs)             # Throws attribute error

stack trace

AttributeError: 'Paystack' object has no attribute 'transferrecipient'

Doc example

from paystackapi.trecipient import TransferRecipient

response = TransferRecipient.create(
            type="nuban",
            name="Zombie",
            description="Zombier",
            account_number="01000000010",
            bank_code="044",
        )

If i'm to utilize the example specified on the docs, how do i specify my secret_key ? How can i utilize TransferRecipient feature ?

spaceofmiah commented 4 years ago

https://github.com/andela-sjames/paystack-python/blob/f4b90820533a62926a52d76f4ce1e77efc43e3cc/paystackapi/paystack.py#L46