def header = { ->
  def builder = new JsonBuilder()
  def parser = stateParser
  'builder' {
    if ((parser?.'Carrier'?.'PRPHeader'?.'prpHost' == 0) || (parser?.'Carrier'?.'PRPHeader'?.'prpHost' == false) || (parser?.'Carrier'?.'PRPHeader'?.'prpHost' && parser?.'Carrier'?.'PRPHeader'?.'prpHost' != null)) { 'PRP-HOST' parser?.'Carrier'?.'PRPHeader'?.'prpHost' == null ? null : String.valueOf(parser?.'Carrier'?.'PRPHeader'?.'prpHost') }
    if ((parser?.'Carrier'?.'PRPHeader'?.'prpAlias' == 0) || (parser?.'Carrier'?.'PRPHeader'?.'prpAlias' == false) || (parser?.'Carrier'?.'PRPHeader'?.'prpAlias' && parser?.'Carrier'?.'PRPHeader'?.'prpAlias' != null)) { 'PRP-ALIAS' parser?.'Carrier'?.'PRPHeader'?.'prpAlias' == null ? null : String.valueOf(parser?.'Carrier'?.'PRPHeader'?.'prpAlias') }
    if ((parser?.'Carrier'?.'PRPHeader'?.'contentType' == 0) || (parser?.'Carrier'?.'PRPHeader'?.'contentType' == false) || (parser?.'Carrier'?.'PRPHeader'?.'contentType' && parser?.'Carrier'?.'PRPHeader'?.'contentType' != null)) { 'Content-Type' parser?.'Carrier'?.'PRPHeader'?.'contentType' == null ? null : String.valueOf(parser?.'Carrier'?.'PRPHeader'?.'contentType') }
    if ((parser?.'Carrier'?.'PRPHeader'?.'acceptEncoding' == 0) || (parser?.'Carrier'?.'PRPHeader'?.'acceptEncoding' == false) || (parser?.'Carrier'?.'PRPHeader'?.'acceptEncoding' && parser?.'Carrier'?.'PRPHeader'?.'acceptEncoding' != null)) { 'Accept-Encoding' parser?.'Carrier'?.'PRPHeader'?.'acceptEncoding' == null ? null : String.valueOf(parser?.'Carrier'?.'PRPHeader'?.'acceptEncoding') }
    if ((parser?.'Carrier'?.'PRPHeader'?.'accept' == 0) || (parser?.'Carrier'?.'PRPHeader'?.'accept' == false) || (parser?.'Carrier'?.'PRPHeader'?.'accept' && parser?.'Carrier'?.'PRPHeader'?.'accept' != null)) { 'Accept' parser?.'Carrier'?.'PRPHeader'?.'accept' == null ? null : String.valueOf(parser?.'Carrier'?.'PRPHeader'?.'accept') }
  }

  context.out.header = builder.toString()
}

