text: /*
   * Token History API
   * # Introduction  Token History API allows users to search for information and transfer records on KLAY, FT (KIP-7, Labeled ERC-20), and NFT (KIP-17, Labeled ERC-721) tokens. You can use Token History API to check the records of a specific EOA transferring KLAY, retrieve NFT information, or other purposes.  For more details on Token History API, refer to our [tutorial](https://klaytn.com).  For any questions regarding this document or KAS, visit [the developer forum](https://forum.klaytn.com/).  # Authentication  <!-- ReDoc-Inject: <security-definitions> -->
   *
   * OpenAPI spec version: 1.0
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   *
   * Swagger Codegen version: 2.4.17
   *
   * Do not edit the class manually.
   *
   */
  
  ;(function(root, factory) {
      if (typeof define === 'function' && define.amd) {
          // AMD. Register as an anonymous module.
          define(['../../ApiClient', '../model/FtContract', '../model/Transaction'], factory)
      } else if (typeof module === 'object' && module.exports) {
          // CommonJS-like environments that support module.exports, like Node.
          module.exports = factory(require('../../ApiClient'), require('./FtContract'), require('./NftContract'), require('./Transaction'))
      } else {
          // Browser globals (root is window)
          if (!root.TokenHistoryApi) {
              root.TokenHistoryApi = {}
          }
          root.TokenHistoryApi.TransferItem = factory(
              root.TokenHistoryApi.ApiClient,
              root.TokenHistoryApi.FtContract,
              root.TokenHistoryApi.NftContract,
              root.TokenHistoryApi.Transaction
          )
      }
  })(this, function(ApiClient, FtContract, NftContract, Transaction) {
      /**
       * The TransferItem model module.
       * @class TransferItem
       * @version 1.0
       */
  
      /**
       * Constructs a new <code>TransferItem</code>.
       * @alias TransferItem
       * @class
       */
      const TransferItem = function() {}
  
      /**
       * Constructs a <code>TransferItem</code> from a plain JavaScript object, optionally creating a new instance.
       * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
       * @param {Object} data The plain JavaScript object bearing properties of interest.
       * @param {TransferItem} obj Optional instance to populate.
       * @return {TransferItem} The populated <code>TransferItem</code> instance.
       * @memberof TransferItem
       */
      TransferItem.constructFromObject = function(data, obj) {
          if (data) {
              obj = obj || new TransferItem()
              if (data.hasOwnProperty('feePayer')) obj.feePayer = ApiClient.convertToType(data.feePayer, 'String')
              if (data.hasOwnProperty('feeRatio')) obj.feeRatio = ApiClient.convertToType(data.feeRatio, 'Number')
              if (data.hasOwnProperty('fee')) obj.fee = ApiClient.convertToType(data.fee, 'String')
              if (data.hasOwnProperty('from')) obj.from = ApiClient.convertToType(data.from, 'String')
              if (data.hasOwnProperty('to')) obj.to = ApiClient.convertToType(data.to, 'String')
              if (data.hasOwnProperty('transactionHash')) obj.transactionHash = ApiClient.convertToType(data.transactionHash, 'String')
              if (data.hasOwnProperty('transactionIndex')) obj.transactionIndex = ApiClient.convertToType(data.transactionIndex, 'Number')
              if (data.hasOwnProperty('transferType')) obj.transferType = ApiClient.convertToType(data.transferType, 'String')
              if (data.hasOwnProperty('typeInt')) obj.typeInt = ApiClient.convertToType(data.typeInt, 'Number')
              if (data.hasOwnProperty('value')) obj.value = ApiClient.convertToType(data.value, 'String')
  
              if (data.hasOwnProperty('contract')) {
                  switch (data.transferType) {
                      case 'nft':
                          obj.contract = NftContract.constructFromObject(data.contract)
                          break
                      case 'ft':
                          obj.contract = FtContract.constructFromObject(data.contract)
                          break
                      default:
                          throw new Error(`Not supported trasnfer type: ${data.transferType}`)
                  }
              }
              if (data.hasOwnProperty('formattedValue')) obj.formattedValue = ApiClient.convertToType(data.formattedValue, 'String')
              if (data.hasOwnProperty('transaction')) obj.transaction = Transaction.constructFromObject(data.transaction)
              if (data.hasOwnProperty('tokenId')) obj.tokenId = ApiClient.convertToType(data.tokenId, 'String')
          }
          return obj
      }
  
      /**
       * Fee delegation account address (20-byte)
       * @type {String}
       * @memberof TransferItem
       */
      TransferItem.prototype.feePayer = undefined
  
      /**
       * Fee delegation ratio
       * @type {Number}
       * @memberof TransferItem
       */
      TransferItem.prototype.feeRatio = undefined
  
      /**
       * Gas fee
       * @type {String}
       * @memberof TransferItem
       */
      TransferItem.prototype.fee = undefined
  
      /**
       * Sender EOA (20-byte)
       * @type {String}
       * @memberof TransferItem
       */
      TransferItem.prototype.from = undefined
  
      /**
       * Receiver EOA (20-byte)
       * @type {String}
       * @memberof TransferItem
       */
      TransferItem.prototype.to = undefined
  
      /**
       * Transaction hash
       * @type {String}
       * @memberof TransferItem
       */
      TransferItem.prototype.transactionHash = undefined
  
      /**
       * Transaction index
       * @type {Number}
       * @memberof TransferItem
       */
      TransferItem.prototype.transactionIndex = undefined
  
      /**
       * Type of transaction detail
       * @type {String}
       * @memberof TransferItem
       */
      TransferItem.prototype.transferType = undefined
  
      /**
       * Transaction type
       * @type {Number}
       * @memberof TransferItem
       */
      TransferItem.prototype.typeInt = undefined
  
      /**
       * The amount of tranferring KLAY (in hexadecimal)
       * @type {String}
       * @memberof TransferItem
       */
      TransferItem.prototype.value = undefined
  
      /**
       * @type {FtContract}
       * @memberof TransferItem
       */
      TransferItem.prototype.contract = undefined
  
      /**
       * Converted value with the contract specific decimal
       * @type {String}
       * @memberof TransferItem
       */
      TransferItem.prototype.formattedValue = undefined
  
      /**
       * @type {Transaction}
       * @memberof TransferItem
       */
      TransferItem.prototype.transaction = undefined
  
      /**
       * Token identifier (in hexadecimal)
       * @type {String}
       * @memberof TransferItem
       */
      TransferItem.prototype.tokenId = undefined
  
      return TransferItem
  })
  