def create_subscription(self, *, customer_id, credit_card_token, plan_code, quantity=None, installments=None,
                            trial_days=None, immediate_payment=None, extra1=None, extra2=None, delivery_address=None,
                            notify_url=None, recurring_bill_items=None):
        """
        Creating a new subscription of a client to a plan.

        Args:
            customer_id: Customer that will be associated to the subscription.
            You can find more information in the "Customer" section of this page.

            credit_card_token: Customer's credit card that is selected to make the payment.
            You can find more information in the "Credit card" section of this page.

            plan_code: Plan that will be associated to the subscription.
            You can find more information in the "Plan" section of this page.

            quantity: Total amount of plans that will be acquired with the subscription.
            Numeric.

            installments: Total amount of installments to defer the payment.
            Numeric.

            trial_days: Total amount of trial days of the subscription.
            This variable has preference over the plan's trial days.
            Numeric.

            immediate_payment:

            extra1:

            extra2:

            delivery_address:

            notify_url:

            recurring_bill_items:

        Returns:

        """
        payload = {
            "quantity": quantity,
            "installments": installments,
            "trialDays": trial_days,
            "immediatePayment": immediate_payment,
            "extra1": extra1,
            "extra2": extra2,
            "customer": {
                "id": customer_id,
                "creditCards": [
                    {
                        "token": credit_card_token
                    }
                ]
            },
            "plan": {
                "planCode": plan_code
            },
            "deliveryAddress": delivery_address,
            "notifyUrl": notify_url,
            "recurringBillItems": recurring_bill_items
        }
        return self.client._post(self.url + 'subscriptions', json=payload, headers=self.get_headers())