README.md in africastalking-ruby-2.1.9 vs README.md in africastalking-ruby-2.2.0
- old
+ new
@@ -213,214 +213,9 @@
```
- Fetch a mobile data product balance
For more information, please read the [https://developers.africastalking.com/docs/data/overview](https://developers.africastalking.com/docs/data/overview)
-### Payments
-```ruby
-payments = @AT.payments
-```
-#### Credit card checkout
-```ruby
-payments.cardCheckoutCharge options
-```
-- `options`
- - `productName`: Payment Product as setup on your account. `REQUIRED`
- - `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported). `REQUIRED`
- - `amount`: Payment amount. `REQUIRED`
- - `narration`: A short description of the transaction `REQUIRED`
- - `checkoutToken`: Token that has been generated by our APIs as as result of charging a user's Payment Card in a previous transaction. When using a token, the `paymentCard` data should NOT be populated. `OPTIONAL`
- - `paymentCard`: Hash of payment Card to be charged: `OPTIONAL`
- - `number`: The payment card number. `REQUIRED`
- - `cvvNumber`: The 3 or 4 digit Card Verification Value. `REQUIRED`
- - `expiryMonth`: The expiration month on the card (e.g `8`) `REQUIRED`
- - `expiryYear`: The expiration year on the card (e.g `2020`) `REQUIRED`
- - `authToken`: The card's ATM PIN. `REQUIRED`
- - `countryCode`: The 2-Digit countryCode where the card was issued (only `NG` is supported). `REQUIRED`
- - `metadata`: Some optional data to associate with transaction. `OPTIONAL`
-
-#### Validate credit card checkout
-
-```ruby
-payments.cardCheckoutValidate options
-```
-- `options`
- - `transactionId`: The transaction that your application wants to validate. `REQUIRED`
- - `otp`: One Time Password that the card issuer sent to the client. `REQUIRED`
-
-
-#### Initiate bank charge checkout
-```ruby
-payments.bankCheckoutCharge options
-```
-- `options`
- - `productName`: Payment Product as setup on your account. `REQUIRED`
- - `bankAccount`: Hash of bank account to be charged:
-
- - `accountName`: The name of the bank account. `REQUIRED`
- - `accountNumber`: The account number. `REQUIRED`
- - `dateOfBirth`: Date of birth of the account owner (`YYYY-MM-DD`). Required for Zenith Bank Nigeria.
- - `bankCode`: A 6-Digit [Integer Code](http://docs.africastalking.com/bank/checkout) for the bank that we allocate. Supported banks at the moment are: `REQUIRED`
- ```ruby
- payments.class::BANK_CODES['FCMB_NG']
- payments.class::BANK_CODES['ZENITH_NG']
- payments.class::BANK_CODES['ACCESS_NG']
- payments.class::BANK_CODES['PROVIDUS_NG']
- payments.class::BANK_CODES['STERLING_NG']
- ```
-
- - `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported). `REQUIRED`
- - `amount`: Payment amount. `REQUIRED`
- - `narration`: A short description of the transaction `REQUIRED`
- - `metadata`: Some optional data to associate with transaction`OPTIONAL`
-
-
-#### Validate bank checkout
-```ruby
-payments.bankCheckoutValidate options
-```
-- `options`
- - `transactionId`: The transaction that your application wants to validate. `REQUIRED`
- - `otp`: One Time Password that the bank sent to the client. `REQUIRED`
-
-
-#### Bank transfer
-
-```ruby
-payments.bankTransfer options
-```
-- `options`
- - `productName`: Payment Product as setup on your account. `REQUIRED`
- - `recipients`: A list of recipients. Each recipient has:
- - `bankAccount`: Bank account to be charged:
- - `accountName`: The name of the bank account.
- - `accountNumber`: The account number `REQUIRED`
- - `bankCode`: A 6-Digit Integer Code for the bank that we allocate; See `payments.class::BANK_CODES` for supported banks. `REQUIRED`
- - `currencyCode`: 3-digit ISO format currency code (only `NGN` is supported). `REQUIRED`
- - `amount`: Payment amount. `REQUIRED`
- - `narration`: A short description of the transaction `REQUIRED`
- - `metadata`: Some optional data to associate with transaction.
-
-#### Mobile Checkout
-
-```ruby
-payments.mobileCheckout options
-```
-- `options`
- - `productName`: Your Payment Product. `REQUIRED`
- - `phoneNumber`: The customer phone number (in international format; e.g. `25471xxxxxxx`). `REQUIRED`
- - `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc.) `REQUIRED`
- - `amount`: This is the amount. `REQUIRED`
- - `metadata`: Some optional data to associate with transaction.`OPTIONAL`
- - `providerChannel`: This represents the payment channel the payment will be made from. eg paybill number. The payment channel must be mapped to you. The AfricasTalking default provider channel is used if not specified.`OPTIONAL`
-
-#### Mobile B2C
-```ruby
-payments.mobileB2C options
-```
-- `options`
- - `productName`: Your Payment Product. `REQUIRED`
- - `recipients`: A list of **up to 10** recipients. Each recipient has:
-
- - `phoneNumber`: The payee phone number (in international format; e.g. `25471xxxxxxx`). `REQUIRED`
- - `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc.) `REQUIRED`
- - `amount`: Payment amount. `REQUIRED`
- - `providerChannel`: This represents the payment channel the payment will be made from. eg paybill number. The payment channel must be mapped to you. The AfricasTalking default provider channel is used if not specified.
- - `reason`: This field contains a string showing the purpose for the payment. If set, it should be one of the following
- ```
- SalaryPayment
- SalaryPaymentWithWithdrawalChargePaid
- BusinessPayment
- BusinessPaymentWithWithdrawalChargePaid
- PromotionPayment
- ```
- - `metadata`: Some optional data to associate with transaction.
-
-#### Mobile B2B
-```ruby
-payments.mobileB2B options
-```
-- `options`
- - `productName`: Your Payment Product as setup on your account. `REQUIRED`
- - `providerData`: Hash containing Provider details. this include; `REQUIRED`
-
- - `provider`: String that shows the payment provider that is facilitating this transaction. Supported providers at the moment are:
-
- ```
- Athena - Please note: This is not available on our production systems
- Mpesa
-
- ```
- - `transferType`: This contains the payment provider that is facilitating this transaction. Supported providers at the moment are:
- ```
- BusinessBuyGoods
- BusinessPayBill
- DisburseFundsToBusiness
- BusinessToBusinessTransfer
- ```
- - `destinationChannel`: This value contains the name or number of the channel that will receive payment by the provider. `REQUIRED`
- - `destinationAccount`: This value contains the account name used by the business to receive money on the provided destinationChannel. `REQUIRED`
- - `currencyCode`: 3-digit ISO format currency code (e.g `KES`, `USD`, `UGX` etc.) `REQUIRED`
- - `amount`: Payment amount. `REQUIRED`
- - `requester`: PhoneNumber through which KPLC will send tokens when using B2B to buy electricity tokens.
- - `metadata`: Some optional data to associate with transaction.`REQUIRED`
-
-
-
-#### Wallet Transfer
-```ruby
-payments.walletTransfer options
-```
-- `options`
- - `productName`: Your Payment Product as setup on your account. `REQUIRED`
- - `targetProductCode`: Unique code ode of payment product receiving funds on Africa's Talking `REQUIRED`
- - `currencyCode`: 3-digit ISO format currency code. `REQUIRED`
- - `amount`: Amount to transfer. `REQUIRED`
- - `metadata`: Additional data to associate with the transaction. `REQUIRED`
-
-#### Topup Stash
-```ruby
-payments.topupStash options
-```
-- `options`
- - `productName`: Your Payment Product as setup on your account. `REQUIRED`
- - `currencyCode`: 3-digit ISO format currency code. `REQUIRED`
- - `amount`: Amount to transfer. `REQUIRED`
- - `metadata`: Additonal data to associate with the transaction. `REQUIRED`
-
-#### Fetch Product Transactions
-```ruby
-payments.fetchProductTransactions options
-```
-- `options`
- - `productName`: Your Payment Product as setup on your account. `REQUIRED`
- - `filters`: Filters to use when fetching transactions:
- - `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 to consider when fetching
-
-#### fetch Wallet Transactions
-```ruby
-payments.fetchWalletTransactions options
-```
-- `options`
- - `filters`: Filters to use when fetching transactions:
- - `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
- - `categories`: Comma delimited list of categories to consider when fetching
-
-
-
-
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).