Class: Vapi::CreateOrgDto
- Inherits:
-
Object
- Object
- Vapi::CreateOrgDto
- Defined in:
- lib/vapi_server_sdk/types/create_org_dto.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#billing_limit ⇒ Float
readonly
This is the monthly billing limit for the org.
-
#concurrency_limit ⇒ Float
readonly
This is the concurrency limit for the org.
-
#hipaa_enabled ⇒ Boolean
readonly
When this is enabled, no logs, recordings, or transcriptions will be stored.
-
#name ⇒ String
readonly
This is the name of the org.
-
#server_url ⇒ String
readonly
This is the URL Vapi will communicate with via HTTP GET and POST Requests.
-
#server_url_secret ⇒ String
readonly
This is the secret you can set that Vapi will send with every request to your server.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::CreateOrgDto
Deserialize a JSON object to an instance of CreateOrgDto.
-
.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.
Instance Method Summary collapse
- #initialize(hipaa_enabled: OMIT, name: OMIT, billing_limit: OMIT, server_url: OMIT, server_url_secret: OMIT, concurrency_limit: OMIT, additional_properties: nil) ⇒ Vapi::CreateOrgDto constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of CreateOrgDto to a JSON object.
Constructor Details
#initialize(hipaa_enabled: OMIT, name: OMIT, billing_limit: OMIT, server_url: OMIT, server_url_secret: OMIT, concurrency_limit: OMIT, additional_properties: nil) ⇒ Vapi::CreateOrgDto
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 62 def initialize(hipaa_enabled: OMIT, name: OMIT, billing_limit: OMIT, server_url: OMIT, server_url_secret: OMIT, concurrency_limit: OMIT, additional_properties: nil) @hipaa_enabled = hipaa_enabled if hipaa_enabled != OMIT @name = name if name != OMIT @billing_limit = billing_limit if billing_limit != OMIT @server_url = server_url if server_url != OMIT @server_url_secret = server_url_secret if server_url_secret != OMIT @concurrency_limit = concurrency_limit if concurrency_limit != OMIT @additional_properties = additional_properties @_field_set = { "hipaaEnabled": hipaa_enabled, "name": name, "billingLimit": billing_limit, "serverUrl": server_url, "serverUrlSecret": server_url_secret, "concurrencyLimit": concurrency_limit }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
34 35 36 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 34 def additional_properties @additional_properties end |
#billing_limit ⇒ Float (readonly)
Returns This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at [email protected].
20 21 22 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 20 def billing_limit @billing_limit end |
#concurrency_limit ⇒ Float (readonly)
Returns This is the concurrency limit for the org. This is the maximum number of calls that can be active at any given time. To go beyond 10, please contact us at [email protected].
32 33 34 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 32 def concurrency_limit @concurrency_limit end |
#hipaa_enabled ⇒ Boolean (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. When HIPAA is enabled, only OpenAI/Custom LLM or Azure Providers will be available for LLM and Voice respectively. This is due to the compliance requirements of HIPAA. Other providers may not meet these requirements.
15 16 17 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 15 def hipaa_enabled @hipaa_enabled end |
#name ⇒ String (readonly)
Returns This is the name of the org. This is just for your own reference.
17 18 19 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 17 def name @name end |
#server_url ⇒ String (readonly)
Returns This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports. All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
25 26 27 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 25 def server_url @server_url end |
#server_url_secret ⇒ String (readonly)
Returns This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
28 29 30 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 28 def server_url_secret @server_url_secret end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::CreateOrgDto
Deserialize a JSON object to an instance of CreateOrgDto
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 87 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"] name = parsed_json["name"] billing_limit = parsed_json["billingLimit"] server_url = parsed_json["serverUrl"] server_url_secret = parsed_json["serverUrlSecret"] concurrency_limit = parsed_json["concurrencyLimit"] new( hipaa_enabled: hipaa_enabled, name: name, billing_limit: billing_limit, server_url: server_url, server_url_secret: server_url_secret, concurrency_limit: concurrency_limit, 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.
120 121 122 123 124 125 126 127 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 120 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.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.billing_limit&.is_a?(Float) != false || raise("Passed value for field obj.billing_limit is not the expected type, validation failed.") obj.server_url&.is_a?(String) != false || raise("Passed value for field obj.server_url is not the expected type, validation failed.") obj.server_url_secret&.is_a?(String) != false || raise("Passed value for field obj.server_url_secret is not the expected type, validation failed.") obj.concurrency_limit&.is_a?(Float) != false || raise("Passed value for field obj.concurrency_limit is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of CreateOrgDto to a JSON object
110 111 112 |
# File 'lib/vapi_server_sdk/types/create_org_dto.rb', line 110 def to_json(*_args) @_field_set&.to_json end |