Skip to content

Commit 32ab8bd

Browse files
author
Erik Räni
authored
🎉 1.3.1 (#11)
**Bug Fix** [phonebook-api][contacts] Make sure scheduled deletion date field is only in responses, not in requests
1 parent 1675bf6 commit 32ab8bd

13 files changed

Lines changed: 372 additions & 29 deletions

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ script:
88
- bundle install --path vendor/bundle
99
- bundle exec rspec
1010
- gem build messente_api.gemspec
11-
- gem install ./messente_api-1.3.0.gem
11+
- gem install ./messente_api-1.3.1.gem

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Messente API Library
22

33
- Messente API version: 1.3.0
4-
- Ruby gem version: 1.3.0
4+
- Ruby gem version: 1.3.1
55

66
[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.
77

docs/ContactEnvelope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**contact** | [**ContactFields**](ContactFields.md) | | [optional]
7+
**contact** | [**ContactResponseFields**](ContactResponseFields.md) | | [optional]
88

99
## Code Sample
1010

docs/ContactFields.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Name | Type | Description | Notes
1414
**custom2** | **String** | The second custom field | [optional]
1515
**custom3** | **String** | The third custom field | [optional]
1616
**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]
1817

1918
## Code Sample
2019

@@ -30,8 +29,7 @@ instance = MessenteApi::ContactFields.new(phone_number: null,
3029
custom: null,
3130
custom2: null,
3231
custom3: null,
33-
custom4: null,
34-
scheduled_deletion_date: null)
32+
custom4: null)
3533
```
3634

3735

docs/ContactListEnvelope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**contacts** | [**Array<ContactFields>**](ContactFields.md) | An array of contacts | [optional]
7+
**contacts** | [**Array<ContactResponseFields>**](ContactResponseFields.md) | An array of contacts | [optional]
88

99
## Code Sample
1010

docs/ContactResponseFields.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+

docs/ContactsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ MessenteApi.configure do |config|
8787
end
8888

8989
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","scheduledDeletionDate":"2020-08-31"} # ContactFields |
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 |
9191

9292
begin
9393
#Creates a new contact
@@ -396,7 +396,7 @@ end
396396

397397
api_instance = MessenteApi::ContactsApi.new
398398
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","scheduledDeletionDate":"2020-08-31"} # ContactUpdateFields |
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 |
400400

401401
begin
402402
#Updates a contact

lib/messente_api.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
require 'messente_api/models/contact_envelope'
2222
require 'messente_api/models/contact_fields'
2323
require 'messente_api/models/contact_list_envelope'
24+
require 'messente_api/models/contact_response_fields'
2425
require 'messente_api/models/contact_update_fields'
2526
require 'messente_api/models/delivery_report_response'
2627
require 'messente_api/models/delivery_result'

lib/messente_api/models/contact_envelope.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def self.attribute_map
2727
# Attribute type mapping.
2828
def self.openapi_types
2929
{
30-
:'contact' => :'ContactFields'
30+
:'contact' => :'ContactResponseFields'
3131
}
3232
end
3333

lib/messente_api/models/contact_fields.rb

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
require 'date'
1414

1515
module MessenteApi
16-
# A container for fields of a contact
16+
# A container for fields of a request body of a contact
1717
class ContactFields
1818
# Phone number in e.164 format
1919
attr_accessor :phone_number
@@ -45,9 +45,6 @@ class ContactFields
4545
# The fourth custom field
4646
attr_accessor :custom4
4747

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-
5148
# Attribute mapping from ruby-style variable name to JSON key.
5249
def self.attribute_map
5350
{
@@ -60,8 +57,7 @@ def self.attribute_map
6057
:'custom' => :'custom',
6158
:'custom2' => :'custom2',
6259
:'custom3' => :'custom3',
63-
:'custom4' => :'custom4',
64-
:'scheduled_deletion_date' => :'scheduledDeletionDate'
60+
:'custom4' => :'custom4'
6561
}
6662
end
6763

@@ -77,8 +73,7 @@ def self.openapi_types
7773
:'custom' => :'String',
7874
:'custom2' => :'String',
7975
:'custom3' => :'String',
80-
:'custom4' => :'String',
81-
:'scheduled_deletion_date' => :'Date'
76+
:'custom4' => :'String'
8277
}
8378
end
8479

@@ -93,8 +88,7 @@ def self.openapi_nullable
9388
:'custom',
9489
:'custom2',
9590
:'custom3',
96-
:'custom4',
97-
:'scheduled_deletion_date'
91+
:'custom4'
9892
])
9993
end
10094

@@ -152,10 +146,6 @@ def initialize(attributes = {})
152146
if attributes.key?(:'custom4')
153147
self.custom4 = attributes[:'custom4']
154148
end
155-
156-
if attributes.key?(:'scheduled_deletion_date')
157-
self.scheduled_deletion_date = attributes[:'scheduled_deletion_date']
158-
end
159149
end
160150

161151
# Show invalid properties with the reasons. Usually used together with valid?
@@ -190,8 +180,7 @@ def ==(o)
190180
custom == o.custom &&
191181
custom2 == o.custom2 &&
192182
custom3 == o.custom3 &&
193-
custom4 == o.custom4 &&
194-
scheduled_deletion_date == o.scheduled_deletion_date
183+
custom4 == o.custom4
195184
end
196185

197186
# @see the `==` method
@@ -203,7 +192,7 @@ def eql?(o)
203192
# Calculates hash code according to all attributes.
204193
# @return [Integer] Hash code
205194
def hash
206-
[phone_number, email, first_name, last_name, company, title, custom, custom2, custom3, custom4, scheduled_deletion_date].hash
195+
[phone_number, email, first_name, last_name, company, title, custom, custom2, custom3, custom4].hash
207196
end
208197

209198
# Builds the object from hash

0 commit comments

Comments
 (0)