def body = { ->
  def writer = new StringWriter()
  def builder = new MarkupBuilder(writer)
  
  builder.setDoubleQuotes(true)
  builder.mkp.xmlDeclaration([version: '1.0', encoding: 'utf-8'])
  def parser = stateParser
  def transformsMap = [
    'setHeaderSubmitOrderFIrst': { args ->
      def serviceName
      def serviceAction
      serviceName = 'orderProcessingComposite'
      serviceAction = 'submitOrder'
      return [
        'serviceName': serviceName,
        'serviceAction': serviceAction,
      ]
    },
    'setFirstSubmitType': { args ->
      def submitType
      submitType = 'FIRSTSUBMIT'
      return [
        'submitType': submitType,
      ]
    },
    'setCustomerType': { args ->
      def orderType = args?.getAt(0)
      def customerType
      def item;
      
      
      
      item = orderType;
      
      if (item == 'Upgrade') {
        item = 'U';
      } else if (item == 'New') {
        item = 'N';
      } else if (item == 'AAL') {
        item = 'E';
      }
      
      return [
        'customerType': customerType,
      ]
    },
    'setAccountNumber': { args ->
      def accountNumber = args?.getAt(0)
      def output
      output = accountNumber
      return [
        'output': output,
      ]
    },
    'setAccountSubNumber': { args ->
      def accountSubNumber = args?.getAt(0)
      def output
      output = accountSubNumber
      return [
        'output': output,
      ]
    },
    'setFirstName': { args ->
      def firstName = args?.getAt(0)
      def output
      output = firstName
      return [
        'output': output,
      ]
    },
    'setLastName': { args ->
      def lastName = args?.getAt(0)
      def output
      output = lastName
      return [
        'output': output,
      ]
    },
    'setAddress': { args ->
      def Address = args?.getAt(0)
      def streetName
      def addressLine2
      def city
      def state
      def zipCode
      def zipCode4
      def country
      streetName = Address['line1']
      addressLine2 = Address['line2']
      city = Address['city']
      state = Address['state']
      zipCode = Address['zipCode']
      zipCode4 = Address['zipCode4']
      country = Address['country']
      return [
        'streetName': streetName,
        'addressLine2': addressLine2,
        'city': city,
        'state': state,
        'zipCode': zipCode,
        'zipCode4': zipCode4,
        'country': country,
      ]
    },
    'setEmpty': { args ->
      def empty
      empty = ''
      return [
        'empty': empty,
      ]
    },
    'setFullName': { args ->
      def firstName = args?.getAt(0)
      def lastName = args?.getAt(1)
      def fullName
      fullName = [firstName,' ',lastName].join('')
      return [
        'fullName': fullName,
      ]
    },
    'setContactPhone': { args ->
      def phoneNumber = args?.getAt(0)
      def output
      output = phoneNumber
      return [
        'output': output,
      ]
    },
    'setEmail': { args ->
      def email = args?.getAt(0)
      def output
      output = email
      return [
        'output': output,
      ]
    },
    'setSaleType': { args ->
      def saleType
      saleType = 'S'
      return [
        'saleType': saleType,
      ]
    },
    'setSpendingLimit': { args ->
      def accountSpendingLimit = args?.getAt(0) == null ? 0 : args?.getAt(0)
      def output
      output = accountSpendingLimit
      return [
        'output': output,
      ]
    },
    'setLineLevelSpendingLimit': { args ->
      def lineSpendingLimit = args?.getAt(0) == null ? 0 : args?.getAt(0)
      def output
      output = lineSpendingLimit
      return [
        'output': output,
      ]
    },
    'setFalse': { args ->
      def output
      output = false
      return [
        'output': output,
      ]
    },
    'setIdSubmitOrder': { args ->
      def term = args?.getAt(0)
      def output
      def item;
      
      
      
      item = term;
      if (item == '0') {
        item = 'CNT=0:CNTID=0048';
      } else if (item == '24') {
        item = 'CNT=2:CNTID=0012';
      } else {
        item = 'CNT=0:CNTID=0048';
      }
      
      output = item
      return [
        'output': output,
      ]
    },
    'setContractDescription': { args ->
      def term = args?.getAt(0)
      def output
      def item;
      
      
      
      item = term;
      if (item == '24') {
        item = '24 Months';
      } else {
        item = '0 Month';
      }
      
      output = item
      return [
        'output': output,
      ]
    },
    'setContractDuration': { args ->
      def term = args?.getAt(0)
      def contractDuration
      def item;
      
      
      
      item = term;
      
      contractDuration = item
      return [
        'contractDuration': contractDuration,
      ]
    },
  ]
  def transformCache = [:]
  def transformExecutor = { name, id, index, ...args ->
    if (!transformsMap[name]) {
      throw new Exception('Transform ' + name + ' not found')
    }
    return transformsMap[name](args)
  }

  builder.'VzwServices' ('xmlns': parser?.'Carrier'?.'Verizon'?.'VerizonNameSpace'?.'nameSpace') {
    'ServiceHeader' () {
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'userName' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'userName' != null) { 'userName' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'userName' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'userName')) } }
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'password' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'password' != null) { 'password' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'password' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'password')) } }
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAppName' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAppName' != null) { 'clientAppName' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAppName' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAppName')) } }
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAppUserName' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAppUserName' != null) { 'clientAppUserName' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAppUserName' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAppUserName')) } }
      'serviceName' { mkp.yield(transformExecutor('setHeaderSubmitOrderFIrst', '0', null, )?.'serviceName' == null ? null : String.valueOf(transformExecutor('setHeaderSubmitOrderFIrst', '0', null, )?.'serviceName')) }
      'serviceAction' { mkp.yield(transformExecutor('setHeaderSubmitOrderFIrst', '1', null, )?.'serviceAction' == null ? null : String.valueOf(transformExecutor('setHeaderSubmitOrderFIrst', '1', null, )?.'serviceAction')) }
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'timeStamp' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'timeStamp' != null) { 'timeStamp' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'timeStamp' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'timeStamp')) } }
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'storeID' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'storeID' != null) { 'storeID' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'storeID' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'storeID')) } }
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAddlInfo' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAddlInfo' != null) { 'clientAddlInfo' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAddlInfo' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'clientAddlInfo')) } }
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'transactionId' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'transactionId' != null) { 'transactionId' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'transactionId' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'transactionId')) } }
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'sessionID' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'sessionID' != null) { 'sessionID' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'sessionID' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'sessionID')) } }
      if (parser?.'customer'?.'address'?.'zipCode' && parser?.'customer'?.'address'?.'zipCode' != null) { 'serviceAreaZip' { mkp.yield(parser?.'customer'?.'address'?.'zipCode' == null ? null : String.valueOf(parser?.'customer'?.'address'?.'zipCode')) } }
      'orderKeyInfo' () {
        if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'clusterInfo' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'clusterInfo' != null) { 'clusterInfo' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'clusterInfo' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'clusterInfo')) } }
        if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'location' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'location' != null) { 'location' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'location' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'location')) } }
        if (parser?.'account'?.'creditInfo'?.'creditInformation'?.'creditReferenceNumber' && parser?.'account'?.'creditInfo'?.'creditInformation'?.'creditReferenceNumber' != null) { 'creditApplicationNum' { mkp.yield(parser?.'account'?.'creditInfo'?.'creditInformation'?.'creditReferenceNumber' == null ? null : String.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'creditReferenceNumber')) } }
        if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'orderNum' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'orderNum' != null) { 'orderNum' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'orderNum' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'orderNum')) } }
        if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'billingSystem' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'billingSystem' != null) { 'billingSystem' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'billingSystem' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'billingSystem')) } }
        if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'salesForceId' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'salesForceId' != null) { 'salesForceId' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'salesForceId' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'salesForceId')) } }
        if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'outletId' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'outletId' != null) { 'outletId' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'outletId' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'orderKeyInfo'?.'outletId')) } }
      }
      if (parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'xmlVersion' && parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'xmlVersion' != null) { 'xmlVersion' { mkp.yield(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'xmlVersion' == null ? null : String.valueOf(parser?.'Carrier'?.'Verizon'?.'ServiceHeader'?.'xmlVersion')) } }
    }
    'ServiceBody' () {
      'writeOrder' () {
        'request' () {
          'serviceLines' () {
            parser?.'account'?.'upgradeSubscribers'?.eachWithIndex({ account_upgradeSubscribers_subscriber, account_upgradeSubscribers_subscriber_index ->
              'serviceLine' () {
                'submitType' { mkp.yield(transformExecutor('setFirstSubmitType', '2', account_upgradeSubscribers_subscriber_index, )?.'submitType' == null ? null : String.valueOf(transformExecutor('setFirstSubmitType', '2', account_upgradeSubscribers_subscriber_index, )?.'submitType')) }
                'custServiceOrderDetail' () {
                  if (account_upgradeSubscribers_subscriber?.'phoneNumber' && account_upgradeSubscribers_subscriber?.'phoneNumber' != null) { 'assignedMobileNumber' { mkp.yield(account_upgradeSubscribers_subscriber?.'phoneNumber' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'phoneNumber')) } }
                  if ((account_upgradeSubscribers_subscriber?.'lineSequnceNumber' == 0) || (account_upgradeSubscribers_subscriber?.'lineSequnceNumber' && account_upgradeSubscribers_subscriber?.'lineSequnceNumber' != null)) { 'multiLineSeqNumber' { mkp.yield(account_upgradeSubscribers_subscriber?.'lineSequnceNumber' == 0 ? Integer.valueOf(account_upgradeSubscribers_subscriber?.'lineSequnceNumber') : !account_upgradeSubscribers_subscriber?.'lineSequnceNumber' || account_upgradeSubscribers_subscriber?.'lineSequnceNumber' == null ? null : Integer.valueOf(account_upgradeSubscribers_subscriber?.'lineSequnceNumber')) } }
                  'customerType' { mkp.yield(transformExecutor('setCustomerType', '3', account_upgradeSubscribers_subscriber_index, parser?.'Carrier'?.'flowType' == null ? null : String.valueOf(parser?.'Carrier'?.'flowType'))?.'customerType' == null ? null : String.valueOf(transformExecutor('setCustomerType', '3', account_upgradeSubscribers_subscriber_index, parser?.'Carrier'?.'flowType' == null ? null : String.valueOf(parser?.'Carrier'?.'flowType'))?.'customerType')) }
                  'accountNumber' { mkp.yield(transformExecutor('setAccountNumber', '4', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'accountNumber' == null ? null : String.valueOf(parser?.'account'?.'accountNumber'))?.'output' == null ? null : String.valueOf(transformExecutor('setAccountNumber', '4', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'accountNumber' == null ? null : String.valueOf(parser?.'account'?.'accountNumber'))?.'output')) }
                  'accountSubNumber' { mkp.yield(transformExecutor('setAccountSubNumber', '5', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'accountSubNumber' == null ? null : String.valueOf(parser?.'account'?.'accountSubNumber'))?.'output' == null ? null : String.valueOf(transformExecutor('setAccountSubNumber', '5', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'accountSubNumber' == null ? null : String.valueOf(parser?.'account'?.'accountSubNumber'))?.'output')) }
                  'primaryUserInfo' () {
                    'firstName' { mkp.yield(transformExecutor('setFirstName', '6', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'name'?.'firstName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'firstName'))?.'output' == null ? null : String.valueOf(transformExecutor('setFirstName', '6', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'name'?.'firstName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'firstName'))?.'output')) }
                    'lastName' { mkp.yield(transformExecutor('setLastName', '7', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'name'?.'lastName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'lastName'))?.'output' == null ? null : String.valueOf(transformExecutor('setLastName', '7', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'name'?.'lastName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'lastName'))?.'output')) }
                    'address' () {
                      'streetName' { mkp.yield(transformExecutor('setAddress', '8', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'streetName' == null ? null : String.valueOf(transformExecutor('setAddress', '8', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'streetName')) }
                      'addressLine2' { mkp.yield(transformExecutor('setAddress', '9', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'addressLine2' == null ? null : String.valueOf(transformExecutor('setAddress', '9', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'addressLine2')) }
                      'city' { mkp.yield(transformExecutor('setAddress', '10', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'city' == null ? null : String.valueOf(transformExecutor('setAddress', '10', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'city')) }
                      'state' { mkp.yield(transformExecutor('setAddress', '11', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'state' == null ? null : String.valueOf(transformExecutor('setAddress', '11', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'state')) }
                      'zipCode' { mkp.yield(transformExecutor('setAddress', '12', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'zipCode' == null ? null : String.valueOf(transformExecutor('setAddress', '12', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'zipCode')) }
                      'zipCode4' { mkp.yield(transformExecutor('setAddress', '13', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'zipCode4' == null ? null : String.valueOf(transformExecutor('setAddress', '13', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'zipCode4')) }
                      'country' { mkp.yield(transformExecutor('setAddress', '14', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'country' == null ? null : String.valueOf(transformExecutor('setAddress', '14', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'address')?.'country')) }
                    }
                    'attention' { mkp.yield(transformExecutor('setFullName', '20', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'name'?.'firstName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'firstName'), parser?.'customer'?.'name'?.'lastName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'lastName'))?.'fullName' == null ? null : String.valueOf(transformExecutor('setFullName', '20', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'name'?.'firstName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'firstName'), parser?.'customer'?.'name'?.'lastName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'lastName'))?.'fullName')) }
                    'contactPersonName' { mkp.yield(transformExecutor('setFullName', '21', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'name'?.'firstName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'firstName'), parser?.'customer'?.'name'?.'lastName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'lastName'))?.'fullName' == null ? null : String.valueOf(transformExecutor('setFullName', '21', account_upgradeSubscribers_subscriber_index, parser?.'customer'?.'name'?.'firstName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'firstName'), parser?.'customer'?.'name'?.'lastName' == null ? null : String.valueOf(parser?.'customer'?.'name'?.'lastName'))?.'fullName')) }
                    'contactPersonPhone' { mkp.yield(transformExecutor('setContactPhone', '22', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'contactPhone' == null ? null : String.valueOf(parser?.'account'?.'contactPhone'))?.'output' == null ? null : String.valueOf(transformExecutor('setContactPhone', '22', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'contactPhone' == null ? null : String.valueOf(parser?.'account'?.'contactPhone'))?.'output')) }
                    'emailId' { mkp.yield(transformExecutor('setEmail', '23', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'email' == null ? null : String.valueOf(parser?.'account'?.'email'))?.'output' == null ? null : String.valueOf(transformExecutor('setEmail', '23', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'email' == null ? null : String.valueOf(parser?.'account'?.'email'))?.'output')) }
                  }
                  'saleType' { mkp.yield(transformExecutor('setSaleType', '24', account_upgradeSubscribers_subscriber_index, )?.'saleType' == null ? null : String.valueOf(transformExecutor('setSaleType', '24', account_upgradeSubscribers_subscriber_index, )?.'saleType')) }
                  'newEqptInfo' () {
                    'deviceInfo' () {
                      if (account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceSKU' && account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceSKU' != null) { 'deviceSKU' { mkp.yield(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceSKU' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceSKU')) } }
                      if (account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceSerial' && account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceSerial' != null) { 'deviceId' { mkp.yield(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceSerial' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceSerial')) } }
                      if ((account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceRetailPrice' == 0) || (account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceRetailPrice' && account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceRetailPrice' != null)) { 'deviceFullRetailPrice' { mkp.yield(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceRetailPrice' == 0 ? Double.valueOf(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceRetailPrice') : !account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceRetailPrice' || account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceRetailPrice' == null ? null : Double.valueOf(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'deviceRetailPrice')) } }
                      'installmentDetails' () {
                        if (account_upgradeSubscribers_subscriber?.'selectedDevice'?.'installmentDetails'?.'installmentContractNum' && account_upgradeSubscribers_subscriber?.'selectedDevice'?.'installmentDetails'?.'installmentContractNum' != null) { 'installmentContractNum' { mkp.yield(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'installmentDetails'?.'installmentContractNum' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'installmentDetails'?.'installmentContractNum')) } }
                        if (account_upgradeSubscribers_subscriber?.'selectedDevice'?.'installmentDetails'?.'eligibleForInstallment' && account_upgradeSubscribers_subscriber?.'selectedDevice'?.'installmentDetails'?.'eligibleForInstallment' != null) { 'eligibleForEDGE' { mkp.yield(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'installmentDetails'?.'eligibleForInstallment' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'installmentDetails'?.'eligibleForInstallment')) } }
                        'spendingLimit' { mkp.yield(transformExecutor('setSpendingLimit', '25', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit'))?.'output' == 0 ? Double.valueOf(transformExecutor('setSpendingLimit', '25', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit'))?.'output') : !transformExecutor('setSpendingLimit', '25', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit'))?.'output' || transformExecutor('setSpendingLimit', '25', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit'))?.'output' == null ? null : Double.valueOf(transformExecutor('setSpendingLimit', '25', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'accountSpendingLimit'))?.'output')) }
                        'lineLevelSpendingLimitAmount' { mkp.yield(transformExecutor('setLineLevelSpendingLimit', '26', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit'))?.'output' == 0 ? Double.valueOf(transformExecutor('setLineLevelSpendingLimit', '26', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit'))?.'output') : !transformExecutor('setLineLevelSpendingLimit', '26', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit'))?.'output' || transformExecutor('setLineLevelSpendingLimit', '26', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit'))?.'output' == null ? null : Double.valueOf(transformExecutor('setLineLevelSpendingLimit', '26', account_upgradeSubscribers_subscriber_index, parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == 0 ? Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit') : !parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' || parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit' == null ? null : Double.valueOf(parser?.'account'?.'creditInfo'?.'creditInformation'?.'lineSpendingLimit'))?.'output')) }
                        account_upgradeSubscribers_subscriber?.'selectedDevice'?.'installmentDetails'?.'availableInstallmentPaymentDetails'?.eachWithIndex({ account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo, account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo_index ->
                          'installmentPaymentDetails' () {
                            if ((account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalAmountFinanced' == 0) || (account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalAmountFinanced' && account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalAmountFinanced' != null)) { 'totalAmountFinanced' { mkp.yield(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalAmountFinanced' == 0 ? Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalAmountFinanced') : !account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalAmountFinanced' || account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalAmountFinanced' == null ? null : Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalAmountFinanced')) } }
                            if ((account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'firstInstallmentAmount' == 0) || (account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'firstInstallmentAmount' && account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'firstInstallmentAmount' != null)) { 'firstInstallmentAmount' { mkp.yield(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'firstInstallmentAmount' == 0 ? Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'firstInstallmentAmount') : !account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'firstInstallmentAmount' || account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'firstInstallmentAmount' == null ? null : Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'firstInstallmentAmount')) } }
                            if ((account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'installmentContractTerm' == 0) || (account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'installmentContractTerm' && account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'installmentContractTerm' != null)) { 'installmentContractTerm' { mkp.yield(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'installmentContractTerm' == 0 ? Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'installmentContractTerm') : !account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'installmentContractTerm' || account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'installmentContractTerm' == null ? null : Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'installmentContractTerm')) } }
                            if ((account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'monthlyInstallmentPayment' == 0) || (account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'monthlyInstallmentPayment' && account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'monthlyInstallmentPayment' != null)) { 'monthlyInstallmentPayment' { mkp.yield(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'monthlyInstallmentPayment' == 0 ? Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'monthlyInstallmentPayment') : !account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'monthlyInstallmentPayment' || account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'monthlyInstallmentPayment' == null ? null : Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'monthlyInstallmentPayment')) } }
                            if ((account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'voluntaryDownPaymentAmount' == 0) || (account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'voluntaryDownPaymentAmount' && account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'voluntaryDownPaymentAmount' != null)) { 'agentDownPaymentAmount' { mkp.yield(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'voluntaryDownPaymentAmount' == 0 ? Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'voluntaryDownPaymentAmount') : !account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'voluntaryDownPaymentAmount' || account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'voluntaryDownPaymentAmount' == null ? null : Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'voluntaryDownPaymentAmount')) } }
                            if ((account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'requiredDownPaymentAmount' == 0) || (account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'requiredDownPaymentAmount' && account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'requiredDownPaymentAmount' != null)) { 'vZWRequiredDownPaymentAmount' { mkp.yield(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'requiredDownPaymentAmount' == 0 ? Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'requiredDownPaymentAmount') : !account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'requiredDownPaymentAmount' || account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'requiredDownPaymentAmount' == null ? null : Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'requiredDownPaymentAmount')) } }
                            if ((account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalDownPaymentAmount' == 0) || (account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalDownPaymentAmount' && account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalDownPaymentAmount' != null)) { 'totalDownPaymentAmount' { mkp.yield(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalDownPaymentAmount' == 0 ? Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalDownPaymentAmount') : !account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalDownPaymentAmount' || account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalDownPaymentAmount' == null ? null : Double.valueOf(account_upgradeSubscribers_subscriber_selectedDevice_installmentDetails_availableInstallmentPaymentDetails_deviceInstallmentPaymentInfo?.'totalDownPaymentAmount')) } }
                          }
                        })
                      }
                    }
                    'lteEqpt' () {
                      if (account_upgradeSubscribers_subscriber?.'selectedDevice'?.'iccid' && account_upgradeSubscribers_subscriber?.'selectedDevice'?.'iccid' != null) { 'ICCID' { mkp.yield(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'iccid' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'iccid')) } }
                      if (account_upgradeSubscribers_subscriber?.'selectedDevice'?.'simSKU' && account_upgradeSubscribers_subscriber?.'selectedDevice'?.'simSKU' != null) { 'simSKU' { mkp.yield(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'simSKU' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'selectedDevice'?.'simSKU')) } }
                    }
                  }
                  'isDeviceInfoFinal' { mkp.yield(transformExecutor('setFalse', '27', account_upgradeSubscribers_subscriber_index, )?.'output' == null ? null : Boolean.valueOf(transformExecutor('setFalse', '27', account_upgradeSubscribers_subscriber_index, )?.'output')) }
                  'pricePlanInfo' () {
                    'planList' () {
                      'planInfo' () {
                        if (account_upgradeSubscribers_subscriber?.'selectedPlan'?.'planID' && account_upgradeSubscribers_subscriber?.'selectedPlan'?.'planID' != null) { 'pricePlanId' { mkp.yield(account_upgradeSubscribers_subscriber?.'selectedPlan'?.'planID' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'selectedPlan'?.'planID')) } }
                      }
                    }
                    account_upgradeSubscribers_subscriber?.'selectedPlan'?.'contracts'?.eachWithIndex({ account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract, account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract_index ->
                      'contract' () {
                        'Id' { mkp.yield(transformExecutor('setIdSubmitOrder', '28', account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract_index, account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract?.'term' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract?.'term'))?.'output' == null ? null : String.valueOf(transformExecutor('setIdSubmitOrder', '28', account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract_index, account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract?.'term' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract?.'term'))?.'output')) }
                        'description' { mkp.yield(transformExecutor('setContractDescription', '29', account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract_index, account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract?.'term' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract?.'term'))?.'output' == null ? null : String.valueOf(transformExecutor('setContractDescription', '29', account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract_index, account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract?.'term' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber_selectedPlan_contracts_contract?.'term'))?.'output')) }
                      }
                    })
                    'contractDuration' { mkp.yield(transformExecutor('setContractDuration', '30', account_upgradeSubscribers_subscriber_index, account_upgradeSubscribers_subscriber?.'selectedPlan'?.'contracts'?.'contract'?.'term' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'selectedPlan'?.'contracts'?.'contract'?.'term'))?.'contractDuration' == null ? null : String.valueOf(transformExecutor('setContractDuration', '30', account_upgradeSubscribers_subscriber_index, account_upgradeSubscribers_subscriber?.'selectedPlan'?.'contracts'?.'contract'?.'term' == null ? null : String.valueOf(account_upgradeSubscribers_subscriber?.'selectedPlan'?.'contracts'?.'contract'?.'term'))?.'contractDuration')) }
                  }
                }
              }
            })
          }
        }
      }
    }
  }

  context.out.body = writer.toString()
}

