kind: ConfigMap
apiVersion: v1
metadata:
  name: integration-customer-offer-http
data:
  directs.yaml: |
    - from:
      uri: direct:Initiate
      steps:
        - unmarshal:
            protobuf:
              instance-class: com.redhat.mercury.customeroffer.v10.api.crcustomerofferprocedureservice.CrCustomerOfferProcedureService$InitiateRequest
              content-type-format: json
        - to:
            uri: grpc://{{mercury.binding.service.host}}:{{mercury.binding.service.port}}/com.redhat.mercury.customeroffer.v10.api.crcustomerofferprocedureservice.CRCustomerOfferProcedureService?synchronous=true&method=Initiate
        - marshal:
            protobuf:
              instance-class: com.redhat.mercury.customeroffer.v10.InitiateCustomerOfferProcedureResponseOuterClass$InitiateCustomerOfferProcedureResponse
              content-type-format: json
    - from:
      uri: direct:Update
      steps:
        - set-body:
            simple: "{\"customerofferId\": \"${header.customerofferId}\", \"customerOfferProcedure\": ${body}}"
        - unmarshal:
            protobuf:
              instance-class: com.redhat.mercury.customeroffer.v10.api.crcustomerofferprocedureservice.CrCustomerOfferProcedureService$UpdateRequest
              content-type-format: json
        - to:
            uri: grpc://{{mercury.binding.service.host}}:{{mercury.binding.service.port}}/com.redhat.mercury.customeroffer.v10.api.crcustomerofferprocedureservice.CRCustomerOfferProcedureService?synchronous=true&method=Update
        - marshal:
            protobuf:
              instance-class: com.redhat.mercury.customeroffer.v10.CustomerOfferProcedureOuterClass$CustomerOfferProcedure
              content-type-format: json
