sib-api-v3-sdk 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -9
- data/docs/GetAccountPlan.md +1 -1
- data/docs/GetCampaignStats.md +1 -1
- data/docs/GetContactCampaignStats.md +4 -4
- data/docs/GetContactCampaignStatsClicked.md +1 -1
- data/docs/GetContactCampaignStatsOpened.md +1 -1
- data/docs/GetContactCampaignStatsUnsubscriptions.md +2 -2
- data/docs/GetEmailCampaign.md +1 -1
- data/docs/GetEmailEventReportEvents.md +2 -0
- data/docs/GetExtendedCampaignOverview.md +1 -1
- data/docs/GetExtendedContactDetails.md +1 -0
- data/docs/GetExtendedContactDetailsStatistics.md +15 -0
- data/docs/GetExtendedContactDetailsStatisticsClicked.md +9 -0
- data/docs/{GetContactCampaignStatsLinks.md → GetExtendedContactDetailsStatisticsLinks.md} +2 -2
- data/docs/{GetContactCampaignStatsMessagesSent.md → GetExtendedContactDetailsStatisticsMessagesSent.md} +2 -2
- data/docs/GetExtendedContactDetailsStatisticsOpened.md +11 -0
- data/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md +9 -0
- data/docs/{GetContactCampaignStatsUnsubscriptionsAdminUnsubscription.md → GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md} +2 -2
- data/docs/{GetContactCampaignStatsUnsubscriptionsUserUnsubscription.md → GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md} +2 -2
- data/docs/GetExtendedList.md +1 -1
- data/docs/GetLists.md +1 -1
- data/docs/GetWebhook.md +2 -2
- data/lib/sib-api-v3-sdk.rb +8 -6
- data/lib/sib-api-v3-sdk/models/get_account_plan.rb +1 -1
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +4 -4
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_clicked.rb +1 -1
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_opened.rb +20 -1
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats_unsubscriptions.rb +2 -2
- data/lib/sib-api-v3-sdk/models/get_email_campaign.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_email_event_report_events.rb +24 -4
- data/lib/sib-api-v3-sdk/models/get_extended_campaign_overview.rb +0 -5
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details.rb +13 -4
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +272 -0
- data/lib/sib-api-v3-sdk/models/{get_contact_campaign_stats_messages_sent.rb → get_extended_contact_details_statistics_clicked.rb} +14 -12
- data/lib/sib-api-v3-sdk/models/{get_contact_campaign_stats_links.rb → get_extended_contact_details_statistics_links.rb} +21 -2
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_messages_sent.rb +228 -0
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_opened.rb +258 -0
- data/lib/sib-api-v3-sdk/models/{get_lists_folder.rb → get_extended_contact_details_statistics_unsubscriptions.rb} +27 -23
- data/lib/sib-api-v3-sdk/models/{get_contact_campaign_stats_unsubscriptions_admin_unsubscription.rb → get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.rb} +21 -2
- data/lib/sib-api-v3-sdk/models/{get_contact_campaign_stats_unsubscriptions_user_unsubscription.rb → get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.rb} +21 -2
- data/lib/sib-api-v3-sdk/models/get_extended_list.rb +6 -6
- data/lib/sib-api-v3-sdk/models/get_lists.rb +19 -19
- data/lib/sib-api-v3-sdk/models/get_webhook.rb +12 -12
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/spec/models/get_email_event_report_events_spec.rb +12 -0
- data/spec/models/get_extended_contact_details_spec.rb +6 -0
- data/spec/models/{get_lists_folder_spec.rb → get_extended_contact_details_statistics_clicked_spec.rb} +8 -8
- data/spec/models/{get_contact_campaign_stats_links_spec.rb → get_extended_contact_details_statistics_links_spec.rb} +6 -6
- data/spec/models/{get_contact_campaign_stats_messages_sent_spec.rb → get_extended_contact_details_statistics_messages_sent_spec.rb} +6 -6
- data/spec/models/get_extended_contact_details_statistics_opened_spec.rb +60 -0
- data/spec/models/get_extended_contact_details_statistics_spec.rb +84 -0
- data/spec/models/{get_contact_campaign_stats_unsubscriptions_admin_unsubscription_spec.rb → get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription_spec.rb} +6 -6
- data/spec/models/get_extended_contact_details_statistics_unsubscriptions_spec.rb +48 -0
- data/spec/models/{get_contact_campaign_stats_unsubscriptions_user_unsubscription_spec.rb → get_extended_contact_details_statistics_unsubscriptions_user_unsubscription_spec.rb} +6 -6
- data/spec/models/get_lists_spec.rb +2 -2
- metadata +34 -27
- data/docs/GetListsFolder.md +0 -9
- data/docs/GetListsLists.md +0 -8
- data/git_push.sh +0 -55
- data/lib/sib-api-v3-sdk/models/get_lists_lists.rb +0 -188
- data/spec/models/get_lists_lists_spec.rb +0 -42
data/docs/GetListsFolder.md
DELETED
data/docs/GetListsLists.md
DELETED
data/git_push.sh
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
#
|
3
|
-
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
-
#
|
5
|
-
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
6
|
-
#
|
7
|
-
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
8
|
-
|
9
|
-
git_user_id=$1
|
10
|
-
git_repo_id=$2
|
11
|
-
release_note=$3
|
12
|
-
|
13
|
-
if [ "$git_user_id" = "" ]; then
|
14
|
-
git_user_id="GIT_USER_ID"
|
15
|
-
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
16
|
-
fi
|
17
|
-
|
18
|
-
if [ "$git_repo_id" = "" ]; then
|
19
|
-
git_repo_id="GIT_REPO_ID"
|
20
|
-
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
21
|
-
fi
|
22
|
-
|
23
|
-
if [ "$release_note" = "" ]; then
|
24
|
-
release_note="Minor update"
|
25
|
-
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
26
|
-
fi
|
27
|
-
|
28
|
-
# Initialize the local directory as a Git repository
|
29
|
-
git init
|
30
|
-
|
31
|
-
# Adds the files in the local repository and stages them for commit.
|
32
|
-
git add .
|
33
|
-
|
34
|
-
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
35
|
-
git commit -m "$release_note"
|
36
|
-
|
37
|
-
# Sets the new remote
|
38
|
-
git_remote=`git remote`
|
39
|
-
if [ "$git_remote" = "" ]; then # git remote not defined
|
40
|
-
|
41
|
-
if [ "$GIT_TOKEN" = "" ]; then
|
42
|
-
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
43
|
-
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
44
|
-
else
|
45
|
-
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
46
|
-
fi
|
47
|
-
|
48
|
-
fi
|
49
|
-
|
50
|
-
git pull origin master
|
51
|
-
|
52
|
-
# Pushes (Forces) the changes in the local repository up to the remote repository
|
53
|
-
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
54
|
-
git push origin master 2>&1 | grep -v 'To https'
|
55
|
-
|
@@ -1,188 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#SendinBlue API
|
3
|
-
|
4
|
-
#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
5
|
-
|
6
|
-
OpenAPI spec version: 3.0.0
|
7
|
-
Contact: contact@sendinblue.com
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module SibApiV3Sdk
|
16
|
-
|
17
|
-
class GetListsLists
|
18
|
-
attr_accessor :folder
|
19
|
-
|
20
|
-
|
21
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
-
def self.attribute_map
|
23
|
-
{
|
24
|
-
:'folder' => :'folder'
|
25
|
-
}
|
26
|
-
end
|
27
|
-
|
28
|
-
# Attribute type mapping.
|
29
|
-
def self.swagger_types
|
30
|
-
{
|
31
|
-
:'folder' => :'GetListsFolder'
|
32
|
-
}
|
33
|
-
end
|
34
|
-
|
35
|
-
# Initializes the object
|
36
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
37
|
-
def initialize(attributes = {})
|
38
|
-
return unless attributes.is_a?(Hash)
|
39
|
-
|
40
|
-
# convert string to symbol for hash key
|
41
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
|
-
|
43
|
-
if attributes.has_key?(:'folder')
|
44
|
-
self.folder = attributes[:'folder']
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|
48
|
-
|
49
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
50
|
-
# @return Array for valid properies with the reasons
|
51
|
-
def list_invalid_properties
|
52
|
-
invalid_properties = Array.new
|
53
|
-
return invalid_properties
|
54
|
-
end
|
55
|
-
|
56
|
-
# Check to see if the all the properties in the model are valid
|
57
|
-
# @return true if the model is valid
|
58
|
-
def valid?
|
59
|
-
return true
|
60
|
-
end
|
61
|
-
|
62
|
-
# Checks equality by comparing each attribute.
|
63
|
-
# @param [Object] Object to be compared
|
64
|
-
def ==(o)
|
65
|
-
return true if self.equal?(o)
|
66
|
-
self.class == o.class &&
|
67
|
-
folder == o.folder
|
68
|
-
end
|
69
|
-
|
70
|
-
# @see the `==` method
|
71
|
-
# @param [Object] Object to be compared
|
72
|
-
def eql?(o)
|
73
|
-
self == o
|
74
|
-
end
|
75
|
-
|
76
|
-
# Calculates hash code according to all attributes.
|
77
|
-
# @return [Fixnum] Hash code
|
78
|
-
def hash
|
79
|
-
[folder].hash
|
80
|
-
end
|
81
|
-
|
82
|
-
# Builds the object from hash
|
83
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
-
# @return [Object] Returns the model itself
|
85
|
-
def build_from_hash(attributes)
|
86
|
-
return nil unless attributes.is_a?(Hash)
|
87
|
-
self.class.swagger_types.each_pair do |key, type|
|
88
|
-
if type =~ /\AArray<(.*)>/i
|
89
|
-
# check to ensure the input is an array given that the the attribute
|
90
|
-
# is documented as an array but the input is not
|
91
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
92
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
93
|
-
end
|
94
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
95
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
96
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
97
|
-
end
|
98
|
-
|
99
|
-
self
|
100
|
-
end
|
101
|
-
|
102
|
-
# Deserializes the data based on type
|
103
|
-
# @param string type Data type
|
104
|
-
# @param string value Value to be deserialized
|
105
|
-
# @return [Object] Deserialized data
|
106
|
-
def _deserialize(type, value)
|
107
|
-
case type.to_sym
|
108
|
-
when :DateTime
|
109
|
-
DateTime.parse(value)
|
110
|
-
when :Date
|
111
|
-
Date.parse(value)
|
112
|
-
when :String
|
113
|
-
value.to_s
|
114
|
-
when :Integer
|
115
|
-
value.to_i
|
116
|
-
when :Float
|
117
|
-
value.to_f
|
118
|
-
when :BOOLEAN
|
119
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
120
|
-
true
|
121
|
-
else
|
122
|
-
false
|
123
|
-
end
|
124
|
-
when :Object
|
125
|
-
# generic object (usually a Hash), return directly
|
126
|
-
value
|
127
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
128
|
-
inner_type = Regexp.last_match[:inner_type]
|
129
|
-
value.map { |v| _deserialize(inner_type, v) }
|
130
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
131
|
-
k_type = Regexp.last_match[:k_type]
|
132
|
-
v_type = Regexp.last_match[:v_type]
|
133
|
-
{}.tap do |hash|
|
134
|
-
value.each do |k, v|
|
135
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
136
|
-
end
|
137
|
-
end
|
138
|
-
else # model
|
139
|
-
temp_model = SibApiV3Sdk.const_get(type).new
|
140
|
-
temp_model.build_from_hash(value)
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
# Returns the string representation of the object
|
145
|
-
# @return [String] String presentation of the object
|
146
|
-
def to_s
|
147
|
-
to_hash.to_s
|
148
|
-
end
|
149
|
-
|
150
|
-
# to_body is an alias to to_hash (backward compatibility)
|
151
|
-
# @return [Hash] Returns the object in the form of hash
|
152
|
-
def to_body
|
153
|
-
to_hash
|
154
|
-
end
|
155
|
-
|
156
|
-
# Returns the object in the form of hash
|
157
|
-
# @return [Hash] Returns the object in the form of hash
|
158
|
-
def to_hash
|
159
|
-
hash = {}
|
160
|
-
self.class.attribute_map.each_pair do |attr, param|
|
161
|
-
value = self.send(attr)
|
162
|
-
next if value.nil?
|
163
|
-
hash[param] = _to_hash(value)
|
164
|
-
end
|
165
|
-
hash
|
166
|
-
end
|
167
|
-
|
168
|
-
# Outputs non-array value in the form of hash
|
169
|
-
# For object, use to_hash. Otherwise, just return the value
|
170
|
-
# @param [Object] value Any valid value
|
171
|
-
# @return [Hash] Returns the value in the form of hash
|
172
|
-
def _to_hash(value)
|
173
|
-
if value.is_a?(Array)
|
174
|
-
value.compact.map{ |v| _to_hash(v) }
|
175
|
-
elsif value.is_a?(Hash)
|
176
|
-
{}.tap do |hash|
|
177
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
178
|
-
end
|
179
|
-
elsif value.respond_to? :to_hash
|
180
|
-
value.to_hash
|
181
|
-
else
|
182
|
-
value
|
183
|
-
end
|
184
|
-
end
|
185
|
-
|
186
|
-
end
|
187
|
-
|
188
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#SendinBlue API
|
3
|
-
|
4
|
-
#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed |
|
5
|
-
|
6
|
-
OpenAPI spec version: 3.0.0
|
7
|
-
Contact: contact@sendinblue.com
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for SibApiV3Sdk::GetListsLists
|
18
|
-
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe 'GetListsLists' do
|
21
|
-
before do
|
22
|
-
# run before each test
|
23
|
-
@instance = SibApiV3Sdk::GetListsLists.new
|
24
|
-
end
|
25
|
-
|
26
|
-
after do
|
27
|
-
# run after each test
|
28
|
-
end
|
29
|
-
|
30
|
-
describe 'test an instance of GetListsLists' do
|
31
|
-
it 'should create an instance of GetListsLists' do
|
32
|
-
expect(@instance).to be_instance_of(SibApiV3Sdk::GetListsLists)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
describe 'test attribute "folder"' do
|
36
|
-
it 'should work' do
|
37
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
|