header();
body();
 

Groovy online compiler

Write, Run & Share Groovy code online using OneCompiler's Groovy online compiler for free. It's one of the robust, feature-rich online compilers for Groovy language, running the latest Groovy version 2.6. Getting started with the OneCompiler's Groovy editor is easy and fast. The editor shows sample boilerplate code when you choose language as Groovy and start coding.

Read inputs from stdin

OneCompiler's Groovy online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Groovy program which takes name as input and prints hello message with your name.

def name = System.in.newReader().readLine()
println "Hello " + name

About Groovy

Groovy is an object-oriented programming language based on java. Apache Groovy is a dynamic and agile language which is similar to Python, Ruby, Smalltalk etc.

Key Features

  • It's not a replacement for java but it's an enhancer to Java with extra features like DSL support, dynamic typing, closures etc.
  • Accepts Java code as it extends JDK
  • Greater flexibility
  • Concise and much simpler compared to Java
  • Can be used as both programming language and scripting language.

Syntax help

Data Types

Data typeDescriptionRange
StringTo represent text literalsNA
charTo represent single character literalNA
intTo represent whole numbers-2,147,483,648 to 2,147,483,647
shortTo represent short numbers-32,768 to 32,767
longTo represent long numbers-9,223,372,036,854,775,808 to +9,223,372,036,854,775,807
doubleTo represent 64 bit floating point numbers4.94065645841246544e-324d to 1.79769313486231570e+308d
floatTo represent 32 bit floating point numbers1.40129846432481707e-45 to 3.40282346638528860e+38
byteTo represent byte value-128 to 127
booleanTo represent boolean values either true or falseTrue or False

