Update cost centers. It is possible to edit any of its fields

Params

Param name Description
cost_center
required

Validations:

  • Must be a Hash

cost_center[name]
optional

Cost center name.

Validations:

  • Must be a String

cost_center[dimension_name]
optional

Cost center dimension name. Cost centers with similar dimension name are grouped into one drop down in transaction form. Please note, name change entails required_dimension value change of Cost Centers with the same name with the value of the required_dimension of the current Cost Center

Validations:

  • Must be a String

cost_center[assignee_ids]
optional , nil allowed

Ids of users assigned to this cost center. Passing nil here will remove all assignees.

Validations:

  • Must be an array of Integer

cost_center[deactivated]
optional , nil allowed

Whether cost center should be hidden from transaction form. Default: false. Possible values: either 1 or 0.

Validations:

  • Must be a Integer

cost_center[send_to_accounting]
optional , nil allowed

Whether cost center should be sent to accounting. It doesn’t affect the UI. Default: true. Possible values: 1, 0

Validations:

  • Must be a Integer

cost_center[external_id]
optional , nil allowed

Cost Center’s External ID, used in external services.

Validations:

  • Must be a String

cost_center[required_dimension]
optional , nil allowed

Make Dimension of current Cost Center required in Expense forms (Receipt, Per Diem, Daily Allowance, Reward). By setting this value in one Cost Center, all Cost Centers with the same Dimension name will be updated with the same value in required_dimension field. Default: false.

Validations:

  • Must be one of: true, false, 1, 0.

cost_center[netsuite]
optional , nil allowed

NetSuite settings in hash

Validations:

  • Must be a Hash

cost_center[procountor]
optional , nil allowed

Procountor settings in hash

Validations:

  • Must be a Hash

cost_center[approvers_attributes]
optional , nil allowed

Add/Remove cost center approvers

Validations:

  • Must be an Array of nested elements

cost_center[approvers_attributes][id]
optional , nil allowed

Cost center approver id, required if user approver already exists. If it’s not supplied, new cost center approver will be added

Validations:

  • Must be a Integer

cost_center[approvers_attributes][approver_id]
optional

Approver id

Validations:

  • Must be a Integer

cost_center[approvers_attributes][operator]
optional

Operator specifying approver process logic

Validations:

  • Must be one of: then, or.

cost_center[approvers_attributes][_destroy]
optional , nil allowed

Pass “true” here to delete an existing approver

Validations:

  • Must be one of: true, false, 1, 0.