messente_api 1.3.0 → 1.3.1
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 +1 -1
- data/docs/ContactEnvelope.md +1 -1
- data/docs/ContactFields.md +1 -3
- data/docs/ContactListEnvelope.md +1 -1
- data/docs/ContactResponseFields.md +37 -0
- data/docs/ContactsApi.md +2 -2
- data/lib/messente_api.rb +1 -0
- data/lib/messente_api/models/contact_envelope.rb +1 -1
- data/lib/messente_api/models/contact_fields.rb +6 -17
- data/lib/messente_api/models/contact_list_envelope.rb +1 -1
- data/lib/messente_api/models/contact_response_fields.rb +318 -0
- data/lib/messente_api/version.rb +1 -1
- data/messente_api-1.3.0.gem +0 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a3ce29bf2a0482b76441757b05d60c531ee6688e26a1fa7615c436c1e13f951
|
4
|
+
data.tar.gz: 5b4a0bed64221ee93477453f4029b855525a2cd065a40bb23f9ebe94055ff4ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afd06b9e58a5c5701b74da69fd15b0fa11cbf6cbc278a4f65dbd7ef1bb5749f378af2d8082f6d16a92def6cdb5fcff8616d71cfd0ba7a7f9adf3296215bdc50a
|
7
|
+
data.tar.gz: 6f49314b5406cb40261a8ae2b661646eb62fac5389ab287281f321102dea574479211f2a02060134af8534954cc802730a2a7604ad5939eb2ba98c008674d0bc
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Messente API Library
|
2
2
|
|
3
3
|
- Messente API version: 1.3.0
|
4
|
-
- Ruby gem version: 1.3.
|
4
|
+
- Ruby gem version: 1.3.1
|
5
5
|
|
6
6
|
[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
7
7
|
|
data/docs/ContactEnvelope.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**contact** | [**
|
7
|
+
**contact** | [**ContactResponseFields**](ContactResponseFields.md) | | [optional]
|
8
8
|
|
9
9
|
## Code Sample
|
10
10
|
|
data/docs/ContactFields.md
CHANGED
@@ -14,7 +14,6 @@ Name | Type | Description | Notes
|
|
14
14
|
**custom2** | **String** | The second custom field | [optional]
|
15
15
|
**custom3** | **String** | The third custom field | [optional]
|
16
16
|
**custom4** | **String** | The fourth custom field | [optional]
|
17
|
-
**scheduled_deletion_date** | **Date** | The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days | [optional]
|
18
17
|
|
19
18
|
## Code Sample
|
20
19
|
|
@@ -30,8 +29,7 @@ instance = MessenteApi::ContactFields.new(phone_number: null,
|
|
30
29
|
custom: null,
|
31
30
|
custom2: null,
|
32
31
|
custom3: null,
|
33
|
-
custom4: null
|
34
|
-
scheduled_deletion_date: null)
|
32
|
+
custom4: null)
|
35
33
|
```
|
36
34
|
|
37
35
|
|
data/docs/ContactListEnvelope.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**contacts** | [**Array<
|
7
|
+
**contacts** | [**Array<ContactResponseFields>**](ContactResponseFields.md) | An array of contacts | [optional]
|
8
8
|
|
9
9
|
## Code Sample
|
10
10
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# MessenteApi::ContactResponseFields
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**phone_number** | **String** | Phone number in e.164 format | [optional]
|
8
|
+
**email** | **String** | The email of the contact | [optional]
|
9
|
+
**first_name** | **String** | The first name of the contact | [optional]
|
10
|
+
**last_name** | **String** | The last name of the contact | [optional]
|
11
|
+
**company** | **String** | The company of the contact | [optional]
|
12
|
+
**title** | **String** | The title of the contact | [optional]
|
13
|
+
**custom** | **String** | The first custom field | [optional]
|
14
|
+
**custom2** | **String** | The second custom field | [optional]
|
15
|
+
**custom3** | **String** | The third custom field | [optional]
|
16
|
+
**custom4** | **String** | The fourth custom field | [optional]
|
17
|
+
**scheduled_deletion_date** | **Date** | The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days | [optional]
|
18
|
+
|
19
|
+
## Code Sample
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'MessenteApi'
|
23
|
+
|
24
|
+
instance = MessenteApi::ContactResponseFields.new(phone_number: null,
|
25
|
+
email: null,
|
26
|
+
first_name: null,
|
27
|
+
last_name: null,
|
28
|
+
company: null,
|
29
|
+
title: null,
|
30
|
+
custom: null,
|
31
|
+
custom2: null,
|
32
|
+
custom3: null,
|
33
|
+
custom4: null,
|
34
|
+
scheduled_deletion_date: null)
|
35
|
+
```
|
36
|
+
|
37
|
+
|
data/docs/ContactsApi.md
CHANGED
@@ -87,7 +87,7 @@ MessenteApi.configure do |config|
|
|
87
87
|
end
|
88
88
|
|
89
89
|
api_instance = MessenteApi::ContactsApi.new
|
90
|
-
contact_fields = {"phoneNumber":"+37251000000","email":"anyone@messente.com","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"
|
90
|
+
contact_fields = {"phoneNumber":"+37251000000","email":"anyone@messente.com","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"} # ContactFields |
|
91
91
|
|
92
92
|
begin
|
93
93
|
#Creates a new contact
|
@@ -396,7 +396,7 @@ end
|
|
396
396
|
|
397
397
|
api_instance = MessenteApi::ContactsApi.new
|
398
398
|
phone = '+37251000000' # String | A phone number
|
399
|
-
contact_update_fields = {"email":"anyone@messente.com","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"
|
399
|
+
contact_update_fields = {"email":"anyone@messente.com","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"} # ContactUpdateFields |
|
400
400
|
|
401
401
|
begin
|
402
402
|
#Updates a contact
|
data/lib/messente_api.rb
CHANGED
@@ -21,6 +21,7 @@ require 'messente_api/models/channel'
|
|
21
21
|
require 'messente_api/models/contact_envelope'
|
22
22
|
require 'messente_api/models/contact_fields'
|
23
23
|
require 'messente_api/models/contact_list_envelope'
|
24
|
+
require 'messente_api/models/contact_response_fields'
|
24
25
|
require 'messente_api/models/contact_update_fields'
|
25
26
|
require 'messente_api/models/delivery_report_response'
|
26
27
|
require 'messente_api/models/delivery_result'
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module MessenteApi
|
16
|
-
# A container for fields of a contact
|
16
|
+
# A container for fields of a request body of a contact
|
17
17
|
class ContactFields
|
18
18
|
# Phone number in e.164 format
|
19
19
|
attr_accessor :phone_number
|
@@ -45,9 +45,6 @@ module MessenteApi
|
|
45
45
|
# The fourth custom field
|
46
46
|
attr_accessor :custom4
|
47
47
|
|
48
|
-
# The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days
|
49
|
-
attr_accessor :scheduled_deletion_date
|
50
|
-
|
51
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
49
|
def self.attribute_map
|
53
50
|
{
|
@@ -60,8 +57,7 @@ module MessenteApi
|
|
60
57
|
:'custom' => :'custom',
|
61
58
|
:'custom2' => :'custom2',
|
62
59
|
:'custom3' => :'custom3',
|
63
|
-
:'custom4' => :'custom4'
|
64
|
-
:'scheduled_deletion_date' => :'scheduledDeletionDate'
|
60
|
+
:'custom4' => :'custom4'
|
65
61
|
}
|
66
62
|
end
|
67
63
|
|
@@ -77,8 +73,7 @@ module MessenteApi
|
|
77
73
|
:'custom' => :'String',
|
78
74
|
:'custom2' => :'String',
|
79
75
|
:'custom3' => :'String',
|
80
|
-
:'custom4' => :'String'
|
81
|
-
:'scheduled_deletion_date' => :'Date'
|
76
|
+
:'custom4' => :'String'
|
82
77
|
}
|
83
78
|
end
|
84
79
|
|
@@ -93,8 +88,7 @@ module MessenteApi
|
|
93
88
|
:'custom',
|
94
89
|
:'custom2',
|
95
90
|
:'custom3',
|
96
|
-
:'custom4'
|
97
|
-
:'scheduled_deletion_date'
|
91
|
+
:'custom4'
|
98
92
|
])
|
99
93
|
end
|
100
94
|
|
@@ -152,10 +146,6 @@ module MessenteApi
|
|
152
146
|
if attributes.key?(:'custom4')
|
153
147
|
self.custom4 = attributes[:'custom4']
|
154
148
|
end
|
155
|
-
|
156
|
-
if attributes.key?(:'scheduled_deletion_date')
|
157
|
-
self.scheduled_deletion_date = attributes[:'scheduled_deletion_date']
|
158
|
-
end
|
159
149
|
end
|
160
150
|
|
161
151
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -190,8 +180,7 @@ module MessenteApi
|
|
190
180
|
custom == o.custom &&
|
191
181
|
custom2 == o.custom2 &&
|
192
182
|
custom3 == o.custom3 &&
|
193
|
-
custom4 == o.custom4
|
194
|
-
scheduled_deletion_date == o.scheduled_deletion_date
|
183
|
+
custom4 == o.custom4
|
195
184
|
end
|
196
185
|
|
197
186
|
# @see the `==` method
|
@@ -203,7 +192,7 @@ module MessenteApi
|
|
203
192
|
# Calculates hash code according to all attributes.
|
204
193
|
# @return [Integer] Hash code
|
205
194
|
def hash
|
206
|
-
[phone_number, email, first_name, last_name, company, title, custom, custom2, custom3, custom4
|
195
|
+
[phone_number, email, first_name, last_name, company, title, custom, custom2, custom3, custom4].hash
|
207
196
|
end
|
208
197
|
|
209
198
|
# Builds the object from hash
|
@@ -0,0 +1,318 @@
|
|
1
|
+
=begin
|
2
|
+
#Messente API
|
3
|
+
|
4
|
+
#[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.3.0
|
7
|
+
Contact: messente@messente.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module MessenteApi
|
16
|
+
# A container for response fields of a contact
|
17
|
+
class ContactResponseFields
|
18
|
+
# Phone number in e.164 format
|
19
|
+
attr_accessor :phone_number
|
20
|
+
|
21
|
+
# The email of the contact
|
22
|
+
attr_accessor :email
|
23
|
+
|
24
|
+
# The first name of the contact
|
25
|
+
attr_accessor :first_name
|
26
|
+
|
27
|
+
# The last name of the contact
|
28
|
+
attr_accessor :last_name
|
29
|
+
|
30
|
+
# The company of the contact
|
31
|
+
attr_accessor :company
|
32
|
+
|
33
|
+
# The title of the contact
|
34
|
+
attr_accessor :title
|
35
|
+
|
36
|
+
# The first custom field
|
37
|
+
attr_accessor :custom
|
38
|
+
|
39
|
+
# The second custom field
|
40
|
+
attr_accessor :custom2
|
41
|
+
|
42
|
+
# The third custom field
|
43
|
+
attr_accessor :custom3
|
44
|
+
|
45
|
+
# The fourth custom field
|
46
|
+
attr_accessor :custom4
|
47
|
+
|
48
|
+
# The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days
|
49
|
+
attr_accessor :scheduled_deletion_date
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'phone_number' => :'phoneNumber',
|
55
|
+
:'email' => :'email',
|
56
|
+
:'first_name' => :'firstName',
|
57
|
+
:'last_name' => :'lastName',
|
58
|
+
:'company' => :'company',
|
59
|
+
:'title' => :'title',
|
60
|
+
:'custom' => :'custom',
|
61
|
+
:'custom2' => :'custom2',
|
62
|
+
:'custom3' => :'custom3',
|
63
|
+
:'custom4' => :'custom4',
|
64
|
+
:'scheduled_deletion_date' => :'scheduledDeletionDate'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.openapi_types
|
70
|
+
{
|
71
|
+
:'phone_number' => :'String',
|
72
|
+
:'email' => :'String',
|
73
|
+
:'first_name' => :'String',
|
74
|
+
:'last_name' => :'String',
|
75
|
+
:'company' => :'String',
|
76
|
+
:'title' => :'String',
|
77
|
+
:'custom' => :'String',
|
78
|
+
:'custom2' => :'String',
|
79
|
+
:'custom3' => :'String',
|
80
|
+
:'custom4' => :'String',
|
81
|
+
:'scheduled_deletion_date' => :'Date'
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
# List of attributes with nullable: true
|
86
|
+
def self.openapi_nullable
|
87
|
+
Set.new([
|
88
|
+
:'email',
|
89
|
+
:'first_name',
|
90
|
+
:'last_name',
|
91
|
+
:'company',
|
92
|
+
:'title',
|
93
|
+
:'custom',
|
94
|
+
:'custom2',
|
95
|
+
:'custom3',
|
96
|
+
:'custom4',
|
97
|
+
:'scheduled_deletion_date'
|
98
|
+
])
|
99
|
+
end
|
100
|
+
|
101
|
+
# Initializes the object
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
def initialize(attributes = {})
|
104
|
+
if (!attributes.is_a?(Hash))
|
105
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MessenteApi::ContactResponseFields` initialize method"
|
106
|
+
end
|
107
|
+
|
108
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
109
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
110
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
111
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MessenteApi::ContactResponseFields`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
112
|
+
end
|
113
|
+
h[k.to_sym] = v
|
114
|
+
}
|
115
|
+
|
116
|
+
if attributes.key?(:'phone_number')
|
117
|
+
self.phone_number = attributes[:'phone_number']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'email')
|
121
|
+
self.email = attributes[:'email']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'first_name')
|
125
|
+
self.first_name = attributes[:'first_name']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'last_name')
|
129
|
+
self.last_name = attributes[:'last_name']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'company')
|
133
|
+
self.company = attributes[:'company']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'title')
|
137
|
+
self.title = attributes[:'title']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'custom')
|
141
|
+
self.custom = attributes[:'custom']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'custom2')
|
145
|
+
self.custom2 = attributes[:'custom2']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'custom3')
|
149
|
+
self.custom3 = attributes[:'custom3']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'custom4')
|
153
|
+
self.custom4 = attributes[:'custom4']
|
154
|
+
end
|
155
|
+
|
156
|
+
if attributes.key?(:'scheduled_deletion_date')
|
157
|
+
self.scheduled_deletion_date = attributes[:'scheduled_deletion_date']
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
162
|
+
# @return Array for valid properties with the reasons
|
163
|
+
def list_invalid_properties
|
164
|
+
invalid_properties = Array.new
|
165
|
+
invalid_properties
|
166
|
+
end
|
167
|
+
|
168
|
+
# Check to see if the all the properties in the model are valid
|
169
|
+
# @return true if the model is valid
|
170
|
+
def valid?
|
171
|
+
true
|
172
|
+
end
|
173
|
+
|
174
|
+
# Checks equality by comparing each attribute.
|
175
|
+
# @param [Object] Object to be compared
|
176
|
+
def ==(o)
|
177
|
+
return true if self.equal?(o)
|
178
|
+
self.class == o.class &&
|
179
|
+
phone_number == o.phone_number &&
|
180
|
+
email == o.email &&
|
181
|
+
first_name == o.first_name &&
|
182
|
+
last_name == o.last_name &&
|
183
|
+
company == o.company &&
|
184
|
+
title == o.title &&
|
185
|
+
custom == o.custom &&
|
186
|
+
custom2 == o.custom2 &&
|
187
|
+
custom3 == o.custom3 &&
|
188
|
+
custom4 == o.custom4 &&
|
189
|
+
scheduled_deletion_date == o.scheduled_deletion_date
|
190
|
+
end
|
191
|
+
|
192
|
+
# @see the `==` method
|
193
|
+
# @param [Object] Object to be compared
|
194
|
+
def eql?(o)
|
195
|
+
self == o
|
196
|
+
end
|
197
|
+
|
198
|
+
# Calculates hash code according to all attributes.
|
199
|
+
# @return [Integer] Hash code
|
200
|
+
def hash
|
201
|
+
[phone_number, email, first_name, last_name, company, title, custom, custom2, custom3, custom4, scheduled_deletion_date].hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Builds the object from hash
|
205
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
206
|
+
# @return [Object] Returns the model itself
|
207
|
+
def self.build_from_hash(attributes)
|
208
|
+
new.build_from_hash(attributes)
|
209
|
+
end
|
210
|
+
|
211
|
+
# Builds the object from hash
|
212
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
213
|
+
# @return [Object] Returns the model itself
|
214
|
+
def build_from_hash(attributes)
|
215
|
+
return nil unless attributes.is_a?(Hash)
|
216
|
+
self.class.openapi_types.each_pair do |key, type|
|
217
|
+
if type =~ /\AArray<(.*)>/i
|
218
|
+
# check to ensure the input is an array given that the attribute
|
219
|
+
# is documented as an array but the input is not
|
220
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
221
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
222
|
+
end
|
223
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
224
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
225
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
226
|
+
end
|
227
|
+
|
228
|
+
self
|
229
|
+
end
|
230
|
+
|
231
|
+
# Deserializes the data based on type
|
232
|
+
# @param string type Data type
|
233
|
+
# @param string value Value to be deserialized
|
234
|
+
# @return [Object] Deserialized data
|
235
|
+
def _deserialize(type, value)
|
236
|
+
case type.to_sym
|
237
|
+
when :DateTime
|
238
|
+
DateTime.parse(value)
|
239
|
+
when :Date
|
240
|
+
Date.parse(value)
|
241
|
+
when :String
|
242
|
+
value.to_s
|
243
|
+
when :Integer
|
244
|
+
value.to_i
|
245
|
+
when :Float
|
246
|
+
value.to_f
|
247
|
+
when :Boolean
|
248
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
249
|
+
true
|
250
|
+
else
|
251
|
+
false
|
252
|
+
end
|
253
|
+
when :Object
|
254
|
+
# generic object (usually a Hash), return directly
|
255
|
+
value
|
256
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
257
|
+
inner_type = Regexp.last_match[:inner_type]
|
258
|
+
value.map { |v| _deserialize(inner_type, v) }
|
259
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
260
|
+
k_type = Regexp.last_match[:k_type]
|
261
|
+
v_type = Regexp.last_match[:v_type]
|
262
|
+
{}.tap do |hash|
|
263
|
+
value.each do |k, v|
|
264
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
265
|
+
end
|
266
|
+
end
|
267
|
+
else # model
|
268
|
+
MessenteApi.const_get(type).build_from_hash(value)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# Returns the string representation of the object
|
273
|
+
# @return [String] String presentation of the object
|
274
|
+
def to_s
|
275
|
+
to_hash.to_s
|
276
|
+
end
|
277
|
+
|
278
|
+
# to_body is an alias to to_hash (backward compatibility)
|
279
|
+
# @return [Hash] Returns the object in the form of hash
|
280
|
+
def to_body
|
281
|
+
to_hash
|
282
|
+
end
|
283
|
+
|
284
|
+
# Returns the object in the form of hash
|
285
|
+
# @return [Hash] Returns the object in the form of hash
|
286
|
+
def to_hash
|
287
|
+
hash = {}
|
288
|
+
self.class.attribute_map.each_pair do |attr, param|
|
289
|
+
value = self.send(attr)
|
290
|
+
if value.nil?
|
291
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
292
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
293
|
+
end
|
294
|
+
|
295
|
+
hash[param] = _to_hash(value)
|
296
|
+
end
|
297
|
+
hash
|
298
|
+
end
|
299
|
+
|
300
|
+
# Outputs non-array value in the form of hash
|
301
|
+
# For object, use to_hash. Otherwise, just return the value
|
302
|
+
# @param [Object] value Any valid value
|
303
|
+
# @return [Hash] Returns the value in the form of hash
|
304
|
+
def _to_hash(value)
|
305
|
+
if value.is_a?(Array)
|
306
|
+
value.compact.map { |v| _to_hash(v) }
|
307
|
+
elsif value.is_a?(Hash)
|
308
|
+
{}.tap do |hash|
|
309
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
310
|
+
end
|
311
|
+
elsif value.respond_to? :to_hash
|
312
|
+
value.to_hash
|
313
|
+
else
|
314
|
+
value
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|
318
|
+
end
|
data/lib/messente_api/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messente_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Messente
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- docs/ContactEnvelope.md
|
91
91
|
- docs/ContactFields.md
|
92
92
|
- docs/ContactListEnvelope.md
|
93
|
+
- docs/ContactResponseFields.md
|
93
94
|
- docs/ContactUpdateFields.md
|
94
95
|
- docs/ContactsApi.md
|
95
96
|
- docs/DeliveryReportApi.md
|
@@ -156,6 +157,7 @@ files:
|
|
156
157
|
- lib/messente_api/models/contact_envelope.rb
|
157
158
|
- lib/messente_api/models/contact_fields.rb
|
158
159
|
- lib/messente_api/models/contact_list_envelope.rb
|
160
|
+
- lib/messente_api/models/contact_response_fields.rb
|
159
161
|
- lib/messente_api/models/contact_update_fields.rb
|
160
162
|
- lib/messente_api/models/delivery_report_response.rb
|
161
163
|
- lib/messente_api/models/delivery_result.rb
|
@@ -201,6 +203,7 @@ files:
|
|
201
203
|
- lib/messente_api/models/whats_app_image.rb
|
202
204
|
- lib/messente_api/models/whats_app_text.rb
|
203
205
|
- lib/messente_api/version.rb
|
206
|
+
- messente_api-1.3.0.gem
|
204
207
|
- messente_api.gemspec
|
205
208
|
- spec/api_client_spec.rb
|
206
209
|
- spec/configuration_spec.rb
|