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
@@ -13,61 +13,57 @@ Swagger Codegen version: 2.4.19
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module SibApiV3Sdk
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
# Contact Details
|
17
|
+
class Contact
|
18
|
+
# Next incomplete task of contact
|
19
|
+
attr_accessor :virtual_next_task
|
19
20
|
|
20
|
-
#
|
21
|
-
attr_accessor :
|
21
|
+
# Contact email
|
22
|
+
attr_accessor :email
|
22
23
|
|
23
|
-
#
|
24
|
-
attr_accessor :
|
24
|
+
# User id to whom contact is assigned
|
25
|
+
attr_accessor :assign_to_id
|
25
26
|
|
26
|
-
#
|
27
|
-
attr_accessor :
|
27
|
+
# Contact id
|
28
|
+
attr_accessor :contacts_id
|
28
29
|
|
29
|
-
#
|
30
|
-
attr_accessor :
|
30
|
+
# CRM lists in which contact is added
|
31
|
+
attr_accessor :crm_lists
|
31
32
|
|
32
|
-
#
|
33
|
-
attr_accessor :attachment
|
34
|
-
|
35
|
-
# Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, {\"Content-Type\":\"text/html\", \"charset\":\"iso-8859-1\", \"sender.ip\":\"1.2.3.4\"}
|
36
|
-
attr_accessor :headers
|
37
|
-
|
38
|
-
# Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}
|
33
|
+
# Contact attributes e.g firstname / lastname / SMS etc.
|
39
34
|
attr_accessor :attributes
|
40
35
|
|
41
|
-
#
|
42
|
-
attr_accessor :
|
36
|
+
# Contact created date/time
|
37
|
+
attr_accessor :created_at
|
38
|
+
|
39
|
+
# Contact updated date/time
|
40
|
+
attr_accessor :updated_at
|
43
41
|
|
44
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
43
|
def self.attribute_map
|
46
44
|
{
|
47
|
-
:'
|
48
|
-
:'
|
49
|
-
:'
|
50
|
-
:'
|
51
|
-
:'
|
52
|
-
:'attachment' => :'attachment',
|
53
|
-
:'headers' => :'headers',
|
45
|
+
:'virtual_next_task' => :'virtualNextTask',
|
46
|
+
:'email' => :'email',
|
47
|
+
:'assign_to_id' => :'assignToId',
|
48
|
+
:'contacts_id' => :'contactsId',
|
49
|
+
:'crm_lists' => :'crmLists',
|
54
50
|
:'attributes' => :'attributes',
|
55
|
-
:'
|
51
|
+
:'created_at' => :'createdAt',
|
52
|
+
:'updated_at' => :'updatedAt'
|
56
53
|
}
|
57
54
|
end
|
58
55
|
|
59
56
|
# Attribute type mapping.
|
60
57
|
def self.swagger_types
|
61
58
|
{
|
62
|
-
:'
|
63
|
-
:'
|
64
|
-
:'
|
65
|
-
:'
|
66
|
-
:'
|
67
|
-
:'attachment' => :'Array<SendEmailAttachment>',
|
68
|
-
:'headers' => :'Object',
|
59
|
+
:'virtual_next_task' => :'Object',
|
60
|
+
:'email' => :'String',
|
61
|
+
:'assign_to_id' => :'String',
|
62
|
+
:'contacts_id' => :'Integer',
|
63
|
+
:'crm_lists' => :'Object',
|
69
64
|
:'attributes' => :'Object',
|
70
|
-
:'
|
65
|
+
:'created_at' => :'DateTime',
|
66
|
+
:'updated_at' => :'DateTime'
|
71
67
|
}
|
72
68
|
end
|
73
69
|
|
@@ -79,50 +75,36 @@ module SibApiV3Sdk
|
|
79
75
|
# convert string to symbol for hash key
|
80
76
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
81
77
|
|
82
|
-
if attributes.has_key?(:'
|
83
|
-
|
84
|
-
self.email_to = value
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
if attributes.has_key?(:'emailBcc')
|
89
|
-
if (value = attributes[:'emailBcc']).is_a?(Array)
|
90
|
-
self.email_bcc = value
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
if attributes.has_key?(:'emailCc')
|
95
|
-
if (value = attributes[:'emailCc']).is_a?(Array)
|
96
|
-
self.email_cc = value
|
97
|
-
end
|
78
|
+
if attributes.has_key?(:'virtualNextTask')
|
79
|
+
self.virtual_next_task = attributes[:'virtualNextTask']
|
98
80
|
end
|
99
81
|
|
100
|
-
if attributes.has_key?(:'
|
101
|
-
self.
|
82
|
+
if attributes.has_key?(:'email')
|
83
|
+
self.email = attributes[:'email']
|
102
84
|
end
|
103
85
|
|
104
|
-
if attributes.has_key?(:'
|
105
|
-
self.
|
86
|
+
if attributes.has_key?(:'assignToId')
|
87
|
+
self.assign_to_id = attributes[:'assignToId']
|
106
88
|
end
|
107
89
|
|
108
|
-
if attributes.has_key?(:'
|
109
|
-
|
110
|
-
self.attachment = value
|
111
|
-
end
|
90
|
+
if attributes.has_key?(:'contactsId')
|
91
|
+
self.contacts_id = attributes[:'contactsId']
|
112
92
|
end
|
113
93
|
|
114
|
-
if attributes.has_key?(:'
|
115
|
-
self.
|
94
|
+
if attributes.has_key?(:'crmLists')
|
95
|
+
self.crm_lists = attributes[:'crmLists']
|
116
96
|
end
|
117
97
|
|
118
98
|
if attributes.has_key?(:'attributes')
|
119
99
|
self.attributes = attributes[:'attributes']
|
120
100
|
end
|
121
101
|
|
122
|
-
if attributes.has_key?(:'
|
123
|
-
|
124
|
-
|
125
|
-
|
102
|
+
if attributes.has_key?(:'createdAt')
|
103
|
+
self.created_at = attributes[:'createdAt']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'updatedAt')
|
107
|
+
self.updated_at = attributes[:'updatedAt']
|
126
108
|
end
|
127
109
|
end
|
128
110
|
|
@@ -130,8 +112,12 @@ module SibApiV3Sdk
|
|
130
112
|
# @return Array for valid properties with the reasons
|
131
113
|
def list_invalid_properties
|
132
114
|
invalid_properties = Array.new
|
133
|
-
if @
|
134
|
-
invalid_properties.push('invalid value for "
|
115
|
+
if @email.nil?
|
116
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
117
|
+
end
|
118
|
+
|
119
|
+
if @crm_lists.nil?
|
120
|
+
invalid_properties.push('invalid value for "crm_lists", crm_lists cannot be nil.')
|
135
121
|
end
|
136
122
|
|
137
123
|
invalid_properties
|
@@ -140,7 +126,8 @@ module SibApiV3Sdk
|
|
140
126
|
# Check to see if the all the properties in the model are valid
|
141
127
|
# @return true if the model is valid
|
142
128
|
def valid?
|
143
|
-
return false if @
|
129
|
+
return false if @email.nil?
|
130
|
+
return false if @crm_lists.nil?
|
144
131
|
true
|
145
132
|
end
|
146
133
|
|
@@ -149,15 +136,14 @@ module SibApiV3Sdk
|
|
149
136
|
def ==(o)
|
150
137
|
return true if self.equal?(o)
|
151
138
|
self.class == o.class &&
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
attachment == o.attachment &&
|
158
|
-
headers == o.headers &&
|
139
|
+
virtual_next_task == o.virtual_next_task &&
|
140
|
+
email == o.email &&
|
141
|
+
assign_to_id == o.assign_to_id &&
|
142
|
+
contacts_id == o.contacts_id &&
|
143
|
+
crm_lists == o.crm_lists &&
|
159
144
|
attributes == o.attributes &&
|
160
|
-
|
145
|
+
created_at == o.created_at &&
|
146
|
+
updated_at == o.updated_at
|
161
147
|
end
|
162
148
|
|
163
149
|
# @see the `==` method
|
@@ -169,7 +155,7 @@ module SibApiV3Sdk
|
|
169
155
|
# Calculates hash code according to all attributes.
|
170
156
|
# @return [Fixnum] Hash code
|
171
157
|
def hash
|
172
|
-
[
|
158
|
+
[virtual_next_task, email, assign_to_id, contacts_id, crm_lists, attributes, created_at, updated_at].hash
|
173
159
|
end
|
174
160
|
|
175
161
|
# Builds the object from hash
|
@@ -28,6 +28,9 @@ module SibApiV3Sdk
|
|
28
28
|
# UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
|
29
29
|
attr_accessor :scheduled_at
|
30
30
|
|
31
|
+
# Format of the message. It indicates whether the content should be treated as unicode or not.
|
32
|
+
attr_accessor :unicode_enabled
|
33
|
+
|
31
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
35
|
def self.attribute_map
|
33
36
|
{
|
@@ -35,7 +38,8 @@ module SibApiV3Sdk
|
|
35
38
|
:'sender' => :'sender',
|
36
39
|
:'content' => :'content',
|
37
40
|
:'recipients' => :'recipients',
|
38
|
-
:'scheduled_at' => :'scheduledAt'
|
41
|
+
:'scheduled_at' => :'scheduledAt',
|
42
|
+
:'unicode_enabled' => :'unicodeEnabled'
|
39
43
|
}
|
40
44
|
end
|
41
45
|
|
@@ -46,7 +50,8 @@ module SibApiV3Sdk
|
|
46
50
|
:'sender' => :'String',
|
47
51
|
:'content' => :'String',
|
48
52
|
:'recipients' => :'CreateSmsCampaignRecipients',
|
49
|
-
:'scheduled_at' => :'String'
|
53
|
+
:'scheduled_at' => :'String',
|
54
|
+
:'unicode_enabled' => :'BOOLEAN'
|
50
55
|
}
|
51
56
|
end
|
52
57
|
|
@@ -77,6 +82,12 @@ module SibApiV3Sdk
|
|
77
82
|
if attributes.has_key?(:'scheduledAt')
|
78
83
|
self.scheduled_at = attributes[:'scheduledAt']
|
79
84
|
end
|
85
|
+
|
86
|
+
if attributes.has_key?(:'unicodeEnabled')
|
87
|
+
self.unicode_enabled = attributes[:'unicodeEnabled']
|
88
|
+
else
|
89
|
+
self.unicode_enabled = false
|
90
|
+
end
|
80
91
|
end
|
81
92
|
|
82
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -135,7 +146,8 @@ module SibApiV3Sdk
|
|
135
146
|
sender == o.sender &&
|
136
147
|
content == o.content &&
|
137
148
|
recipients == o.recipients &&
|
138
|
-
scheduled_at == o.scheduled_at
|
149
|
+
scheduled_at == o.scheduled_at &&
|
150
|
+
unicode_enabled == o.unicode_enabled
|
139
151
|
end
|
140
152
|
|
141
153
|
# @see the `==` method
|
@@ -147,7 +159,7 @@ module SibApiV3Sdk
|
|
147
159
|
# Calculates hash code according to all attributes.
|
148
160
|
# @return [Fixnum] Hash code
|
149
161
|
def hash
|
150
|
-
[name, sender, content, recipients, scheduled_at].hash
|
162
|
+
[name, sender, content, recipients, scheduled_at, unicode_enabled].hash
|
151
163
|
end
|
152
164
|
|
153
165
|
# Builds the object from hash
|
@@ -0,0 +1,244 @@
|
|
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 CreateSubAccount
|
17
|
+
# Name of the organization
|
18
|
+
attr_accessor :company_name
|
19
|
+
|
20
|
+
# Language for identifying localization information
|
21
|
+
attr_accessor :language
|
22
|
+
|
23
|
+
# Request timezone of the client
|
24
|
+
attr_accessor :timezone
|
25
|
+
|
26
|
+
class EnumAttributeValidator
|
27
|
+
attr_reader :datatype
|
28
|
+
attr_reader :allowable_values
|
29
|
+
|
30
|
+
def initialize(datatype, allowable_values)
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
32
|
+
case datatype.to_s
|
33
|
+
when /Integer/i
|
34
|
+
value.to_i
|
35
|
+
when /Float/i
|
36
|
+
value.to_f
|
37
|
+
else
|
38
|
+
value
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def valid?(value)
|
44
|
+
!value || allowable_values.include?(value)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
49
|
+
def self.attribute_map
|
50
|
+
{
|
51
|
+
:'company_name' => :'companyName',
|
52
|
+
:'language' => :'language',
|
53
|
+
:'timezone' => :'timezone'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.swagger_types
|
59
|
+
{
|
60
|
+
:'company_name' => :'String',
|
61
|
+
:'language' => :'String',
|
62
|
+
:'timezone' => :'String'
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# Initializes the object
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
68
|
+
def initialize(attributes = {})
|
69
|
+
return unless attributes.is_a?(Hash)
|
70
|
+
|
71
|
+
# convert string to symbol for hash key
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
73
|
+
|
74
|
+
if attributes.has_key?(:'companyName')
|
75
|
+
self.company_name = attributes[:'companyName']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.has_key?(:'language')
|
79
|
+
self.language = attributes[:'language']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.has_key?(:'timezone')
|
83
|
+
self.timezone = attributes[:'timezone']
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
88
|
+
# @return Array for valid properties with the reasons
|
89
|
+
def list_invalid_properties
|
90
|
+
invalid_properties = Array.new
|
91
|
+
if @company_name.nil?
|
92
|
+
invalid_properties.push('invalid value for "company_name", company_name cannot be nil.')
|
93
|
+
end
|
94
|
+
|
95
|
+
invalid_properties
|
96
|
+
end
|
97
|
+
|
98
|
+
# Check to see if the all the properties in the model are valid
|
99
|
+
# @return true if the model is valid
|
100
|
+
def valid?
|
101
|
+
return false if @company_name.nil?
|
102
|
+
language_validator = EnumAttributeValidator.new('String', ['en', 'fr', 'it', 'es', 'pt', 'de'])
|
103
|
+
return false unless language_validator.valid?(@language)
|
104
|
+
true
|
105
|
+
end
|
106
|
+
|
107
|
+
# Custom attribute writer method checking allowed values (enum).
|
108
|
+
# @param [Object] language Object to be assigned
|
109
|
+
def language=(language)
|
110
|
+
validator = EnumAttributeValidator.new('String', ['en', 'fr', 'it', 'es', 'pt', 'de'])
|
111
|
+
unless validator.valid?(language)
|
112
|
+
fail ArgumentError, 'invalid value for "language", must be one of #{validator.allowable_values}.'
|
113
|
+
end
|
114
|
+
@language = language
|
115
|
+
end
|
116
|
+
|
117
|
+
# Checks equality by comparing each attribute.
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def ==(o)
|
120
|
+
return true if self.equal?(o)
|
121
|
+
self.class == o.class &&
|
122
|
+
company_name == o.company_name &&
|
123
|
+
language == o.language &&
|
124
|
+
timezone == o.timezone
|
125
|
+
end
|
126
|
+
|
127
|
+
# @see the `==` method
|
128
|
+
# @param [Object] Object to be compared
|
129
|
+
def eql?(o)
|
130
|
+
self == o
|
131
|
+
end
|
132
|
+
|
133
|
+
# Calculates hash code according to all attributes.
|
134
|
+
# @return [Fixnum] Hash code
|
135
|
+
def hash
|
136
|
+
[company_name, language, timezone].hash
|
137
|
+
end
|
138
|
+
|
139
|
+
# Builds the object from hash
|
140
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
141
|
+
# @return [Object] Returns the model itself
|
142
|
+
def build_from_hash(attributes)
|
143
|
+
return nil unless attributes.is_a?(Hash)
|
144
|
+
self.class.swagger_types.each_pair do |key, type|
|
145
|
+
if type =~ /\AArray<(.*)>/i
|
146
|
+
# check to ensure the input is an array given that the attribute
|
147
|
+
# is documented as an array but the input is not
|
148
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
149
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
150
|
+
end
|
151
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
152
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
153
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
154
|
+
end
|
155
|
+
|
156
|
+
self
|
157
|
+
end
|
158
|
+
|
159
|
+
# Deserializes the data based on type
|
160
|
+
# @param string type Data type
|
161
|
+
# @param string value Value to be deserialized
|
162
|
+
# @return [Object] Deserialized data
|
163
|
+
def _deserialize(type, value)
|
164
|
+
case type.to_sym
|
165
|
+
when :DateTime
|
166
|
+
DateTime.parse(value)
|
167
|
+
when :Date
|
168
|
+
Date.parse(value)
|
169
|
+
when :String
|
170
|
+
value.to_s
|
171
|
+
when :Integer
|
172
|
+
value.to_i
|
173
|
+
when :Float
|
174
|
+
value.to_f
|
175
|
+
when :BOOLEAN
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
177
|
+
true
|
178
|
+
else
|
179
|
+
false
|
180
|
+
end
|
181
|
+
when :Object
|
182
|
+
# generic object (usually a Hash), return directly
|
183
|
+
value
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each do |k, v|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
else # model
|
196
|
+
temp_model = SibApiV3Sdk.const_get(type).new
|
197
|
+
temp_model.build_from_hash(value)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the string representation of the object
|
202
|
+
# @return [String] String presentation of the object
|
203
|
+
def to_s
|
204
|
+
to_hash.to_s
|
205
|
+
end
|
206
|
+
|
207
|
+
# to_body is an alias to to_hash (backward compatibility)
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
209
|
+
def to_body
|
210
|
+
to_hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Returns the object in the form of hash
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
215
|
+
def to_hash
|
216
|
+
hash = {}
|
217
|
+
self.class.attribute_map.each_pair do |attr, param|
|
218
|
+
value = self.send(attr)
|
219
|
+
next if value.nil?
|
220
|
+
hash[param] = _to_hash(value)
|
221
|
+
end
|
222
|
+
hash
|
223
|
+
end
|
224
|
+
|
225
|
+
# Outputs non-array value in the form of hash
|
226
|
+
# For object, use to_hash. Otherwise, just return the value
|
227
|
+
# @param [Object] value Any valid value
|
228
|
+
# @return [Hash] Returns the value in the form of hash
|
229
|
+
def _to_hash(value)
|
230
|
+
if value.is_a?(Array)
|
231
|
+
value.compact.map { |v| _to_hash(v) }
|
232
|
+
elsif value.is_a?(Hash)
|
233
|
+
{}.tap do |hash|
|
234
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
235
|
+
end
|
236
|
+
elsif value.respond_to? :to_hash
|
237
|
+
value.to_hash
|
238
|
+
else
|
239
|
+
value
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
end
|
244
|
+
end
|
@@ -20,12 +20,15 @@ module SibApiV3Sdk
|
|
20
20
|
# Description of the webhook
|
21
21
|
attr_accessor :description
|
22
22
|
|
23
|
-
# Events triggering the webhook. Possible values for Transactional type webhook
|
23
|
+
# - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed`
|
24
24
|
attr_accessor :events
|
25
25
|
|
26
26
|
# Type of the webhook
|
27
27
|
attr_accessor :type
|
28
28
|
|
29
|
+
# Inbound domain of webhook, required in case of event type `inbound`
|
30
|
+
attr_accessor :domain
|
31
|
+
|
29
32
|
class EnumAttributeValidator
|
30
33
|
attr_reader :datatype
|
31
34
|
attr_reader :allowable_values
|
@@ -54,7 +57,8 @@ module SibApiV3Sdk
|
|
54
57
|
:'url' => :'url',
|
55
58
|
:'description' => :'description',
|
56
59
|
:'events' => :'events',
|
57
|
-
:'type' => :'type'
|
60
|
+
:'type' => :'type',
|
61
|
+
:'domain' => :'domain'
|
58
62
|
}
|
59
63
|
end
|
60
64
|
|
@@ -64,7 +68,8 @@ module SibApiV3Sdk
|
|
64
68
|
:'url' => :'String',
|
65
69
|
:'description' => :'String',
|
66
70
|
:'events' => :'Array<String>',
|
67
|
-
:'type' => :'String'
|
71
|
+
:'type' => :'String',
|
72
|
+
:'domain' => :'String'
|
68
73
|
}
|
69
74
|
end
|
70
75
|
|
@@ -95,6 +100,10 @@ module SibApiV3Sdk
|
|
95
100
|
else
|
96
101
|
self.type = 'transactional'
|
97
102
|
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'domain')
|
105
|
+
self.domain = attributes[:'domain']
|
106
|
+
end
|
98
107
|
end
|
99
108
|
|
100
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -117,7 +126,7 @@ module SibApiV3Sdk
|
|
117
126
|
def valid?
|
118
127
|
return false if @url.nil?
|
119
128
|
return false if @events.nil?
|
120
|
-
type_validator = EnumAttributeValidator.new('String', ['transactional', 'marketing'])
|
129
|
+
type_validator = EnumAttributeValidator.new('String', ['transactional', 'marketing', 'inbound'])
|
121
130
|
return false unless type_validator.valid?(@type)
|
122
131
|
true
|
123
132
|
end
|
@@ -125,7 +134,7 @@ module SibApiV3Sdk
|
|
125
134
|
# Custom attribute writer method checking allowed values (enum).
|
126
135
|
# @param [Object] type Object to be assigned
|
127
136
|
def type=(type)
|
128
|
-
validator = EnumAttributeValidator.new('String', ['transactional', 'marketing'])
|
137
|
+
validator = EnumAttributeValidator.new('String', ['transactional', 'marketing', 'inbound'])
|
129
138
|
unless validator.valid?(type)
|
130
139
|
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
131
140
|
end
|
@@ -140,7 +149,8 @@ module SibApiV3Sdk
|
|
140
149
|
url == o.url &&
|
141
150
|
description == o.description &&
|
142
151
|
events == o.events &&
|
143
|
-
type == o.type
|
152
|
+
type == o.type &&
|
153
|
+
domain == o.domain
|
144
154
|
end
|
145
155
|
|
146
156
|
# @see the `==` method
|
@@ -152,7 +162,7 @@ module SibApiV3Sdk
|
|
152
162
|
# Calculates hash code according to all attributes.
|
153
163
|
# @return [Fixnum] Hash code
|
154
164
|
def hash
|
155
|
-
[url, description, events, type].hash
|
165
|
+
[url, description, events, type, domain].hash
|
156
166
|
end
|
157
167
|
|
158
168
|
# Builds the object from hash
|