Skip to content

Commit a844a83

Browse files
Merge pull request #8 from sendinblue/feature_updated_swagger_sync
Sync: latest swagger update changes for get-contacts and event-report…
2 parents d7f731f + e0a9f33 commit a844a83

7 files changed

+37
-14
lines changed

docs/ContactsApi.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,8 @@ api_instance = SibApiV3Sdk::ContactsApi.new
617617

618618
opts = {
619619
limit: 50, # Integer | Number of documents per page
620-
offset: 0 # Integer | Index of the first document of the page
620+
offset: 0, # Integer | Index of the first document of the page
621+
modified_since: DateTime.parse("2013-10-20T19:20:30+01:00") # DateTime | Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
621622
}
622623

623624
begin
@@ -635,6 +636,7 @@ Name | Type | Description | Notes
635636
------------- | ------------- | ------------- | -------------
636637
**limit** | **Integer**| Number of documents per page | [optional] [default to 50]
637638
**offset** | **Integer**| Index of the first document of the page | [optional] [default to 0]
639+
**modified_since** | **DateTime**| Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional]
638640

639641
### Return type
640642

docs/GetEmailEventReportEvents.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**email** | **String** | Email address which generates the event |
7-
**date** | **Date** | Date on which the event has been generated |
7+
**date** | **DateTime** | Date on which the event has been generated |
88
**subject** | **String** | Subject of the event | [optional]
99
**message_id** | **String** | Message ID which generated the event |
1010
**event** | **String** | Event which occurred |
11-
**reason** | **String** | Reason of bounce (only available if the event is hardbounce or softbounce) |
11+
**reason** | **String** | Reason of bounce (only available if the event is hardbounce or softbounce) | [optional]
1212
**tag** | **String** | Tag of the email which generated the event |
1313
**ip** | **String** | IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) | [optional]
1414
**link** | **String** | The link which is sent to the user (only available if the event is requests or opened or clicks) | [optional]
15+
**from** | **String** | Sender email from which the emails are sent |
1516

1617

lib/sib-api-v3-sdk/api/contacts_api.rb

+3
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ def get_contact_stats_with_http_info(email, opts = {})
627627
# @param [Hash] opts the optional parameters
628628
# @option opts [Integer] :limit Number of documents per page (default to 50)
629629
# @option opts [Integer] :offset Index of the first document of the page (default to 0)
630+
# @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
630631
# @return [GetContacts]
631632
def get_contacts(opts = {})
632633
data, _status_code, _headers = get_contacts_with_http_info(opts)
@@ -638,6 +639,7 @@ def get_contacts(opts = {})
638639
# @param [Hash] opts the optional parameters
639640
# @option opts [Integer] :limit Number of documents per page
640641
# @option opts [Integer] :offset Index of the first document of the page
642+
# @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
641643
# @return [Array<(GetContacts, Fixnum, Hash)>] GetContacts data, response status code and response headers
642644
def get_contacts_with_http_info(opts = {})
643645
if @api_client.config.debugging
@@ -654,6 +656,7 @@ def get_contacts_with_http_info(opts = {})
654656
query_params = {}
655657
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
656658
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
659+
query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
657660

658661
# header parameters
659662
header_params = {}

lib/sib-api-v3-sdk/models/get_email_event_report_events.rb

+20-10
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class GetEmailEventReportEvents
4242
# The link which is sent to the user (only available if the event is requests or opened or clicks)
4343
attr_accessor :link
4444

45+
# Sender email from which the emails are sent
46+
attr_accessor :from
47+
4548
class EnumAttributeValidator
4649
attr_reader :datatype
4750
attr_reader :allowable_values
@@ -75,22 +78,24 @@ def self.attribute_map
7578
:'reason' => :'reason',
7679
:'tag' => :'tag',
7780
:'ip' => :'ip',
78-
:'link' => :'link'
81+
:'link' => :'link',
82+
:'from' => :'from'
7983
}
8084
end
8185

8286
# Attribute type mapping.
8387
def self.swagger_types
8488
{
8589
:'email' => :'String',
86-
:'date' => :'Date',
90+
:'date' => :'DateTime',
8791
:'subject' => :'String',
8892
:'message_id' => :'String',
8993
:'event' => :'String',
9094
:'reason' => :'String',
9195
:'tag' => :'String',
9296
:'ip' => :'String',
93-
:'link' => :'String'
97+
:'link' => :'String',
98+
:'from' => :'String'
9499
}
95100
end
96101

@@ -138,6 +143,10 @@ def initialize(attributes = {})
138143
self.link = attributes[:'link']
139144
end
140145

146+
if attributes.has_key?(:'from')
147+
self.from = attributes[:'from']
148+
end
149+
141150
end
142151

143152
# Show invalid properties with the reasons. Usually used together with valid?
@@ -160,14 +169,14 @@ def list_invalid_properties
160169
invalid_properties.push("invalid value for 'event', event cannot be nil.")
161170
end
162171

163-
if @reason.nil?
164-
invalid_properties.push("invalid value for 'reason', reason cannot be nil.")
165-
end
166-
167172
if @tag.nil?
168173
invalid_properties.push("invalid value for 'tag', tag cannot be nil.")
169174
end
170175

176+
if @from.nil?
177+
invalid_properties.push("invalid value for 'from', from cannot be nil.")
178+
end
179+
171180
return invalid_properties
172181
end
173182

@@ -180,8 +189,8 @@ def valid?
180189
return false if @event.nil?
181190
event_validator = EnumAttributeValidator.new('String', ["bounces", "hardBounces", "softBounces", "delivered", "spam", "requests", "opened", "clicks", "invalid", "deferred", "blocked"])
182191
return false unless event_validator.valid?(@event)
183-
return false if @reason.nil?
184192
return false if @tag.nil?
193+
return false if @from.nil?
185194
return true
186195
end
187196

@@ -208,7 +217,8 @@ def ==(o)
208217
reason == o.reason &&
209218
tag == o.tag &&
210219
ip == o.ip &&
211-
link == o.link
220+
link == o.link &&
221+
from == o.from
212222
end
213223

214224
# @see the `==` method
@@ -220,7 +230,7 @@ def eql?(o)
220230
# Calculates hash code according to all attributes.
221231
# @return [Fixnum] Hash code
222232
def hash
223-
[email, date, subject, message_id, event, reason, tag, ip, link].hash
233+
[email, date, subject, message_id, event, reason, tag, ip, link, from].hash
224234
end
225235

226236
# Builds the object from hash

lib/sib-api-v3-sdk/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module SibApiV3Sdk
14-
VERSION = "2.1.1"
14+
VERSION = "2.1.2"
1515
end

spec/api/contacts_api_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
# @param [Hash] opts the optional parameters
171171
# @option opts [Integer] :limit Number of documents per page
172172
# @option opts [Integer] :offset Index of the first document of the page
173+
# @option opts [DateTime] :modified_since Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
173174
# @return [GetContacts]
174175
describe 'get_contacts test' do
175176
it "should work" do

spec/models/get_email_event_report_events_spec.rb

+6
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,11 @@
9090
end
9191
end
9292

93+
describe 'test attribute "from"' do
94+
it 'should work' do
95+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
96+
end
97+
end
98+
9399
end
94100

0 commit comments

Comments
 (0)