package com.africastalking.payment.recipient;

import com.google.gson.Gson;

import java.util.HashMap;


/**
 * Business-type payment recipient, used in B2B transactions.
 */
public final class Business {

    /*
     * Payment Providers
     */
    public static final String PROVIDER_MPESA = "Mpesa";
    public static final String PROVIDER_ATHENA = "Athena";

    /*
     * Transfer Types
     */
    public static final String TRANSFER_TYPE_BUYGOODS = "BusinessBuyGoods";
    public static final String TRANSFER_TYPE_PAYBILL = "BusinessPayBill";
    public static final String TRANSFER_TYPE_DISBURSE = "DisburseFundsToBusiness";
    public static final String TRANSFER_TYPE_B2B = "BusinessToBusinessTransfer";


    public float amount;
    public String provider;
    public String currencyCode;
    public String transferType;
    public String destinationChannel;
    public String destinationAccount = null;
    public HashMap<String, String> metadata = new HashMap<>();

    /**
     *
     * Business-type payment recipient, used in B2B transactions.
     *
     * @param destinationChannel Name or number of the channel that will receive payment by the provider.
     *                           e.g. Mobile Provider's Paybill or Buy Goods number that belongs to the business.
     * @param destinationAccount Account name used by the business to receive money on the provided @{param destinationAccount}.
     * @param transferType Nature of transaction. e.g. {@link com.africastalking.payment.recipient.Business Business.TRANSFER_TYPE_BUYGOODS}
     * @param provider Payment Provider. e.g. {@link com.africastalking.payment.recipient.Business Business.PROVIDER_MPESA}
     * @param amount Amount to transact, along with the currency code. e.g. USD 3435
     */
    public Business(String destinationChannel, String destinationAccount, String transferType, String provider, String curencyCode, float amount) {
        this.amount = amount;
        this.provider = provider;
        this.currencyCode = curencyCode;
        this.transferType = transferType;
        this.destinationChannel = destinationChannel;
        this.destinationAccount = destinationAccount;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }

}

@@ -909,16 +909,52 @@
 = null;%0A
+    public String requester = null;%0A
     publ
@@ -1008,16 +1008,16 @@
 ap%3C%3E();%0A
-
 %0A    /**
@@ -1446,16 +1446,130 @@
 count%7D.%0A
+     * @param requester PhoneNumber through which KPLC will send tokens when using B2B to buy electricity tokens.%0A
      * @
@@ -1991,16 +1991,34 @@
 Account,
+ String requester,
  String 
@@ -2227,24 +2227,24 @@
 ansferType;%0A
-
         this
@@ -2281,24 +2281,60 @@
 ionChannel;%0A
+        this.requester = requester;%0A
         this

add requester to B2B