code: def create(
              self,
              order_increment_id,
              creditmemo_data=None,
              comment=None,
              email=False,
              include_comment=False,
              refund_to_store_credit_amount=None):
          
          if comment is None:
              comment = ''
          return self.call(
              'sales_order_creditmemo.create', [
                  order_increment_id, creditmemo_data, comment, email, include_comment, refund_to_store_credit_amount
              ]
          )
docs: Create new credit_memo for order
  
          :param order_increment_id: Order Increment ID
          :type order_increment_id: str
          :param creditmemo_data: Sales order credit memo data (optional)
          :type creditmemo_data: associative array as dict
  
              {
                  'qtys': [
                      {
                          'order_item_id': str,   # Order item ID to be refunded
                          'qty': int              # Items quantity to be refunded
                      },
                      ...
                  ],
                  'shipping_amount': float        # refund shipping amount (optional)
                  'adjustment_positive': float    # adjustment refund amount (optional)
                  'adjustment_negative': float    # adjustment fee amount (optional)
              }
  
          :param comment: Credit memo Comment
          :type comment: str
          :param email: send e-mail flag (optional)
          :type email: bool
          :param include_comment: include comment in e-mail flag (optional)
          :type include_comment: bool
          :param refund_to_store_credit_amount: amount to refund to store credit
          :type refund_to_store_credit_amount: float
  
          :return str, increment id of credit memo created