sib-api-v3-sdk 7.5.0 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +59 -4
- data/docs/Body.md +18 -0
- data/docs/Body1.md +18 -0
- data/docs/CRMApi.md +710 -0
- data/docs/Contact.md +15 -0
- data/docs/ContactsApi.md +61 -2
- data/docs/CreateSmsCampaign.md +1 -0
- data/docs/CreateSubAccount.md +10 -0
- data/docs/CreateWebhook.md +2 -1
- data/docs/FileData.md +17 -0
- data/docs/GetCampaignStats.md +1 -0
- data/docs/GetContactCampaignStats.md +1 -0
- data/docs/GetExtendedContactDetailsStatistics.md +1 -0
- data/docs/GetExtendedContactDetailsStatisticsDelivered.md +9 -0
- data/docs/GetInboundEmailEvents.md +8 -0
- data/docs/GetInboundEmailEventsByUuid.md +15 -0
- data/docs/GetInboundEmailEventsByUuidAttachments.md +11 -0
- data/docs/GetInboundEmailEventsByUuidLogs.md +9 -0
- data/docs/GetInboundEmailEventsEvents.md +11 -0
- data/docs/InboundParsingApi.md +139 -0
- data/docs/MasterAccountApi.md +367 -0
- data/docs/MasterDetailsResponse.md +14 -0
- data/docs/MasterDetailsResponseBillingInfo.md +11 -0
- data/docs/MasterDetailsResponseBillingInfoAddress.md +12 -0
- data/docs/MasterDetailsResponseBillingInfoName.md +9 -0
- data/docs/MasterDetailsResponsePlanInfo.md +13 -0
- data/docs/MasterDetailsResponsePlanInfoFeatures.md +12 -0
- data/docs/Note.md +14 -0
- data/docs/NoteData.md +10 -0
- data/docs/RequestContactExport.md +1 -2
- data/docs/SendSmtpEmail.md +3 -3
- data/docs/SendTransacSms.md +1 -0
- data/docs/SsoTokenRequest.md +9 -0
- data/docs/SubAccountDetailsResponse.md +11 -0
- data/docs/SubAccountDetailsResponsePlanInfo.md +10 -0
- data/docs/SubAccountDetailsResponsePlanInfoCredits.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeatures.md +10 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md +9 -0
- data/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md +9 -0
- data/docs/SubAccountUpdatePlanRequest.md +9 -0
- data/docs/SubAccountUpdatePlanRequestCredits.md +8 -0
- data/docs/SubAccountUpdatePlanRequestFeatures.md +10 -0
- data/docs/SubAccountsResponse.md +9 -0
- data/docs/SubAccountsResponseSubAccounts.md +11 -0
- data/docs/Task.md +24 -0
- data/docs/TaskReminder.md +10 -0
- data/docs/TransactionalEmailsApi.md +4 -63
- data/docs/UpdateBatchContacts.md +8 -0
- data/docs/UpdateBatchContactsContacts.md +16 -0
- data/docs/UpdateBatchContactsModel.md +9 -0
- data/docs/UpdateSmsCampaign.md +1 -0
- data/docs/UpdateWebhook.md +2 -1
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +55 -2
- data/lib/sib-api-v3-sdk/api/crm_api.rb +670 -0
- data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +161 -0
- data/lib/sib-api-v3-sdk/api/master_account_api.rb +365 -0
- data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +4 -60
- data/lib/sib-api-v3-sdk/api/webhooks_api.rb +2 -2
- data/lib/sib-api-v3-sdk/models/body.rb +305 -0
- data/lib/sib-api-v3-sdk/models/body_1.rb +305 -0
- data/lib/sib-api-v3-sdk/models/{send_email.rb → contact.rb} +64 -78
- data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +16 -4
- data/lib/sib-api-v3-sdk/models/create_sub_account.rb +244 -0
- data/lib/sib-api-v3-sdk/models/create_webhook.rb +17 -7
- data/lib/sib-api-v3-sdk/models/file_data.rb +278 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +16 -1
- data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +15 -4
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +16 -4
- data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_delivered.rb +205 -0
- data/lib/sib-api-v3-sdk/models/{send_template_email.rb → get_inbound_email_events.rb} +10 -14
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid.rb +259 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_attachments.rb +215 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_logs.rb +229 -0
- data/lib/sib-api-v3-sdk/models/get_inbound_email_events_events.rb +235 -0
- data/lib/sib-api-v3-sdk/models/master_details_response.rb +243 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_billing_info.rb +214 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_address.rb +226 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_name.rb +196 -0
- data/lib/sib-api-v3-sdk/models/master_details_response_plan_info.rb +272 -0
- data/lib/sib-api-v3-sdk/models/{send_email_attachment.rb → master_details_response_plan_info_features.rb} +45 -44
- data/lib/sib-api-v3-sdk/models/note.rb +283 -0
- data/lib/sib-api-v3-sdk/models/note_data.rb +243 -0
- data/lib/sib-api-v3-sdk/models/request_contact_export.rb +6 -11
- data/lib/sib-api-v3-sdk/models/request_contact_export_custom_contact_filter.rb +1 -1
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +3 -3
- data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +16 -4
- data/lib/sib-api-v3-sdk/models/sso_token_request.rb +200 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response.rb +214 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info.rb +204 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +195 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +203 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_inbox.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_landing_page.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_users.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request.rb +194 -0
- data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_credits.rb +186 -0
- data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_features.rb +206 -0
- data/lib/sib-api-v3-sdk/models/sub_accounts_response.rb +196 -0
- data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +235 -0
- data/lib/sib-api-v3-sdk/models/task.rb +367 -0
- data/lib/sib-api-v3-sdk/models/task_reminder.rb +257 -0
- data/lib/sib-api-v3-sdk/models/update_batch_contacts.rb +187 -0
- data/lib/sib-api-v3-sdk/models/update_batch_contacts_contacts.rb +273 -0
- data/lib/sib-api-v3-sdk/models/update_batch_contacts_model.rb +197 -0
- data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +16 -4
- data/lib/sib-api-v3-sdk/models/update_webhook.rb +15 -5
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/lib/sib-api-v3-sdk.rb +41 -3
- data/sib-api-v3-sdk.gemspec +2 -1
- data/spec/api/contacts_api_spec.rb +13 -1
- data/spec/api/crm_api_spec.rb +170 -0
- data/spec/api/inbound_parsing_api_spec.rb +64 -0
- data/spec/api/master_account_api_spec.rb +108 -0
- data/spec/api/transactional_emails_api_spec.rb +2 -13
- data/spec/models/body_1_spec.rb +101 -0
- data/spec/models/body_spec.rb +101 -0
- data/spec/models/contact_spec.rb +83 -0
- data/spec/models/create_sms_campaign_spec.rb +6 -0
- data/spec/models/create_sub_account_spec.rb +57 -0
- data/spec/models/create_webhook_spec.rb +8 -2
- data/spec/models/file_data_spec.rb +95 -0
- data/spec/models/get_campaign_stats_spec.rb +6 -0
- data/spec/models/get_contact_campaign_stats_spec.rb +6 -0
- data/spec/models/get_extended_contact_details_statistics_delivered_spec.rb +47 -0
- data/spec/models/get_extended_contact_details_statistics_spec.rb +6 -0
- data/spec/models/get_inbound_email_events_by_uuid_attachments_spec.rb +59 -0
- data/spec/models/get_inbound_email_events_by_uuid_logs_spec.rb +51 -0
- data/spec/models/get_inbound_email_events_by_uuid_spec.rb +83 -0
- data/spec/models/get_inbound_email_events_events_spec.rb +59 -0
- data/spec/models/get_inbound_email_events_spec.rb +41 -0
- data/spec/models/master_details_response_billing_info_address_spec.rb +65 -0
- data/spec/models/master_details_response_billing_info_name_spec.rb +47 -0
- data/spec/models/master_details_response_billing_info_spec.rb +59 -0
- data/spec/models/master_details_response_plan_info_features_spec.rb +65 -0
- data/spec/models/master_details_response_plan_info_spec.rb +75 -0
- data/spec/models/master_details_response_spec.rb +77 -0
- data/spec/models/note_data_spec.rb +53 -0
- data/spec/models/note_spec.rb +77 -0
- data/spec/models/request_contact_export_spec.rb +0 -6
- data/spec/models/send_transac_sms_spec.rb +6 -0
- data/spec/models/{send_email_attachment_spec.rb → sso_token_request_spec.rb} +8 -8
- data/spec/models/sub_account_details_response_plan_info_credits_emails_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_credits_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_inbox_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_landing_page_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_features_spec.rb +53 -0
- data/spec/models/sub_account_details_response_plan_info_features_users_spec.rb +47 -0
- data/spec/models/sub_account_details_response_plan_info_spec.rb +53 -0
- data/spec/models/sub_account_details_response_spec.rb +59 -0
- data/spec/models/sub_account_update_plan_request_credits_spec.rb +41 -0
- data/spec/models/sub_account_update_plan_request_features_spec.rb +53 -0
- data/spec/models/sub_account_update_plan_request_spec.rb +47 -0
- data/spec/models/sub_accounts_response_spec.rb +47 -0
- data/spec/models/sub_accounts_response_sub_accounts_spec.rb +59 -0
- data/spec/models/task_reminder_spec.rb +57 -0
- data/spec/models/task_spec.rb +137 -0
- data/spec/models/{send_email_spec.rb → update_batch_contacts_contacts_spec.rb} +15 -15
- data/spec/models/update_batch_contacts_model_spec.rb +47 -0
- data/spec/models/{send_template_email_spec.rb → update_batch_contacts_spec.rb} +7 -7
- data/spec/models/update_sms_campaign_spec.rb +6 -0
- data/spec/models/update_webhook_spec.rb +7 -1
- metadata +186 -14
- data/docs/SendEmail.md +0 -16
- data/docs/SendEmailAttachment.md +0 -9
- data/docs/SendTemplateEmail.md +0 -8
@@ -0,0 +1,278 @@
|
|
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 | | 406 | Error. Not Acceptable |
|
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.4.19
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SibApiV3Sdk
|
16
|
+
# File data that is uploaded
|
17
|
+
class FileData
|
18
|
+
# Url of uploaded file
|
19
|
+
attr_accessor :url
|
20
|
+
|
21
|
+
# Id of uploaded file
|
22
|
+
attr_accessor :id
|
23
|
+
|
24
|
+
# Name of uploaded file
|
25
|
+
attr_accessor :name
|
26
|
+
|
27
|
+
# Account id of user which created the file
|
28
|
+
attr_accessor :author_id
|
29
|
+
|
30
|
+
# Account details of user which created the file
|
31
|
+
attr_accessor :author
|
32
|
+
|
33
|
+
# Contact id of contact on which file is uploaded
|
34
|
+
attr_accessor :contact_id
|
35
|
+
|
36
|
+
# Deal ids linked to a file
|
37
|
+
attr_accessor :deal_ids
|
38
|
+
|
39
|
+
# Size of file uploaded
|
40
|
+
attr_accessor :size
|
41
|
+
|
42
|
+
# File created date/time
|
43
|
+
attr_accessor :created_at
|
44
|
+
|
45
|
+
# File updated date/time
|
46
|
+
attr_accessor :updated_at
|
47
|
+
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
49
|
+
def self.attribute_map
|
50
|
+
{
|
51
|
+
:'url' => :'url',
|
52
|
+
:'id' => :'id',
|
53
|
+
:'name' => :'name',
|
54
|
+
:'author_id' => :'authorId',
|
55
|
+
:'author' => :'author',
|
56
|
+
:'contact_id' => :'contactId',
|
57
|
+
:'deal_ids' => :'dealIds',
|
58
|
+
:'size' => :'size',
|
59
|
+
:'created_at' => :'createdAt',
|
60
|
+
:'updated_at' => :'updatedAt'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.swagger_types
|
66
|
+
{
|
67
|
+
:'url' => :'String',
|
68
|
+
:'id' => :'String',
|
69
|
+
:'name' => :'String',
|
70
|
+
:'author_id' => :'String',
|
71
|
+
:'author' => :'Object',
|
72
|
+
:'contact_id' => :'Integer',
|
73
|
+
:'deal_ids' => :'Array<String>',
|
74
|
+
:'size' => :'Integer',
|
75
|
+
:'created_at' => :'DateTime',
|
76
|
+
:'updated_at' => :'DateTime'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
return unless attributes.is_a?(Hash)
|
84
|
+
|
85
|
+
# convert string to symbol for hash key
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
87
|
+
|
88
|
+
if attributes.has_key?(:'url')
|
89
|
+
self.url = attributes[:'url']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.has_key?(:'id')
|
93
|
+
self.id = attributes[:'id']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.has_key?(:'name')
|
97
|
+
self.name = attributes[:'name']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'authorId')
|
101
|
+
self.author_id = attributes[:'authorId']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'author')
|
105
|
+
self.author = attributes[:'author']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.has_key?(:'contactId')
|
109
|
+
self.contact_id = attributes[:'contactId']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.has_key?(:'dealIds')
|
113
|
+
if (value = attributes[:'dealIds']).is_a?(Array)
|
114
|
+
self.deal_ids = value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'size')
|
119
|
+
self.size = attributes[:'size']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.has_key?(:'createdAt')
|
123
|
+
self.created_at = attributes[:'createdAt']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.has_key?(:'updatedAt')
|
127
|
+
self.updated_at = attributes[:'updatedAt']
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
132
|
+
# @return Array for valid properties with the reasons
|
133
|
+
def list_invalid_properties
|
134
|
+
invalid_properties = Array.new
|
135
|
+
invalid_properties
|
136
|
+
end
|
137
|
+
|
138
|
+
# Check to see if the all the properties in the model are valid
|
139
|
+
# @return true if the model is valid
|
140
|
+
def valid?
|
141
|
+
true
|
142
|
+
end
|
143
|
+
|
144
|
+
# Checks equality by comparing each attribute.
|
145
|
+
# @param [Object] Object to be compared
|
146
|
+
def ==(o)
|
147
|
+
return true if self.equal?(o)
|
148
|
+
self.class == o.class &&
|
149
|
+
url == o.url &&
|
150
|
+
id == o.id &&
|
151
|
+
name == o.name &&
|
152
|
+
author_id == o.author_id &&
|
153
|
+
author == o.author &&
|
154
|
+
contact_id == o.contact_id &&
|
155
|
+
deal_ids == o.deal_ids &&
|
156
|
+
size == o.size &&
|
157
|
+
created_at == o.created_at &&
|
158
|
+
updated_at == o.updated_at
|
159
|
+
end
|
160
|
+
|
161
|
+
# @see the `==` method
|
162
|
+
# @param [Object] Object to be compared
|
163
|
+
def eql?(o)
|
164
|
+
self == o
|
165
|
+
end
|
166
|
+
|
167
|
+
# Calculates hash code according to all attributes.
|
168
|
+
# @return [Fixnum] Hash code
|
169
|
+
def hash
|
170
|
+
[url, id, name, author_id, author, contact_id, deal_ids, size, created_at, updated_at].hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Builds the object from hash
|
174
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
175
|
+
# @return [Object] Returns the model itself
|
176
|
+
def build_from_hash(attributes)
|
177
|
+
return nil unless attributes.is_a?(Hash)
|
178
|
+
self.class.swagger_types.each_pair do |key, type|
|
179
|
+
if type =~ /\AArray<(.*)>/i
|
180
|
+
# check to ensure the input is an array given that the attribute
|
181
|
+
# is documented as an array but the input is not
|
182
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
183
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
184
|
+
end
|
185
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
186
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
187
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
188
|
+
end
|
189
|
+
|
190
|
+
self
|
191
|
+
end
|
192
|
+
|
193
|
+
# Deserializes the data based on type
|
194
|
+
# @param string type Data type
|
195
|
+
# @param string value Value to be deserialized
|
196
|
+
# @return [Object] Deserialized data
|
197
|
+
def _deserialize(type, value)
|
198
|
+
case type.to_sym
|
199
|
+
when :DateTime
|
200
|
+
DateTime.parse(value)
|
201
|
+
when :Date
|
202
|
+
Date.parse(value)
|
203
|
+
when :String
|
204
|
+
value.to_s
|
205
|
+
when :Integer
|
206
|
+
value.to_i
|
207
|
+
when :Float
|
208
|
+
value.to_f
|
209
|
+
when :BOOLEAN
|
210
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
211
|
+
true
|
212
|
+
else
|
213
|
+
false
|
214
|
+
end
|
215
|
+
when :Object
|
216
|
+
# generic object (usually a Hash), return directly
|
217
|
+
value
|
218
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
219
|
+
inner_type = Regexp.last_match[:inner_type]
|
220
|
+
value.map { |v| _deserialize(inner_type, v) }
|
221
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
222
|
+
k_type = Regexp.last_match[:k_type]
|
223
|
+
v_type = Regexp.last_match[:v_type]
|
224
|
+
{}.tap do |hash|
|
225
|
+
value.each do |k, v|
|
226
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
227
|
+
end
|
228
|
+
end
|
229
|
+
else # model
|
230
|
+
temp_model = SibApiV3Sdk.const_get(type).new
|
231
|
+
temp_model.build_from_hash(value)
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# Returns the string representation of the object
|
236
|
+
# @return [String] String presentation of the object
|
237
|
+
def to_s
|
238
|
+
to_hash.to_s
|
239
|
+
end
|
240
|
+
|
241
|
+
# to_body is an alias to to_hash (backward compatibility)
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
243
|
+
def to_body
|
244
|
+
to_hash
|
245
|
+
end
|
246
|
+
|
247
|
+
# Returns the object in the form of hash
|
248
|
+
# @return [Hash] Returns the object in the form of hash
|
249
|
+
def to_hash
|
250
|
+
hash = {}
|
251
|
+
self.class.attribute_map.each_pair do |attr, param|
|
252
|
+
value = self.send(attr)
|
253
|
+
next if value.nil?
|
254
|
+
hash[param] = _to_hash(value)
|
255
|
+
end
|
256
|
+
hash
|
257
|
+
end
|
258
|
+
|
259
|
+
# Outputs non-array value in the form of hash
|
260
|
+
# For object, use to_hash. Otherwise, just return the value
|
261
|
+
# @param [Object] value Any valid value
|
262
|
+
# @return [Hash] Returns the value in the form of hash
|
263
|
+
def _to_hash(value)
|
264
|
+
if value.is_a?(Array)
|
265
|
+
value.compact.map { |v| _to_hash(v) }
|
266
|
+
elsif value.is_a?(Hash)
|
267
|
+
{}.tap do |hash|
|
268
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
269
|
+
end
|
270
|
+
elsif value.respond_to? :to_hash
|
271
|
+
value.to_hash
|
272
|
+
else
|
273
|
+
value
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
end
|
278
|
+
end
|
@@ -41,6 +41,9 @@ module SibApiV3Sdk
|
|
41
41
|
# Number of unique openings for the campaign
|
42
42
|
attr_accessor :unique_views
|
43
43
|
|
44
|
+
# Recipients without any privacy protection option enabled in their email client
|
45
|
+
attr_accessor :trackable_views
|
46
|
+
|
44
47
|
# Number of unsubscription for the campaign
|
45
48
|
attr_accessor :unsubscriptions
|
46
49
|
|
@@ -65,6 +68,7 @@ module SibApiV3Sdk
|
|
65
68
|
:'soft_bounces' => :'softBounces',
|
66
69
|
:'hard_bounces' => :'hardBounces',
|
67
70
|
:'unique_views' => :'uniqueViews',
|
71
|
+
:'trackable_views' => :'trackableViews',
|
68
72
|
:'unsubscriptions' => :'unsubscriptions',
|
69
73
|
:'viewed' => :'viewed',
|
70
74
|
:'deferred' => :'deferred',
|
@@ -84,6 +88,7 @@ module SibApiV3Sdk
|
|
84
88
|
:'soft_bounces' => :'Integer',
|
85
89
|
:'hard_bounces' => :'Integer',
|
86
90
|
:'unique_views' => :'Integer',
|
91
|
+
:'trackable_views' => :'Integer',
|
87
92
|
:'unsubscriptions' => :'Integer',
|
88
93
|
:'viewed' => :'Integer',
|
89
94
|
:'deferred' => :'Integer',
|
@@ -135,6 +140,10 @@ module SibApiV3Sdk
|
|
135
140
|
self.unique_views = attributes[:'uniqueViews']
|
136
141
|
end
|
137
142
|
|
143
|
+
if attributes.has_key?(:'trackableViews')
|
144
|
+
self.trackable_views = attributes[:'trackableViews']
|
145
|
+
end
|
146
|
+
|
138
147
|
if attributes.has_key?(:'unsubscriptions')
|
139
148
|
self.unsubscriptions = attributes[:'unsubscriptions']
|
140
149
|
end
|
@@ -188,6 +197,10 @@ module SibApiV3Sdk
|
|
188
197
|
invalid_properties.push('invalid value for "unique_views", unique_views cannot be nil.')
|
189
198
|
end
|
190
199
|
|
200
|
+
if @trackable_views.nil?
|
201
|
+
invalid_properties.push('invalid value for "trackable_views", trackable_views cannot be nil.')
|
202
|
+
end
|
203
|
+
|
191
204
|
if @unsubscriptions.nil?
|
192
205
|
invalid_properties.push('invalid value for "unsubscriptions", unsubscriptions cannot be nil.')
|
193
206
|
end
|
@@ -210,6 +223,7 @@ module SibApiV3Sdk
|
|
210
223
|
return false if @soft_bounces.nil?
|
211
224
|
return false if @hard_bounces.nil?
|
212
225
|
return false if @unique_views.nil?
|
226
|
+
return false if @trackable_views.nil?
|
213
227
|
return false if @unsubscriptions.nil?
|
214
228
|
return false if @viewed.nil?
|
215
229
|
true
|
@@ -229,6 +243,7 @@ module SibApiV3Sdk
|
|
229
243
|
soft_bounces == o.soft_bounces &&
|
230
244
|
hard_bounces == o.hard_bounces &&
|
231
245
|
unique_views == o.unique_views &&
|
246
|
+
trackable_views == o.trackable_views &&
|
232
247
|
unsubscriptions == o.unsubscriptions &&
|
233
248
|
viewed == o.viewed &&
|
234
249
|
deferred == o.deferred &&
|
@@ -244,7 +259,7 @@ module SibApiV3Sdk
|
|
244
259
|
# Calculates hash code according to all attributes.
|
245
260
|
# @return [Fixnum] Hash code
|
246
261
|
def hash
|
247
|
-
[list_id, unique_clicks, clickers, complaints, delivered, sent, soft_bounces, hard_bounces, unique_views, unsubscriptions, viewed, deferred, return_bounce].hash
|
262
|
+
[list_id, unique_clicks, clickers, complaints, delivered, sent, soft_bounces, hard_bounces, unique_views, trackable_views, unsubscriptions, viewed, deferred, return_bounce].hash
|
248
263
|
end
|
249
264
|
|
250
265
|
# Builds the object from hash
|
@@ -31,6 +31,8 @@ module SibApiV3Sdk
|
|
31
31
|
|
32
32
|
attr_accessor :transac_attributes
|
33
33
|
|
34
|
+
attr_accessor :delivered
|
35
|
+
|
34
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
37
|
def self.attribute_map
|
36
38
|
{
|
@@ -41,7 +43,8 @@ module SibApiV3Sdk
|
|
41
43
|
:'unsubscriptions' => :'unsubscriptions',
|
42
44
|
:'opened' => :'opened',
|
43
45
|
:'clicked' => :'clicked',
|
44
|
-
:'transac_attributes' => :'transacAttributes'
|
46
|
+
:'transac_attributes' => :'transacAttributes',
|
47
|
+
:'delivered' => :'delivered'
|
45
48
|
}
|
46
49
|
end
|
47
50
|
|
@@ -55,7 +58,8 @@ module SibApiV3Sdk
|
|
55
58
|
:'unsubscriptions' => :'GetContactCampaignStatsUnsubscriptions',
|
56
59
|
:'opened' => :'Array<GetContactCampaignStatsOpened>',
|
57
60
|
:'clicked' => :'Array<GetContactCampaignStatsClicked>',
|
58
|
-
:'transac_attributes' => :'Array<GetContactCampaignStatsTransacAttributes>'
|
61
|
+
:'transac_attributes' => :'Array<GetContactCampaignStatsTransacAttributes>',
|
62
|
+
:'delivered' => :'Array<GetExtendedContactDetailsStatisticsMessagesSent>'
|
59
63
|
}
|
60
64
|
end
|
61
65
|
|
@@ -112,6 +116,12 @@ module SibApiV3Sdk
|
|
112
116
|
self.transac_attributes = value
|
113
117
|
end
|
114
118
|
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'delivered')
|
121
|
+
if (value = attributes[:'delivered']).is_a?(Array)
|
122
|
+
self.delivered = value
|
123
|
+
end
|
124
|
+
end
|
115
125
|
end
|
116
126
|
|
117
127
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -139,7 +149,8 @@ module SibApiV3Sdk
|
|
139
149
|
unsubscriptions == o.unsubscriptions &&
|
140
150
|
opened == o.opened &&
|
141
151
|
clicked == o.clicked &&
|
142
|
-
transac_attributes == o.transac_attributes
|
152
|
+
transac_attributes == o.transac_attributes &&
|
153
|
+
delivered == o.delivered
|
143
154
|
end
|
144
155
|
|
145
156
|
# @see the `==` method
|
@@ -151,7 +162,7 @@ module SibApiV3Sdk
|
|
151
162
|
# Calculates hash code according to all attributes.
|
152
163
|
# @return [Fixnum] Hash code
|
153
164
|
def hash
|
154
|
-
[messages_sent, hard_bounces, soft_bounces, complaints, unsubscriptions, opened, clicked, transac_attributes].hash
|
165
|
+
[messages_sent, hard_bounces, soft_bounces, complaints, unsubscriptions, opened, clicked, transac_attributes, delivered].hash
|
155
166
|
end
|
156
167
|
|
157
168
|
# Builds the object from hash
|
@@ -38,6 +38,9 @@ module SibApiV3Sdk
|
|
38
38
|
# Listing of the transactional attributes for the contact
|
39
39
|
attr_accessor :transac_attributes
|
40
40
|
|
41
|
+
# Listing of the delivered campaign for the contact
|
42
|
+
attr_accessor :delivered
|
43
|
+
|
41
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
45
|
def self.attribute_map
|
43
46
|
{
|
@@ -48,7 +51,8 @@ module SibApiV3Sdk
|
|
48
51
|
:'unsubscriptions' => :'unsubscriptions',
|
49
52
|
:'opened' => :'opened',
|
50
53
|
:'clicked' => :'clicked',
|
51
|
-
:'transac_attributes' => :'transacAttributes'
|
54
|
+
:'transac_attributes' => :'transacAttributes',
|
55
|
+
:'delivered' => :'delivered'
|
52
56
|
}
|
53
57
|
end
|
54
58
|
|
@@ -62,7 +66,8 @@ module SibApiV3Sdk
|
|
62
66
|
:'unsubscriptions' => :'GetExtendedContactDetailsStatisticsUnsubscriptions',
|
63
67
|
:'opened' => :'Array<GetExtendedContactDetailsStatisticsOpened>',
|
64
68
|
:'clicked' => :'Array<GetExtendedContactDetailsStatisticsClicked>',
|
65
|
-
:'transac_attributes' => :'Array<Object>'
|
69
|
+
:'transac_attributes' => :'Array<Object>',
|
70
|
+
:'delivered' => :'Array<GetExtendedContactDetailsStatisticsDelivered>'
|
66
71
|
}
|
67
72
|
end
|
68
73
|
|
@@ -119,6 +124,12 @@ module SibApiV3Sdk
|
|
119
124
|
self.transac_attributes = value
|
120
125
|
end
|
121
126
|
end
|
127
|
+
|
128
|
+
if attributes.has_key?(:'delivered')
|
129
|
+
if (value = attributes[:'delivered']).is_a?(Array)
|
130
|
+
self.delivered = value
|
131
|
+
end
|
132
|
+
end
|
122
133
|
end
|
123
134
|
|
124
135
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -146,7 +157,8 @@ module SibApiV3Sdk
|
|
146
157
|
unsubscriptions == o.unsubscriptions &&
|
147
158
|
opened == o.opened &&
|
148
159
|
clicked == o.clicked &&
|
149
|
-
transac_attributes == o.transac_attributes
|
160
|
+
transac_attributes == o.transac_attributes &&
|
161
|
+
delivered == o.delivered
|
150
162
|
end
|
151
163
|
|
152
164
|
# @see the `==` method
|
@@ -158,7 +170,7 @@ module SibApiV3Sdk
|
|
158
170
|
# Calculates hash code according to all attributes.
|
159
171
|
# @return [Fixnum] Hash code
|
160
172
|
def hash
|
161
|
-
[messages_sent, hard_bounces, soft_bounces, complaints, unsubscriptions, opened, clicked, transac_attributes].hash
|
173
|
+
[messages_sent, hard_bounces, soft_bounces, complaints, unsubscriptions, opened, clicked, transac_attributes, delivered].hash
|
162
174
|
end
|
163
175
|
|
164
176
|
# Builds the object from hash
|
@@ -0,0 +1,205 @@
|
|
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 | | 406 | Error. Not Acceptable |
|
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.4.19
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SibApiV3Sdk
|
16
|
+
class GetExtendedContactDetailsStatisticsDelivered
|
17
|
+
# ID of the campaign which generated the event
|
18
|
+
attr_accessor :campaign_id
|
19
|
+
|
20
|
+
# UTC date-time of the event
|
21
|
+
attr_accessor :event_time
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'campaign_id' => :'campaignId',
|
27
|
+
:'event_time' => :'eventTime'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'campaign_id' => :'Integer',
|
35
|
+
:'event_time' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
|
+
|
47
|
+
if attributes.has_key?(:'campaignId')
|
48
|
+
self.campaign_id = attributes[:'campaignId']
|
49
|
+
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'eventTime')
|
52
|
+
self.event_time = attributes[:'eventTime']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
+
# @return Array for valid properties with the reasons
|
58
|
+
def list_invalid_properties
|
59
|
+
invalid_properties = Array.new
|
60
|
+
if @campaign_id.nil?
|
61
|
+
invalid_properties.push('invalid value for "campaign_id", campaign_id cannot be nil.')
|
62
|
+
end
|
63
|
+
|
64
|
+
if @event_time.nil?
|
65
|
+
invalid_properties.push('invalid value for "event_time", event_time cannot be nil.')
|
66
|
+
end
|
67
|
+
|
68
|
+
invalid_properties
|
69
|
+
end
|
70
|
+
|
71
|
+
# Check to see if the all the properties in the model are valid
|
72
|
+
# @return true if the model is valid
|
73
|
+
def valid?
|
74
|
+
return false if @campaign_id.nil?
|
75
|
+
return false if @event_time.nil?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
campaign_id == o.campaign_id &&
|
85
|
+
event_time == o.event_time
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see the `==` method
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Fixnum] Hash code
|
96
|
+
def hash
|
97
|
+
[campaign_id, event_time].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
self.class.swagger_types.each_pair do |key, type|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Deserializes the data based on type
|
121
|
+
# @param string type Data type
|
122
|
+
# @param string value Value to be deserialized
|
123
|
+
# @return [Object] Deserialized data
|
124
|
+
def _deserialize(type, value)
|
125
|
+
case type.to_sym
|
126
|
+
when :DateTime
|
127
|
+
DateTime.parse(value)
|
128
|
+
when :Date
|
129
|
+
Date.parse(value)
|
130
|
+
when :String
|
131
|
+
value.to_s
|
132
|
+
when :Integer
|
133
|
+
value.to_i
|
134
|
+
when :Float
|
135
|
+
value.to_f
|
136
|
+
when :BOOLEAN
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
+
true
|
139
|
+
else
|
140
|
+
false
|
141
|
+
end
|
142
|
+
when :Object
|
143
|
+
# generic object (usually a Hash), return directly
|
144
|
+
value
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
151
|
+
{}.tap do |hash|
|
152
|
+
value.each do |k, v|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else # model
|
157
|
+
temp_model = SibApiV3Sdk.const_get(type).new
|
158
|
+
temp_model.build_from_hash(value)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the string representation of the object
|
163
|
+
# @return [String] String presentation of the object
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_body
|
171
|
+
to_hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the object in the form of hash
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_hash
|
177
|
+
hash = {}
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
179
|
+
value = self.send(attr)
|
180
|
+
next if value.nil?
|
181
|
+
hash[param] = _to_hash(value)
|
182
|
+
end
|
183
|
+
hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Outputs non-array value in the form of hash
|
187
|
+
# For object, use to_hash. Otherwise, just return the value
|
188
|
+
# @param [Object] value Any valid value
|
189
|
+
# @return [Hash] Returns the value in the form of hash
|
190
|
+
def _to_hash(value)
|
191
|
+
if value.is_a?(Array)
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
193
|
+
elsif value.is_a?(Hash)
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
196
|
+
end
|
197
|
+
elsif value.respond_to? :to_hash
|
198
|
+
value.to_hash
|
199
|
+
else
|
200
|
+
value
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
end
|
205
|
+
end
|