zernio-sdk 0.0.73 → 0.0.75
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 +2 -0
- data/docs/CreateSequenceRequestStepsInner.md +1 -1
- data/docs/CreateSequenceRequestStepsInnerTemplate.md +22 -0
- data/docs/CreateSequenceRequestStepsInnerTemplateVariableMappingValue.md +20 -0
- data/docs/GetWhatsAppBroadcasts200ResponseBroadcastsInner.md +2 -0
- data/lib/late-sdk/models/create_sequence_request_steps_inner.rb +1 -1
- data/lib/late-sdk/models/create_sequence_request_steps_inner_template.rb +168 -0
- data/lib/late-sdk/models/create_sequence_request_steps_inner_template_variable_mapping_value.rb +191 -0
- data/lib/late-sdk/models/get_whats_app_broadcasts200_response_broadcasts_inner.rb +11 -1
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +2 -0
- data/openapi.yaml +14 -1
- data/spec/models/create_sequence_request_steps_inner_template_spec.rb +48 -0
- data/spec/models/create_sequence_request_steps_inner_template_variable_mapping_value_spec.rb +46 -0
- data/spec/models/get_whats_app_broadcasts200_response_broadcasts_inner_spec.rb +6 -0
- metadata +9 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d503a6ae72758e65ac08522c0a7debe21cf39c7a4df3e3e100c7f1d14fdd483b
|
|
4
|
+
data.tar.gz: 265dbe6b50ab5f3e91e05858c980ae3a5ef8cc6049b301389e861db3369f83a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56b9c61b141e35b6b8c3f36ce801352dbd2c5f27a88aeeff9fec7d72219dd1d9e7c8bbec35a378cc6d35c9ee283fcbba481bb0461471eff26f678b497999350f
|
|
7
|
+
data.tar.gz: a8948b1fb6dc2e7674557afd30e4fb3b351e1f94c2224e1b7ab33a2fd6303d55ec45004151f9c453b01d42acffb0b8b1f2bb74626fef4637d1310e8567e9780b
|
data/README.md
CHANGED
|
@@ -372,6 +372,8 @@ Class | Method | HTTP request | Description
|
|
|
372
372
|
- [Late::CreateSequenceRequest](docs/CreateSequenceRequest.md)
|
|
373
373
|
- [Late::CreateSequenceRequestStepsInner](docs/CreateSequenceRequestStepsInner.md)
|
|
374
374
|
- [Late::CreateSequenceRequestStepsInnerMessage](docs/CreateSequenceRequestStepsInnerMessage.md)
|
|
375
|
+
- [Late::CreateSequenceRequestStepsInnerTemplate](docs/CreateSequenceRequestStepsInnerTemplate.md)
|
|
376
|
+
- [Late::CreateSequenceRequestStepsInnerTemplateVariableMappingValue](docs/CreateSequenceRequestStepsInnerTemplateVariableMappingValue.md)
|
|
375
377
|
- [Late::CreateWebhookSettingsRequest](docs/CreateWebhookSettingsRequest.md)
|
|
376
378
|
- [Late::CreateWhatsAppBroadcast200Response](docs/CreateWhatsAppBroadcast200Response.md)
|
|
377
379
|
- [Late::CreateWhatsAppBroadcast200ResponseBroadcast](docs/CreateWhatsAppBroadcast200ResponseBroadcast.md)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **order** | **Integer** | | |
|
|
8
8
|
| **delay_minutes** | **Integer** | | |
|
|
9
9
|
| **message** | [**CreateSequenceRequestStepsInnerMessage**](CreateSequenceRequestStepsInnerMessage.md) | | [optional] |
|
|
10
|
-
| **template** | [**
|
|
10
|
+
| **template** | [**CreateSequenceRequestStepsInnerTemplate**](CreateSequenceRequestStepsInnerTemplate.md) | | [optional] |
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Late::CreateSequenceRequestStepsInnerTemplate
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | | [optional] |
|
|
8
|
+
| **language** | **String** | | [optional] |
|
|
9
|
+
| **variable_mapping** | [**Hash<String, CreateSequenceRequestStepsInnerTemplateVariableMappingValue>**](CreateSequenceRequestStepsInnerTemplateVariableMappingValue.md) | Maps template variable positions to contact fields. Keys are position strings (\"1\", \"2\"), values are objects with field and optional customValue | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'late-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Late::CreateSequenceRequestStepsInnerTemplate.new(
|
|
17
|
+
name: null,
|
|
18
|
+
language: null,
|
|
19
|
+
variable_mapping: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::CreateSequenceRequestStepsInnerTemplateVariableMappingValue
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **field** | **String** | | [optional] |
|
|
8
|
+
| **custom_value** | **String** | Static value when field is \"custom\" | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::CreateSequenceRequestStepsInnerTemplateVariableMappingValue.new(
|
|
16
|
+
field: null,
|
|
17
|
+
custom_value: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| **description** | **String** | | [optional] |
|
|
10
10
|
| **template** | [**GetWhatsAppBroadcasts200ResponseBroadcastsInnerTemplate**](GetWhatsAppBroadcasts200ResponseBroadcastsInnerTemplate.md) | | [optional] |
|
|
11
11
|
| **status** | **String** | | [optional] |
|
|
12
|
+
| **message_preview** | **String** | Template name or message text snippet | [optional] |
|
|
12
13
|
| **recipient_count** | **Integer** | | [optional] |
|
|
13
14
|
| **scheduled_at** | **Time** | | [optional] |
|
|
14
15
|
| **started_at** | **Time** | | [optional] |
|
|
@@ -30,6 +31,7 @@ instance = Late::GetWhatsAppBroadcasts200ResponseBroadcastsInner.new(
|
|
|
30
31
|
description: null,
|
|
31
32
|
template: null,
|
|
32
33
|
status: null,
|
|
34
|
+
message_preview: null,
|
|
33
35
|
recipient_count: null,
|
|
34
36
|
scheduled_at: null,
|
|
35
37
|
started_at: null,
|
|
@@ -49,7 +49,7 @@ module Late
|
|
|
49
49
|
:'order' => :'Integer',
|
|
50
50
|
:'delay_minutes' => :'Integer',
|
|
51
51
|
:'message' => :'CreateSequenceRequestStepsInnerMessage',
|
|
52
|
-
:'template' => :'
|
|
52
|
+
:'template' => :'CreateSequenceRequestStepsInnerTemplate'
|
|
53
53
|
}
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -0,0 +1,168 @@
|
|
|
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.1
|
|
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 Late
|
|
17
|
+
class CreateSequenceRequestStepsInnerTemplate < ApiModelBase
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
attr_accessor :language
|
|
21
|
+
|
|
22
|
+
# Maps template variable positions to contact fields. Keys are position strings (\"1\", \"2\"), values are objects with field and optional customValue
|
|
23
|
+
attr_accessor :variable_mapping
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'name' => :'name',
|
|
29
|
+
:'language' => :'language',
|
|
30
|
+
:'variable_mapping' => :'variableMapping'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'name' => :'String',
|
|
48
|
+
:'language' => :'String',
|
|
49
|
+
:'variable_mapping' => :'Hash<String, CreateSequenceRequestStepsInnerTemplateVariableMappingValue>'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateSequenceRequestStepsInnerTemplate` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateSequenceRequestStepsInnerTemplate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'name')
|
|
76
|
+
self.name = attributes[:'name']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'language')
|
|
80
|
+
self.language = attributes[:'language']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'variable_mapping')
|
|
84
|
+
if (value = attributes[:'variable_mapping']).is_a?(Hash)
|
|
85
|
+
self.variable_mapping = value
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
91
|
+
# @return Array for valid properties with the reasons
|
|
92
|
+
def list_invalid_properties
|
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
94
|
+
invalid_properties = Array.new
|
|
95
|
+
invalid_properties
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Check to see if the all the properties in the model are valid
|
|
99
|
+
# @return true if the model is valid
|
|
100
|
+
def valid?
|
|
101
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
name == o.name &&
|
|
111
|
+
language == o.language &&
|
|
112
|
+
variable_mapping == o.variable_mapping
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @see the `==` method
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def eql?(o)
|
|
118
|
+
self == o
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Calculates hash code according to all attributes.
|
|
122
|
+
# @return [Integer] Hash code
|
|
123
|
+
def hash
|
|
124
|
+
[name, language, variable_mapping].hash
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Builds the object from hash
|
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
129
|
+
# @return [Object] Returns the model itself
|
|
130
|
+
def self.build_from_hash(attributes)
|
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
133
|
+
transformed_hash = {}
|
|
134
|
+
openapi_types.each_pair do |key, type|
|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = nil
|
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
138
|
+
# check to ensure the input is an array given that the attribute
|
|
139
|
+
# is documented as an array but the input is not
|
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
142
|
+
end
|
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
new(transformed_hash)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Returns the object in the form of hash
|
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
|
152
|
+
def to_hash
|
|
153
|
+
hash = {}
|
|
154
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
155
|
+
value = self.send(attr)
|
|
156
|
+
if value.nil?
|
|
157
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
158
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
hash[param] = _to_hash(value)
|
|
162
|
+
end
|
|
163
|
+
hash
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
end
|
data/lib/late-sdk/models/create_sequence_request_steps_inner_template_variable_mapping_value.rb
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
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.1
|
|
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 Late
|
|
17
|
+
class CreateSequenceRequestStepsInnerTemplateVariableMappingValue < ApiModelBase
|
|
18
|
+
attr_accessor :field
|
|
19
|
+
|
|
20
|
+
# Static value when field is \"custom\"
|
|
21
|
+
attr_accessor :custom_value
|
|
22
|
+
|
|
23
|
+
class EnumAttributeValidator
|
|
24
|
+
attr_reader :datatype
|
|
25
|
+
attr_reader :allowable_values
|
|
26
|
+
|
|
27
|
+
def initialize(datatype, allowable_values)
|
|
28
|
+
@allowable_values = allowable_values.map do |value|
|
|
29
|
+
case datatype.to_s
|
|
30
|
+
when /Integer/i
|
|
31
|
+
value.to_i
|
|
32
|
+
when /Float/i
|
|
33
|
+
value.to_f
|
|
34
|
+
else
|
|
35
|
+
value
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def valid?(value)
|
|
41
|
+
!value || allowable_values.include?(value)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
46
|
+
def self.attribute_map
|
|
47
|
+
{
|
|
48
|
+
:'field' => :'field',
|
|
49
|
+
:'custom_value' => :'customValue'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns attribute mapping this model knows about
|
|
54
|
+
def self.acceptable_attribute_map
|
|
55
|
+
attribute_map
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns all the JSON keys this model knows about
|
|
59
|
+
def self.acceptable_attributes
|
|
60
|
+
acceptable_attribute_map.values
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute type mapping.
|
|
64
|
+
def self.openapi_types
|
|
65
|
+
{
|
|
66
|
+
:'field' => :'String',
|
|
67
|
+
:'custom_value' => :'String'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
])
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::CreateSequenceRequestStepsInnerTemplateVariableMappingValue` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::CreateSequenceRequestStepsInnerTemplateVariableMappingValue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'field')
|
|
94
|
+
self.field = attributes[:'field']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'custom_value')
|
|
98
|
+
self.custom_value = attributes[:'custom_value']
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
103
|
+
# @return Array for valid properties with the reasons
|
|
104
|
+
def list_invalid_properties
|
|
105
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
106
|
+
invalid_properties = Array.new
|
|
107
|
+
invalid_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Check to see if the all the properties in the model are valid
|
|
111
|
+
# @return true if the model is valid
|
|
112
|
+
def valid?
|
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
|
+
field_validator = EnumAttributeValidator.new('String', ["name", "phone", "email", "company", "custom"])
|
|
115
|
+
return false unless field_validator.valid?(@field)
|
|
116
|
+
true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
120
|
+
# @param [Object] field Object to be assigned
|
|
121
|
+
def field=(field)
|
|
122
|
+
validator = EnumAttributeValidator.new('String', ["name", "phone", "email", "company", "custom"])
|
|
123
|
+
unless validator.valid?(field)
|
|
124
|
+
fail ArgumentError, "invalid value for \"field\", must be one of #{validator.allowable_values}."
|
|
125
|
+
end
|
|
126
|
+
@field = field
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Checks equality by comparing each attribute.
|
|
130
|
+
# @param [Object] Object to be compared
|
|
131
|
+
def ==(o)
|
|
132
|
+
return true if self.equal?(o)
|
|
133
|
+
self.class == o.class &&
|
|
134
|
+
field == o.field &&
|
|
135
|
+
custom_value == o.custom_value
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# @see the `==` method
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def eql?(o)
|
|
141
|
+
self == o
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Calculates hash code according to all attributes.
|
|
145
|
+
# @return [Integer] Hash code
|
|
146
|
+
def hash
|
|
147
|
+
[field, custom_value].hash
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Builds the object from hash
|
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
+
# @return [Object] Returns the model itself
|
|
153
|
+
def self.build_from_hash(attributes)
|
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
156
|
+
transformed_hash = {}
|
|
157
|
+
openapi_types.each_pair do |key, type|
|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
159
|
+
transformed_hash["#{key}"] = nil
|
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
161
|
+
# check to ensure the input is an array given that the attribute
|
|
162
|
+
# is documented as an array but the input is not
|
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
165
|
+
end
|
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
new(transformed_hash)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns the object in the form of hash
|
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
|
175
|
+
def to_hash
|
|
176
|
+
hash = {}
|
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
178
|
+
value = self.send(attr)
|
|
179
|
+
if value.nil?
|
|
180
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
181
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
hash[param] = _to_hash(value)
|
|
185
|
+
end
|
|
186
|
+
hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
end
|
|
@@ -25,6 +25,9 @@ module Late
|
|
|
25
25
|
|
|
26
26
|
attr_accessor :status
|
|
27
27
|
|
|
28
|
+
# Template name or message text snippet
|
|
29
|
+
attr_accessor :message_preview
|
|
30
|
+
|
|
28
31
|
attr_accessor :recipient_count
|
|
29
32
|
|
|
30
33
|
attr_accessor :scheduled_at
|
|
@@ -73,6 +76,7 @@ module Late
|
|
|
73
76
|
:'description' => :'description',
|
|
74
77
|
:'template' => :'template',
|
|
75
78
|
:'status' => :'status',
|
|
79
|
+
:'message_preview' => :'messagePreview',
|
|
76
80
|
:'recipient_count' => :'recipientCount',
|
|
77
81
|
:'scheduled_at' => :'scheduledAt',
|
|
78
82
|
:'started_at' => :'startedAt',
|
|
@@ -103,6 +107,7 @@ module Late
|
|
|
103
107
|
:'description' => :'String',
|
|
104
108
|
:'template' => :'GetWhatsAppBroadcasts200ResponseBroadcastsInnerTemplate',
|
|
105
109
|
:'status' => :'String',
|
|
110
|
+
:'message_preview' => :'String',
|
|
106
111
|
:'recipient_count' => :'Integer',
|
|
107
112
|
:'scheduled_at' => :'Time',
|
|
108
113
|
:'started_at' => :'Time',
|
|
@@ -157,6 +162,10 @@ module Late
|
|
|
157
162
|
self.status = attributes[:'status']
|
|
158
163
|
end
|
|
159
164
|
|
|
165
|
+
if attributes.key?(:'message_preview')
|
|
166
|
+
self.message_preview = attributes[:'message_preview']
|
|
167
|
+
end
|
|
168
|
+
|
|
160
169
|
if attributes.key?(:'recipient_count')
|
|
161
170
|
self.recipient_count = attributes[:'recipient_count']
|
|
162
171
|
end
|
|
@@ -231,6 +240,7 @@ module Late
|
|
|
231
240
|
description == o.description &&
|
|
232
241
|
template == o.template &&
|
|
233
242
|
status == o.status &&
|
|
243
|
+
message_preview == o.message_preview &&
|
|
234
244
|
recipient_count == o.recipient_count &&
|
|
235
245
|
scheduled_at == o.scheduled_at &&
|
|
236
246
|
started_at == o.started_at &&
|
|
@@ -251,7 +261,7 @@ module Late
|
|
|
251
261
|
# Calculates hash code according to all attributes.
|
|
252
262
|
# @return [Integer] Hash code
|
|
253
263
|
def hash
|
|
254
|
-
[id, name, description, template, status, recipient_count, scheduled_at, started_at, completed_at, sent_count, delivered_count, read_count, failed_count, created_at].hash
|
|
264
|
+
[id, name, description, template, status, message_preview, recipient_count, scheduled_at, started_at, completed_at, sent_count, delivered_count, read_count, failed_count, created_at].hash
|
|
255
265
|
end
|
|
256
266
|
|
|
257
267
|
# Builds the object from hash
|
data/lib/late-sdk/version.rb
CHANGED
data/lib/late-sdk.rb
CHANGED
|
@@ -96,6 +96,8 @@ require 'late-sdk/models/create_queue_slot_request'
|
|
|
96
96
|
require 'late-sdk/models/create_sequence_request'
|
|
97
97
|
require 'late-sdk/models/create_sequence_request_steps_inner'
|
|
98
98
|
require 'late-sdk/models/create_sequence_request_steps_inner_message'
|
|
99
|
+
require 'late-sdk/models/create_sequence_request_steps_inner_template'
|
|
100
|
+
require 'late-sdk/models/create_sequence_request_steps_inner_template_variable_mapping_value'
|
|
99
101
|
require 'late-sdk/models/create_webhook_settings_request'
|
|
100
102
|
require 'late-sdk/models/create_whats_app_broadcast200_response'
|
|
101
103
|
require 'late-sdk/models/create_whats_app_broadcast200_response_broadcast'
|
data/openapi.yaml
CHANGED
|
@@ -13618,6 +13618,7 @@ paths:
|
|
|
13618
13618
|
name: { type: string }
|
|
13619
13619
|
language: { type: string }
|
|
13620
13620
|
status: { type: string, enum: [draft, scheduled, sending, completed, failed, cancelled] }
|
|
13621
|
+
messagePreview: { type: string, description: Template name or message text snippet }
|
|
13621
13622
|
recipientCount: { type: integer }
|
|
13622
13623
|
scheduledAt: { type: string, format: date-time }
|
|
13623
13624
|
startedAt: { type: string, format: date-time }
|
|
@@ -15021,7 +15022,19 @@ paths:
|
|
|
15021
15022
|
order: { type: integer }
|
|
15022
15023
|
delayMinutes: { type: integer }
|
|
15023
15024
|
message: { type: object, properties: { text: { type: string } } }
|
|
15024
|
-
template:
|
|
15025
|
+
template:
|
|
15026
|
+
type: object
|
|
15027
|
+
properties:
|
|
15028
|
+
name: { type: string }
|
|
15029
|
+
language: { type: string }
|
|
15030
|
+
variableMapping:
|
|
15031
|
+
type: object
|
|
15032
|
+
description: Maps template variable positions to contact fields. Keys are position strings ("1", "2"), values are objects with field and optional customValue
|
|
15033
|
+
additionalProperties:
|
|
15034
|
+
type: object
|
|
15035
|
+
properties:
|
|
15036
|
+
field: { type: string, enum: [name, phone, email, company, custom] }
|
|
15037
|
+
customValue: { type: string, description: Static value when field is "custom" }
|
|
15025
15038
|
exitOnReply: { type: boolean, default: true }
|
|
15026
15039
|
exitOnUnsubscribe: { type: boolean, default: true }
|
|
15027
15040
|
responses:
|
|
@@ -0,0 +1,48 @@
|
|
|
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.1
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Late::CreateSequenceRequestStepsInnerTemplate
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Late::CreateSequenceRequestStepsInnerTemplate do
|
|
21
|
+
#let(:instance) { Late::CreateSequenceRequestStepsInnerTemplate.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateSequenceRequestStepsInnerTemplate' do
|
|
24
|
+
it 'should create an instance of CreateSequenceRequestStepsInnerTemplate' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Late::CreateSequenceRequestStepsInnerTemplate)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "name"' 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 "language"' 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 "variable_mapping"' 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,46 @@
|
|
|
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.1
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Late::CreateSequenceRequestStepsInnerTemplateVariableMappingValue
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Late::CreateSequenceRequestStepsInnerTemplateVariableMappingValue do
|
|
21
|
+
#let(:instance) { Late::CreateSequenceRequestStepsInnerTemplateVariableMappingValue.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateSequenceRequestStepsInnerTemplateVariableMappingValue' do
|
|
24
|
+
it 'should create an instance of CreateSequenceRequestStepsInnerTemplateVariableMappingValue' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Late::CreateSequenceRequestStepsInnerTemplateVariableMappingValue)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "field"' 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', ["name", "phone", "email", "company", "custom"])
|
|
34
|
+
# validator.allowable_values.each do |value|
|
|
35
|
+
# expect { instance.field = value }.not_to raise_error
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "custom_value"' 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
|
|
@@ -61,6 +61,12 @@ describe Late::GetWhatsAppBroadcasts200ResponseBroadcastsInner do
|
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
describe 'test attribute "message_preview"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
64
70
|
describe 'test attribute "recipient_count"' do
|
|
65
71
|
it 'should work' do
|
|
66
72
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zernio-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.75
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -151,6 +151,8 @@ files:
|
|
|
151
151
|
- docs/CreateSequenceRequest.md
|
|
152
152
|
- docs/CreateSequenceRequestStepsInner.md
|
|
153
153
|
- docs/CreateSequenceRequestStepsInnerMessage.md
|
|
154
|
+
- docs/CreateSequenceRequestStepsInnerTemplate.md
|
|
155
|
+
- docs/CreateSequenceRequestStepsInnerTemplateVariableMappingValue.md
|
|
154
156
|
- docs/CreateWebhookSettingsRequest.md
|
|
155
157
|
- docs/CreateWhatsAppBroadcast200Response.md
|
|
156
158
|
- docs/CreateWhatsAppBroadcast200ResponseBroadcast.md
|
|
@@ -812,6 +814,8 @@ files:
|
|
|
812
814
|
- lib/late-sdk/models/create_sequence_request.rb
|
|
813
815
|
- lib/late-sdk/models/create_sequence_request_steps_inner.rb
|
|
814
816
|
- lib/late-sdk/models/create_sequence_request_steps_inner_message.rb
|
|
817
|
+
- lib/late-sdk/models/create_sequence_request_steps_inner_template.rb
|
|
818
|
+
- lib/late-sdk/models/create_sequence_request_steps_inner_template_variable_mapping_value.rb
|
|
815
819
|
- lib/late-sdk/models/create_webhook_settings_request.rb
|
|
816
820
|
- lib/late-sdk/models/create_whats_app_broadcast200_response.rb
|
|
817
821
|
- lib/late-sdk/models/create_whats_app_broadcast200_response_broadcast.rb
|
|
@@ -1444,6 +1448,8 @@ files:
|
|
|
1444
1448
|
- spec/models/create_sequence_request_spec.rb
|
|
1445
1449
|
- spec/models/create_sequence_request_steps_inner_message_spec.rb
|
|
1446
1450
|
- spec/models/create_sequence_request_steps_inner_spec.rb
|
|
1451
|
+
- spec/models/create_sequence_request_steps_inner_template_spec.rb
|
|
1452
|
+
- spec/models/create_sequence_request_steps_inner_template_variable_mapping_value_spec.rb
|
|
1447
1453
|
- spec/models/create_webhook_settings_request_spec.rb
|
|
1448
1454
|
- spec/models/create_whats_app_broadcast200_response_broadcast_spec.rb
|
|
1449
1455
|
- spec/models/create_whats_app_broadcast200_response_spec.rb
|
|
@@ -2150,6 +2156,7 @@ test_files:
|
|
|
2150
2156
|
- spec/models/post_retry_response_spec.rb
|
|
2151
2157
|
- spec/models/purchase_whats_app_phone_number200_response_one_of_spec.rb
|
|
2152
2158
|
- spec/models/validate_post200_response_one_of_warnings_inner_spec.rb
|
|
2159
|
+
- spec/models/create_sequence_request_steps_inner_template_variable_mapping_value_spec.rb
|
|
2153
2160
|
- spec/models/user_get_response_spec.rb
|
|
2154
2161
|
- spec/models/get_posting_frequency200_response_frequency_inner_spec.rb
|
|
2155
2162
|
- spec/models/post_delete_response_spec.rb
|
|
@@ -2594,6 +2601,7 @@ test_files:
|
|
|
2594
2601
|
- spec/models/get_google_business_attributes200_response_attributes_inner_spec.rb
|
|
2595
2602
|
- spec/models/list_google_business_locations200_response_spec.rb
|
|
2596
2603
|
- spec/models/get_reddit_flairs200_response_spec.rb
|
|
2604
|
+
- spec/models/create_sequence_request_steps_inner_template_spec.rb
|
|
2597
2605
|
- spec/models/remove_whats_app_broadcast_recipients_request_spec.rb
|
|
2598
2606
|
- spec/models/create_profile_request_spec.rb
|
|
2599
2607
|
- spec/models/get_google_business_location_details200_response_categories_additional_categories_inner_spec.rb
|