one_msg_sdk 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AGENTS.md +707 -0
- data/README.md +868 -0
- data/docs/CallingApi.md +27 -31
- data/docs/CallingSettings.md +18 -0
- data/docs/CallingSettingsCalling.md +38 -0
- data/docs/CallingSettingsCallingAudio.md +18 -0
- data/docs/CallingSettingsCallingCallHours.md +22 -0
- data/docs/CallingSettingsCallingSip.md +20 -0
- data/docs/CallingSettingsCallingSipServersInner.md +28 -0
- data/docs/CallingSettingsCallingVideo.md +18 -0
- data/docs/InitiateCallRequest.md +28 -0
- data/docs/InitiateCallRequestSession.md +20 -0
- data/docs/InitiateCallResponse.md +26 -0
- data/docs/InitiateCallResponseCallsInner.md +18 -0
- data/docs/InitiateCallResponseResponse.md +18 -0
- data/docs/UpdateCallingSettings200Response.md +22 -0
- data/docs/UpdateCallingSettings200ResponseResponse.md +18 -0
- data/docs/WebhooksApi.md +1 -1
- data/lib/one_msg_sdk/api/calling_api.rb +37 -29
- data/lib/one_msg_sdk/api/webhooks_api.rb +2 -2
- data/lib/one_msg_sdk/models/calling_settings.rb +148 -0
- data/lib/one_msg_sdk/models/calling_settings_calling.rb +321 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_audio.rb +148 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_call_hours.rb +166 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_sip.rb +193 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_sip_servers_inner.rb +196 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_video.rb +182 -0
- data/lib/one_msg_sdk/models/initiate_call_request.rb +277 -0
- data/lib/one_msg_sdk/models/initiate_call_request_session.rb +217 -0
- data/lib/one_msg_sdk/models/initiate_call_response.rb +188 -0
- data/lib/one_msg_sdk/models/initiate_call_response_calls_inner.rb +147 -0
- data/lib/one_msg_sdk/models/initiate_call_response_response.rb +148 -0
- data/lib/one_msg_sdk/models/update_calling_settings200_response.rb +165 -0
- data/lib/one_msg_sdk/models/update_calling_settings200_response_response.rb +147 -0
- data/lib/one_msg_sdk/version.rb +1 -1
- data/lib/one_msg_sdk.rb +14 -0
- data/one_msg_sdk.gemspec +2 -2
- data/spec/api/calling_api_spec.rb +9 -9
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/models/calling_settings_calling_audio_spec.rb +36 -0
- data/spec/models/calling_settings_calling_call_hours_spec.rb +48 -0
- data/spec/models/calling_settings_calling_sip_servers_inner_spec.rb +66 -0
- data/spec/models/calling_settings_calling_sip_spec.rb +46 -0
- data/spec/models/calling_settings_calling_spec.rb +112 -0
- data/spec/models/calling_settings_calling_video_spec.rb +40 -0
- data/spec/models/calling_settings_spec.rb +36 -0
- data/spec/models/initiate_call_request_session_spec.rb +46 -0
- data/spec/models/initiate_call_request_spec.rb +74 -0
- data/spec/models/initiate_call_response_calls_inner_spec.rb +36 -0
- data/spec/models/initiate_call_response_response_spec.rb +36 -0
- data/spec/models/initiate_call_response_spec.rb +60 -0
- data/spec/models/update_calling_settings200_response_response_spec.rb +36 -0
- data/spec/models/update_calling_settings200_response_spec.rb +48 -0
- metadata +984 -57
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module OneMsgSdk
|
|
17
|
+
class UpdateCallingSettings200ResponseResponse < ApiModelBase
|
|
18
|
+
attr_accessor :error
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'error' => :'error'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'error' => :'String'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OneMsgSdk::UpdateCallingSettings200ResponseResponse` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OneMsgSdk::UpdateCallingSettings200ResponseResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'error')
|
|
67
|
+
self.error = attributes[:'error']
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
72
|
+
# @return Array for valid properties with the reasons
|
|
73
|
+
def list_invalid_properties
|
|
74
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
75
|
+
invalid_properties = Array.new
|
|
76
|
+
invalid_properties
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
def valid?
|
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
+
true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checks equality by comparing each attribute.
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def ==(o)
|
|
89
|
+
return true if self.equal?(o)
|
|
90
|
+
self.class == o.class &&
|
|
91
|
+
error == o.error
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# @see the `==` method
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def eql?(o)
|
|
97
|
+
self == o
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Calculates hash code according to all attributes.
|
|
101
|
+
# @return [Integer] Hash code
|
|
102
|
+
def hash
|
|
103
|
+
[error].hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Builds the object from hash
|
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
+
# @return [Object] Returns the model itself
|
|
109
|
+
def self.build_from_hash(attributes)
|
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
112
|
+
transformed_hash = {}
|
|
113
|
+
openapi_types.each_pair do |key, type|
|
|
114
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
115
|
+
transformed_hash["#{key}"] = nil
|
|
116
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
117
|
+
# check to ensure the input is an array given that the attribute
|
|
118
|
+
# is documented as an array but the input is not
|
|
119
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
120
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
121
|
+
end
|
|
122
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
123
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
new(transformed_hash)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Returns the object in the form of hash
|
|
130
|
+
# @return [Hash] Returns the object in the form of hash
|
|
131
|
+
def to_hash
|
|
132
|
+
hash = {}
|
|
133
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
134
|
+
value = self.send(attr)
|
|
135
|
+
if value.nil?
|
|
136
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
137
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
hash[param] = _to_hash(value)
|
|
141
|
+
end
|
|
142
|
+
hash
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|
data/lib/one_msg_sdk/version.rb
CHANGED
data/lib/one_msg_sdk.rb
CHANGED
|
@@ -20,6 +20,13 @@ require 'one_msg_sdk/configuration'
|
|
|
20
20
|
# Models
|
|
21
21
|
require 'one_msg_sdk/models/add_template_request'
|
|
22
22
|
require 'one_msg_sdk/models/block_user_request'
|
|
23
|
+
require 'one_msg_sdk/models/calling_settings'
|
|
24
|
+
require 'one_msg_sdk/models/calling_settings_calling'
|
|
25
|
+
require 'one_msg_sdk/models/calling_settings_calling_audio'
|
|
26
|
+
require 'one_msg_sdk/models/calling_settings_calling_call_hours'
|
|
27
|
+
require 'one_msg_sdk/models/calling_settings_calling_sip'
|
|
28
|
+
require 'one_msg_sdk/models/calling_settings_calling_sip_servers_inner'
|
|
29
|
+
require 'one_msg_sdk/models/calling_settings_calling_video'
|
|
23
30
|
require 'one_msg_sdk/models/conversational_automation'
|
|
24
31
|
require 'one_msg_sdk/models/conversational_automation_commands_inner'
|
|
25
32
|
require 'one_msg_sdk/models/create_commerce200_response'
|
|
@@ -37,6 +44,11 @@ require 'one_msg_sdk/models/get_commerce200_response_inner'
|
|
|
37
44
|
require 'one_msg_sdk/models/get_mm_lite_status200_response'
|
|
38
45
|
require 'one_msg_sdk/models/get_webhook200_response'
|
|
39
46
|
require 'one_msg_sdk/models/get_whatsapp_business_encryption200_response'
|
|
47
|
+
require 'one_msg_sdk/models/initiate_call_request'
|
|
48
|
+
require 'one_msg_sdk/models/initiate_call_request_session'
|
|
49
|
+
require 'one_msg_sdk/models/initiate_call_response'
|
|
50
|
+
require 'one_msg_sdk/models/initiate_call_response_calls_inner'
|
|
51
|
+
require 'one_msg_sdk/models/initiate_call_response_response'
|
|
40
52
|
require 'one_msg_sdk/models/list_blocked_users200_response'
|
|
41
53
|
require 'one_msg_sdk/models/list_flows200_response'
|
|
42
54
|
require 'one_msg_sdk/models/list_messages200_response'
|
|
@@ -78,6 +90,8 @@ require 'one_msg_sdk/models/send_template_request'
|
|
|
78
90
|
require 'one_msg_sdk/models/send_template_request_language'
|
|
79
91
|
require 'one_msg_sdk/models/set_whatsapp_business_encryption_request'
|
|
80
92
|
require 'one_msg_sdk/models/success_response'
|
|
93
|
+
require 'one_msg_sdk/models/update_calling_settings200_response'
|
|
94
|
+
require 'one_msg_sdk/models/update_calling_settings200_response_response'
|
|
81
95
|
require 'one_msg_sdk/models/update_me_request'
|
|
82
96
|
|
|
83
97
|
# APIs
|
data/one_msg_sdk.gemspec
CHANGED
|
@@ -22,8 +22,8 @@ Gem::Specification.new do |s|
|
|
|
22
22
|
s.authors = ["1MSG"]
|
|
23
23
|
s.email = ["support@1msg.io"]
|
|
24
24
|
s.homepage = "https://github.com/1msg/1msg-sdk"
|
|
25
|
-
s.summary = "Official Ruby SDK for the 1msg WhatsApp Business API"
|
|
26
|
-
s.description =
|
|
25
|
+
s.summary = ""Official Ruby SDK for the 1msg WhatsApp Business API""
|
|
26
|
+
s.description = File.read(File.expand_path('README.md', __dir__), encoding: 'UTF-8')
|
|
27
27
|
s.license = "MIT"
|
|
28
28
|
s.required_ruby_version = ">= 2.7"
|
|
29
29
|
s.metadata = {}
|
|
@@ -34,10 +34,10 @@ describe 'CallingApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for get_calling_settings
|
|
36
36
|
# Get calling settings
|
|
37
|
-
# WhatsApp Calling API settings (beta).
|
|
37
|
+
# Return WhatsApp Calling API settings for this channel (beta). Proxies upstream `GET /calling/settings`. **Prerequisites** - Number must be eligible for Meta Calling (Cloud API; not COEX) - Trial / `subscriptionBlocked` channels receive **403** plain text - You need your own WebRTC or SIP stack; 1msg is a **signaling proxy** only and does **not** store call history or recordings See the **Calling** tag overview for inbound/outbound flows and webhooks.
|
|
38
38
|
# @param token JWT token or API key for authorization
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
|
-
# @return [
|
|
40
|
+
# @return [CallingSettings]
|
|
41
41
|
describe 'get_calling_settings test' do
|
|
42
42
|
it 'should work' do
|
|
43
43
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -45,12 +45,12 @@ describe 'CallingApi' do
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# unit tests for initiate_call
|
|
48
|
-
#
|
|
49
|
-
#
|
|
48
|
+
# Call action (connect / pre_accept / accept / reject / terminate)
|
|
49
|
+
# Perform a WhatsApp Calling action (beta). Proxies upstream `POST /calling/calls`. Despite the historical path name `/initiateCall`, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | `connect` | Outbound business → user | `to` + `session` (`sdp_type: offer`) | | `pre_accept` | Inbound (optional, reduces audio clipping) | `call_id` + `session` (`sdp_type: answer`) | | `accept` | Inbound answer | `call_id` + `session` (`sdp_type: answer`) | | `reject` | Decline inbound | `call_id` | | `terminate` | Hang up | `call_id` | **SDP / media (critical)** - `accept` / `pre_accept` require a **WebRTC-generated SDP answer**. - Do **not** send Meta's offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound `connect` webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (`138000`), no permission (`138006`), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / `subscriptionBlocked` → **403** plain text. Upstream failures often return HTTP 200 with `{ \"response\": { \"error\": \"...\" } }`.
|
|
50
50
|
# @param token JWT token or API key for authorization
|
|
51
|
+
# @param initiate_call_request
|
|
51
52
|
# @param [Hash] opts the optional parameters
|
|
52
|
-
# @
|
|
53
|
-
# @return [Hash<String, Object>]
|
|
53
|
+
# @return [InitiateCallResponse]
|
|
54
54
|
describe 'initiate_call test' do
|
|
55
55
|
it 'should work' do
|
|
56
56
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -59,11 +59,11 @@ describe 'CallingApi' do
|
|
|
59
59
|
|
|
60
60
|
# unit tests for update_calling_settings
|
|
61
61
|
# Update calling settings
|
|
62
|
-
#
|
|
62
|
+
# Enable, disable, or update WhatsApp Calling settings (beta). Proxies upstream `POST /calling/settings`. Body is forwarded as-is (1msg does not validate fields). **Common fields under `calling`** - `status` (`ENABLED` | `DISABLED`) — required to turn calling on/off - `call_icon_visibility` (`DEFAULT` | `DISABLE_ALL`) — optional - `callback_permission_status` (`ENABLED` | `DISABLED`) — optional; when enabled, inbound user calls grant callback permission - `call_hours` — optional hours / timezone object - `sip` — optional SIP trunk; when SIP is ENABLED, Graph call actions and calling webhooks are not used - `srtp_key_exchange_protocol` (`DTLS` | `SDES`) — SDES only with SIP - `video.status` — optional Meta may accept only one feature group per request — prefer focused updates (e.g. enable status first, then SIP). Trial / `subscriptionBlocked` → **403** plain text.
|
|
63
63
|
# @param token JWT token or API key for authorization
|
|
64
|
+
# @param calling_settings
|
|
64
65
|
# @param [Hash] opts the optional parameters
|
|
65
|
-
# @
|
|
66
|
-
# @return [Hash<String, Object>]
|
|
66
|
+
# @return [UpdateCallingSettings200Response]
|
|
67
67
|
describe 'update_calling_settings test' do
|
|
68
68
|
it 'should work' do
|
|
69
69
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -46,7 +46,7 @@ describe 'WebhooksApi' do
|
|
|
46
46
|
|
|
47
47
|
# unit tests for set_webhook
|
|
48
48
|
# Set webhook URL
|
|
49
|
-
# Configure the client webhook URL for inbound events.
|
|
49
|
+
# Configure the client webhook URL for inbound events. WhatsApp **Calling** events (`field=calls`) are forwarded as passthrough payloads with `type: \"calls\"` and `instanceId` (connect / status / terminate). Call permission replies arrive on the normal messages path (`call_permission_reply`). Details: **Calling** tag.
|
|
50
50
|
# @param token JWT token or API key for authorization
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @option opts [GetWebhook200Response] :get_webhook200_response
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for OneMsgSdk::CallingSettingsCallingAudio
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe OneMsgSdk::CallingSettingsCallingAudio do
|
|
21
|
+
#let(:instance) { OneMsgSdk::CallingSettingsCallingAudio.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CallingSettingsCallingAudio' do
|
|
24
|
+
it 'should create an instance of CallingSettingsCallingAudio' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(OneMsgSdk::CallingSettingsCallingAudio)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "status"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for OneMsgSdk::CallingSettingsCallingCallHours
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe OneMsgSdk::CallingSettingsCallingCallHours do
|
|
21
|
+
#let(:instance) { OneMsgSdk::CallingSettingsCallingCallHours.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CallingSettingsCallingCallHours' do
|
|
24
|
+
it 'should create an instance of CallingSettingsCallingCallHours' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(OneMsgSdk::CallingSettingsCallingCallHours)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "status"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "timezone"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "day_of_week_start"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for OneMsgSdk::CallingSettingsCallingSipServersInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe OneMsgSdk::CallingSettingsCallingSipServersInner do
|
|
21
|
+
#let(:instance) { OneMsgSdk::CallingSettingsCallingSipServersInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CallingSettingsCallingSipServersInner' do
|
|
24
|
+
it 'should create an instance of CallingSettingsCallingSipServersInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(OneMsgSdk::CallingSettingsCallingSipServersInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "hostname"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "port"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "request_uri_user_params"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "sip_user_password"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "password"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "app_id"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for OneMsgSdk::CallingSettingsCallingSip
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe OneMsgSdk::CallingSettingsCallingSip do
|
|
21
|
+
#let(:instance) { OneMsgSdk::CallingSettingsCallingSip.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CallingSettingsCallingSip' do
|
|
24
|
+
it 'should create an instance of CallingSettingsCallingSip' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(OneMsgSdk::CallingSettingsCallingSip)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "status"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ENABLED", "DISABLED"])
|
|
34
|
+
# validator.allowable_values.each do |value|
|
|
35
|
+
# expect { instance.status = value }.not_to raise_error
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "servers"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for OneMsgSdk::CallingSettingsCalling
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe OneMsgSdk::CallingSettingsCalling do
|
|
21
|
+
#let(:instance) { OneMsgSdk::CallingSettingsCalling.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CallingSettingsCalling' do
|
|
24
|
+
it 'should create an instance of CallingSettingsCalling' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(OneMsgSdk::CallingSettingsCalling)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "status"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ENABLED", "DISABLED"])
|
|
34
|
+
# validator.allowable_values.each do |value|
|
|
35
|
+
# expect { instance.status = value }.not_to raise_error
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "call_icon_visibility"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DEFAULT", "DISABLE_ALL"])
|
|
44
|
+
# validator.allowable_values.each do |value|
|
|
45
|
+
# expect { instance.call_icon_visibility = value }.not_to raise_error
|
|
46
|
+
# end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
describe 'test attribute "callback_permission_status"' do
|
|
51
|
+
it 'should work' do
|
|
52
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
53
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ENABLED", "DISABLED"])
|
|
54
|
+
# validator.allowable_values.each do |value|
|
|
55
|
+
# expect { instance.callback_permission_status = value }.not_to raise_error
|
|
56
|
+
# end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "srtp_key_exchange_protocol"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DTLS", "SDES"])
|
|
64
|
+
# validator.allowable_values.each do |value|
|
|
65
|
+
# expect { instance.srtp_key_exchange_protocol = value }.not_to raise_error
|
|
66
|
+
# end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
describe 'test attribute "call_hours"' do
|
|
71
|
+
it 'should work' do
|
|
72
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
describe 'test attribute "sip"' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
describe 'test attribute "video"' do
|
|
83
|
+
it 'should work' do
|
|
84
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
describe 'test attribute "audio"' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
describe 'test attribute "restrictions"' do
|
|
95
|
+
it 'should work' do
|
|
96
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
describe 'test attribute "ip_addresses"' do
|
|
101
|
+
it 'should work' do
|
|
102
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
describe 'test attribute "call_icons"' do
|
|
107
|
+
it 'should work' do
|
|
108
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for OneMsgSdk::CallingSettingsCallingVideo
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe OneMsgSdk::CallingSettingsCallingVideo do
|
|
21
|
+
#let(:instance) { OneMsgSdk::CallingSettingsCallingVideo.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CallingSettingsCallingVideo' do
|
|
24
|
+
it 'should create an instance of CallingSettingsCallingVideo' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(OneMsgSdk::CallingSettingsCallingVideo)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "status"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ENABLED", "DISABLED"])
|
|
34
|
+
# validator.allowable_values.each do |value|
|
|
35
|
+
# expect { instance.status = value }.not_to raise_error
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for OneMsgSdk::CallingSettings
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe OneMsgSdk::CallingSettings do
|
|
21
|
+
#let(:instance) { OneMsgSdk::CallingSettings.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CallingSettings' do
|
|
24
|
+
it 'should create an instance of CallingSettings' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(OneMsgSdk::CallingSettings)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "calling"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|