Variables

You can define variables in two ways

Syntax:

data-type variable-name;

[or]

def variable-name;

Loops

0.upto(n) {println "$it"}

or

n.times{println "$it"}

where n is the number of loops and 0 specifies the starting index

Decision-Making

1. If / Nested-If / If-Else:

When ever you want to perform a set of operations based on a condition or set of conditions, then If / Nested-If / If-Else is used.

if(conditional-expression) {
  // code
} else {
  // code
}

2. Switch:

Switch is an alternative to If-Else-If ladder and to select one among many blocks of code.

switch(conditional-expression) {    
case value1:    
 // code    
 break;  // optional  
case value2:    
 // code    
 break;  // optional  
...    
    
default:     
 //code to be executed when all the above cases are not matched;    
} 

List

List allows you to store ordered collection of data values.

Example:

def mylist = [1,2,3,4,5];
List MethodsDescription
size()To find size of elements
sort()To sort the elements
add()To append new value at the end
contains()Returns true if this List contains requested value.
get()Returns the element of the list at the definite position
pop()To remove the last item from the List
isEmpty()Returns true if List contains no elements
minus()This allows you to exclude few specified elements from the elements of the original
plus()This allows you to add few specified elements to the elements of the original
remove()To remove the element present at the specific position
reverse()To reverse the elements of the original List and creates new list