def topup(msisdn, destination_msisdn, product, method = 'topup',
              reserved_id = nil, send_sms = true, sms = nil, sender_text = nil,
              cid1 = '', cid2 = '', cid3 = '',
              operator_id = nil,
              return_service_fee = 1, delivered_amount_info = 1, return_timestamp = 1, return_version = 1,
              return_promo = 0)

      @params = {
        msisdn: msisdn,
        destination_msisdn: destination_msisdn,
        product: product
      }
      self.oid = operator_id

      @params.merge(cid1: cid1, cid2: cid2, cid3: cid3,
                    reserved_id: reserved_id,
                    sender_sms: (sender_text ? 'yes' : 'no'),
                    send_sms: (send_sms ? 'yes' : 'no'),
                    sms: sms,
                    sender_text: sender_text,
                    delivered_amount_info: delivered_amount_info,
                    return_service_fee: return_service_fee,
                    return_timestamp: return_timestamp,
                    return_version: return_version,
                    return_promo: return_promo)

      run_action method
    end
def topup(msisdn, destination_msisdn, product, method = 'topup',
              reserved_id = nil, send_sms = true, sms = nil, sender_text = nil,
              cid1 = '', cid2 = '', cid3 = '',
              operator_id = nil,
              return_service_fee = 1, delivered_amount_info = 1, return_timestamp = 1, return_version = 1,
              return_promo = 0)

      @params = {
        msisdn: msisdn,
        destination_msisdn: destination_msisdn,
        product: product
      }
      self.oid = operator_id

      @params.merge(cid1: cid1, cid2: cid2, cid3: cid3,
                    reserved_id: reserved_id,
                    sender_sms: (sender_text ? 'yes' : 'no'),
                    send_sms: (send_sms ? 'yes' : 'no'),
                    sms: sms,
                    sender_text: sender_text,
                    delivered_amount_info: delivered_amount_info,
                    return_service_fee: return_service_fee,
                    return_timestamp: return_timestamp,
                    return_version: return_version,
                    return_promo: return_promo)

      run_action method
    end
This method is used to recharge a destination number with a specified
 denomination (“product” field).
 This is the API’s most important action as it is required when sending
 a topup to a prepaid account phone numberin a live! environment.

 parameters
 ==========
 msisdn
 ------
 The international phone number of the user requesting to credit
 a TransferToAPI phone number. The format must contain the country code,
 and will be valid with or without the ‘+’ or ‘00’ placed before it. For
 example: “6012345678” or “+6012345678” or “006012345678” (Malaysia) are
 all valid.

 product
 -------
 This field is used to define the remote product(often, the same as the
 amount in destination currency) to use in the request.

 destination
 -----------
 This is the destination phone number that will be credited with the
 amount transferred. Format is similar to “msisdn”.

 operator_id
 -----------
 It defines the operator id of the destination MSISDN that must be used
 when treating the request. If set, the platform will be forced to use
 this operatorID and will not identify the operator of the destination
 MSISDN based on the numbering plan. It must be very useful in case of
 countries with number portability if you are able to know the destination
 operator.
 Most receiving operators (or carriers) are PIN less (direct top-up), meaning that the mobile phone of the
 recipient is recharged in real time. A few operators are however PIN based (mostly in the USA and UK).
 For  these  PIN  based  operators, a  PIN  code is  sent  by SMS  to  the  recipient, who  then  has  to manually
 complete the recharge process (usually by calling an IVR to redeem the PIN).
 Name Type Description
 pin_based String Returns “Yes” if PIN-based transactions. Else “No”.
 pin_option_1 String Additional information. For example, it can describe how to use
 the PIN directly from handset (by entering a dedicated USSD code).
 pin_option_2 String Additional information. For example, it can provide the operator refill website.
 pin_option_3 String Additional information. For example, it can provide the operator refill call center.
 pin_value Integer Value of the PIN.
 pin_code Alphanumeric String Code of the PIN.
 pin_ivr Integer IVR number of the PIN.
 pin_serial Alphanumeric String Serial number of the PIN.
 pin_validity String Validity of the PIN
 By default, an SMS notification is sent to the recipient after every successful Top-up.
 The default originating address for the SMS is “8888”.
 The following is the default SMS which is translated into local languages for most of recipient countries:
 Congratulations! You've received
 AMOUNT_CURRENCY from SENDER. Thank you for using
 TransferTo. FREE_TEXT.
 • AMOUNT  CURRENCY  is  the  amount  that  has
 been sent with the currency.
 • SENDER can be a name or a phone number.
 • FREE_TEXT  is  the  content  of  the  field  named
 “sms” of the topup method.