Repository: ctreminiom/go-atlassian
Pull request #243 (2023-08-31 20:09:07)

:boom: Improved the SM.Request.Create() method.
1. Removed the necessity to use two struct when you want to create a new ITSM request.

2. The CreateCustomerRequestPayloadScheme contains multiple methods to inject the customfields based on the field type.

3. Added the possibility to embed form on the CreateCustomerRequestPayloadScheme struct.

4. Added the IsAdfRequest and RaiseOnBehalfOf tags on the CreateCustomerRequestPayloadScheme struct.

5. Changed the RequestConnector.Create method contract removing the CustomerRequestFields struct.

6. Added the new customfield handling implementation with a 100% of coverage.


Patch:
diff --git a/README.md b/README.md
index 7921ac7..52c20be 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
-
-<p align="center"><img src="https://github.com/ctreminiom/go-atlassian/assets/16035390/f73c7a54-ff48-454a-9821-f3d391ccd9d8"></p>
+![Go Atlassian Framework](https://user-images.githubusercontent.com/16035390/131232958-022b0382-e6bc-42db-97b6-82fbd190e19a.png)
 
 [![Releases](https://img.shields.io/github/v/release/ctreminiom/go-atlassian)](https://github.com/ctreminiom/go-atlassian/releases/latest)
 [![Testing](https://github.com/ctreminiom/go-atlassian/actions/workflows/test.yml/badge.svg)](https://github.com/ctreminiom/go-atlassian/actions/workflows/test.yml)
@@ -8,6 +7,7 @@
 [![Go Report Card](https://goreportcard.com/badge/ctreminiom/go-atlassian)](https://goreportcard.com/report/github.com/ctreminiom/go-atlassian)
 [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fctreminiom%2Fgo-atlassian.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fctreminiom%2Fgo-atlassian?ref=badge_shield)
 [![Codacy Badge](https://app.codacy.com/project/badge/Grade/fe5c1b3c9fd64f84989ae51c42803456)](https://app.codacy.com/gh/ctreminiom/go-atlassian/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
+![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/ctreminiom/go-atlassian/v1.4.4)
 ![GitHub](https://img.shields.io/github/license/ctreminiom/go-atlassian)
 [![Mentioned in Awesome Go-Atlassian](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#third-party-apis)
 [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/4861/badge)](https://bestpractices.coreinfrastructure.org/projects/4861)
@@ -15,13 +15,13 @@
 [![Dependency Review](https://github.com/ctreminiom/go-atlassian/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/ctreminiom/go-atlassian/actions/workflows/dependency-review.yml)
 [![Analysis](https://github.com/ctreminiom/go-atlassian/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/ctreminiom/go-atlassian/actions/workflows/codeql-analysis.yml)
 
+
 **go-atlassian** is a Go library that provides a simple and convenient way to interact with various Atlassian products' REST APIs. [Atlassian](https://developer.atlassian.com/cloud/) is a leading provider of software and tools for software development, 
 project management, and collaboration. Some of the products that **go-atlassian** supports include Jira, Confluence, Jira Service Management, and more.
 
 The **go-atlassian** library is designed to simplify the process of building Go applications that interact with Atlassian products. It provides a set of functions and data structures that can be used to easily send HTTP requests to the Atlassian APIs, parse the responses, and work with the data returned.&#x20;
 
--------------------------
-## 🚀Features
+### 🚀Features
 
 - Easy-to-use functions and data structures that abstract away much of the complexity of working with the APIs.
 - Comprehensive support for various Atlassian products' APIs.
@@ -29,8 +29,7 @@ The **go-atlassian** library is designed to simplify the process of building Go
 - Active development and maintenance by the community, with regular updates and bug fixes.
 - Comprehensive [documentation](https://docs.go-atlassian.io/jira-software-cloud/introduction) and examples to help developers get started with using the library.
 
--------------------------
-## 📁 Installation
+### 📁 Installation
 
 If you do not have [Go](https://golang.org/) installed yet, you can find installation instructions
 [here](https://golang.org/doc/install). Please note that the package requires Go version
@@ -42,23 +41,22 @@ To pull the most recent version of **go-atlassian**, use `go get`.
 go get github.com/ctreminiom/go-atlassian
 ```
 
--------------------------
-## 📪 Packages
-Then import the package into your project as you normally would. You can import the following packages:
+### 📪 Packages
+Then import the package into your project as you normally would. You can import the following packages
+
+|Package|import path  |
+|--|--|
+|Jira v2|`github.com/ctreminiom/go-atlassian/jira/v2`|
+|Jira v3|`github.com/ctreminiom/go-atlassian/jira/v3`|
+|Jira Agile|`github.com/ctreminiom/go-atlassian/jira/agile`|
+|Jira ITSM|`github.com/ctreminiom/go-atlassian/jira/sm`|
+|Confluence|`github.com/ctreminiom/go-atlassian/confluence`|
+|Confluence V2|`github.com/ctreminiom/go-atlassian/confluence/v2`|
+|Cloud Admin|`github.com/ctreminiom/go-atlassian/admin`|
 
-| Module                  	 | Path                                               	| URL's                                                                                	|
-|---------------------------|----------------------------------------------------	|--------------------------------------------------------------------------------------	|
-| Jira v2                 	 | `github.com/ctreminiom/go-atlassian/jira/v2`       	| [Getting Started](https://docs.go-atlassian.io/jira-software-cloud/introduction)     	|
-| Jira v3                 	 | `github.com/ctreminiom/go-atlassian/jira/v3`       	| [Getting Started](https://docs.go-atlassian.io/jira-software-cloud/introduction)     	|
-| Jira Software Agile     	 | `github.com/ctreminiom/go-atlassian/jira/agile`    	| [Getting Started](https://docs.go-atlassian.io/jira-agile/introduction)              	|
-| Jira Service Management 	 | `github.com/ctreminiom/go-atlassian/jira/sm`       	| [Getting Started](https://docs.go-atlassian.io/jira-service-management/introduction) 	|
-| Jira Assets             	 | `github.com/ctreminiom/go-atlassian/assets`        	| [Getting Started](https://docs.go-atlassian.io/jira-assets/overview)                 	|
-| Confluence              	 | `github.com/ctreminiom/go-atlassian/confluence`    	| [Getting Started](https://docs.go-atlassian.io/confluence-cloud/introduction)        	|
-| Confluence v2           	 | `github.com/ctreminiom/go-atlassian/confluence/v2` 	| [Getting Started](https://docs.go-atlassian.io/confluence-cloud/v2/introduction)     	|
-| Admin Cloud             	 | `github.com/ctreminiom/go-atlassian/admin`         	| [Getting Started](https://docs.go-atlassian.io/atlassian-admin-cloud/overview)       	|
+Now you're ready to Go 😁.
 
--------------------------
-## 🔨 Usage
+### 🔨 Usage
 
 Before using the **go-atlassian** package, you need to have an Atlassian API key. If you do not have a key yet, you can sign up [here](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
 
@@ -94,12 +92,7 @@ if err != nil {
 instance.Auth.SetBasicAuth("YOUR_CLIENT_MAIL", "YOUR_APP_ACCESS_TOKEN")
 ```
 
-## ☕Cookbooks
-
-For detailed examples and usage of the go-atlassian library, please refer to our Cookbook. This section provides step-by-step guides and code samples for common tasks and scenarios.
-
--------------------------
-## 🌍 Services
+### 🌍 Services
 
 The library uses the services interfaces to provide a modular and flexible way to interact with Atlassian products' REST APIs. It defines a set of services interfaces that define the functionality of each API, and then provides implementations of those interfaces that can be used to interact with the APIs.
 
@@ -135,8 +128,7 @@ type BoardConnector interface {
 
 Each service interface includes a set of methods that correspond to the available endpoints in the corresponding API. For example, the `IssueService` interface includes methods like `Create`, `Update`, and `Get` that correspond to the `POST`, `PUT`, and `GET` endpoints in the Jira Issues API.
 
--------------------------
-## 🎉 Implementation
+### 🎉 Implementation
 
 Behind the scenes, the `Create` method on the `IssueService` interface is implemented by the `issueService.Create` function in the go-atlassian library. This function sends an HTTP request to the relevant endpoint in the Jira Issues API, using the credentials and configuration provided by the client, and then parses the response into a usable format.
 
@@ -158,7 +150,6 @@ for _, transition := range issue.Transitions {
 
 The rest of the service functions work much the same way; they are concise and behave as you would expect. The [documentation](https://docs.go-atlassian.io/) contains several examples on how to use each service function.
 
--------------------------
 ## ✍️ Contributions
 
 If you would like to contribute to this project, please adhere to the following guidelines.
@@ -170,7 +161,7 @@ If you would like to contribute to this project, please adhere to the following
 
 Again, contributions are greatly appreciated!
 
--------------------------
+
 ## 💡 Inspiration
 The project was created with the purpose to provide a unique point to provide an interface for interacting with Atlassian products. 
 
@@ -182,14 +173,12 @@ However, go-atlassian also adds several new features and improvements that are n
 
 Despite these differences, go-atlassian remains heavily inspired by go-jira, and many of the core design principles and patterns used in go-jira can be found in go-atlassian as well.
 
--------------------------
 ## 📝 License
 Copyright © 2023 [Carlos Treminio](https://github.com/ctreminiom).
 This project is [MIT](https://opensource.org/licenses/MIT) licensed.
 
 [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fctreminiom%2Fgo-atlassian.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fctreminiom%2Fgo-atlassian?ref=badge_large)
 
--------------------------
 ## 🤝 Special Thanks
 
 We would like to extend our sincere thanks to the following sponsors for their generous support:
diff --git a/jira/sm/internal/request_impl.go b/jira/sm/internal/request_impl.go
index daad551..0ec2867 100644
--- a/jira/sm/internal/request_impl.go
+++ b/jira/sm/internal/request_impl.go
@@ -64,8 +64,8 @@ type RequestService struct {
 // POST /rest/servicedeskapi/request
 //
 // https://docs.go-atlassian.io/jira-service-management/request#create-customer-request
-func (s *RequestService) Create(ctx context.Context, payload *model.CreateCustomerRequestPayloadScheme, fields *model.CustomerRequestFields) (*model.CustomerRequestScheme, *model.ResponseScheme, error) {
-	return s.internalClient.Create(ctx, payload, fields)
+func (s *RequestService) Create(ctx context.Context, payload *model.CreateCustomerRequestPayloadScheme) (*model.CustomerRequestScheme, *model.ResponseScheme, error) {
+	return s.internalClient.Create(ctx, payload)
 }
 
 // Gets returns all customer requests for the user executing the query.
@@ -131,20 +131,11 @@ type internalServiceRequestImpl struct {
 	version string
 }
 
-func (i *internalServiceRequestImpl) Create(ctx context.Context, payload *model.CreateCustomerRequestPayloadScheme, fields *model.CustomerRequestFields) (*model.CustomerRequestScheme, *model.ResponseScheme, error) {
-
-	if fields == nil || fields.Fields == nil {
-		return nil, nil, model.ErrNoCustomRequestFieldsError
-	}
-
-	payloadWithFields, err := payload.MergeFields(fields)
-	if err != nil {
-		return nil, nil, err
-	}
+func (i *internalServiceRequestImpl) Create(ctx context.Context, payload *model.CreateCustomerRequestPayloadScheme) (*model.CustomerRequestScheme, *model.ResponseScheme, error) {
 
 	endpoint := "rest/servicedeskapi/request"
 
-	req, err := i.c.NewRequest(ctx, http.MethodPost, endpoint, "", payloadWithFields)
+	req, err := i.c.NewRequest(ctx, http.MethodPost, endpoint, "", payload)
 	if err != nil {
 		return nil, nil, err
 	}
diff --git a/pkg/infra/models/errors.go b/pkg/infra/models/errors.go
index f69f1cd..1120c2c 100644
--- a/pkg/infra/models/errors.go
+++ b/pkg/infra/models/errors.go
@@ -158,6 +158,7 @@ var (
 	ErrNoAttachmentIdsError                = errors.New("sm: no attachment id's set")
 	ErrNoLabelsError                       = errors.New("sm: no label names set")
 	ErrNoComponentsError                   = errors.New("sm: no components set")
+	ErrNCoComponentError                   = errors.New("sm: no component set")
 	ErrNoWorkspaceIDError                  = errors.New("assets: no workspace id set")
 	ErrNoAqlQueryError                     = errors.New("assets: no aql query id set")
 	ErrNoIconIDError                       = errors.New("assets: no icon id set")
diff --git a/pkg/infra/models/sm_request_field.go b/pkg/infra/models/sm_request_field.go
index ae62859..d32ec8a 100644
--- a/pkg/infra/models/sm_request_field.go
+++ b/pkg/infra/models/sm_request_field.go
@@ -1,341 +1,198 @@
 package models
 
 import (
-	"encoding/json"
-	"github.com/imdario/mergo"
 	"time"
 )
 
 type CreateCustomerRequestPayloadScheme struct {
-	RequestParticipants []string `json:"requestParticipants,omitempty"`
-	ServiceDeskID       string   `json:"serviceDeskId,omitempty"`
-	RequestTypeID       string   `json:"requestTypeId,omitempty"`
+	Channel             string                                  `json:"channel,omitempty"`
+	Form                *CreateCustomerRequestFormPayloadScheme `json:"form,omitempty"`
+	IsAdfRequest        bool                                    `json:"isAdfRequest,omitempty"`
+	RaiseOnBehalfOf     string                                  `json:"raiseOnBehalfOf,omitempty"`
+	RequestFieldValues  map[string]interface{}                  `json:"requestFieldValues,omitempty"`
+	RequestParticipants []string                                `json:"requestParticipants,omitempty"`
+	RequestTypeID       string                                  `json:"requestTypeId,omitempty"`
+	ServiceDeskID       string                                  `json:"serviceDeskId,omitempty"`
 }
 
-func (c *CreateCustomerRequestPayloadScheme) MergeFields(fields *CustomerRequestFields) (map[string]interface{}, error) {
-
-	if fields == nil || len(fields.Fields) == 0 {
-		return nil, ErrNoCustomFieldError
-	}
-
-	//Convert the IssueScheme struct to map[string]interface{}
-	issueSchemeAsBytes, err := json.Marshal(c)
-	if err != nil {
-		return nil, err
-	}
-
-	issueSchemeAsMap := make(map[string]interface{})
-	if err := json.Unmarshal(issueSchemeAsBytes, &issueSchemeAsMap); err != nil {
-		return nil, err
-	}
-
-	// Create the requestFieldValues object with the custom fields
-	fieldsAsMap := make(map[string]interface{})
-	for key, value := range fields.Fields {
-		fieldsAsMap[key] = value
-	}
-
-	requestFieldValues := map[string]interface{}{"requestFieldValues": fieldsAsMap}
-
-	// Merge the requestFieldValues map struct with the service desk request struct information
-	if err := mergo.Merge(&issueSchemeAsMap, requestFieldValues, mergo.WithOverride); err != nil {
-		return nil, err
-	}
-
-	return issueSchemeAsMap, nil
+type CreateCustomerRequestFormPayloadScheme struct {
+	Answers interface{} `json:"answers,omitempty"`
 }
 
-type CustomerRequestFields struct{ Fields map[string]interface{} }
+func (c *CreateCustomerRequestPayloadScheme) AddCustomField(key string, value interface{}) error {
 
-func (c *CustomerRequestFields) Attachments(attachments []string) error {
-
-	if len(attachments) == 0 {
-		return ErrNoAttachmentIdsError
+	if c.RequestFieldValues == nil {
+		c.RequestFieldValues = make(map[string]interface{})
 	}
 
-	c.Fields["attachments"] = attachments
+	c.RequestFieldValues[key] = value
 	return nil
 }
 
-func (c *CustomerRequestFields) Labels(labels []string) error {
-
-	if len(labels) == 0 {
-		return ErrNoLabelsError
-	}
+func (c *CreateCustomerRequestPayloadScheme) DateTimeCustomField(id string, value time.Time) error {
 
-	c.Fields["labels"] = labels
-	return nil
-}
-
-func (c *CustomerRequestFields) Components(components []string) error {
-
-	if len(components) == 0 {
-		return ErrNoComponentsError
+	if id == "" {
+		return ErrNoCustomFieldIDError
 	}
 
-	var componentNode []map[string]interface{}
-	for _, component := range components {
-
-		var groupNode = map[string]interface{}{}
-		groupNode["name"] = component
-
-		componentNode = append(componentNode, groupNode)
+	if value.IsZero() {
+		return ErrNoDateTimeTypeError
 	}
 
-	c.Fields["components"] = componentNode
-	return nil
+	return c.AddCustomField(id, value.Format(time.RFC3339))
 }
 
-func (c *CustomerRequestFields) Groups(customFieldID string, groups []string) error {
+func (c *CreateCustomerRequestPayloadScheme) DateCustomField(id string, value time.Time) error {
 
-	if len(customFieldID) == 0 {
+	if id == "" {
 		return ErrNoCustomFieldIDError
 	}
 
-	if len(groups) == 0 {
-		return ErrNoGroupsNameError
-	}
-
-	var groupsNode []map[string]interface{}
-	for _, group := range groups {
-
-		var groupNode = map[string]interface{}{}
-		groupNode["name"] = group
-
-		groupsNode = append(groupsNode, groupNode)
+	if value.IsZero() {
+		return ErrNoDateTimeTypeError
 	}
 
-	var fieldNode = map[string]interface{}{}
-	fieldNode[customFieldID] = groupsNode
-
-	c.Fields["components"] = fieldNode
-	return nil
+	return c.AddCustomField(id, value.Format("2006-01-02"))
 }
 
-func (c *CustomerRequestFields) Group(customFieldID, group string) error {
+func (c *CreateCustomerRequestPayloadScheme) MultiSelectOrCheckBoxCustomField(id string, values []string) error {
 
-	if len(customFieldID) == 0 {
+	if id == "" {
 		return ErrNoCustomFieldIDError
 	}
 
-	if len(group) == 0 {
-		return ErrNoGroupNameError
-	}
-
-	var groupNode = map[string]interface{}{}
-	groupNode["name"] = group
-
-	c.Fields[customFieldID] = groupNode
-	return nil
-}
-
-func (c *CustomerRequestFields) URL(customFieldID, URL string) error {
-
-	if len(customFieldID) == 0 {
-		return ErrNoCustomFieldIDError
+	if len(values) == 0 {
+		return ErrNoMultiSelectTypeError
 	}
 
-	if len(URL) == 0 {
-		return ErrNoUrlTypeError
+	var options []map[string]interface{}
+	for _, option := range values {
+		optionNode := make(map[string]interface{})
+		optionNode["value"] = option
+		options = append(options, optionNode)
 	}
 
-	c.Fields[customFieldID] = URL
-	return nil
+	return c.AddCustomField(id, options)
 }
 
-func (c *CustomerRequestFields) Text(customFieldID, textValue string) error {
+func (c *CreateCustomerRequestPayloadScheme) UserCustomField(id, accountID string) error {
 
-	if len(customFieldID) == 0 {
+	if id == "" {
 		return ErrNoCustomFieldIDError
 	}
 
-	if len(textValue) == 0 {
-		return ErrNoTextTypeError
+	if accountID == "" {
+		return ErrNoUserTypeError
 	}
 
-	c.Fields[customFieldID] = textValue
-	return nil
+	return c.AddCustomField(id, map[string]interface{}{"accountId": accountID})
 }
 
-func (c *CustomerRequestFields) DateTime(customFieldID string, dateValue time.Time) error {
+func (c *CreateCustomerRequestPayloadScheme) UsersCustomField(id string, accountIDs []string) error {
 
-	if len(customFieldID) == 0 {
+	if id == "" {
 		return ErrNoCustomFieldIDError
 	}
 
-	if dateValue.IsZero() {
-		return ErrNoDateTimeTypeError
+	if len(accountIDs) == 0 {
+		return ErrNoMultiUserTypeError
 	}
 
-	c.Fields[customFieldID] = dateValue.Format(time.RFC3339)
-	return nil
-}
+	var accounts []map[string]interface{}
+	for _, accountID := range accountIDs {
 
-func (c *CustomerRequestFields) Date(customFieldID string, dateTimeValue time.Time) error {
+		if accountID == "" {
+			return ErrNoUserTypeError
+		}
 
-	if len(customFieldID) == 0 {
-		return ErrNoCustomFieldIDError
+		accounts = append(accounts, map[string]interface{}{"accountId": accountID})
 	}
 
-	if dateTimeValue.IsZero() {
-		return ErrNoDateTypeError
-	}
-
-	c.Fields[customFieldID] = dateTimeValue.Format("2006-01-02")
-	return nil
+	return c.AddCustomField(id, accounts)
 }
 
-func (c *CustomerRequestFields) MultiSelect(customFieldID string, options []string) error {
+func (c *CreateCustomerRequestPayloadScheme) CascadingCustomField(id, parent, child string) error {
 
-	if len(customFieldID) == 0 {
+	if id == "" {
 		return ErrNoCustomFieldIDError
 	}
 
-	if len(options) == 0 {
-		return ErrNoMultiSelectTypeError
+	if parent == "" {
+		return ErrNoCascadingParentError
 	}
 
-	var multiSelectOptions []map[string]interface{}
-	for _, group := range options {
-
-		var groupNode = map[string]interface{}{}
-		groupNode["value"] = group
-
-		multiSelectOptions = append(multiSelectOptions, groupNode)
+	if child == "" {
+		return ErrNoCascadingChildError
 	}
 
-	c.Fields[customFieldID] = multiSelectOptions
-	return nil
+	childNode := map[string]interface{}{"value": child}
+	return c.AddCustomField(id, map[string]interface{}{"value": parent, "child": childNode})
 }
 
-func (c *CustomerRequestFields) Select(customFieldID string, option string) error {
+func (c *CreateCustomerRequestPayloadScheme) GroupsCustomField(id string, names []string) error {
 
-	if len(customFieldID) == 0 {
+	if id == "" {
 		return ErrNoCustomFieldIDError
 	}
 
-	if len(option) == 0 {
-		return ErrNoSelectTypeError
+	if len(names) == 0 {
+		return ErrNoGroupsNameError
 	}
 
-	var selectNode = map[string]interface{}{}
-	selectNode["value"] = option
+	var groups []map[string]interface{}
+	for _, name := range names {
 
-	c.Fields[customFieldID] = selectNode
-	return nil
-}
+		if name == "" {
+			return ErrNoGroupNameError
+		}
 
-func (c *CustomerRequestFields) RadioButton(customFieldID, button string) error {
-
-	if len(customFieldID) == 0 {
-		return ErrNoCustomFieldIDError
+		groups = append(groups, map[string]interface{}{"name": name})
 	}
 
-	if len(button) == 0 {
-		return ErrNoButtonTypeError
-	}
-
-	var selectNode = map[string]interface{}{}
-	selectNode["value"] = button
-
-	c.Fields[customFieldID] = selectNode
-	return nil
+	return c.AddCustomField(id, groups)
 }
 
-func (c *CustomerRequestFields) User(customFieldID string, accountID string) error {
+func (c *CreateCustomerRequestPayloadScheme) GroupCustomField(id, name string) error {
 
-	if len(customFieldID) == 0 {
+	if id == "" {
 		return ErrNoCustomFieldIDError
 	}
 
-	if len(accountID) == 0 {
-		return ErrNoUserTypeError
+	if name == "" {
+		return ErrNoGroupNameError
 	}
 
-	var userNode = map[string]interface{}{}
-	userNode["accountId"] = accountID
-
-	c.Fields[customFieldID] = userNode
-	return nil
+	return c.AddCustomField(id, map[string]interface{}{"name": name})
 }
 
-func (c *CustomerRequestFields) Users(customFieldID string, accountIDs []string) error {
+func (c *CreateCustomerRequestPayloadScheme) RadioButtonOrSelectCustomField(id string, option string) error {
 
-	if len(customFieldID) == 0 {
+	if id == "" {
 		return ErrNoCustomFieldIDError
 	}
 
-	if len(accountIDs) == 0 {
-		return ErrNoMultiUserTypeError
-	}
-
-	var accountsNode []map[string]interface{}
-	for _, accountID := range accountIDs {
-
-		var groupNode = map[string]interface{}{}
-		groupNode["accountId"] = accountID
-
-		accountsNode = append(accountsNode, groupNode)
-	}
-
-	c.Fields[customFieldID] = accountsNode
-	return nil
-}
-
-func (c *CustomerRequestFields) Number(customFieldID string, numberValue float64) error {
-
-	if len(customFieldID) == 0 {
-		return ErrNoCustomFieldIDError
+	if option == "" {
+		return ErrNoSelectTypeError
 	}
 
-	c.Fields[customFieldID] = numberValue
-	return nil
+	return c.AddCustomField(id, map[string]interface{}{"value": option})
 }
 
-func (c *CustomerRequestFields) CheckBox(customFieldID string, options []string) error {
+func (c *CreateCustomerRequestPayloadScheme) Components(components []string) error {
 
-	if len(customFieldID) == 0 {
-		return ErrNoCustomFieldIDError
-	}
-
-	if len(options) == 0 {
-		return ErrNoCheckBoxTypeError
-	}
-
-	var groupsNode []map[string]interface{}
-	for _, group := range options {
-
-		var groupNode = map[string]interface{}{}
-		groupNode["value"] = group
-
-		groupsNode = append(groupsNode, groupNode)
+	if len(components) == 0 {
+		return ErrNoComponentsError
 	}
 
-	c.Fields[customFieldID] = groupsNode
-	return nil
-}
-
-func (c *CustomerRequestFields) Cascading(customFieldID, parent, child string) error {
-
-	if len(customFieldID) == 0 {
-		return ErrNoCustomFieldIDError
-	}
+	var values []map[string]interface{}
+	for _, component := range components {
 
-	if len(parent) == 0 {
-		return ErrNoCascadingParentError
-	}
+		if component == "" {
+			return ErrNCoComponentError
+		}
 
-	if len(child) == 0 {
-		return ErrNoCascadingChildError
+		values = append(values, map[string]interface{}{"name": component})
 	}
 
-	var childNode = map[string]interface{}{}
-	childNode["value"] = child
-
-	var parentNode = map[string]interface{}{}
-	parentNode["value"] = parent
-	parentNode["child"] = childNode
-
-	c.Fields[customFieldID] = parentNode
-	return nil
+	return c.AddCustomField("components", values)
 }
diff --git a/service/sm/request.go b/service/sm/request.go
index 2e98b13..ffab7ab 100644
--- a/service/sm/request.go
+++ b/service/sm/request.go
@@ -14,7 +14,7 @@ type RequestConnector interface {
 	// POST /rest/servicedeskapi/request
 	//
 	// https://docs.go-atlassian.io/jira-service-management/request#create-customer-request
-	Create(ctx context.Context, payload *model.CreateCustomerRequestPayloadScheme, fields *model.CustomerRequestFields) (*model.CustomerRequestScheme, *model.ResponseScheme, error)
+	Create(ctx context.Context, payload *model.CreateCustomerRequestPayloadScheme) (*model.CustomerRequestScheme, *model.ResponseScheme, error)
 
 	// Gets returns all customer requests for the user executing the query.
 	//


Test patch:
diff --git a/jira/sm/internal/request_impl_test.go b/jira/sm/internal/request_impl_test.go
index cd520d1..7a8bba8 100644
--- a/jira/sm/internal/request_impl_test.go
+++ b/jira/sm/internal/request_impl_test.go
@@ -7,10 +7,8 @@ import (
 	"github.com/ctreminiom/go-atlassian/service"
 	"github.com/ctreminiom/go-atlassian/service/mocks"
 	"github.com/stretchr/testify/assert"
-	"log"
 	"net/http"
 	"testing"
-	"time"
 )
 
 func Test_internalServiceRequestImpl_Gets(t *testing.T) {
@@ -929,49 +927,41 @@ func Test_internalServiceRequestImpl_Transition(t *testing.T) {
 
 func Test_internalServiceRequestImpl_Create(t *testing.T) {
 
-	fieldsMocked := &model.CustomerRequestFields{Fields: make(map[string]interface{})}
+	payloadMocked := &model.CreateCustomerRequestPayloadScheme{
+		RequestParticipants: []string{"uuid-sample-1", "uuid-sample-2"},
+		ServiceDeskID:       "29990",
+		RequestTypeID:       "28881",
+	}
 
-	if err := fieldsMocked.Text("summary", "Request JSD help via REST"); err != nil {
+	// Append the request form fields
+	if err := payloadMocked.AddCustomField("summary", "Request JSD help via REST"); err != nil {
 		t.Fatal(err)
 	}
 
-	if err := fieldsMocked.Text("description", "I need a new *mouse* for my Mac"); err != nil {
+	if err := payloadMocked.AddCustomField("description", "Request JSD help via REST"); err != nil {
 		t.Fatal(err)
 	}
 
-	if err := fieldsMocked.Select("priority", "Major"); err != nil {
+	if err := payloadMocked.RadioButtonOrSelectCustomField("priority", "Major"); err != nil {
 		t.Fatal(err)
 	}
 
-	if err := fieldsMocked.Components([]string{"Jira", "Intranet"}); err != nil {
+	if err := payloadMocked.UsersCustomField("customfield_320239", []string{"account-id-sample", "account-id-sample"}); err != nil {
 		t.Fatal(err)
 	}
 
-	if err := fieldsMocked.Users("customfield_320239", []string{"account-id-sample"}); err != nil {
+	if err := payloadMocked.AddCustomField("labels", []string{"label-00", "label-01"}); err != nil {
 		t.Fatal(err)
 	}
 
-	if err := fieldsMocked.Date("duedate", time.Date(2020, 1, 2, 3, 4, 5, 0, time.UTC)); err != nil {
-		log.Fatal(err)
+	if err := payloadMocked.AddCustomField("labels", []string{"label-00", "label-01"}); err != nil {
+		t.Fatal(err)
 	}
 
-	if err := fieldsMocked.Labels([]string{"label-00", "label-01"}); err != nil {
-		log.Fatal(err)
+	if err := payloadMocked.CascadingCustomField("customfield_10002", "America", "Costa Rica"); err != nil {
+		t.Fatal(err)
 	}
 
-	payloadMocked := map[string]interface{}{
-		"requestFieldValues": map[string]interface{}{
-			"components":         []map[string]interface{}{map[string]interface{}{"name": "Jira"}, map[string]interface{}{"name": "Intranet"}},
-			"customfield_320239": []map[string]interface{}{map[string]interface{}{"accountId": "account-id-sample"}},
-			"description":        "I need a new *mouse* for my Mac",
-			"duedate":            "2020-01-02",
-			"labels":             []string{"label-00", "label-01"},
-			"priority":           map[string]interface{}{"value": "Major"},
-			"summary":            "Request JSD help via REST"},
-		"requestParticipants": []interface{}{"uuid-sample-1", "uuid-sample-2"},
-		"requestTypeId":       "28881",
-		"serviceDeskId":       "29990"}
-
 	type fields struct {
 		c service.Connector
 	}
@@ -979,7 +969,6 @@ func Test_internalServiceRequestImpl_Create(t *testing.T) {
 	type args struct {
 		ctx     context.Context
 		payload *model.CreateCustomerRequestPayloadScheme
-		fields  *model.CustomerRequestFields
 	}
 
 	testCases := []struct {
@@ -993,13 +982,8 @@ func Test_internalServiceRequestImpl_Create(t *testing.T) {
 		{
 			name: "when the parameters are correct",
 			args: args{
-				ctx: context.Background(),
-				payload: &model.CreateCustomerRequestPayloadScheme{
-					RequestParticipants: []string{"uuid-sample-1", "uuid-sample-2"},
-					ServiceDeskID:       "29990",
-					RequestTypeID:       "28881",
-				},
-				fields: fieldsMocked,
+				ctx:     context.Background(),
+				payload: payloadMocked,
 			},
 			on: func(fields *fields) {
 
@@ -1025,13 +1009,8 @@ func Test_internalServiceRequestImpl_Create(t *testing.T) {
 		{
 			name: "when the http call cannot be executed",
 			args: args{
-				ctx: context.Background(),
-				payload: &model.CreateCustomerRequestPayloadScheme{
-					RequestParticipants: []string{"uuid-sample-1", "uuid-sample-2"},
-					ServiceDeskID:       "29990",
-					RequestTypeID:       "28881",
-				},
-				fields: fieldsMocked,
+				ctx:     context.Background(),
+				payload: payloadMocked,
 			},
 			on: func(fields *fields) {
 
@@ -1059,13 +1038,8 @@ func Test_internalServiceRequestImpl_Create(t *testing.T) {
 		{
 			name: "when the request cannot be created",
 			args: args{
-				ctx: context.Background(),
-				payload: &model.CreateCustomerRequestPayloadScheme{
-					RequestParticipants: []string{"uuid-sample-1", "uuid-sample-2"},
-					ServiceDeskID:       "29990",
-					RequestTypeID:       "28881",
-				},
-				fields: fieldsMocked,
+				ctx:     context.Background(),
+				payload: payloadMocked,
 			},
 			on: func(fields *fields) {
 
@@ -1084,16 +1058,6 @@ func Test_internalServiceRequestImpl_Create(t *testing.T) {
 			Err:     errors.New("client: no http request created"),
 			wantErr: true,
 		},
-
-		{
-			name: "when the request type fields are not provided",
-			args: args{
-				ctx:    context.Background(),
-				fields: &model.CustomerRequestFields{},
-			},
-			wantErr: true,
-			Err:     model.ErrNoCustomRequestFieldsError,
-		},
 	}
 
 	for _, testCase := range testCases {
@@ -1106,7 +1070,7 @@ func Test_internalServiceRequestImpl_Create(t *testing.T) {
 			smService, err := NewRequestService(testCase.fields.c, "latest", nil)
 			assert.NoError(t, err)
 
-			gotResult, gotResponse, err := smService.Create(testCase.args.ctx, testCase.args.payload, testCase.args.fields)
+			gotResult, gotResponse, err := smService.Create(testCase.args.ctx, testCase.args.payload)
 
 			if testCase.wantErr {
 
diff --git a/pkg/infra/models/sm_request_field_test.go b/pkg/infra/models/sm_request_field_test.go
index 0d185d6..e2ee222 100644
--- a/pkg/infra/models/sm_request_field_test.go
+++ b/pkg/infra/models/sm_request_field_test.go
@@ -1,1300 +1,932 @@
 package models
 
 import (
-	"fmt"
 	"github.com/stretchr/testify/assert"
-	"log"
 	"testing"
 	"time"
 )
 
-func TestCustomerRequestFields_Attachments(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_DateTimeCustomField(t *testing.T) {
 
 	type fields struct {
-		Fields map[string]interface{}
-	}
-	type args struct {
-		attachments []string
-	}
-	testCases := []struct {
-		name    string
-		fields  fields
-		args    args
-		wantErr bool
-		err     error
-	}{
-		{
-			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				attachments: []string{"uuid-sample"},
-			},
-			wantErr: false,
-		},
-
-		{
-			name:   "when the attachments are not provided",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				attachments: nil,
-			},
-			wantErr: true,
-			err:     ErrNoAttachmentIdsError,
-		},
-	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
-			}
-
-			err := c.Attachments(testCase.args.attachments)
-
-			if testCase.wantErr {
-
-				if err != nil {
-					t.Logf("error returned: %v", err.Error())
-				}
-				assert.EqualError(t, err, testCase.err.Error())
-
-			} else {
-				assert.NoError(t, err)
-			}
-
-		})
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
-}
 
-func TestCustomerRequestFields_Labels(t *testing.T) {
-
-	type fields struct {
-		Fields map[string]interface{}
-	}
 	type args struct {
-		labels []string
-	}
-	testCases := []struct {
-		name    string
-		fields  fields
-		args    args
-		wantErr bool
-		err     error
-	}{
-		{
-			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				labels: []string{"label-sample"},
-			},
-			wantErr: false,
-		},
-
-		{
-			name:   "when the labels are not provided",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				labels: nil,
-			},
-			wantErr: true,
-			err:     ErrNoLabelsError,
-		},
+		id    string
+		value time.Time
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
-			}
-
-			err := c.Labels(testCase.args.labels)
 
-			if testCase.wantErr {
-
-				if err != nil {
-					t.Logf("error returned: %v", err.Error())
-				}
-				assert.EqualError(t, err, testCase.err.Error())
-
-			} else {
-				assert.NoError(t, err)
-			}
-
-		})
-	}
-}
-
-func TestCustomerRequestFields_Components(t *testing.T) {
-
-	type fields struct {
-		Fields map[string]interface{}
-	}
-	type args struct {
-		components []string
-	}
-	testCases := []struct {
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
-		err     error
+		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				components: []string{"component-sample"},
+				id:    "customfield_10021",
+				value: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
 			},
 			wantErr: false,
-		},
-
-		{
-			name:   "when the components are not provided",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				components: nil,
-			},
-			wantErr: true,
-			err:     ErrNoComponentsError,
-		},
-	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
-			}
-
-			err := c.Components(testCase.args.components)
-
-			if testCase.wantErr {
-
-				if err != nil {
-					t.Logf("error returned: %v", err.Error())
-				}
-				assert.EqualError(t, err, testCase.err.Error())
-
-			} else {
-				assert.NoError(t, err)
-			}
-
-		})
-	}
-}
-
-func TestCustomerRequestFields_Groups(t *testing.T) {
-
-	type fields struct {
-		Fields map[string]interface{}
-	}
-	type args struct {
-		customFieldID string
-		groups        []string
-	}
-	testCases := []struct {
-		name    string
-		fields  fields
-		args    args
-		wantErr bool
-		err     error
-	}{
-		{
-			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "customfield_10000",
-				groups:        []string{"group-sample"},
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"customfield_10021": "2019-01-01T00:00:00Z"},
 			},
-			wantErr: false,
 		},
 
 		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the customfield id is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "",
-				groups:        []string{"group-sample"},
+				id:    "",
+				value: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
 			},
 			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
+			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the groups are not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the date value is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				groups:        nil,
+				id:    "customfield_10021",
+				value: time.Time{},
 			},
 			wantErr: true,
-			err:     ErrNoGroupsNameError,
+			Err:     ErrNoDateTimeTypeError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.Groups(testCase.args.customFieldID, testCase.args.groups)
+			err := c.DateTimeCustomField(tt.args.id, tt.args.value)
 
-			if testCase.wantErr {
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
-
 		})
 	}
 }
 
-func TestCustomerRequestFields_Group(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_DateCustomField(t *testing.T) {
 
 	type fields struct {
-		Fields map[string]interface{}
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
+
 	type args struct {
-		customFieldID string
-		group         string
+		id    string
+		value time.Time
 	}
-	testCases := []struct {
+
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
-		err     error
+		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				group:         "group-sample",
+				id:    "customfield_10021",
+				value: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
 			},
 			wantErr: false,
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"customfield_10021": "2019-01-01"},
+			},
 		},
 
 		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the customfield id is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "",
-				group:         "group-sample",
+				id:    "",
+				value: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
 			},
 			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
+			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the group is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the date value is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				group:         "",
+				id:    "customfield_10021",
+				value: time.Time{},
 			},
 			wantErr: true,
-			err:     ErrNoGroupNameError,
+			Err:     ErrNoDateTimeTypeError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.Group(testCase.args.customFieldID, testCase.args.group)
+			err := c.DateCustomField(tt.args.id, tt.args.value)
 
-			if testCase.wantErr {
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
-
 		})
 	}
 }
 
-func TestCustomerRequestFields_URL(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_MultiSelectOrCheckBoxCustomField(t *testing.T) {
 
 	type fields struct {
-		Fields map[string]interface{}
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
+
 	type args struct {
-		customFieldID string
-		url           string
+		id      string
+		options []string
 	}
-	testCases := []struct {
+
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
-		err     error
+		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				url:           "url-sample",
+				id:      "customfield_10021",
+				options: []string{"option 01", "option 02"},
 			},
 			wantErr: false,
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"customfield_10021": []map[string]interface{}{map[string]interface{}{"value": "option 01"}, map[string]interface{}{"value": "option 02"}}},
+			},
 		},
 
 		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the customfield id is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "",
-				url:           "url-sample",
+				id: "",
 			},
 			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
+			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the url is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the option name is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				url:           "",
+				id: "customfield_10021",
 			},
 			wantErr: true,
-			err:     ErrNoUrlTypeError,
+			Err:     ErrNoMultiSelectTypeError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.URL(testCase.args.customFieldID, testCase.args.url)
+			err := c.MultiSelectOrCheckBoxCustomField(tt.args.id, tt.args.options)
 
-			if testCase.wantErr {
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
-
 		})
 	}
 }
 
-func TestCustomerRequestFields_Text(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_UserCustomField(t *testing.T) {
 
 	type fields struct {
-		Fields map[string]interface{}
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
+
 	type args struct {
-		customFieldID string
-		textValue     string
+		id        string
+		accountID string
 	}
-	testCases := []struct {
+
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
-		err     error
+		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				textValue:     "text-sample",
+				id:        "customfield_10021",
+				accountID: "uuid-sample",
 			},
 			wantErr: false,
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"customfield_10021": map[string]interface{}{"accountId": "uuid-sample"}},
+			},
 		},
 
 		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the customfield id is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "",
-				textValue:     "url-sample",
+				id: "",
 			},
 			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
+			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the text is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the date value is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				textValue:     "",
+				id: "customfield_10021",
 			},
 			wantErr: true,
-			err:     ErrNoTextTypeError,
+			Err:     ErrNoUserTypeError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.Text(testCase.args.customFieldID, testCase.args.textValue)
+			err := c.UserCustomField(tt.args.id, tt.args.accountID)
 
-			if testCase.wantErr {
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
-
 		})
 	}
 }
 
-func TestCustomerRequestFields_DateTime(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_UsersCustomField(t *testing.T) {
 
 	type fields struct {
-		Fields map[string]interface{}
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
+
 	type args struct {
-		customFieldID string
-		dateValue     time.Time
+		id      string
+		options []string
 	}
-	testCases := []struct {
+
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
-		err     error
+		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				dateValue:     time.Now().AddDate(0, -1, 0),
+				id:      "customfield_10021",
+				options: []string{"uuid-sample", "uuid-sample-1"},
 			},
 			wantErr: false,
-		},
-
-		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "",
-				dateValue:     time.Now().AddDate(0, -1, 0),
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"customfield_10021": []map[string]interface{}{map[string]interface{}{"accountId": "uuid-sample"}, map[string]interface{}{"accountId": "uuid-sample-1"}}},
 			},
-			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the date-time is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the customfield id is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
+				id: "",
 			},
 			wantErr: true,
-			err:     ErrNoDateTimeTypeError,
-		},
-	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
-			}
-
-			err := c.DateTime(testCase.args.customFieldID, testCase.args.dateValue)
-
-			if testCase.wantErr {
-
-				if err != nil {
-					t.Logf("error returned: %v", err.Error())
-				}
-				assert.EqualError(t, err, testCase.err.Error())
-
-			} else {
-				assert.NoError(t, err)
-			}
-
-		})
-	}
-}
-
-func TestCustomerRequestFields_Date(t *testing.T) {
-
-	type fields struct {
-		Fields map[string]interface{}
-	}
-	type args struct {
-		customFieldID string
-		dateValue     time.Time
-	}
-	testCases := []struct {
-		name    string
-		fields  fields
-		args    args
-		wantErr bool
-		err     error
-	}{
-		{
-			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "customfield_10000",
-				dateValue:     time.Now().AddDate(0, -1, 0),
-			},
-			wantErr: false,
+			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the date value is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "",
-				dateValue:     time.Now().AddDate(0, -1, 0),
+				id: "customfield_10021",
 			},
 			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
+			Err:     ErrNoMultiUserTypeError,
 		},
 
 		{
-			name:   "when the date-time is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the users slice contains an empty value",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
+				id:      "customfield_10021",
+				options: []string{"uuid-sample", ""},
 			},
 			wantErr: true,
-			err:     ErrNoDateTypeError,
+			Err:     ErrNoUserTypeError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.Date(testCase.args.customFieldID, testCase.args.dateValue)
+			err := c.UsersCustomField(tt.args.id, tt.args.options)
 
-			if testCase.wantErr {
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
-
 		})
 	}
 }
 
-func TestCustomerRequestFields_MultiSelect(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_CascadingCustomField(t *testing.T) {
 
 	type fields struct {
-		Fields map[string]interface{}
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
+
 	type args struct {
-		customFieldID string
-		options       []string
+		id, parent, child string
 	}
-	testCases := []struct {
+
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
-		err     error
+		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				options:       []string{"option-1"},
+				id:     "customfield_10021",
+				parent: "America",
+				child:  "Costa Rica",
 			},
 			wantErr: false,
-		},
-
-		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "",
-				options:       []string{"option-1"},
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"customfield_10021": map[string]interface{}{"child": map[string]interface{}{"value": "Costa Rica"}, "value": "America"}},
 			},
-			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the groups are not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the customfield id is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				options:       nil,
+				id: "",
 			},
 			wantErr: true,
-			err:     ErrNoMultiSelectTypeError,
-		},
-	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
-			}
-
-			err := c.MultiSelect(testCase.args.customFieldID, testCase.args.options)
-
-			if testCase.wantErr {
-
-				if err != nil {
-					t.Logf("error returned: %v", err.Error())
-				}
-				assert.EqualError(t, err, testCase.err.Error())
-
-			} else {
-				assert.NoError(t, err)
-			}
-
-		})
-	}
-}
-
-func TestCustomerRequestFields_Select(t *testing.T) {
-
-	type fields struct {
-		Fields map[string]interface{}
-	}
-	type args struct {
-		customFieldID string
-		option        string
-	}
-	testCases := []struct {
-		name    string
-		fields  fields
-		args    args
-		wantErr bool
-		err     error
-	}{
-		{
-			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "customfield_10000",
-				option:        "option-sample",
-			},
-			wantErr: false,
+			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the parent value is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "",
-				option:        "option-sample",
+				id: "customfield_10021",
 			},
 			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
+			Err:     ErrNoCascadingParentError,
 		},
 
 		{
-			name:   "when the group is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the child value is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				option:        "",
+				id:     "customfield_10021",
+				parent: "America",
 			},
 			wantErr: true,
-			err:     ErrNoSelectTypeError,
+			Err:     ErrNoCascadingChildError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.Select(testCase.args.customFieldID, testCase.args.option)
+			err := c.CascadingCustomField(tt.args.id, tt.args.parent, tt.args.child)
 
-			if testCase.wantErr {
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
-
 		})
 	}
 }
 
-func TestCustomerRequestFields_RadioButton(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_GroupsCustomField(t *testing.T) {
 
 	type fields struct {
-		Fields map[string]interface{}
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
+
 	type args struct {
-		customFieldID string
-		option        string
+		id      string
+		options []string
 	}
-	testCases := []struct {
+
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
-		err     error
+		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				option:        "option-sample",
+				id:      "customfield_10021",
+				options: []string{"group-name-01", "group-name-02"},
 			},
 			wantErr: false,
-		},
-
-		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "",
-				option:        "option-sample",
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"customfield_10021": []map[string]interface{}{map[string]interface{}{"name": "group-name-01"}, map[string]interface{}{"name": "group-name-02"}}},
 			},
-			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the group is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the customfield id is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				option:        "",
+				id: "",
 			},
 			wantErr: true,
-			err:     ErrNoButtonTypeError,
-		},
-	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
-			}
-
-			err := c.RadioButton(testCase.args.customFieldID, testCase.args.option)
-
-			if testCase.wantErr {
-
-				if err != nil {
-					t.Logf("error returned: %v", err.Error())
-				}
-				assert.EqualError(t, err, testCase.err.Error())
-
-			} else {
-				assert.NoError(t, err)
-			}
-
-		})
-	}
-}
-
-func TestCustomerRequestFields_User(t *testing.T) {
-
-	type fields struct {
-		Fields map[string]interface{}
-	}
-	type args struct {
-		customFieldID string
-		accountID     string
-	}
-	testCases := []struct {
-		name    string
-		fields  fields
-		args    args
-		wantErr bool
-		err     error
-	}{
-		{
-			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "customfield_10000",
-				accountID:     "account-id-sample-uuid",
-			},
-			wantErr: false,
+			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the groups value is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "",
-				accountID:     "account-id-sample-uuid",
+				id: "customfield_10021",
 			},
 			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
+			Err:     ErrNoGroupsNameError,
 		},
 
 		{
-			name:   "when the group is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the groups slice contains an empty element",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				accountID:     "",
+				id:      "customfield_10021",
+				options: []string{"group-name-01", ""},
 			},
 			wantErr: true,
-			err:     ErrNoUserTypeError,
+			Err:     ErrNoGroupNameError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.User(testCase.args.customFieldID, testCase.args.accountID)
+			err := c.GroupsCustomField(tt.args.id, tt.args.options)
 
-			if testCase.wantErr {
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
-
 		})
 	}
 }
 
-func TestCustomerRequestFields_Users(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_GroupCustomField(t *testing.T) {
 
 	type fields struct {
-		Fields map[string]interface{}
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
+
 	type args struct {
-		customFieldID string
-		accountIDs    []string
+		id   string
+		name string
 	}
-	testCases := []struct {
+
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
-		err     error
+		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				accountIDs:    []string{"account-id-sample-uuid"},
+				id:   "customfield_10021",
+				name: "jira-admins",
 			},
 			wantErr: false,
-		},
-
-		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "",
-				accountIDs:    []string{"account-id-sample-uuid"},
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"customfield_10021": map[string]interface{}{"name": "jira-admins"}},
 			},
-			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the group is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the customfield id is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				accountIDs:    nil,
+				id: "",
 			},
 			wantErr: true,
-			err:     ErrNoMultiUserTypeError,
-		},
-	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
-			}
-
-			err := c.Users(testCase.args.customFieldID, testCase.args.accountIDs)
-
-			if testCase.wantErr {
-
-				if err != nil {
-					t.Logf("error returned: %v", err.Error())
-				}
-				assert.EqualError(t, err, testCase.err.Error())
-
-			} else {
-				assert.NoError(t, err)
-			}
-
-		})
-	}
-}
-
-func TestCustomerRequestFields_Number(t *testing.T) {
-
-	type fields struct {
-		Fields map[string]interface{}
-	}
-	type args struct {
-		customFieldID string
-		numberValue   float64
-	}
-	testCases := []struct {
-		name    string
-		fields  fields
-		args    args
-		wantErr bool
-		err     error
-	}{
-		{
-			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "customfield_10000",
-				numberValue:   10000.232,
-			},
-			wantErr: false,
+			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the group name is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "",
-				numberValue:   10000.232,
+				id: "customfield_10021",
 			},
 			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
+			Err:     ErrNoGroupNameError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.Number(testCase.args.customFieldID, testCase.args.numberValue)
+			err := c.GroupCustomField(tt.args.id, tt.args.name)
 
-			if testCase.wantErr {
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
-
 		})
 	}
 }
 
-func TestCustomerRequestFields_CheckBox(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_RadioButtonOrSelectCustomField(t *testing.T) {
 
 	type fields struct {
-		Fields map[string]interface{}
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
+
 	type args struct {
-		customFieldID string
-		options       []string
+		id     string
+		option string
 	}
-	testCases := []struct {
+
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
-		err     error
+		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				options:       []string{"option-1"},
+				id:     "customfield_10021",
+				option: "Option 01",
 			},
 			wantErr: false,
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"customfield_10021": map[string]interface{}{"value": "Option 01"}},
+			},
 		},
 
 		{
-			name:   "when the customfield is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the customfield id is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "",
-				options:       []string{"option-1"},
+				id: "",
 			},
 			wantErr: true,
-			err:     ErrNoCustomFieldIDError,
+			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the groups are not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the option name is not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10000",
-				options:       nil,
+				id: "customfield_10021",
 			},
 			wantErr: true,
-			err:     ErrNoCheckBoxTypeError,
+			Err:     ErrNoSelectTypeError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.CheckBox(testCase.args.customFieldID, testCase.args.options)
+			err := c.RadioButtonOrSelectCustomField(tt.args.id, tt.args.option)
 
-			if testCase.wantErr {
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
-
 		})
 	}
 }
 
-func TestCustomerRequestFields_Cascading(t *testing.T) {
+func TestCreateCustomerRequestPayloadScheme_Components(t *testing.T) {
+
 	type fields struct {
-		Fields map[string]interface{}
+		Channel             string
+		Form                *CreateCustomerRequestFormPayloadScheme
+		IsAdfRequest        bool
+		RaiseOnBehalfOf     string
+		RequestFieldValues  map[string]interface{}
+		RequestParticipants []string
+		RequestTypeID       string
+		ServiceDeskID       string
 	}
+
 	type args struct {
-		customFieldID string
-		parent        string
-		child         string
+		components []string
 	}
-	testCases := []struct {
+
+	tests := []struct {
 		name    string
 		fields  fields
 		args    args
 		wantErr bool
 		Err     error
+		want    *CreateCustomerRequestPayloadScheme
 	}{
 		{
 			name:   "when the parameters are correct",
-			fields: fields{Fields: make(map[string]interface{})},
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10001",
-				parent:        "America",
-				child:         "US",
+				components: []string{"Jira Cloud", "Confluence Cloud"},
 			},
 			wantErr: false,
-		},
-
-		{
-			name:   "when the custom-field is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
-			args: args{
-				customFieldID: "",
-				parent:        "America",
-				child:         "US",
+			want: &CreateCustomerRequestPayloadScheme{
+				RequestFieldValues: map[string]interface{}{"components": []map[string]interface{}{map[string]interface{}{"name": "Jira Cloud"}, map[string]interface{}{"name": "Confluence Cloud"}}},
 			},
-			wantErr: true,
-			Err:     ErrNoCustomFieldIDError,
 		},
 
 		{
-			name:   "when the parent value is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the components are not provided",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10001",
-				parent:        "",
-				child:         "US",
+				components: nil,
 			},
 			wantErr: true,
-			Err:     ErrNoCascadingParentError,
+			Err:     ErrNoComponentsError,
 		},
 
 		{
-			name:   "when the child value is not provided",
-			fields: fields{Fields: make(map[string]interface{})},
+			name:   "when the one component on the slice is empty",
+			fields: fields{},
 			args: args{
-				customFieldID: "customfield_10001",
-				parent:        "America",
-				child:         "",
+				components: []string{"Jira Cloud", ""},
 			},
 			wantErr: true,
-			Err:     ErrNoCascadingChildError,
+			Err:     ErrNCoComponentError,
 		},
 	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
 
-			c := &CustomerRequestFields{
-				Fields: testCase.fields.Fields,
+			c := &CreateCustomerRequestPayloadScheme{
+				Channel:             tt.fields.Channel,
+				Form:                tt.fields.Form,
+				IsAdfRequest:        tt.fields.IsAdfRequest,
+				RaiseOnBehalfOf:     tt.fields.RaiseOnBehalfOf,
+				RequestFieldValues:  tt.fields.RequestFieldValues,
+				RequestParticipants: tt.fields.RequestParticipants,
+				RequestTypeID:       tt.fields.RequestTypeID,
+				ServiceDeskID:       tt.fields.ServiceDeskID,
 			}
 
-			err := c.Cascading(testCase.args.customFieldID, testCase.args.parent, testCase.args.child)
-			if testCase.wantErr {
+			err := c.Components(tt.args.components)
+
+			if tt.wantErr {
 
 				if err != nil {
 					t.Logf("error returned: %v", err.Error())
 				}
-				assert.EqualError(t, err, testCase.Err.Error())
-
+				assert.EqualError(t, err, tt.Err.Error())
 			} else {
 				assert.NoError(t, err)
+				assert.Equal(t, tt.want, c)
 			}
 		})
 	}
 }
-
-func TestCreateCustomerRequestPayloadScheme_MergeFields(t *testing.T) {
-
-	fieldsMocked := &CustomerRequestFields{Fields: make(map[string]interface{})}
-
-	if err := fieldsMocked.Text("summary", "Request JSD help via REST"); err != nil {
-		t.Fatal(err)
-	}
-
-	if err := fieldsMocked.Text("description", "I need a new *mouse* for my Mac"); err != nil {
-		t.Fatal(err)
-	}
-
-	if err := fieldsMocked.Select("priority", "Major"); err != nil {
-		t.Fatal(err)
-	}
-
-	if err := fieldsMocked.Components([]string{"Jira", "Intranet"}); err != nil {
-		t.Fatal(err)
-	}
-
-	if err := fieldsMocked.Users("customfield_320239", []string{"account-id-sample"}); err != nil {
-		t.Fatal(err)
-	}
-
-	if err := fieldsMocked.Date("duedate", time.Date(2020, 1, 2, 3, 4, 5, 0, time.UTC)); err != nil {
-		log.Fatal(err)
-	}
-
-	if err := fieldsMocked.Labels([]string{"label-00", "label-01"}); err != nil {
-		log.Fatal(err)
-	}
-
-	payloadMocked := map[string]interface{}{
-		"requestFieldValues": map[string]interface{}{
-			"components":         []map[string]interface{}{map[string]interface{}{"name": "Jira"}, map[string]interface{}{"name": "Intranet"}},
-			"customfield_320239": []map[string]interface{}{map[string]interface{}{"accountId": "account-id-sample"}},
-			"description":        "I need a new *mouse* for my Mac",
-			"duedate":            "2020-01-02",
-			"labels":             []string{"label-00", "label-01"},
-			"priority":           map[string]interface{}{"value": "Major"},
-			"summary":            "Request JSD help via REST"},
-		"requestParticipants": []interface{}{"uuid-sample-1", "uuid-sample-2"},
-		"requestTypeId":       "28881",
-		"serviceDeskId":       "29990"}
-
-	type fields struct {
-		RequestParticipants []string
-		ServiceDeskID       string
-		RequestTypeID       string
-	}
-	type args struct {
-		fields *CustomerRequestFields
-	}
-
-	testCases := []struct {
-		name    string
-		fields  fields
-		args    args
-		want    map[string]interface{}
-		wantErr assert.ErrorAssertionFunc
-		Err     error
-	}{
-		{
-			name: "when the parameters are correct",
-			fields: fields{
-				RequestParticipants: []string{"uuid-sample-1", "uuid-sample-2"},
-				ServiceDeskID:       "29990",
-				RequestTypeID:       "28881",
-			},
-			args: args{
-				fields: fieldsMocked,
-			},
-			want:    payloadMocked,
-			wantErr: assert.NoError,
-		},
-
-		{
-			name: "when the field struct is not provided",
-			fields: fields{
-				RequestParticipants: []string{"uuid-sample-1", "uuid-sample-2"},
-				ServiceDeskID:       "29990",
-				RequestTypeID:       "28881",
-			},
-			args: args{
-				fields: nil,
-			},
-			wantErr: assert.Error,
-			Err:     ErrNoCustomFieldError,
-		},
-
-		{
-			name: "when the field struct does not contain values",
-			fields: fields{
-				RequestParticipants: []string{"uuid-sample-1", "uuid-sample-2"},
-				ServiceDeskID:       "29990",
-				RequestTypeID:       "28881",
-			},
-			args: args{
-				fields: &CustomerRequestFields{},
-			},
-			wantErr: assert.Error,
-			Err:     ErrNoCustomFieldError,
-		},
-	}
-	for _, testCase := range testCases {
-		t.Run(testCase.name, func(t *testing.T) {
-
-			c := &CreateCustomerRequestPayloadScheme{
-				RequestParticipants: testCase.fields.RequestParticipants,
-				ServiceDeskID:       testCase.fields.ServiceDeskID,
-				RequestTypeID:       testCase.fields.RequestTypeID,
-			}
-
-			got, err := c.MergeFields(testCase.args.fields)
-
-			if !testCase.wantErr(t, err, fmt.Sprintf("MergeFields(%v)", testCase.args.fields)) {
-
-				assert.NoError(t, err)
-				return
-			}
-			assert.Equalf(t, testCase.want, got, "MergeFields(%v)", testCase.args.fields)
-		})
-	}
-}