Class: Vapi::CompliancePlan

Inherits:
Object
  • Object
show all
Defined in:
lib/vapi_server_sdk/types/compliance_plan.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hipaa_enabled: OMIT, pci_enabled: OMIT, additional_properties: nil) ⇒ Vapi::CompliancePlan

Parameters:

  • hipaa_enabled (Boolean) (defaults to: OMIT)

    When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.

  • pci_enabled (Boolean) (defaults to: OMIT)

    When this is enabled, the user will be restricted to use PCI-compliant providers, and no logs or transcripts are stored. At the end of the call, you will receive an end-of-call-report message to store on your server. Defaults to false.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



34
35
36
37
38
39
40
41
# File 'lib/vapi_server_sdk/types/compliance_plan.rb', line 34

def initialize(hipaa_enabled: OMIT, pci_enabled: OMIT, additional_properties: nil)
  @hipaa_enabled = hipaa_enabled if hipaa_enabled != OMIT
  @pci_enabled = pci_enabled if pci_enabled != OMIT
  @additional_properties = additional_properties
  @_field_set = { "hipaaEnabled": hipaa_enabled, "pciEnabled": pci_enabled }.reject do |_k, v|
    v == OMIT
  end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



18
19
20
# File 'lib/vapi_server_sdk/types/compliance_plan.rb', line 18

def additional_properties
  @additional_properties
end

#hipaa_enabledBoolean (readonly)

Returns When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.

Returns:

  • (Boolean)

    When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.



11
12
13
# File 'lib/vapi_server_sdk/types/compliance_plan.rb', line 11

def hipaa_enabled
  @hipaa_enabled
end

#pci_enabledBoolean (readonly)

Returns When this is enabled, the user will be restricted to use PCI-compliant providers, and no logs or transcripts are stored. At the end of the call, you will receive an end-of-call-report message to store on your server. Defaults to false.

Returns:

  • (Boolean)

    When this is enabled, the user will be restricted to use PCI-compliant providers, and no logs or transcripts are stored. At the end of the call, you will receive an end-of-call-report message to store on your server. Defaults to false.



16
17
18
# File 'lib/vapi_server_sdk/types/compliance_plan.rb', line 16

def pci_enabled
  @pci_enabled
end

Class Method Details

.from_json(json_object:) ⇒ Vapi::CompliancePlan

Deserialize a JSON object to an instance of CompliancePlan

Parameters:

  • json_object (String)

Returns:



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/vapi_server_sdk/types/compliance_plan.rb', line 47

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  hipaa_enabled = parsed_json["hipaaEnabled"]
  pci_enabled = parsed_json["pciEnabled"]
  new(
    hipaa_enabled: hipaa_enabled,
    pci_enabled: pci_enabled,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Leveraged for Union-type generation, validate_raw attempts to parse the given

hash and check each fields type against the current object's property
definitions.

Parameters:

  • obj (Object)

Returns:

  • (Void)


72
73
74
75
# File 'lib/vapi_server_sdk/types/compliance_plan.rb', line 72

def self.validate_raw(obj:)
  obj.hipaa_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.hipaa_enabled is not the expected type, validation failed.")
  obj.pci_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.pci_enabled is not the expected type, validation failed.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of CompliancePlan to a JSON object

Returns:

  • (String)


62
63
64
# File 'lib/vapi_server_sdk/types/compliance_plan.rb', line 62

def to_json(*_args)
  @_field_set&.to_json
end