zernio-sdk 0.0.533 → 0.0.535
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/README.md +13 -0
- data/docs/CreateSmsSenderId200Response.md +22 -0
- data/docs/CreateSmsSenderIdRequest.md +18 -0
- data/docs/DeleteSmsSenderId200Response.md +18 -0
- data/docs/ListSmsSenderIds200Response.md +20 -0
- data/docs/ListSmsSenderIds200ResponseBudget.md +24 -0
- data/docs/ListSmsSenderIds200ResponseBudgetPendingRequest.md +22 -0
- data/docs/ListSmsSenderIds200ResponseSenderIdsInner.md +24 -0
- data/docs/RequestSmsSenderIdLimitIncrease200Response.md +20 -0
- data/docs/RequestSmsSenderIdLimitIncreaseRequest.md +20 -0
- data/docs/SMSApi.md +276 -1
- data/docs/SendSmsRequest.md +1 -1
- data/lib/zernio-sdk/api/sms_api.rb +256 -2
- data/lib/zernio-sdk/models/create_sms_sender_id200_response.rb +166 -0
- data/lib/zernio-sdk/models/create_sms_sender_id_request.rb +183 -0
- data/lib/zernio-sdk/models/delete_sms_sender_id200_response.rb +147 -0
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response.rb +158 -0
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget.rb +178 -0
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget_pending_request.rb +167 -0
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response_sender_ids_inner.rb +175 -0
- data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase200_response.rb +156 -0
- data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase_request.rb +210 -0
- data/lib/zernio-sdk/models/send_sms_request.rb +1 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +9 -0
- data/openapi.yaml +164 -8
- data/spec/api/sms_api_spec.rb +47 -1
- data/spec/models/create_sms_sender_id200_response_spec.rb +48 -0
- data/spec/models/create_sms_sender_id_request_spec.rb +36 -0
- data/spec/models/delete_sms_sender_id200_response_spec.rb +36 -0
- data/spec/models/list_sms_sender_ids200_response_budget_pending_request_spec.rb +48 -0
- data/spec/models/list_sms_sender_ids200_response_budget_spec.rb +54 -0
- data/spec/models/list_sms_sender_ids200_response_sender_ids_inner_spec.rb +54 -0
- data/spec/models/list_sms_sender_ids200_response_spec.rb +42 -0
- data/spec/models/request_sms_sender_id_limit_increase200_response_spec.rb +42 -0
- data/spec/models/request_sms_sender_id_limit_increase_request_spec.rb +42 -0
- metadata +37 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class ListSmsSenderIds200ResponseSenderIdsInner < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :sender_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :is_active
|
|
23
|
+
|
|
24
|
+
attr_accessor :created_at
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'id' => :'id',
|
|
30
|
+
:'sender_id' => :'senderId',
|
|
31
|
+
:'is_active' => :'isActive',
|
|
32
|
+
:'created_at' => :'createdAt'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'id' => :'String',
|
|
50
|
+
:'sender_id' => :'String',
|
|
51
|
+
:'is_active' => :'Boolean',
|
|
52
|
+
:'created_at' => :'Time'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
:'created_at'
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListSmsSenderIds200ResponseSenderIdsInner` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListSmsSenderIds200ResponseSenderIdsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'id')
|
|
80
|
+
self.id = attributes[:'id']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'sender_id')
|
|
84
|
+
self.sender_id = attributes[:'sender_id']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'is_active')
|
|
88
|
+
self.is_active = attributes[:'is_active']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'created_at')
|
|
92
|
+
self.created_at = attributes[:'created_at']
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
97
|
+
# @return Array for valid properties with the reasons
|
|
98
|
+
def list_invalid_properties
|
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
|
+
invalid_properties = Array.new
|
|
101
|
+
invalid_properties
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Check to see if the all the properties in the model are valid
|
|
105
|
+
# @return true if the model is valid
|
|
106
|
+
def valid?
|
|
107
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Checks equality by comparing each attribute.
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def ==(o)
|
|
114
|
+
return true if self.equal?(o)
|
|
115
|
+
self.class == o.class &&
|
|
116
|
+
id == o.id &&
|
|
117
|
+
sender_id == o.sender_id &&
|
|
118
|
+
is_active == o.is_active &&
|
|
119
|
+
created_at == o.created_at
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see the `==` method
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def eql?(o)
|
|
125
|
+
self == o
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Calculates hash code according to all attributes.
|
|
129
|
+
# @return [Integer] Hash code
|
|
130
|
+
def hash
|
|
131
|
+
[id, sender_id, is_active, created_at].hash
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Builds the object from hash
|
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
136
|
+
# @return [Object] Returns the model itself
|
|
137
|
+
def self.build_from_hash(attributes)
|
|
138
|
+
return nil unless attributes.is_a?(Hash)
|
|
139
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
140
|
+
transformed_hash = {}
|
|
141
|
+
openapi_types.each_pair do |key, type|
|
|
142
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
143
|
+
transformed_hash["#{key}"] = nil
|
|
144
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
145
|
+
# check to ensure the input is an array given that the attribute
|
|
146
|
+
# is documented as an array but the input is not
|
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
149
|
+
end
|
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
new(transformed_hash)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Returns the object in the form of hash
|
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
|
159
|
+
def to_hash
|
|
160
|
+
hash = {}
|
|
161
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
162
|
+
value = self.send(attr)
|
|
163
|
+
if value.nil?
|
|
164
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
165
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
hash[param] = _to_hash(value)
|
|
169
|
+
end
|
|
170
|
+
hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class RequestSmsSenderIdLimitIncrease200Response < ApiModelBase
|
|
18
|
+
attr_accessor :requested
|
|
19
|
+
|
|
20
|
+
attr_accessor :requested_cap
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'requested' => :'requested',
|
|
26
|
+
:'requested_cap' => :'requestedCap'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'requested' => :'Boolean',
|
|
44
|
+
:'requested_cap' => :'Integer'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::RequestSmsSenderIdLimitIncrease200Response` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::RequestSmsSenderIdLimitIncrease200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'requested')
|
|
71
|
+
self.requested = attributes[:'requested']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'requested_cap')
|
|
75
|
+
self.requested_cap = attributes[:'requested_cap']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
requested == o.requested &&
|
|
100
|
+
requested_cap == o.requested_cap
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[requested, requested_cap].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class RequestSmsSenderIdLimitIncreaseRequest < ApiModelBase
|
|
18
|
+
# Desired daily message cap. Must exceed the current cap.
|
|
19
|
+
attr_accessor :requested_cap
|
|
20
|
+
|
|
21
|
+
# Use case and audience (what you send, to whom, opt-in status).
|
|
22
|
+
attr_accessor :reason
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'requested_cap' => :'requestedCap',
|
|
28
|
+
:'reason' => :'reason'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'requested_cap' => :'Integer',
|
|
46
|
+
:'reason' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::RequestSmsSenderIdLimitIncreaseRequest` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::RequestSmsSenderIdLimitIncreaseRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'requested_cap')
|
|
73
|
+
self.requested_cap = attributes[:'requested_cap']
|
|
74
|
+
else
|
|
75
|
+
self.requested_cap = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'reason')
|
|
79
|
+
self.reason = attributes[:'reason']
|
|
80
|
+
else
|
|
81
|
+
self.reason = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @requested_cap.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "requested_cap", requested_cap cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @reason.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if @reason.to_s.length > 2000
|
|
99
|
+
invalid_properties.push('invalid value for "reason", the character length must be smaller than or equal to 2000.')
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if @reason.to_s.length < 10
|
|
103
|
+
invalid_properties.push('invalid value for "reason", the character length must be greater than or equal to 10.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
return false if @requested_cap.nil?
|
|
114
|
+
return false if @reason.nil?
|
|
115
|
+
return false if @reason.to_s.length > 2000
|
|
116
|
+
return false if @reason.to_s.length < 10
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] requested_cap Value to be assigned
|
|
122
|
+
def requested_cap=(requested_cap)
|
|
123
|
+
if requested_cap.nil?
|
|
124
|
+
fail ArgumentError, 'requested_cap cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@requested_cap = requested_cap
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Custom attribute writer method with validation
|
|
131
|
+
# @param [Object] reason Value to be assigned
|
|
132
|
+
def reason=(reason)
|
|
133
|
+
if reason.nil?
|
|
134
|
+
fail ArgumentError, 'reason cannot be nil'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if reason.to_s.length > 2000
|
|
138
|
+
fail ArgumentError, 'invalid value for "reason", the character length must be smaller than or equal to 2000.'
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if reason.to_s.length < 10
|
|
142
|
+
fail ArgumentError, 'invalid value for "reason", the character length must be greater than or equal to 10.'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@reason = reason
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Checks equality by comparing each attribute.
|
|
149
|
+
# @param [Object] Object to be compared
|
|
150
|
+
def ==(o)
|
|
151
|
+
return true if self.equal?(o)
|
|
152
|
+
self.class == o.class &&
|
|
153
|
+
requested_cap == o.requested_cap &&
|
|
154
|
+
reason == o.reason
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# @see the `==` method
|
|
158
|
+
# @param [Object] Object to be compared
|
|
159
|
+
def eql?(o)
|
|
160
|
+
self == o
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Calculates hash code according to all attributes.
|
|
164
|
+
# @return [Integer] Hash code
|
|
165
|
+
def hash
|
|
166
|
+
[requested_cap, reason].hash
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Builds the object from hash
|
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
171
|
+
# @return [Object] Returns the model itself
|
|
172
|
+
def self.build_from_hash(attributes)
|
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
|
174
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
175
|
+
transformed_hash = {}
|
|
176
|
+
openapi_types.each_pair do |key, type|
|
|
177
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = nil
|
|
179
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
180
|
+
# check to ensure the input is an array given that the attribute
|
|
181
|
+
# is documented as an array but the input is not
|
|
182
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
183
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
184
|
+
end
|
|
185
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
186
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
new(transformed_hash)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the object in the form of hash
|
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
|
194
|
+
def to_hash
|
|
195
|
+
hash = {}
|
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
197
|
+
value = self.send(attr)
|
|
198
|
+
if value.nil?
|
|
199
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
200
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
hash[param] = _to_hash(value)
|
|
204
|
+
end
|
|
205
|
+
hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
end
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class SendSmsRequest < ApiModelBase
|
|
18
|
-
# One of your SMS-enabled numbers (E.164; formatting is normalized).
|
|
18
|
+
# One of your SMS-enabled numbers (E.164; formatting is normalized), or an approved alphanumeric sender ID (3-11 letters/digits/spaces, created via `/v1/sms/sender-ids`).
|
|
19
19
|
attr_accessor :from
|
|
20
20
|
|
|
21
21
|
# Recipient number (E.164).
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -238,6 +238,8 @@ require 'zernio-sdk/models/create_sequence_request'
|
|
|
238
238
|
require 'zernio-sdk/models/create_sequence_request_steps_inner'
|
|
239
239
|
require 'zernio-sdk/models/create_sequence_request_steps_inner_template'
|
|
240
240
|
require 'zernio-sdk/models/create_sequence_request_steps_inner_template_variable_mapping_value'
|
|
241
|
+
require 'zernio-sdk/models/create_sms_sender_id200_response'
|
|
242
|
+
require 'zernio-sdk/models/create_sms_sender_id_request'
|
|
241
243
|
require 'zernio-sdk/models/create_standalone_ad201_response'
|
|
242
244
|
require 'zernio-sdk/models/create_standalone_ad201_response_one_of'
|
|
243
245
|
require 'zernio-sdk/models/create_standalone_ad201_response_one_of1'
|
|
@@ -310,6 +312,7 @@ require 'zernio-sdk/models/delete_google_business_review_reply200_response'
|
|
|
310
312
|
require 'zernio-sdk/models/delete_inbox_comment200_response'
|
|
311
313
|
require 'zernio-sdk/models/delete_inbox_review_reply200_response'
|
|
312
314
|
require 'zernio-sdk/models/delete_inbox_review_reply_request'
|
|
315
|
+
require 'zernio-sdk/models/delete_sms_sender_id200_response'
|
|
313
316
|
require 'zernio-sdk/models/delete_whatsapp_business_username_request'
|
|
314
317
|
require 'zernio-sdk/models/dial_voice_web_call200_response'
|
|
315
318
|
require 'zernio-sdk/models/dial_voice_web_call_request'
|
|
@@ -861,6 +864,10 @@ require 'zernio-sdk/models/list_sms_opt_outs200_response_opt_outs_inner'
|
|
|
861
864
|
require 'zernio-sdk/models/list_sms_registrations200_response'
|
|
862
865
|
require 'zernio-sdk/models/list_sms_registrations200_response_registrations_inner'
|
|
863
866
|
require 'zernio-sdk/models/list_sms_registrations200_response_registrations_inner_throughput'
|
|
867
|
+
require 'zernio-sdk/models/list_sms_sender_ids200_response'
|
|
868
|
+
require 'zernio-sdk/models/list_sms_sender_ids200_response_budget'
|
|
869
|
+
require 'zernio-sdk/models/list_sms_sender_ids200_response_budget_pending_request'
|
|
870
|
+
require 'zernio-sdk/models/list_sms_sender_ids200_response_sender_ids_inner'
|
|
864
871
|
require 'zernio-sdk/models/list_snapchat_profiles200_response'
|
|
865
872
|
require 'zernio-sdk/models/list_snapchat_profiles200_response_public_profiles_inner'
|
|
866
873
|
require 'zernio-sdk/models/list_tracking_tag_shared_accounts200_response'
|
|
@@ -986,6 +993,8 @@ require 'zernio-sdk/models/reply_to_inbox_review200_response'
|
|
|
986
993
|
require 'zernio-sdk/models/reply_to_inbox_review_request'
|
|
987
994
|
require 'zernio-sdk/models/reply_to_mention200_response'
|
|
988
995
|
require 'zernio-sdk/models/reply_to_mention_request'
|
|
996
|
+
require 'zernio-sdk/models/request_sms_sender_id_limit_increase200_response'
|
|
997
|
+
require 'zernio-sdk/models/request_sms_sender_id_limit_increase_request'
|
|
989
998
|
require 'zernio-sdk/models/resend_sms_registration_otp200_response'
|
|
990
999
|
require 'zernio-sdk/models/reserve_rf_prediction201_response'
|
|
991
1000
|
require 'zernio-sdk/models/reserve_rf_prediction_request'
|