Skip to content

Commit

Permalink
Remove isPromoBundle field from mobile data request
Browse files Browse the repository at this point in the history
  • Loading branch information
aksalj committed Nov 8, 2023
1 parent eb39b17 commit 12acb56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 146 deletions.
147 changes: 2 additions & 145 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Initialize the SDK by calling `africastalking.initialize(username, api_key)`. Af
- [Voice](#voice): `africastalking.Voice`
- [Token](#token): `africastalking.Token`
- [Application](#application): `africastalking.Application`
- [MobileData](#mobiledata): `africastalking.MobileData`
- [Mobile Data](#mobiledata): `africastalking.MobileData`

### `Application`

Expand Down Expand Up @@ -131,148 +131,6 @@ Initialize the SDK by calling `africastalking.initialize(username, api_key)`. Af
- `short_code`: Premium short code mapped to your account. `REQUIRED`
- `keyword`: Premium keyword under the above short code and is also mapped to your account. `REQUIRED`
- `phone_number`: PhoneNumber to be subscribed `REQUIRED`


<!-- ### `Payments`
- `mobile_checkout(product_name: str, phone_number: str, currency_code: str, amount: float, metadata: dict = {}, provider_channel:str)`: Charge a customers mobile money account
- `product_name`: Payment product on Africa's Talking. `REQUIRED`
- `phone_number`: Customer phone number (in international format). `REQUIRED`
- `currency_code`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc). `REQUIRED`
- `amount`: Amount to charge. `REQUIRED`
- `metadata`: Additional data to associate with the transaction. `REQUIRED`
- `provider_channel`: The provider channel the payment will be initiated from e.g a paybill number. `OPTIONAL`
- `mobile_b2c(product_name: str, consumers: [dict])`: Send mobile money to customers:
- `product_name`: Payment product on Africa's Talking. `REQUIRED`
- `consumers`: A list of **up to 10** recipients. Each recipient has:
- `phoneNumber`: Customer phone number (in international format). `REQUIRED`
- `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc). `REQUIRED`
- `amount`: Amount to pay. `REQUIRED`
- `reason`: The purpose of the payment. See `payments::REASON*` for supported reasons. `REQUIRED`
- `metadata`: Additional data to associate with the tranasction. `REQUIRED`
- `mobile_b2b(product_name: str, business: dict)`: Send mobile money to business.
- `product_name`: Payment product on Africa's Talking. `REQUIRED`
- `business`: Business details
- `provider`: Payment provider that is facilitating this transaction. See `payments::PROVIDER*` for supported providers. `REQUIRED`
- `transferType`: Describes the type of payment being made. See `payments::TRANSFER_TYPE*` for supported transfer types. `REQUIRED`
- `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc). `REQUIRED`
- `destinationChannel`: Name or number of the channel that will receive payment by the provider. `REQUIRED`
- `destinationAccount`: Name used by the business to receive money on the provided destinationChannel. `REQUIRED`
- `amount`: Amount to pay. `REQUIRED`
- `requester`: PhoneNumber through which KPLC will send tokens when using B2B to buy electricity tokens.
- `metadata`: Additional data to associate with the transaction. `REQUIRED`
- `bank_checkout(product_name: str, currency_code: str, amount: float, bank_account: dict, narration: str, metadata: dict = {})`: Initiate bank checkout.
- `product_name`: Payment product on Africa's Talking. `REQUIRED`
- `bank_account`: Bank account to be charged:
- `accountName`: Name of the bank account. `REQUIRED`
- `accountNumber`: Account number. `REQUIRED`
- `bankCode`: A [6-Digit Integer Code](https://developers.africastalking.com/docs/payments/bank/checkout) for the bank that we allocate. See `payments::BANK*` for supported banks. `REQUIRED`
- `dateOfBirth`: Date of birth of the account owner (in the format `YYYY-MM-DD`). Required for Zenith Bank Nigeria.
- `currency_ode`: 3-digit ISO format currency code (only `NGN` is supported at present). `REQUIRED`
- `amount`: Amount to charge. `REQUIRED`
- `narration`: A short description of the transaction. `REQUIRED`
- `metadata`: Additional data to associate with the transaction. `REQUIRED`
- `validate_bank_checkout(transaction_id: str, otp: str)`: Validate a bank checkout
- `transactionId`: Transaction id returned from a bank charge request. `REQUIRED`
- `otp`: One Time Password provided by the customer you're charging. `REQUIRED`
- `bank_transfer(product_name: str, recipients: [dict])`: Move money form payment wallet to bank account.
- `product_name`: Payment product on Africa's Talking. `REQUIRED`
- `recipients`: A list of recipients. Each recipient has:
- `bankAccount`: Bank account to receive money:
- `accountName`: Name of the bank account. `REQUIRED`
- `accountNumber`: Account number. `REQUIRED`
- `bankCode`: A [6-Digit Integer Code](https://developers.africastalking.com/docs/payments/bank/checkout) for the bank that we allocate. See `payments::BANK*` for supported banks. `REQUIRED`
- `dateOfBirth`: Date of birth of the account owner (in the format `YYYY-MM-DD`). Required for Zenith Bank Nigeria.
- `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported at present). `REQUIRED`
- `amount`: Amount to pay. `REQUIRED`
- `narration`: A short description of the transaction. `REQUIRED`
- `metadata`: Additonal data to associate with the transaction. `REQUIRED`
- `card_checkout(product_name: str, currency_code:str, amount: float, payment_card: dict, narration: str, metadata: dict = {})`: Initiate card checkout.
- `product_name`: Payment product on Africa's Talking. `REQUIRED`
- `payment_card`: Payment card to be charged:
- `number`: Payment card number. `REQUIRED`
- `cvvNumber`: 3 or 4 digit card verification Value. `REQUIRED`
- `expiryMonth`: Expiration month on the card (e.g `8`). `REQUIRED`
- `authToken`: Payment card's ATM PIN. `REQUIRED`
- `countryCode`: 2-Digit countryCode where the card was issued (only `NG` is supported at present). `REQUIRED`
- `checkout_token`: A token that has been generated by our APIs as as result of charging a customers payment card in a previous transaction. When using a `checkoutToken`, the `paymentCard` data should NOT be populated.
- `currency_code`: 3-digit ISO format currency code (only `NGN` is supported at present). `REQUIRED`
- `amount`: Amount to charge. `REQUIRED`
- `narration`: A short description of the transaction. `REQUIRED`
- `metadata`: Additonal data to associate with the transaction. `REQUIRED`
- `validate_card_checkout(transaction_id: str, otp: str)`: Validate a card checkout
- `transactionId`: Transaction id returned from a card charge request. `REQUIRED`
- `otp`: One Time Password provided by the customer you're charging. `REQUIRED`
- `wallet_transfer(product_name: str, target_product_code: int, currency_code: str, amount: float, metadata: dict)`: Transfer money from one Payment Product to another Payment Product hosted on Africa's Talking.
- `product_name`: Payment product on Africa's Talking. `REQUIRED`
- `target_product_code`: Unique code ode of payment product receiving funds on Africa's Talking. `REQUIRED`
- `currency_code`: 3-digit ISO format currency code (only `NGN` is supported at present). `REQUIRED`
- `amount`: Amount to transfer. `REQUIRED`
- `metadata`: Additional data to associate with the transation. `REQUIRED`
- `topup_stash(product_name: str, currency_code: str, amount: float, metadata: dict)`: Move money from a Payment Product to an app's stash.
- `product_name`: Payment product on Africa's Talking. `REQUIRED`
- `currency_code`: 3-digit ISO format currency code (only `NGN` is supported at present). `REQUIRED`
- `amount`: Amount to transfer. `REQUIRED`
- `metadata`: Additonal data to associate with the transaction. `REQUIRED`
- `fetch_product_transactions(product_name: str, filters: dict)`: Fetch transactions of a particular payment product.
- `productName`: Payment product on Africa's Talking. `REQUIRED`
- `filters`: Transaction filters.
- `pageNumber`: Page number to fetch results from. Starts from `1`. `REQUIRED`
- `count`: Number of results to fetch. `REQUIRED`
- `startDate`: Start Date to consider when fetching.
- `endDate`: End Date to consider when fetching.
- `category`: Category to consider when fetching.
- `provider`: Provider to consider when fetching.
- `status`: Status to consider when fetching.
- `source`: Source to consider when fetching.
- `destination`: Destination to consider when fetching.
- `providerChannel`: Provider channel to consider when fetching.
- `wallet_transactions(filters: dict)`: Fetch your wallet transactions.
- `filters`: Wallet transactions filters. `REQUIRED`
- `pageNumber`: Page number to fetch results from. Starts from `1`. `REQUIRED`
- `count`: Number of results to fetch. `REQUIRED`
- `startDate`: Start Date to consider when fetching.
- `endDate`: End Date to consider when fetching.
- `category`: Comma delimited list of categories to consider when fetching.
- `find_transaction(transaction_id: str)`: Find a particular payment transaction.
- `transaction_id`: ID of trancation to find. `REQUIRED`
- `wallet_balance()`: Fetch your wallet balance.


### `Voice`
Expand All @@ -289,7 +147,7 @@ Initialize the SDK by calling `africastalking.initialize(username, api_key)`. Af
- `upload_media_file(phone_number: str, url: str)`: Upload voice media file

- `phone_number`: phone number mapped to your Africa's Talking account (in international format). `REQUIRED`
- `url`: The url of the file to upload. Should start with `http(s)://`. `REQUIRED` -->
- `url`: The url of the file to upload. Should start with `http(s)://`. `REQUIRED`

### `MobileData`

Expand All @@ -301,7 +159,6 @@ Initialize the SDK by calling `africastalking.initialize(username, api_key)`. Af
- `quantity`: Mobile data amount. `REQUIRED`
- `unit`: Mobile data unit. Can either be `MB` or `GB`. `REQUIRED`
- `validity`: How long the mobile data is valid for. Must be one of `Day`, `Week` and `Month`. `REQUIRED`
- `isPromoBundle`: This is an optional field that can be either`true` and `false`. `OPTIONAL`
- `metadata`: Additional data to associate with the transaction. `OPTIONAL`

- `find_transaction(transaction_id: str)`: Find a mobile data transaction.
Expand Down
1 change: 0 additions & 1 deletion africastalking/MobileData.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def send(self, product_name, recipients, callback=None):
"quantity": And(lambda f: float(f) > 0),
"unit": And(str, lambda s: validate_data_units(s)),
"validity": And(str, lambda s: validate_data_validity(s)),
Optional("isPromoBundle"): And(bool),
Optional("metadata"): And(dict),
}
]
Expand Down

0 comments on commit 12acb56

Please sign in to comment.