---
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    funktion.fabric8.io/kind: Connector
  name: braintree
data:
  deployment.yml: |
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      labels:
        funktion.fabric8.io/kind: Subscription
        connector: braintree
    spec:
      replicas: 1
      template:
        metadata:
          labels:
            funktion.fabric8.io/kind: Subscription
            connector: braintree
        spec:
          containers:
          - image: funktion/connector-braintree:${project.version}
            name: connector
  schema.yml: |
    ---
    component:
      kind: component
      scheme: braintree
      syntax: braintree:apiName/methodName
      title: Braintree
      description: The braintree component is used for integrating with the Braintree Payment System.
      label: api,cloud,payment
      deprecated: false
      async: false
      javaType: org.apache.camel.component.braintree.BraintreeComponent
      groupId: org.apache.camel
      artifactId: camel-braintree
      version: 2.18.3
    componentProperties:
      configuration:
        kind: property
        type: object
        javaType: org.apache.camel.component.braintree.BraintreeConfiguration
        deprecated: false
        secret: false
        description: To use the shared configuration
        order: 0
    properties:
      apiName:
        kind: path
        group: common
        required: true
        type: string
        javaType: org.apache.camel.component.braintree.internal.BraintreeApiName
        enum:
        - ADDON
        - ADDRESS
        - CLIENTTOKEN
        - CREDITCARDVERIFICATION
        - CUSTOMER
        - DISCOUNT
        - MERCHANTACCOUNT
        - PAYMENTMETHOD
        - PAYMENTMETHODNONCE
        - PLAN
        - SETTLEMENTBATCHSUMMARY
        - SUBSCRIPTION
        - TRANSACTION
        - WEBHOOKNOTIFICATION
        deprecated: false
        secret: false
        description: What kind of operation to perform
        order: 0
      methodName:
        kind: path
        group: common
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: What sub operation to use for the selected operation
        order: 1
      environment:
        kind: parameter
        group: common
        required: true
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The environment Either SANDBOX or PRODUCTION
        order: 2
      inBody:
        kind: parameter
        group: common
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: Sets the name of a parameter to be passed in the exchange In Body
        order: 3
      merchantId:
        kind: parameter
        group: common
        required: true
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The merchant id provided by Braintree.
        order: 4
      privateKey:
        kind: parameter
        group: common
        required: true
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The private key provided by Braintree.
        order: 5
      publicKey:
        kind: parameter
        group: common
        required: true
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The public key provided by Braintree.
        order: 6
      bridgeErrorHandler:
        kind: parameter
        group: consumer
        label: consumer
        type: boolean
        javaType: boolean
        optionalPrefix: consumer.
        deprecated: false
        secret: false
        defaultValue: false
        description: Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
        order: 7
      exceptionHandler:
        kind: parameter
        group: consumer (advanced)
        label: consumer,advanced
        type: object
        javaType: org.apache.camel.spi.ExceptionHandler
        optionalPrefix: consumer.
        deprecated: false
        secret: false
        description: To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
        order: 8
      exchangePattern:
        kind: parameter
        group: consumer (advanced)
        label: consumer,advanced
        type: string
        javaType: org.apache.camel.ExchangePattern
        enum:
        - InOnly
        - RobustInOnly
        - InOut
        - InOptionalOut
        - OutOnly
        - RobustOutOnly
        - OutIn
        - OutOptionalIn
        deprecated: false
        secret: false
        description: Sets the exchange pattern when the consumer creates an exchange.
        order: 9
      httpReadTimeout:
        kind: parameter
        group: advanced
        label: advanced
        required: false
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: Set read timeout for http calls.
        order: 10
      synchronous:
        kind: parameter
        group: advanced
        label: advanced
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: false
        description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
        order: 11
      httpLogLevel:
        kind: parameter
        group: logging
        label: advanced,logging
        required: false
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: Set logging level for http calls see java.util.logging.Level
        order: 12
      proxyHost:
        kind: parameter
        group: proxy
        label: proxy
        required: false
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The proxy host
        order: 13
      proxyPort:
        kind: parameter
        group: proxy
        label: proxy
        required: false
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: The proxy port
        order: 14
  documentation.adoc: |
    [[Braintree-BraintreeComponent]]
    Braintree Component
    ~~~~~~~~~~~~~~~~~~~

    *Available as of Camel 2.17*

    The Braintree component provides access to
    https://www.braintreepayments.com/[Braintree Payments] trough through
    theirs https://developers.braintreepayments.com/start/hello-server/java[Java
    SDK].

    All client applications need API credential in order to process
    payments. In order to use camel-braintree with your account, you'll need
    to create a new
    https://www.braintreepayments.com/get-started[Sandbox] or https://www.braintreepayments.com/signup[Production]
    account.


    Maven users will need to add the following dependency to their pom.xml
    for this component:


    [source,xml]
    --------------------------------------------
    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-braintree</artifactId>
        <version>${camel-version}</version>
    </dependency>
    --------------------------------------------

     

    [[Braintree-Options]]
    Braintree Options
    ^^^^^^^^^^^^^^^^^




    // component options: START
    The Braintree component supports 1 options which are listed below.



    {% raw %}
    [width="100%",cols="2,1m,7",options="header"]
    |=======================================================================
    | Name | Java Type | Description
    | configuration | BraintreeConfiguration | To use the shared configuration
    |=======================================================================
    {% endraw %}
    // component options: END





    // endpoint options: START
    The Braintree component supports 15 endpoint options which are listed below:

    {% raw %}
    [width="100%",cols="2,1,1m,1m,5",options="header"]
    |=======================================================================
    | Name | Group | Default | Java Type | Description
    | apiName | common |  | BraintreeApiName | *Required* What kind of operation to perform
    | methodName | common |  | String | What sub operation to use for the selected operation
    | environment | common |  | String | *Required* The environment Either SANDBOX or PRODUCTION
    | inBody | common |  | String | Sets the name of a parameter to be passed in the exchange In Body
    | merchantId | common |  | String | *Required* The merchant id provided by Braintree.
    | privateKey | common |  | String | *Required* The private key provided by Braintree.
    | publicKey | common |  | String | *Required* The public key provided by Braintree.
    | bridgeErrorHandler | consumer | false | boolean | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
    | exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
    | exchangePattern | consumer (advanced) |  | ExchangePattern | Sets the exchange pattern when the consumer creates an exchange.
    | httpReadTimeout | advanced |  | Integer | Set read timeout for http calls.
    | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
    | httpLogLevel | logging |  | String | Set logging level for http calls see java.util.logging.Level
    | proxyHost | proxy |  | String | The proxy host
    | proxyPort | proxy |  | Integer | The proxy port
    |=======================================================================
    {% endraw %}
    // endpoint options: END


    [[Braintree-URIformat]]
    URI format
    ^^^^^^^^^^

     

    [source,java]
    ---------------------------------------------
    braintree://endpoint-prefix/endpoint?[options]
    ---------------------------------------------

     

    Endpoint prefix can be one of:

    * addOn
    * address
    * clientToken
    * creditCardverification
    * customer
    * discount
    * merchantAccount
    * paymentmethod
    * paymentmethodNonce
    * plan
    * settlementBatchSummary
    * subscription
    * transaction
    * webhookNotification

     

    [[Braintree-BraintreeComponent.1]]
    BraintreeComponent
    ^^^^^^^^^^^^^^^^^^

    The Braintree Component can be configured with the options below. These
    options can be provided using the component's bean
    property *configuration* of
    type *org.apache.camel.component.braintree.BraintreeConfiguration*.

    [cols="<,<,<",options="header",]
    |=======================================================================
    |Option |Type |Description
    |environment |String |value that specifies where requests should be
    directed – sandbox or production

    |merchantId |String |a unique identifier for your gateway account, which
    is different than your merchant account ID

    |publicKey |String |user-specific public identifier

    |privateKey |String |user-specific secure identifier that should not be
    shared – even with us!
    |=======================================================================

    All the options above are provided by Braintree Payments

    [[Braintree-ProducerEndpoints:]]
    Producer Endpoints:
    ^^^^^^^^^^^^^^^^^^^

    Producer endpoints can use endpoint prefixes followed by endpoint names
    and associated options described next. A shorthand alias can be used for
    some endpoints. The endpoint URI MUST contain a prefix.

    Endpoint options that are not mandatory are denoted by []. When there
    are no mandatory options for an endpoint, one of the set of [] options
    MUST be provided. Producer endpoints can also use a special
    option *inBody* that in turn should contain the name of the endpoint
    option whose value will be contained in the Camel Exchange In message.

    Any of the endpoint options can be provided in either the endpoint URI,
    or dynamically in a message header. The message header name must be of
    the format *CamelBraintree.<option>*. Note that the *inBody* option
    overrides message header, i.e. the endpoint option *inBody=option* would
    override a *CamelBraintree.option* header.

    For more information on the endpoints and options see Braintree
    references
    at https://developers.braintreepayments.com/reference/overview[https://developers.braintreepayments.com/reference/overview]

     

    [[Braintree-EndpointprefixaddOn]]
    Endpoint prefix _addOn_
    +++++++++++++++++++++++

    The following endpoints can be invoked with the prefix *addOn* as
    follows:

     

    [source,java]
    --------------------------
    braintree://addOn/endpoint
    --------------------------

    [cols="<,<,<,<",options="header",]
    |====================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |all |  |  |List<com.braintreegateway.Addon>
    |====================================================

    [[Braintree-Endpointprefixaddress]]
    Endpoint prefix _address_
    +++++++++++++++++++++++++

    The following endpoints can be invoked with the prefix *address* as
    follows:

     

    [source,java]
    --------------------------------------
    braintree://address/endpoint?[options]
    --------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |create |  |customerId, request
    |com.braintreegateway.Result<com.braintreegateway.Address>

    |delete |  |customerId, id
    |com.braintreegateway.Result<com.braintreegateway.Address> 

    |find |  |customerId, id |com.braintreegateway.Address

    |update |  |customerId, id, request
    |com.braintreegateway.Result<com.braintreegateway.Address> 
    |=======================================================================

    [[Braintree-URIOptionsforaddress]]
    URI Options for _address_

    [cols="<,<",options="header",]
    |============================================
    |Name |Type
    |customerId |String
    |request |com.braintreegateway.AddressRequest
    |id |String
    |============================================

    [[Braintree-EndpointprefixclientToken]]
    Endpoint prefix _clientToken_
    +++++++++++++++++++++++++++++

    The following endpoints can be invoked with the prefix *clientToken* as
    follows:

     

    [source,java]
    ------------------------------------------
    braintree://clientToken/endpoint?[options]
    ------------------------------------------

    [cols="<,<,<,<",options="header",]
    |====================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |generate |  | request |String
    |====================================================

    [[Braintree-URIOptionsforclientToken]]
    URI Options for _clientToken_

    [cols="<,<",options="header",]
    |================================================
    |Name |Type
    |request |com.braintreegateway.ClientTokenrequest
    |================================================

    [[Braintree-EndpointprefixcreditCardVerification]]
    Endpoint prefix _creditCardVerification_
    ++++++++++++++++++++++++++++++++++++++++

    The following endpoints can be invoked with the
    prefix *creditCardverification* as follows:

     

    [source,java]
    -----------------------------------------------------
    braintree://creditCardVerification/endpoint?[options]
    -----------------------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |find |  | id |com.braintreegateway.CreditCardVerification

    |search |  |query
    |com.braintreegateway.ResourceCollection<com.braintreegateway.CreditCardVerification>
    |=======================================================================

    [[Braintree-URIOptionsforcreditCardVerification]]
    URI Options for _creditCardVerification_

    [cols="<,<",options="header",]
    |===============================================================
    |Name |Type
    |id |String
    |query |com.braintreegateway.CreditCardVerificationSearchRequest
    |===============================================================

    [[Braintree-Endpointprefixcustomer]]
    Endpoint prefix _customer_
    ++++++++++++++++++++++++++

    The following endpoints can be invoked with the prefix *customer* as
    follows:

     

    [source,java]
    ---------------------------------------
    braintree://customer/endpoint?[options]
    ---------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |all |  |  | 

    |create |  |request
    |com.braintreegateway.Result<com.braintreegateway.Customer>

    |delete |  |id
    |com.braintreegateway.Result<com.braintreegateway.Customer>

    |find |  |id |com.braintreegateway.Customer

    |search |  |query
    |com.braintreegateway.ResourceCollection<com.braintreegateway.Customer>

    |update |  |id, request
    |com.braintreegateway.Result<com.braintreegateway.Customer>
    |=======================================================================

    [[Braintree-URIOptionsforcustomer]]
    URI Options for _customer_

    [cols="<,<",options="header",]
    |=================================================
    |Name |Type
    |id |String
    |request |com.braintreegateway.CustomerRequest
    |query |com.braintreegateway.CustomerSearchRequest
    |=================================================

    [[Braintree-Endpointprefixdiscount]]
    Endpoint prefix _discount_
    ++++++++++++++++++++++++++

    The following endpoints can be invoked with the prefix *discount* as
    follows:

     

    [source,java]
    -----------------------------
    braintree://discount/endpoint
    -----------------------------

    [cols="<,<,<,<",options="header",]
    |====================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |all |  |  |List<com.braintreegateway.Discount>
    |====================================================

     +

     +

    [[Braintree-EndpointprefixmerchantAccount]]
    Endpoint prefix _merchantAccount_
    +++++++++++++++++++++++++++++++++

    The following endpoints can be invoked with the
    prefix *merchantAccount* as follows:

     

    [source,java]
    ----------------------------------------------
    braintree://merchantAccount/endpoint?[options]
    ----------------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |create |  |request
    |com.braintreegateway.Result<com.braintreegateway.MerchantAccount>

    |find |  |id |com.braintreegateway.MerchantAccount

    |update |  |id, request
    |com.braintreegateway.Result<com.braintreegateway.MerchantAccount>
    |=======================================================================

    [[Braintree-URIOptionsformerchantAccount]]
    URI Options for _merchantAccount_

    [cols="<,<",options="header",]
    |====================================================
    |Name |Type
    |id |String
    |request |com.braintreegateway.MerchantAccountRequest
    |====================================================

    [[Braintree-EndpointprefixpaymentMethod]]
    Endpoint prefix _paymentMethod_
    +++++++++++++++++++++++++++++++

    The following endpoints can be invoked with the
    prefix *paymentMethod* as follows:

     

    [source,java]
    --------------------------------------------
    braintree://paymentMethod/endpoint?[options]
    --------------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |create |  |request
    |com.braintreegateway.Result<com.braintreegateway.PaymentMethod>

    |delete |  |token
    |com.braintreegateway.Result<com.braintreegateway.PaymentMethod>

    |find |  |token |com.braintreegateway.PaymentMethod

    |update |  |token, request
    |com.braintreegateway.Result<com.braintreegateway.PaymentMethod>
    |=======================================================================

    [[Braintree-URIOptionsforpaymentMethod]]
    URI Options for _paymentMethod_

    [cols="<,<",options="header",]
    |==================================================
    |Name |Type
    |token |String
    |request |com.braintreegateway.PaymentMethodRequest
    |==================================================

    [[Braintree-EndpointprefixpaymentMethodNonce]]
    Endpoint prefix _paymentMethodNonce_
    ++++++++++++++++++++++++++++++++++++

    The following endpoints can be invoked with the
    prefix *paymentMethodNonce* as follows:

     

    [source,java]
    -------------------------------------------------
    braintree://paymentMethodNonce/endpoint?[options]
    -------------------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |create |  |paymentMethodToken
    |com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce>

    |find |  |paymentMethodNonce |com.braintreegateway.PaymentMethodNonce
    |=======================================================================

    [[Braintree-URIOptionsforpaymentMethodNonce]]
    URI Options for _paymentMethodNonce_

    [cols="<,<",options="header",]
    |==========================
    |Name |Type
    |paymentMethodToken |String
    |paymentMethodNonce |String
    |==========================

    [[Braintree-Endpointprefixplan]]
    Endpoint prefix _plan_
    ++++++++++++++++++++++

    The following endpoints can be invoked with the prefix *plan* as
    follows:

     

    [source,java]
    -------------------------
    braintree://plan/endpoint
    -------------------------

    [cols="<,<,<,<",options="header",]
    |====================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |all |  |  |List<com.braintreegateway.Plan>
    |====================================================

     

    [[Braintree-EndpointprefixsettlementBatchSummary]]
    Endpoint prefix _settlementBatchSummary_
    ++++++++++++++++++++++++++++++++++++++++

    The following endpoints can be invoked with the
    prefix *settlementBatchSummary* as follows:

     

    [source,java]
    -----------------------------------------------------
    braintree://settlementBatchSummary/endpoint?[options]
    -----------------------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |generate |  | request
    |com.braintreegateway.Result<com.braintreegateway.SettlementBatchSummary>
    |=======================================================================

    [[Braintree-URIOptionsforsettlementBatchSummary]]
    URI Options for _settlementBatchSummary_

    [cols="<,<",options="header",]
    |==========================
    |Name |Type
    |settlementDate |Calendar
    |groupByCustomField |String
    |==========================

    [[Braintree-Endpointprefixsubscription]]
    Endpoint prefix _subscription_
    ++++++++++++++++++++++++++++++

    The following endpoints can be invoked with the prefix *subscription* as
    follows:

     

    [source,java]
    -------------------------------------------
    braintree://subscription/endpoint?[options]
    -------------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |cancel |  | id
    | com.braintreegateway.Result<com.braintreegateway.Subscription>

    |create |  |request
    |com.braintreegateway.Result<com.braintreegateway.Subscription>

    |delete |  |customerId, id
    |com.braintreegateway.Result<com.braintreegateway.Subscription>

    |find |  |id |com.braintreegateway.Subscription

    |retryCharge |  |subscriptionId, amount
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |search |  |searchRequest
    |com.braintreegateway.ResourceCollection<com.braintreegateway.Subscription>

    |update |  |id, request
    |com.braintreegateway.Result<com.braintreegateway.Subscription>
    |=======================================================================

    [[Braintree-URIOptionsforsubscription]]
    URI Options for _subscription_

    [cols="<,<",options="header",]
    |==============================================================
    |Name |Type
    |id |String
    |request |com.braintreegateway.SubscriptionRequest
    |customerId |String
    |subscriptionId |String
    |amount |BigDecimal
    |searchRequest |com.braintreegateway.SubscriptionSearchRequest.
    |==============================================================

     

    [[Braintree-Endpointprefixtransaction]]
    Endpoint prefix _transaction_
    +++++++++++++++++++++++++++++

    The following endpoints can be invoked with the prefix *transaction* as
    follows:

     

    [source,java]
    ------------------------------------------
    braintree://transaction/endpoint?[options]
    ------------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |cancelRelease |  |id
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |cloneTransaction |  |id, cloneRequest
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |credit |  |request
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |find |  |id |com.braintreegateway.Transaction

    |holdInEscrow |  |id
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |releaseFromEscrow |  |id
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |refund |  |id, amount
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |sale |  |request
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |search |  |query
    |com.braintreegateway.ResourceCollection<com.braintreegateway.Transaction>

    |submitForPartialSettlement |  |id, amount
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |submitForSettlement |  |id, amount, request
    |com.braintreegateway.Result<com.braintreegateway.Transaction>

    |voidTransaction |  |id
    |com.braintreegateway.Result<com.braintreegateway.Transaction>
    |=======================================================================

    [[Braintree-URIOptionsfortransaction]]
    URI Options for _transaction_

    [cols="<,<",options="header",]
    |==========================================================
    |Name |Type
    |id |String
    |request |com.braintreegateway.TransactionCloneRequest
    |cloneRequest |com.braintreegateway.TransactionCloneRequest
    |amount |BigDecimal
    |query |com.braintreegateway.TransactionSearchRequest
    |==========================================================

    [[Braintree-EndpointprefixwebhookNotification]]
    Endpoint prefix _webhookNotification_
    +++++++++++++++++++++++++++++++++++++

    The following endpoints can be invoked with the
    prefix *webhookNotification* as follows:

     

    [source,java]
    --------------------------------------------------
    braintree://webhookNotification/endpoint?[options]
    --------------------------------------------------

    [cols="<,<,<,<",options="header",]
    |=======================================================================
    |Endpoint |Shorthand Alias |Options |Result Body Type
    |parse |  | signature, payload |com.braintreegateway.WebhookNotification
    |verify |  |challenge |String
    |=======================================================================

    [[Braintree-URIOptionsforwebhookNotification]]
    URI Options for _webhookNotification_

    [cols="<,<",options="header",]
    |=================
    |Name |Type
    |signature |String
    |payload |String
    |challenge |String
    |=================

     

    [[Braintree-ConsumerEndpoints]]
    Consumer Endpoints
    ^^^^^^^^^^^^^^^^^^

    Any of the producer endpoints can be used as a consumer endpoint.
    Consumer endpoints can
    use http://camel.apache.org/polling-consumer.html#PollingConsumer-ScheduledPollConsumerOptions[Scheduled
    Poll Consumer Options] with a *consumer.* prefix to schedule endpoint
    invocation. By default Consumer endpoints that return an array or
    collection will generate one exchange per element, and their routes will
    be executed once for each exchange. To change this behavior use the
    property *consumer.splitResults=true* to return a single exchange for
    the entire list or array. 

    [[Braintree-MessageHeaders]]
    Message Headers
    ^^^^^^^^^^^^^^^

    Any URI option can be provided in a message header for producer
    endpoints with a *CamelBraintree.* prefix.

    [[Braintree-Messagebody]]
    Message body
    ^^^^^^^^^^^^

    All result message bodies utilize objects provided by the Braintree Java
    SDK. Producer endpoints can specify the option name for incoming message
    body in the *inBody* endpoint parameter.

     

     

    [[Braintree-Examples]]
    Examples
    ^^^^^^^^

    *Blueprint*

    [source,xml]
    --------------------------------------------------------------------------------------------------------------------------------------------
    <?xml version="1.0"?>
    <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
               xsi:schemaLocation="
                 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
                 http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
                 http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">


        <cm:property-placeholder id="placeholder" persistent-id="camel.braintree">
        </cm:property-placeholder>

        <bean id="braintree" class="org.apache.camel.component.braintree.BraintreeComponent">
            <property name="configuration">
                <bean class="org.apache.camel.component.braintree.BraintreeConfiguration">
                    <property name="environment" value="${environment}"/>
                    <property name="merchantId" value="${merchantId}"/>
                    <property name="publicKey" value="${publicKey}"/>
                    <property name="privateKey" value="${privateKey}"/>
                </bean>
            </property>
        </bean>

        <camelContext trace="true" xmlns="http://camel.apache.org/schema/blueprint" id="braintree-example-context">
            <route id="braintree-example-route">
                <from uri="direct:generateClientToken"/>
                <to uri="braintree://clientToken/generate"/>
                <to uri="stream:out"/>
            </route>
        </camelContext>

    </blueprint>
    --------------------------------------------------------------------------------------------------------------------------------------------

    [[Braintree-SeeAlso]]
    See Also
    ^^^^^^^^

    *
    https://cwiki.apache.org/confluence/display/CAMEL/Configuring+Camel[Configuring
    Camel]
    * https://cwiki.apache.org/confluence/display/CAMEL/Component[Component]
    * https://cwiki.apache.org/confluence/display/CAMEL/Endpoint[Endpoint]
    *
    https://cwiki.apache.org/confluence/display/CAMEL/Getting+Started[Getting
    Started]

     

    https://cwiki.apache.org/confluence/display/CAMEL/AMQP[ ]
