title: How to update a customer belonging to a connected account in Stripe?
body: <p>I am building a Rails 5.2 app. In this app I have integrated Stripe Connect.
  I am currently building a feature where my customers can enroll their customers in subscriptions. The front end is Angular 11.</p>
  <p>After the user have entered their payment data I need to attach this payment method to the created customer but I am not able too.</p>
  <p>When I use this code it says that the customer is not found (even though I am using the correct ID). I guess it's because I created the Customer to a connected account.</p>
  <p>The problem is I have no way of setting the stripe_account ID to the code.</p>
  <pre><code>customer = Stripe::Customer.update(
    params[:customer],
    invoice_settings: { 
      default_payment_method: params[:payment_method_id] 
     }
  </code></pre>
  <p>)</p>
  <p>If I try this it says the stripe_account parameter is not valid.</p>
  <pre><code>&quot;(Status 400) (Request req_sByQlJONJi0oHt) Received unknown parameter: stripe_account&quot;
  
  customer = Stripe::Customer.update(
        params[:customer],
        invoice_settings: { 
          default_payment_method: params[:payment_method_id] 
         }, stripe_account: params[:account]
     )
  </code></pre>
  <p>So basically, how can I update a customer belonging to a Connected Account?</p>