diff --git a/docs/Balance.md b/docs/Balance.md index 7d9ce9e..a3d895a 100644 --- a/docs/Balance.md +++ b/docs/Balance.md @@ -20,14 +20,17 @@ You can only transfer from what you have * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' # Fetch Balance response = paystack.Balance.fetch() + + pprint(response) ``` ### Parameters @@ -66,18 +69,17 @@ Balance Ledger * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # Balance Ledger -response = paystack.Balance.ledger(per_page=per_page, page=page, _from=_from, to=to) +response = paystack.Balance.ledger( +) + pprint(response) ``` ### Parameters diff --git a/docs/BulkCharge.md b/docs/BulkCharge.md index bd5c3eb..4a50251 100644 --- a/docs/BulkCharge.md +++ b/docs/BulkCharge.md @@ -22,15 +22,19 @@ Fetch Charges in a Batch * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Batch code # Fetch Charges in a Batch -response = paystack.BulkCharge.charges(code) +response = paystack.BulkCharge.charges( + code, +) + pprint(response) ``` ### Parameters @@ -72,15 +76,19 @@ Fetch Bulk Charge Batch * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Batch code # Fetch Bulk Charge Batch -response = paystack.BulkCharge.fetch(code) +response = paystack.BulkCharge.fetch( + code, +) + pprint(response) ``` ### Parameters @@ -122,14 +130,17 @@ Initiate Bulk Charge * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' # Initiate Bulk Charge response = paystack.BulkCharge.initiate() + + pprint(response) ``` ### Parameters @@ -167,18 +178,17 @@ List Bulk Charge Batches * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Bulk Charge Batches -response = paystack.BulkCharge.list(per_page=per_page, page=page, _from=_from, to=to) +response = paystack.BulkCharge.list( +) + pprint(response) ``` ### Parameters @@ -223,15 +233,19 @@ Pause Bulk Charge Batch * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Batch code # Pause Bulk Charge Batch -response = paystack.BulkCharge.pause(code) +response = paystack.BulkCharge.pause( + code, +) + pprint(response) ``` ### Parameters @@ -273,15 +287,19 @@ Resume Bulk Charge Batch * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Batch code # Resume Bulk Charge Batch -response = paystack.BulkCharge.resume(code) +response = paystack.BulkCharge.resume( + code, +) + pprint(response) ``` ### Parameters diff --git a/docs/Charge.md b/docs/Charge.md index de29f28..3b6301c 100644 --- a/docs/Charge.md +++ b/docs/Charge.md @@ -23,15 +23,19 @@ Check pending charge * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' reference = 'reference_example' # str | # Check pending charge -response = paystack.Charge.check(reference) +response = paystack.Charge.check( + reference, +) + pprint(response) ``` ### Parameters @@ -73,26 +77,17 @@ Create Charge * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -email = 'email_example' # str | Customer's email address (optional) -amount = 'amount_example' # str | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR (optional) -authorization_code = 'authorization_code_example' # str | An authorization code to charge. (optional) -pin = 'pin_example' # str | 4-digit PIN (send with a non-reusable authorization code) (optional) -reference = 'reference_example' # str | Unique transaction reference. Only -, .`, = and alphanumeric characters allowed. (optional) -birthday = '2013-10-20T19:20:30+01:00' # datetime | The customer's birthday in the format YYYY-MM-DD e.g 2017-05-16 (optional) -device_id = 'device_id_example' # str | This is the unique identifier of the device a user uses in making payment. Only -, .`, = and alphanumeric characters are allowed. (optional) -metadata = 'metadata_example' # str | Stringified JSON object of custom data (optional) -bank = paystack.Bank() # Bank | (optional) -mobile_money = paystack.MobileMoney() # MobileMoney | (optional) -ussd = paystack.USSD() # USSD | (optional) -eft = paystack.EFT() # EFT | (optional) # Create Charge -response = paystack.Charge.create(email=email, amount=amount, authorization_code=authorization_code, pin=pin, reference=reference, birthday=birthday, device_id=device_id, metadata=metadata, bank=bank, mobile_money=mobile_money, ussd=ussd, eft=eft) +response = paystack.Charge.create( +) + pprint(response) ``` ### Parameters @@ -144,9 +139,10 @@ Submit Address * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' address = 'address_example' # str | Customer's address city = 'city_example' # str | Customer's city @@ -156,7 +152,14 @@ reference = 'reference_example' # str | The reference of the ongoing transaction # Submit Address -response = paystack.Charge.submit_address(address, city, state, zipcode, reference) +response = paystack.Charge.submit_address( + address, + city, + state, + zipcode, + reference, +) + pprint(response) ``` ### Parameters @@ -201,16 +204,21 @@ Submit Birthday * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' birthday = 'birthday_example' # str | Customer's birthday in the format YYYY-MM-DD e.g 2016-09-21 reference = 'reference_example' # str | The reference of the ongoing transaction # Submit Birthday -response = paystack.Charge.submit_birthday(birthday, reference) +response = paystack.Charge.submit_birthday( + birthday, + reference, +) + pprint(response) ``` ### Parameters @@ -252,16 +260,21 @@ Submit OTP * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' otp = 'otp_example' # str | Customer's OTP reference = 'reference_example' # str | The reference of the ongoing transaction # Submit OTP -response = paystack.Charge.submit_otp(otp, reference) +response = paystack.Charge.submit_otp( + otp, + reference, +) + pprint(response) ``` ### Parameters @@ -303,16 +316,21 @@ Submit Phone * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' phone = 'phone_example' # str | Customer's mobile number reference = 'reference_example' # str | The reference of the ongoing transaction # Submit Phone -response = paystack.Charge.submit_phone(phone, reference) +response = paystack.Charge.submit_phone( + phone, + reference, +) + pprint(response) ``` ### Parameters @@ -354,16 +372,21 @@ Submit PIN * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' pin = 'pin_example' # str | Customer's PIN reference = 'reference_example' # str | Transaction reference that requires the PIN # Submit PIN -response = paystack.Charge.submit_pin(pin, reference) +response = paystack.Charge.submit_pin( + pin, + reference, +) + pprint(response) ``` ### Parameters diff --git a/docs/Customer.md b/docs/Customer.md index dcf1f06..79c3ec5 100644 --- a/docs/Customer.md +++ b/docs/Customer.md @@ -23,19 +23,19 @@ Create Customer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' email = 'email_example' # str | Customer's email address -first_name = 'first_name_example' # str | Customer's first name (optional) -last_name = 'last_name_example' # str | Customer's last name (optional) -phone = 'phone_example' # str | Customer's phone number (optional) -metadata = 'metadata_example' # str | Stringified JSON object of custom data (optional) # Create Customer -response = paystack.Customer.create(email, first_name=first_name, last_name=last_name, phone=phone, metadata=metadata) +response = paystack.Customer.create( + email, +) + pprint(response) ``` ### Parameters @@ -82,15 +82,19 @@ Deactivate a customer's card * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' authorization_code = 'authorization_code_example' # str | Authorization code to be deactivated # Deactivate Authorization -response = paystack.Customer.deactivate_authorization(authorization_code) +response = paystack.Customer.deactivate_authorization( + authorization_code, +) + pprint(response) ``` ### Parameters @@ -131,15 +135,19 @@ Fetch Customer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | # Fetch Customer -response = paystack.Customer.fetch(code) +response = paystack.Customer.fetch( + code, +) + pprint(response) ``` ### Parameters @@ -183,21 +191,17 @@ List customers on your integration * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -use_cursor = True # bool | (optional) -next = 'next_example' # str | (optional) -previous = 'previous_example' # str | (optional) -_from = '_from_example' # str | (optional) -to = 'to_example' # str | (optional) -per_page = 'per_page_example' # str | (optional) -page = 'page_example' # str | (optional) # List Customers -response = paystack.Customer.list(use_cursor=use_cursor, next=next, previous=previous, _from=_from, to=to, per_page=per_page, page=page) +response = paystack.Customer.list( +) + pprint(response) ``` ### Parameters @@ -247,16 +251,19 @@ Set customer's risk action by whitelisting or blacklisting the customer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' customer = 'customer_example' # str | Customer's code, or email address -risk_action = 'risk_action_example' # str | One of the possible risk actions [ default, allow, deny ]. allow to whitelist. deny to blacklist. Customers start with a default risk action. (optional) # White/blacklist Customer -response = paystack.Customer.risk_action(customer, risk_action=risk_action) +response = paystack.Customer.risk_action( + customer, +) + pprint(response) ``` ### Parameters @@ -298,19 +305,19 @@ Update Customer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | -first_name = 'first_name_example' # str | Customer's first name (optional) -last_name = 'last_name_example' # str | Customer's last name (optional) -phone = 'phone_example' # str | Customer's phone number (optional) -metadata = 'metadata_example' # str | Stringified JSON object of custom data (optional) # Update Customer -response = paystack.Customer.update(code, first_name=first_name, last_name=last_name, phone=phone, metadata=metadata) +response = paystack.Customer.update( + code, +) + pprint(response) ``` ### Parameters @@ -358,9 +365,10 @@ Validate a customer's identity * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | first_name = 'first_name_example' # str | Customer's first name @@ -370,11 +378,20 @@ country = 'country_example' # str | Two-letter country code of identification is bvn = 'bvn_example' # str | Customer's Bank Verification Number bank_code = 'bank_code_example' # str | You can get the list of bank codes by calling the List Banks endpoint (https://api.paystack.co/bank). account_number = 'account_number_example' # str | Customer's bank account number. -value = 'value_example' # str | Customer's identification number. Required if type is bvn (optional) # Validate Customer -response = paystack.Customer.validatte(code, first_name, last_name, type, country, bvn, bank_code, account_number, value=value) +response = paystack.Customer.validatte( + code, + first_name, + last_name, + type, + country, + bvn, + bank_code, + account_number, +) + pprint(response) ``` ### Parameters diff --git a/docs/DedicatedVirtualAccount.md b/docs/DedicatedVirtualAccount.md index 4c73674..285863a 100644 --- a/docs/DedicatedVirtualAccount.md +++ b/docs/DedicatedVirtualAccount.md @@ -23,17 +23,19 @@ Split Dedicated Account Transaction * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' account_number = 'account_number_example' # str | Valid Dedicated virtual account -subaccount = 'subaccount_example' # str | Subaccount code of the account you want to split the transaction with (optional) -split_code = 'split_code_example' # str | Split code consisting of the lists of accounts you want to split the transaction with (optional) # Split Dedicated Account Transaction -response = paystack.DedicatedVirtualAccount.add_split(account_number, subaccount=subaccount, split_code=split_code) +response = paystack.DedicatedVirtualAccount.add_split( + account_number, +) + pprint(response) ``` ### Parameters @@ -76,14 +78,17 @@ Fetch Bank Providers * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' # Fetch Bank Providers response = paystack.DedicatedVirtualAccount.available_providers() + + pprint(response) ``` ### Parameters @@ -122,18 +127,19 @@ Create Dedicated Account * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' customer = 'customer_example' # str | Customer ID or code -preferred_bank = 'preferred_bank_example' # str | The bank slug for preferred bank. To get a list of available banks, use the List Providers endpoint (optional) -subaccount = 'subaccount_example' # str | Subaccount code of the account you want to split the transaction with (optional) -split_code = 'split_code_example' # str | Split code consisting of the lists of accounts you want to split the transaction with (optional) # Create Dedicated Account -response = paystack.DedicatedVirtualAccount.create(customer, preferred_bank=preferred_bank, subaccount=subaccount, split_code=split_code) +response = paystack.DedicatedVirtualAccount.create( + customer, +) + pprint(response) ``` ### Parameters @@ -177,15 +183,19 @@ Deactivate Dedicated Account * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' account_id = 'account_id_example' # str | # Deactivate Dedicated Account -response = paystack.DedicatedVirtualAccount.deactivate(account_id) +response = paystack.DedicatedVirtualAccount.deactivate( + account_id, +) + pprint(response) ``` ### Parameters @@ -227,15 +237,19 @@ Fetch Dedicated Account * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' account_id = 'account_id_example' # str | # Fetch Dedicated Account -response = paystack.DedicatedVirtualAccount.fetch(account_id) +response = paystack.DedicatedVirtualAccount.fetch( + account_id, +) + pprint(response) ``` ### Parameters @@ -277,22 +291,17 @@ List Dedicated Accounts * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -account_number = 'account_number_example' # str | (optional) -customer = 'customer_example' # str | (optional) -active = True # bool | (optional) -currency = 'currency_example' # str | (optional) -provider_slug = 'provider_slug_example' # str | (optional) -bank_id = 'bank_id_example' # str | (optional) -per_page = 'per_page_example' # str | (optional) -page = 'page_example' # str | (optional) # List Dedicated Accounts -response = paystack.DedicatedVirtualAccount.list(account_number=account_number, customer=customer, active=active, currency=currency, provider_slug=provider_slug, bank_id=bank_id, per_page=per_page, page=page) +response = paystack.DedicatedVirtualAccount.list( +) + pprint(response) ``` ### Parameters @@ -341,17 +350,19 @@ Remove Split from Dedicated Account * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' account_number = 'account_number_example' # str | Valid Dedicated virtual account -subaccount = 'subaccount_example' # str | Subaccount code of the account you want to split the transaction with (optional) -split_code = 'split_code_example' # str | Split code consisting of the lists of accounts you want to split the transaction with (optional) # Remove Split from Dedicated Account -response = paystack.DedicatedVirtualAccount.remove_split(account_number, subaccount=subaccount, split_code=split_code) +response = paystack.DedicatedVirtualAccount.remove_split( + account_number, +) + pprint(response) ``` ### Parameters diff --git a/docs/Dispute.md b/docs/Dispute.md index e2c5c99..93d4de5 100644 --- a/docs/Dispute.md +++ b/docs/Dispute.md @@ -24,19 +24,17 @@ Export Disputes * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -status = 'status_example' # str | (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # Export Disputes -response = paystack.Dispute.download(per_page=per_page, page=page, status=status, _from=_from, to=to) +response = paystack.Dispute.download( +) + pprint(response) ``` ### Parameters @@ -82,21 +80,27 @@ Add Evidence * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | Dispute ID customer_email = 'customer_email_example' # str | Customer email customer_name = 'customer_name_example' # str | Customer name customer_phone = 'customer_phone_example' # str | Customer mobile number service_details = 'service_details_example' # str | Details of service offered -delivery_address = 'delivery_address_example' # str | Delivery address (optional) -delivery_date = '2013-10-20T19:20:30+01:00' # datetime | ISO 8601 representation of delivery date (YYYY-MM-DD) (optional) # Add Evidence -response = paystack.Dispute.evidence(id, customer_email, customer_name, customer_phone, service_details, delivery_address=delivery_address, delivery_date=delivery_date) +response = paystack.Dispute.evidence( + id, + customer_email, + customer_name, + customer_phone, + service_details, +) + pprint(response) ``` ### Parameters @@ -143,15 +147,19 @@ Fetch Dispute * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | Dispute ID # Fetch Dispute -response = paystack.Dispute.fetch(id) +response = paystack.Dispute.fetch( + id, +) + pprint(response) ``` ### Parameters @@ -193,20 +201,17 @@ List Disputes * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -status = 'status_example' # str | Dispute Status. Acceptable values are awaiting-merchant-feedback, awaiting-bank-feedback, pending, resolved (optional) -transaction = 'transaction_example' # str | Transaction ID (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Disputes -response = paystack.Dispute.list(per_page=per_page, page=page, status=status, transaction=transaction, _from=_from, to=to) +response = paystack.Dispute.list( +) + pprint(response) ``` ### Parameters @@ -253,20 +258,27 @@ Resolve a Dispute * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | Dispute ID resolution = 'resolution_example' # str | Dispute resolution. Accepted values, merchant-accepted, declined message = 'message_example' # str | Reason for resolving refund_amount = 'refund_amount_example' # str | The amount to refund, in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR uploaded_filename = 'uploaded_filename_example' # str | Filename of attachment returned via response from the Dispute upload URL -evidence = 56 # int | Evidence Id for fraud claims (optional) # Resolve a Dispute -response = paystack.Dispute.resolve(id, resolution, message, refund_amount, uploaded_filename, evidence=evidence) +response = paystack.Dispute.resolve( + id, + resolution, + message, + refund_amount, + uploaded_filename, +) + pprint(response) ``` ### Parameters @@ -313,15 +325,19 @@ List Transaction Disputes * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | Transaction ID # List Transaction Disputes -response = paystack.Dispute.transaction(id) +response = paystack.Dispute.transaction( + id, +) + pprint(response) ``` ### Parameters @@ -363,17 +379,21 @@ Update Dispute * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | Dispute ID refund_amount = 'refund_amount_example' # str | The amount to refund, in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR -uploaded_filename = 'uploaded_filename_example' # str | Filename of attachment returned via response from the Dispute upload URL (optional) # Update Dispute -response = paystack.Dispute.update(id, refund_amount, uploaded_filename=uploaded_filename) +response = paystack.Dispute.update( + id, + refund_amount, +) + pprint(response) ``` ### Parameters @@ -417,15 +437,19 @@ Get Upload URL * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | Dispute ID # Get Upload URL -response = paystack.Dispute.upload_url(id) +response = paystack.Dispute.upload_url( + id, +) + pprint(response) ``` ### Parameters diff --git a/docs/Integration.md b/docs/Integration.md index 054a592..3995746 100644 --- a/docs/Integration.md +++ b/docs/Integration.md @@ -18,14 +18,17 @@ Fetch Payment Session Timeout * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' # Fetch Payment Session Timeout response = paystack.Integration.fetch_payment_session_timeout() + + pprint(response) ``` ### Parameters @@ -64,15 +67,17 @@ Update Payment Session Timeout * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -body = None # object | (optional) # Update Payment Session Timeout -response = paystack.Integration.update_payment_session_timeout(body=body) +response = paystack.Integration.update_payment_session_timeout( +) + pprint(response) ``` ### Parameters diff --git a/docs/Page.md b/docs/Page.md index 42916cb..aee5e6f 100644 --- a/docs/Page.md +++ b/docs/Page.md @@ -22,16 +22,21 @@ Add Products * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | product = 'product_example' # list[str] | IDs of all products to add to a page # Add Products -response = paystack.Page.add_products(id, product) +response = paystack.Page.add_products( + id, + product, +) + pprint(response) ``` ### Parameters @@ -73,15 +78,19 @@ Check Slug Availability * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' slug = 'slug_example' # str | # Check Slug Availability -response = paystack.Page.check_slug_availability(slug) +response = paystack.Page.check_slug_availability( + slug, +) + pprint(response) ``` ### Parameters @@ -123,21 +132,19 @@ Create Page * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' name = 'name_example' # str | Name of page -description = 'description_example' # str | The description of the page (optional) -amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR (optional) -slug = 'slug_example' # str | URL slug you would like to be associated with this page. Page will be accessible at https://paystack.com/pay/[slug] (optional) -metadata = 'metadata_example' # str | Stringified JSON object of custom data (optional) -redirect_url = 'redirect_url_example' # str | If you would like Paystack to redirect to a URL upon successful payment, specify the URL here. (optional) -custom_fields = None # list[object] | If you would like to accept custom fields, specify them here. (optional) # Create Page -response = paystack.Page.create(name, description=description, amount=amount, slug=slug, metadata=metadata, redirect_url=redirect_url, custom_fields=custom_fields) +response = paystack.Page.create( + name, +) + pprint(response) ``` ### Parameters @@ -184,15 +191,19 @@ Fetch Page * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Fetch Page -response = paystack.Page.fetch(id) +response = paystack.Page.fetch( + id, +) + pprint(response) ``` ### Parameters @@ -234,18 +245,17 @@ List Pages * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Pages -response = paystack.Page.list(per_page=per_page, page=page, _from=_from, to=to) +response = paystack.Page.list( +) + pprint(response) ``` ### Parameters @@ -290,19 +300,19 @@ Update Page * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | -name = 'name_example' # str | Name of page (optional) -description = 'description_example' # str | The description of the page (optional) -amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR (optional) -active = True # bool | Set to false to deactivate page url (optional) # Update Page -response = paystack.Page.update(id, name=name, description=description, amount=amount, active=active) +response = paystack.Page.update( + id, +) + pprint(response) ``` ### Parameters diff --git a/docs/PaymentRequest.md b/docs/PaymentRequest.md index 2242412..98063d7 100644 --- a/docs/PaymentRequest.md +++ b/docs/PaymentRequest.md @@ -25,15 +25,19 @@ Archive Payment Request * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Archive Payment Request -response = paystack.PaymentRequest.archive(id) +response = paystack.PaymentRequest.archive( + id, +) + pprint(response) ``` ### Parameters @@ -74,26 +78,19 @@ Create Payment Request * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' customer = 'customer_example' # str | Customer id or code -amount = 56 # int | Payment request amount. Only useful if line items and tax values are ignored. The endpoint will throw a friendly warning if neither is available. (optional) -currency = 'currency_example' # str | Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN (optional) -due_date = '2013-10-20T19:20:30+01:00' # datetime | ISO 8601 representation of request due date (optional) -description = 'description_example' # str | A short description of the payment request (optional) -line_items = None # list[object] | Array of line items (optional) -tax = None # list[object] | Array of taxes (optional) -send_notification = None # list[object] | Indicates whether Paystack sends an email notification to customer. Defaults to true (optional) -draft = None # list[object] | Indicate if request should be saved as draft. Defaults to false and overrides send_notification (optional) -has_invoice = None # list[object] | Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no line_items or tax passed (optional) -invoice_number = 56 # int | Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. (optional) -split_code = 'split_code_example' # str | The split code of the transaction split. (optional) # Create Payment Request -response = paystack.PaymentRequest.create(customer, amount=amount, currency=currency, due_date=due_date, description=description, line_items=line_items, tax=tax, send_notification=send_notification, draft=draft, has_invoice=has_invoice, invoice_number=invoice_number, split_code=split_code) +response = paystack.PaymentRequest.create( + customer, +) + pprint(response) ``` ### Parameters @@ -145,15 +142,19 @@ Fetch Payment Request * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Fetch Payment Request -response = paystack.PaymentRequest.fetch(id) +response = paystack.PaymentRequest.fetch( + id, +) + pprint(response) ``` ### Parameters @@ -195,15 +196,19 @@ Finalize Payment Request * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Finalize Payment Request -response = paystack.PaymentRequest.finalize(id) +response = paystack.PaymentRequest.finalize( + id, +) + pprint(response) ``` ### Parameters @@ -244,21 +249,17 @@ List Payment Request * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -customer = 'customer_example' # str | Customer ID (optional) -status = 'status_example' # str | Invoice status to filter (optional) -currency = 'currency_example' # str | If your integration supports more than one currency, choose the one to filter (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Payment Request -response = paystack.PaymentRequest.list(per_page=per_page, page=page, customer=customer, status=status, currency=currency, _from=_from, to=to) +response = paystack.PaymentRequest.list( +) + pprint(response) ``` ### Parameters @@ -306,15 +307,19 @@ Send Notification * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Send Notification -response = paystack.PaymentRequest.notify(id) +response = paystack.PaymentRequest.notify( + id, +) + pprint(response) ``` ### Parameters @@ -355,14 +360,17 @@ Payment Request Total * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' # Payment Request Total response = paystack.PaymentRequest.totals() + + pprint(response) ``` ### Parameters @@ -401,27 +409,19 @@ Update Payment Request * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | -customer = 'customer_example' # str | Customer id or code (optional) -amount = 56 # int | Payment request amount. Only useful if line items and tax values are ignored. The endpoint will throw a friendly warning if neither is available. (optional) -currency = 'currency_example' # str | Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN (optional) -due_date = '2013-10-20T19:20:30+01:00' # datetime | ISO 8601 representation of request due date (optional) -description = 'description_example' # str | A short description of the payment request (optional) -line_items = None # list[object] | Array of line items (optional) -tax = None # list[object] | Array of taxes (optional) -send_notification = None # list[object] | Indicates whether Paystack sends an email notification to customer. Defaults to true (optional) -draft = None # list[object] | Indicate if request should be saved as draft. Defaults to false and overrides send_notification (optional) -has_invoice = None # list[object] | Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no line_items or tax passed (optional) -invoice_number = 56 # int | Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. (optional) -split_code = 'split_code_example' # str | The split code of the transaction split. (optional) # Update Payment Request -response = paystack.PaymentRequest.update(id, customer=customer, amount=amount, currency=currency, due_date=due_date, description=description, line_items=line_items, tax=tax, send_notification=send_notification, draft=draft, has_invoice=has_invoice, invoice_number=invoice_number, split_code=split_code) +response = paystack.PaymentRequest.update( + id, +) + pprint(response) ``` ### Parameters @@ -475,15 +475,19 @@ Verify Payment Request * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Verify Payment Request -response = paystack.PaymentRequest.verify(id) +response = paystack.PaymentRequest.verify( + id, +) + pprint(response) ``` ### Parameters diff --git a/docs/Plan.md b/docs/Plan.md index 925daae..6608cb9 100644 --- a/docs/Plan.md +++ b/docs/Plan.md @@ -20,22 +20,23 @@ Create Plan * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' name = 'name_example' # str | Name of plan amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR interval = 'interval_example' # str | Interval in words. Valid intervals are daily, weekly, monthly,biannually, annually -description = True # bool | A description for this plan (optional) -send_invoices = True # bool | Set to false if you don't want invoices to be sent to your customers (optional) -send_sms = True # bool | Set to false if you don't want text messages to be sent to your customers (optional) -currency = 'currency_example' # str | Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD (optional) -invoice_limit = 56 # int | Number of invoices to raise during subscription to this plan. Can be overridden by specifying an invoice_limit while subscribing. (optional) # Create Plan -response = paystack.Plan.create(name, amount, interval, description=description, send_invoices=send_invoices, send_sms=send_sms, currency=currency, invoice_limit=invoice_limit) +response = paystack.Plan.create( + name, + amount, + interval, +) + pprint(response) ``` ### Parameters @@ -83,15 +84,19 @@ Fetch Plan * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | # Fetch Plan -response = paystack.Plan.fetch(code) +response = paystack.Plan.fetch( + code, +) + pprint(response) ``` ### Parameters @@ -133,20 +138,17 @@ List Plans * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -interval = 'interval_example' # str | Specify interval of the plan (optional) -amount = 56 # int | The amount on the plans to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Plans -response = paystack.Plan.list(per_page=per_page, page=page, interval=interval, amount=amount, _from=_from, to=to) +response = paystack.Plan.list( +) + pprint(response) ``` ### Parameters @@ -193,23 +195,19 @@ Update Plan * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | -name = 'name_example' # str | Name of plan (optional) -amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR (optional) -interval = 'interval_example' # str | Interval in words. Valid intervals are daily, weekly, monthly,biannually, annually (optional) -description = True # bool | A description for this plan (optional) -send_invoices = True # bool | Set to false if you don't want invoices to be sent to your customers (optional) -send_sms = True # bool | Set to false if you don't want text messages to be sent to your customers (optional) -currency = 'currency_example' # str | Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD (optional) -invoice_limit = 56 # int | Number of invoices to raise during subscription to this plan. Can be overridden by specifying an invoice_limit while subscribing. (optional) # Update Plan -response = paystack.Plan.update(code, name=name, amount=amount, interval=interval, description=description, send_invoices=send_invoices, send_sms=send_sms, currency=currency, invoice_limit=invoice_limit) +response = paystack.Plan.update( + code, +) + pprint(response) ``` ### Parameters diff --git a/docs/Product.md b/docs/Product.md index 61b037c..146fcdc 100644 --- a/docs/Product.md +++ b/docs/Product.md @@ -21,20 +21,25 @@ Create Product * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' name = 'name_example' # str | Name of product description = 'description_example' # str | The description of the product price = 56 # int | Price should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR currency = 'currency_example' # str | Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD -limited = True # bool | Set to true if the product has limited stock. Leave as false if the product has unlimited stock (optional) -quantity = 56 # int | Number of products in stock. Use if limited is true (optional) # Create Product -response = paystack.Product.create(name, description, price, currency, limited=limited, quantity=quantity) +response = paystack.Product.create( + name, + description, + price, + currency, +) + pprint(response) ``` ### Parameters @@ -80,15 +85,19 @@ Delete Product * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Delete Product -response = paystack.Product.delete(id) +response = paystack.Product.delete( + id, +) + pprint(response) ``` ### Parameters @@ -130,15 +139,19 @@ Fetch Product * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Fetch Product -response = paystack.Product.fetch(id) +response = paystack.Product.fetch( + id, +) + pprint(response) ``` ### Parameters @@ -180,19 +193,17 @@ List Products * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | (optional) -page = 56 # int | (optional) -active = True # bool | (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Products -response = paystack.Product.list(per_page=per_page, page=page, active=active, _from=_from, to=to) +response = paystack.Product.list( +) + pprint(response) ``` ### Parameters @@ -238,21 +249,19 @@ Update product * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | -name = 'name_example' # str | Name of product (optional) -description = 'description_example' # str | The description of the product (optional) -price = 56 # int | Price should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR (optional) -currency = 'currency_example' # str | Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD (optional) -limited = True # bool | Set to true if the product has limited stock. Leave as false if the product has unlimited stock (optional) -quantity = 56 # int | Number of products in stock. Use if limited is true (optional) # Update product -response = paystack.Product.update(id, name=name, description=description, price=price, currency=currency, limited=limited, quantity=quantity) +response = paystack.Product.update( + id, +) + pprint(response) ``` ### Parameters diff --git a/docs/Refund.md b/docs/Refund.md index 66b2c56..e2fee6a 100644 --- a/docs/Refund.md +++ b/docs/Refund.md @@ -19,19 +19,19 @@ Create Refund * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' transaction = 'transaction_example' # str | Transaction reference or id -amount = 56 # int | Amount ( in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR ) to be refunded to the customer. Amount cannot be more than the original transaction amount (optional) -currency = 'currency_example' # str | Three-letter ISO currency. Allowed values are NGN, GHS, ZAR or USD (optional) -customer_note = 'customer_note_example' # str | Customer reason (optional) -merchant_note = 'merchant_note_example' # str | Merchant reason (optional) # Create Refund -response = paystack.Refund.create(transaction, amount=amount, currency=currency, customer_note=customer_note, merchant_note=merchant_note) +response = paystack.Refund.create( + transaction, +) + pprint(response) ``` ### Parameters @@ -76,15 +76,19 @@ Fetch Refund * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Fetch Refund -response = paystack.Refund.fetch(id) +response = paystack.Refund.fetch( + id, +) + pprint(response) ``` ### Parameters @@ -126,18 +130,17 @@ List Refunds * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Refunds -response = paystack.Refund.list(per_page=per_page, page=page, _from=_from, to=to) +response = paystack.Refund.list( +) + pprint(response) ``` ### Parameters diff --git a/docs/Settlement.md b/docs/Settlement.md index 01565e0..b863118 100644 --- a/docs/Settlement.md +++ b/docs/Settlement.md @@ -18,16 +18,17 @@ Fetch Settlements * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 50 # int | (optional) -page = 2 # int | (optional) # Fetch Settlements -response = paystack.Settlement.fetch(per_page=per_page, page=page) +response = paystack.Settlement.fetch( +) + pprint(response) ``` ### Parameters @@ -70,15 +71,19 @@ Settlement Transactions * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Settlement Transactions -response = paystack.Settlement.transaction(id) +response = paystack.Settlement.transaction( + id, +) + pprint(response) ``` ### Parameters diff --git a/docs/Split.md b/docs/Split.md index 97333c8..d170f7f 100644 --- a/docs/Split.md +++ b/docs/Split.md @@ -22,17 +22,19 @@ Add Subaccount to Split * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'application/json' # str | -subaccount = 'subaccount_example' # str | Subaccount code of the customer or partner (optional) -share = 'share_example' # str | The percentage or flat quota of the customer or partner (optional) # Add Subaccount to Split -response = paystack.Split.add_subaccount(id, subaccount=subaccount, share=share) +response = paystack.Split.add_subaccount( + id, +) + pprint(response) ``` ### Parameters @@ -75,20 +77,25 @@ Create Split * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' name = 'name_example' # str | Name of the transaction split type = 'type_example' # str | The type of transaction split you want to create. subaccounts = paystack.SplitSubaccounts() # list[SplitSubaccounts] | A list of object containing subaccount code and number of shares currency = 'currency_example' # str | The transaction currency -bearer_type = 'bearer_type_example' # str | This allows you specify how the transaction charge should be processed (optional) -bearer_subaccount = 'bearer_subaccount_example' # str | This is the subaccount code of the customer or partner that would bear the transaction charge if you specified subaccount as the bearer type (optional) # Create Split -response = paystack.Split.create(name, type, subaccounts, currency, bearer_type=bearer_type, bearer_subaccount=bearer_subaccount) +response = paystack.Split.create( + name, + type, + subaccounts, + currency, +) + pprint(response) ``` ### Parameters @@ -134,15 +141,19 @@ Fetch Split * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Fetch Split -response = paystack.Split.fetch(id) +response = paystack.Split.fetch( + id, +) + pprint(response) ``` ### Parameters @@ -184,21 +195,17 @@ List/Search Splits * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -name = 'name_example' # str | (optional) -active = 'active_example' # str | (optional) -sort_by = 'sort_by_example' # str | (optional) -_from = '_from_example' # str | (optional) -to = 'to_example' # str | (optional) -per_page = 'per_page_example' # str | (optional) -page = 'page_example' # str | (optional) # List/Search Splits -response = paystack.Split.list(name=name, active=active, sort_by=sort_by, _from=_from, to=to, per_page=per_page, page=page) +response = paystack.Split.list( +) + pprint(response) ``` ### Parameters @@ -246,17 +253,19 @@ Remove Subaccount from split * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | -subaccount = 'subaccount_example' # str | Subaccount code of the customer or partner (optional) -share = 'share_example' # str | The percentage or flat quota of the customer or partner (optional) # Remove Subaccount from split -response = paystack.Split.remove_subaccount(id, subaccount=subaccount, share=share) +response = paystack.Split.remove_subaccount( + id, +) + pprint(response) ``` ### Parameters @@ -299,19 +308,19 @@ Update Split * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | -name = 'name_example' # str | Name of the transaction split (optional) -active = True # bool | Toggle status of split. When true, the split is active, else it's inactive (optional) -bearer_type = 'bearer_type_example' # str | This allows you specify how the transaction charge should be processed (optional) -bearer_subaccount = 'bearer_subaccount_example' # str | This is the subaccount code of the customer or partner that would bear the transaction charge if you specified subaccount as the bearer type (optional) # Update Split -response = paystack.Split.update(id, name=name, active=active, bearer_type=bearer_type, bearer_subaccount=bearer_subaccount) +response = paystack.Split.update( + id, +) + pprint(response) ``` ### Parameters diff --git a/docs/Subaccount.md b/docs/Subaccount.md index 20d043e..c9e7bfc 100644 --- a/docs/Subaccount.md +++ b/docs/Subaccount.md @@ -20,23 +20,25 @@ Create Subaccount * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' business_name = 'business_name_example' # str | Name of business for subaccount settlement_bank = 'settlement_bank_example' # str | Bank code for the bank. You can get the list of Bank Codes by calling the List Banks endpoint. account_number = 'account_number_example' # str | Bank account number percentage_charge = 3.4 # float | Customer's phone number -description = 'description_example' # str | A description for this subaccount (optional) -primary_contact_email = 'primary_contact_email_example' # str | A contact email for the subaccount (optional) -primary_contact_name = 'primary_contact_name_example' # str | The name of the contact person for this subaccount (optional) -primary_contact_phone = 'primary_contact_phone_example' # str | A phone number to call for this subaccount (optional) -metadata = 'metadata_example' # str | Stringified JSON object of custom data (optional) # Create Subaccount -response = paystack.Subaccount.create(business_name, settlement_bank, account_number, percentage_charge, description=description, primary_contact_email=primary_contact_email, primary_contact_name=primary_contact_name, primary_contact_phone=primary_contact_phone, metadata=metadata) +response = paystack.Subaccount.create( + business_name, + settlement_bank, + account_number, + percentage_charge, +) + pprint(response) ``` ### Parameters @@ -85,15 +87,19 @@ Fetch Subaccount * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | # Fetch Subaccount -response = paystack.Subaccount.fetch(code) +response = paystack.Subaccount.fetch( + code, +) + pprint(response) ``` ### Parameters @@ -135,18 +141,17 @@ List Subaccounts * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Subaccounts -response = paystack.Subaccount.list(per_page=per_page, page=page, _from=_from, to=to) +response = paystack.Subaccount.list( +) + pprint(response) ``` ### Parameters @@ -191,25 +196,19 @@ Update Subaccount * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | -business_name = 'business_name_example' # str | Name of business for subaccount (optional) -settlement_bank = 'settlement_bank_example' # str | Bank code for the bank. You can get the list of Bank Codes by calling the List Banks endpoint. (optional) -account_number = 'account_number_example' # str | Bank account number (optional) -active = True # bool | Activate or deactivate a subaccount (optional) -percentage_charge = 3.4 # float | Customer's phone number (optional) -description = 'description_example' # str | A description for this subaccount (optional) -primary_contact_email = 'primary_contact_email_example' # str | A contact email for the subaccount (optional) -primary_contact_name = 'primary_contact_name_example' # str | The name of the contact person for this subaccount (optional) -primary_contact_phone = 'primary_contact_phone_example' # str | A phone number to call for this subaccount (optional) -metadata = 'metadata_example' # str | Stringified JSON object of custom data (optional) # Update Subaccount -response = paystack.Subaccount.update(code, business_name=business_name, settlement_bank=settlement_bank, account_number=account_number, active=active, percentage_charge=percentage_charge, description=description, primary_contact_email=primary_contact_email, primary_contact_name=primary_contact_name, primary_contact_phone=primary_contact_phone, metadata=metadata) +response = paystack.Subaccount.update( + code, +) + pprint(response) ``` ### Parameters diff --git a/docs/Subscription.md b/docs/Subscription.md index 1956fe5..86afaca 100644 --- a/docs/Subscription.md +++ b/docs/Subscription.md @@ -23,18 +23,21 @@ Create Subscription * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' customer = 'customer_example' # str | Customer's email address or customer code plan = 'plan_example' # str | Plan code -authorization = 'authorization_example' # str | If customer has multiple authorizations, you can set the desired authorization you wish to use for this subscription here. If this is not supplied, the customer's most recent authorization would be used (optional) -start_date = '2013-10-20T19:20:30+01:00' # datetime | Set the date for the first debit. (ISO 8601 format) e.g. 2017-05-16T00:30:13+01:00 (optional) # Create Subscription -response = paystack.Subscription.create(customer, plan, authorization=authorization, start_date=start_date) +response = paystack.Subscription.create( + customer, + plan, +) + pprint(response) ``` ### Parameters @@ -78,16 +81,21 @@ Disable Subscription * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Subscription code token = 'token_example' # str | Email token # Disable Subscription -response = paystack.Subscription.disable(code, token) +response = paystack.Subscription.disable( + code, + token, +) + pprint(response) ``` ### Parameters @@ -129,16 +137,21 @@ Enable Subscription * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Subscription code token = 'token_example' # str | Email token # Enable Subscription -response = paystack.Subscription.enable(code, token) +response = paystack.Subscription.enable( + code, + token, +) + pprint(response) ``` ### Parameters @@ -180,15 +193,19 @@ Fetch Subscription * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | # Fetch Subscription -response = paystack.Subscription.fetch(code) +response = paystack.Subscription.fetch( + code, +) + pprint(response) ``` ### Parameters @@ -230,20 +247,17 @@ List Subscriptions * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -plan = 'plan_example' # str | Plan ID (optional) -customer = 'customer_example' # str | Customer ID (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Subscriptions -response = paystack.Subscription.list(per_page=per_page, page=page, plan=plan, customer=customer, _from=_from, to=to) +response = paystack.Subscription.list( +) + pprint(response) ``` ### Parameters @@ -290,15 +304,19 @@ Send Update Subscription Link * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | # Send Update Subscription Link -response = paystack.Subscription.manage_email(code) +response = paystack.Subscription.manage_email( + code, +) + pprint(response) ``` ### Parameters @@ -339,15 +357,19 @@ Generate Update Subscription Link * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | # Generate Update Subscription Link -response = paystack.Subscription.manage_link(code) +response = paystack.Subscription.manage_link( + code, +) + pprint(response) ``` ### Parameters diff --git a/docs/Transaction.md b/docs/Transaction.md index 8b20be8..566119b 100644 --- a/docs/Transaction.md +++ b/docs/Transaction.md @@ -28,25 +28,23 @@ Charge Authorization * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' email = 'email_example' # str | Customer's email address amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR authorization_code = 'authorization_code_example' # str | Valid authorization code to charge -reference = 'reference_example' # str | Unique transaction reference. Only -, ., = and alphanumeric characters allowed. (optional) -currency = 'currency_example' # str | The transaction currency (optional) -metadata = 'metadata_example' # str | Stringified JSON object of custom data (optional) -split_code = 'split_code_example' # str | The split code of the transaction split (optional) -subaccount = 'subaccount_example' # str | The code for the subaccount that owns the payment (optional) -transaction_charge = 'transaction_charge_example' # str | A flat fee to charge the subaccount for a transaction. This overrides the split percentage set when the subaccount was created (optional) -bearer = 'bearer_example' # str | The beare of the transaction charge (optional) -queue = True # bool | If you are making a scheduled charge call, it is a good idea to queue them so the processing system does not get overloaded causing transaction processing errors. (optional) # Charge Authorization -response = paystack.Transaction.charge_authorization(email, amount, authorization_code, reference=reference, currency=currency, metadata=metadata, split_code=split_code, subaccount=subaccount, transaction_charge=transaction_charge, bearer=bearer, queue=queue) +response = paystack.Transaction.charge_authorization( + email, + amount, + authorization_code, +) + pprint(response) ``` ### Parameters @@ -97,18 +95,21 @@ Check Authorization * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' email = 'email_example' # str | Customer's email address amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR -authorization_code = 'authorization_code_example' # str | Valid authorization code to charge (optional) -currency = 'currency_example' # str | The transaction currency (optional) # Check Authorization -response = paystack.Transaction.check_authorization(email, amount, authorization_code=authorization_code, currency=currency) +response = paystack.Transaction.check_authorization( + email, + amount, +) + pprint(response) ``` ### Parameters @@ -152,18 +153,17 @@ Export Transactions * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # Export Transactions -response = paystack.Transaction.download(per_page=per_page, page=page, _from=_from, to=to) +response = paystack.Transaction.download( +) + pprint(response) ``` ### Parameters @@ -208,15 +208,19 @@ Get Transaction Event * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Get Transaction Event -response = paystack.Transaction.event(id) +response = paystack.Transaction.event( + id, +) + pprint(response) ``` ### Parameters @@ -258,15 +262,19 @@ Fetch Transaction * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | The ID of the transaction to fetch # Fetch Transaction -response = paystack.Transaction.fetch(id) +response = paystack.Transaction.fetch( + id, +) + pprint(response) ``` ### Parameters @@ -310,27 +318,21 @@ Create a new transaction * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' email = 'email_example' # str | Customer's email address amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR -currency = 'currency_example' # str | The transaction currency (optional) -reference = 'reference_example' # str | Unique transaction reference. Only -, ., = and alphanumeric characters allowed. (optional) -callback_url = 'callback_url_example' # str | Fully qualified url, e.g. https://example.com/ . Use this to override the callback url provided on the dashboard for this transaction (optional) -plan = 'plan_example' # str | If transaction is to create a subscription to a predefined plan, provide plan code here. This would invalidate the value provided in amount (optional) -invoice_limit = 56 # int | Number of times to charge customer during subscription to plan (optional) -metadata = 'metadata_example' # str | Stringified JSON object of custom data (optional) -channels = 'channels_example' # list[str] | An array of payment channels to control what channels you want to make available to the user to make a payment with (optional) -split_code = 'split_code_example' # str | The split code of the transaction split (optional) -subaccount = 'subaccount_example' # str | The code for the subaccount that owns the payment (optional) -transaction_charge = 'transaction_charge_example' # str | A flat fee to charge the subaccount for a transaction. This overrides the split percentage set when the subaccount was created (optional) -bearer = 'bearer_example' # str | The beare of the transaction charge (optional) # Initialize Transaction -response = paystack.Transaction.initialize(email, amount, currency=currency, reference=reference, callback_url=callback_url, plan=plan, invoice_limit=invoice_limit, metadata=metadata, channels=channels, split_code=split_code, subaccount=subaccount, transaction_charge=transaction_charge, bearer=bearer) +response = paystack.Transaction.initialize( + email, + amount, +) + pprint(response) ``` ### Parameters @@ -383,18 +385,17 @@ List Transactions * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Transactions -response = paystack.Transaction.list(per_page=per_page, page=page, _from=_from, to=to) +response = paystack.Transaction.list( +) + pprint(response) ``` ### Parameters @@ -439,20 +440,25 @@ Partial Debit * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' email = 'email_example' # str | Customer's email address amount = 56 # int | Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR authorization_code = 'authorization_code_example' # str | Valid authorization code to charge currency = 'currency_example' # str | The transaction currency -reference = 'reference_example' # str | Unique transaction reference. Only -, ., = and alphanumeric characters allowed. (optional) -at_least = 'at_least_example' # str | Minimum amount to charge (optional) # Partial Debit -response = paystack.Transaction.partial_debit(email, amount, authorization_code, currency, reference=reference, at_least=at_least) +response = paystack.Transaction.partial_debit( + email, + amount, + authorization_code, + currency, +) + pprint(response) ``` ### Parameters @@ -498,15 +504,19 @@ Get Transaction Session * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id = 'id_example' # str | # Get Transaction Session -response = paystack.Transaction.session(id) +response = paystack.Transaction.session( + id, +) + pprint(response) ``` ### Parameters @@ -548,15 +558,19 @@ Fetch Transaction Timeline * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' id_or_reference = 'id_or_reference_example' # str | # Fetch Transaction Timeline -response = paystack.Transaction.timeline(id_or_reference) +response = paystack.Transaction.timeline( + id_or_reference, +) + pprint(response) ``` ### Parameters @@ -598,18 +612,17 @@ Transaction Totals * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # Transaction Totals -response = paystack.Transaction.totals(per_page=per_page, page=page, _from=_from, to=to) +response = paystack.Transaction.totals( +) + pprint(response) ``` ### Parameters @@ -654,15 +667,19 @@ Verify Transaction * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' reference = 'reference_example' # str | The transaction reference to verify # Verify Transaction -response = paystack.Transaction.verify(reference) +response = paystack.Transaction.verify( + reference, +) + pprint(response) ``` ### Parameters diff --git a/docs/Transfer.md b/docs/Transfer.md index e447918..241db0a 100644 --- a/docs/Transfer.md +++ b/docs/Transfer.md @@ -27,16 +27,17 @@ Initiate Bulk Transfer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -source = 'source_example' # str | Where should we transfer from? Only balance is allowed for now (optional) -transfers = paystack.TransferInitiate() # list[TransferInitiate] | A list of transfer object. Each object should contain amount, recipient, and reference (optional) # Initiate Bulk Transfer -response = paystack.Transfer.bulk(source=source, transfers=transfers) +response = paystack.Transfer.bulk( +) + pprint(response) ``` ### Parameters @@ -78,14 +79,17 @@ Disable OTP requirement for Transfers * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' # Disable OTP requirement for Transfers response = paystack.Transfer.disable_otp() + + pprint(response) ``` ### Parameters @@ -123,15 +127,19 @@ Finalize Disabling of OTP requirement for Transfers * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' otp = 'otp_example' # str | OTP sent to business phone to verify disabling OTP requirement # Finalize Disabling of OTP requirement for Transfers -response = paystack.Transfer.disable_otp_finalize(otp) +response = paystack.Transfer.disable_otp_finalize( + otp, +) + pprint(response) ``` ### Parameters @@ -172,19 +180,17 @@ Export Transfers * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -status = 'status_example' # str | (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # Export Transfers -response = paystack.Transfer.download(per_page=per_page, page=page, status=status, _from=_from, to=to) +response = paystack.Transfer.download( +) + pprint(response) ``` ### Parameters @@ -230,14 +236,17 @@ Enable OTP requirement for Transfers * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' # Enable OTP requirement for Transfers response = paystack.Transfer.enable_otp() + + pprint(response) ``` ### Parameters @@ -275,15 +284,19 @@ Fetch Transfer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Transfer code # Fetch Transfer -response = paystack.Transfer.fetch(code) +response = paystack.Transfer.fetch( + code, +) + pprint(response) ``` ### Parameters @@ -325,16 +338,21 @@ Finalize Transfer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' transfer_code = 'transfer_code_example' # str | The transfer code you want to finalize otp = 'otp_example' # str | OTP sent to business phone to verify transfer # Finalize Transfer -response = paystack.Transfer.finalize(transfer_code, otp) +response = paystack.Transfer.finalize( + transfer_code, + otp, +) + pprint(response) ``` ### Parameters @@ -376,20 +394,23 @@ Initiate Transfer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' source = 'source_example' # str | Where should we transfer from? Only balance is allowed for now amount = 'amount_example' # str | Amount to transfer in kobo if currency is NGN and pesewas if currency is GHS. recipient = 'recipient_example' # str | The transfer recipient's code -reason = 'reason_example' # str | The reason or narration for the transfer. (optional) -currency = 'currency_example' # str | Specify the currency of the transfer. Defaults to NGN. (optional) -reference = 'reference_example' # str | If specified, the field should be a unique identifier (in lowercase) for the object. Only -,_ and alphanumeric characters are allowed. (optional) # Initiate Transfer -response = paystack.Transfer.initiate(source, amount, recipient, reason=reason, currency=currency, reference=reference) +response = paystack.Transfer.initiate( + source, + amount, + recipient, +) + pprint(response) ``` ### Parameters @@ -435,19 +456,17 @@ List Transfers * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -status = 'status_example' # str | (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Transfers -response = paystack.Transfer.list(per_page=per_page, page=page, status=status, _from=_from, to=to) +response = paystack.Transfer.list( +) + pprint(response) ``` ### Parameters @@ -493,16 +512,21 @@ Resend OTP for Transfer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' transfer_code = 'transfer_code_example' # str | The transfer code that requires an OTP validation reason = 'reason_example' # str | Either resend_otp or transfer # Resend OTP for Transfer -response = paystack.Transfer.resend_otp(transfer_code, reason) +response = paystack.Transfer.resend_otp( + transfer_code, + reason, +) + pprint(response) ``` ### Parameters @@ -544,15 +568,19 @@ Verify Transfer * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' reference = 'reference_example' # str | # Verify Transfer -response = paystack.Transfer.verify(reference) +response = paystack.Transfer.verify( + reference, +) + pprint(response) ``` ### Parameters diff --git a/docs/TransferRecipient.md b/docs/TransferRecipient.md index a48bacb..a6d1a1d 100644 --- a/docs/TransferRecipient.md +++ b/docs/TransferRecipient.md @@ -22,15 +22,19 @@ Bulk Create Transfer Recipient * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' batch = paystack.TransferRecipientCreate() # list[TransferRecipientCreate] | A list of transfer recipient object. Each object should contain type, name, and bank_code. Any Create Transfer Recipient param can also be passed. # Bulk Create Transfer Recipient -response = paystack.TransferRecipient.bulk(batch) +response = paystack.TransferRecipient.bulk( + batch, +) + pprint(response) ``` ### Parameters @@ -71,22 +75,25 @@ Create Transfer Recipient * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' type = 'type_example' # str | Recipient Type (Only nuban at this time) name = 'name_example' # str | Recipient's name account_number = 'account_number_example' # str | Recipient's bank account number bank_code = 'bank_code_example' # str | Recipient's bank code. You can get the list of Bank Codes by calling the List Banks endpoint -description = 'description_example' # str | A description for this recipient (optional) -currency = 'currency_example' # str | Currency for the account receiving the transfer (optional) -authorization_code = 'authorization_code_example' # str | An authorization code from a previous transaction (optional) -metadata = 'metadata_example' # str | Stringified JSON object of custom data (optional) # Create Transfer Recipient -response = paystack.TransferRecipient.create(type, name, account_number, bank_code, description=description, currency=currency, authorization_code=authorization_code, metadata=metadata) +response = paystack.TransferRecipient.create( + type, + name, + account_number, + bank_code, +) + pprint(response) ``` ### Parameters @@ -134,15 +141,19 @@ Fetch Transfer recipient * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Transfer recipient code # Fetch Transfer recipient -response = paystack.TransferRecipient.fetch(code) +response = paystack.TransferRecipient.fetch( + code, +) + pprint(response) ``` ### Parameters @@ -184,18 +195,17 @@ List Transfer Recipients * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -per_page = 56 # int | Number of records to fetch per page (optional) -page = 56 # int | The section to retrieve (optional) -_from = '2013-10-20T19:20:30+01:00' # datetime | The start date (optional) -to = '2013-10-20T19:20:30+01:00' # datetime | The end date (optional) # List Transfer Recipients -response = paystack.TransferRecipient.list(per_page=per_page, page=page, _from=_from, to=to) +response = paystack.TransferRecipient.list( +) + pprint(response) ``` ### Parameters @@ -240,15 +250,19 @@ Delete Transfer Recipient * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Transfer recipient code # Delete Transfer Recipient -response = paystack.TransferRecipient.transferrecipient_code_delete(code) +response = paystack.TransferRecipient.transferrecipient_code_delete( + code, +) + pprint(response) ``` ### Parameters @@ -290,17 +304,19 @@ Update Transfer recipient * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' code = 'code_example' # str | Transfer recipient code -name = 'name_example' # str | Recipient's name (optional) -email = 'email_example' # str | Recipient's email address (optional) # Update Transfer recipient -response = paystack.TransferRecipient.transferrecipient_code_put(code, name=name, email=email) +response = paystack.TransferRecipient.transferrecipient_code_put( + code, +) + pprint(response) ``` ### Parameters diff --git a/docs/Verification.md b/docs/Verification.md index 5e14a64..9ccb9a9 100644 --- a/docs/Verification.md +++ b/docs/Verification.md @@ -21,17 +21,17 @@ List States (AVS) * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -type = 'type_example' # str | (optional) -country = 'country_example' # str | (optional) -currency = 'currency_example' # str | (optional) # List States (AVS) -response = paystack.Verification.avs(type=type, country=country, currency=currency) +response = paystack.Verification.avs( +) + pprint(response) ``` ### Parameters @@ -75,21 +75,17 @@ Fetch Banks * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -country = 'country_example' # str | (optional) -pay_with_bank_transfer = True # bool | (optional) -use_cursor = True # bool | (optional) -per_page = 56 # int | (optional) -next = 'next_example' # str | (optional) -previous = 'previous_example' # str | (optional) -gateway = 'gateway_example' # str | (optional) # Fetch Banks -response = paystack.Verification.fetch_banks(country=country, pay_with_bank_transfer=pay_with_bank_transfer, use_cursor=use_cursor, per_page=per_page, next=next, previous=previous, gateway=gateway) +response = paystack.Verification.fetch_banks( +) + pprint(response) ``` ### Parameters @@ -137,14 +133,17 @@ List Countries * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' # List Countries response = paystack.Verification.list_countries() + + pprint(response) ``` ### Parameters @@ -183,16 +182,17 @@ Resolve Account Number * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' -account_number = 0022728151 # int | (optional) -bank_code = 063 # int | (optional) # Resolve Account Number -response = paystack.Verification.resolve_account_number(account_number=account_number, bank_code=bank_code) +response = paystack.Verification.resolve_account_number( +) + pprint(response) ``` ### Parameters @@ -235,15 +235,19 @@ Resolve Card BIN * Bearer Authentication (bearerAuth): ```python import paystack -from paystack.rest import ApiException from pprint import pprint +# Set your API key based on domain (test or live mode) +paystack.api_key = 'sk_domain_xxxxxxxx' bin = 'bin_example' # str | # Resolve Card BIN -response = paystack.Verification.resolve_card_bin(bin) +response = paystack.Verification.resolve_card_bin( + bin, +) + pprint(response) ``` ### Parameters