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.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +59 -4
  3. data/docs/Body.md +18 -0
  4. data/docs/Body1.md +18 -0
  5. data/docs/CRMApi.md +710 -0
  6. data/docs/Contact.md +15 -0
  7. data/docs/ContactsApi.md +61 -2
  8. data/docs/CreateSmsCampaign.md +1 -0
  9. data/docs/CreateSubAccount.md +10 -0
  10. data/docs/CreateWebhook.md +2 -1
  11. data/docs/FileData.md +17 -0
  12. data/docs/GetCampaignStats.md +1 -0
  13. data/docs/GetContactCampaignStats.md +1 -0
  14. data/docs/GetExtendedContactDetailsStatistics.md +1 -0
  15. data/docs/GetExtendedContactDetailsStatisticsDelivered.md +9 -0
  16. data/docs/GetInboundEmailEvents.md +8 -0
  17. data/docs/GetInboundEmailEventsByUuid.md +15 -0
  18. data/docs/GetInboundEmailEventsByUuidAttachments.md +11 -0
  19. data/docs/GetInboundEmailEventsByUuidLogs.md +9 -0
  20. data/docs/GetInboundEmailEventsEvents.md +11 -0
  21. data/docs/InboundParsingApi.md +139 -0
  22. data/docs/MasterAccountApi.md +367 -0
  23. data/docs/MasterDetailsResponse.md +14 -0
  24. data/docs/MasterDetailsResponseBillingInfo.md +11 -0
  25. data/docs/MasterDetailsResponseBillingInfoAddress.md +12 -0
  26. data/docs/MasterDetailsResponseBillingInfoName.md +9 -0
  27. data/docs/MasterDetailsResponsePlanInfo.md +13 -0
  28. data/docs/MasterDetailsResponsePlanInfoFeatures.md +12 -0
  29. data/docs/Note.md +14 -0
  30. data/docs/NoteData.md +10 -0
  31. data/docs/RequestContactExport.md +1 -2
  32. data/docs/SendSmtpEmail.md +3 -3
  33. data/docs/SendTransacSms.md +1 -0
  34. data/docs/SsoTokenRequest.md +9 -0
  35. data/docs/SubAccountDetailsResponse.md +11 -0
  36. data/docs/SubAccountDetailsResponsePlanInfo.md +10 -0
  37. data/docs/SubAccountDetailsResponsePlanInfoCredits.md +9 -0
  38. data/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md +9 -0
  39. data/docs/SubAccountDetailsResponsePlanInfoFeatures.md +10 -0
  40. data/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md +9 -0
  41. data/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md +9 -0
  42. data/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md +9 -0
  43. data/docs/SubAccountUpdatePlanRequest.md +9 -0
  44. data/docs/SubAccountUpdatePlanRequestCredits.md +8 -0
  45. data/docs/SubAccountUpdatePlanRequestFeatures.md +10 -0
  46. data/docs/SubAccountsResponse.md +9 -0
  47. data/docs/SubAccountsResponseSubAccounts.md +11 -0
  48. data/docs/Task.md +24 -0
  49. data/docs/TaskReminder.md +10 -0
  50. data/docs/TransactionalEmailsApi.md +4 -63
  51. data/docs/UpdateBatchContacts.md +8 -0
  52. data/docs/UpdateBatchContactsContacts.md +16 -0
  53. data/docs/UpdateBatchContactsModel.md +9 -0
  54. data/docs/UpdateSmsCampaign.md +1 -0
  55. data/docs/UpdateWebhook.md +2 -1
  56. data/lib/sib-api-v3-sdk/api/contacts_api.rb +55 -2
  57. data/lib/sib-api-v3-sdk/api/crm_api.rb +670 -0
  58. data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +161 -0
  59. data/lib/sib-api-v3-sdk/api/master_account_api.rb +365 -0
  60. data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +4 -60
  61. data/lib/sib-api-v3-sdk/api/webhooks_api.rb +2 -2
  62. data/lib/sib-api-v3-sdk/models/body.rb +305 -0
  63. data/lib/sib-api-v3-sdk/models/body_1.rb +305 -0
  64. data/lib/sib-api-v3-sdk/models/{send_email.rb → contact.rb} +64 -78
  65. data/lib/sib-api-v3-sdk/models/create_sms_campaign.rb +16 -4
  66. data/lib/sib-api-v3-sdk/models/create_sub_account.rb +244 -0
  67. data/lib/sib-api-v3-sdk/models/create_webhook.rb +17 -7
  68. data/lib/sib-api-v3-sdk/models/file_data.rb +278 -0
  69. data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +16 -1
  70. data/lib/sib-api-v3-sdk/models/get_contact_campaign_stats.rb +15 -4
  71. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics.rb +16 -4
  72. data/lib/sib-api-v3-sdk/models/get_extended_contact_details_statistics_delivered.rb +205 -0
  73. data/lib/sib-api-v3-sdk/models/{send_template_email.rb → get_inbound_email_events.rb} +10 -14
  74. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid.rb +259 -0
  75. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_attachments.rb +215 -0
  76. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_by_uuid_logs.rb +229 -0
  77. data/lib/sib-api-v3-sdk/models/get_inbound_email_events_events.rb +235 -0
  78. data/lib/sib-api-v3-sdk/models/master_details_response.rb +243 -0
  79. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info.rb +214 -0
  80. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_address.rb +226 -0
  81. data/lib/sib-api-v3-sdk/models/master_details_response_billing_info_name.rb +196 -0
  82. data/lib/sib-api-v3-sdk/models/master_details_response_plan_info.rb +272 -0
  83. data/lib/sib-api-v3-sdk/models/{send_email_attachment.rb → master_details_response_plan_info_features.rb} +45 -44
  84. data/lib/sib-api-v3-sdk/models/note.rb +283 -0
  85. data/lib/sib-api-v3-sdk/models/note_data.rb +243 -0
  86. data/lib/sib-api-v3-sdk/models/request_contact_export.rb +6 -11
  87. data/lib/sib-api-v3-sdk/models/request_contact_export_custom_contact_filter.rb +1 -1
  88. data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +3 -3
  89. data/lib/sib-api-v3-sdk/models/send_transac_sms.rb +16 -4
  90. data/lib/sib-api-v3-sdk/models/sso_token_request.rb +200 -0
  91. data/lib/sib-api-v3-sdk/models/sub_account_details_response.rb +214 -0
  92. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info.rb +204 -0
  93. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +195 -0
  94. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +196 -0
  95. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +203 -0
  96. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_inbox.rb +196 -0
  97. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_landing_page.rb +196 -0
  98. data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features_users.rb +196 -0
  99. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request.rb +194 -0
  100. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_credits.rb +186 -0
  101. data/lib/sib-api-v3-sdk/models/sub_account_update_plan_request_features.rb +206 -0
  102. data/lib/sib-api-v3-sdk/models/sub_accounts_response.rb +196 -0
  103. data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +235 -0
  104. data/lib/sib-api-v3-sdk/models/task.rb +367 -0
  105. data/lib/sib-api-v3-sdk/models/task_reminder.rb +257 -0
  106. data/lib/sib-api-v3-sdk/models/update_batch_contacts.rb +187 -0
  107. data/lib/sib-api-v3-sdk/models/update_batch_contacts_contacts.rb +273 -0
  108. data/lib/sib-api-v3-sdk/models/update_batch_contacts_model.rb +197 -0
  109. data/lib/sib-api-v3-sdk/models/update_sms_campaign.rb +16 -4
  110. data/lib/sib-api-v3-sdk/models/update_webhook.rb +15 -5
  111. data/lib/sib-api-v3-sdk/version.rb +1 -1
  112. data/lib/sib-api-v3-sdk.rb +41 -3
  113. data/sib-api-v3-sdk.gemspec +2 -1
  114. data/spec/api/contacts_api_spec.rb +13 -1
  115. data/spec/api/crm_api_spec.rb +170 -0
  116. data/spec/api/inbound_parsing_api_spec.rb +64 -0
  117. data/spec/api/master_account_api_spec.rb +108 -0
  118. data/spec/api/transactional_emails_api_spec.rb +2 -13
  119. data/spec/models/body_1_spec.rb +101 -0
  120. data/spec/models/body_spec.rb +101 -0
  121. data/spec/models/contact_spec.rb +83 -0
  122. data/spec/models/create_sms_campaign_spec.rb +6 -0
  123. data/spec/models/create_sub_account_spec.rb +57 -0
  124. data/spec/models/create_webhook_spec.rb +8 -2
  125. data/spec/models/file_data_spec.rb +95 -0
  126. data/spec/models/get_campaign_stats_spec.rb +6 -0
  127. data/spec/models/get_contact_campaign_stats_spec.rb +6 -0
  128. data/spec/models/get_extended_contact_details_statistics_delivered_spec.rb +47 -0
  129. data/spec/models/get_extended_contact_details_statistics_spec.rb +6 -0
  130. data/spec/models/get_inbound_email_events_by_uuid_attachments_spec.rb +59 -0
  131. data/spec/models/get_inbound_email_events_by_uuid_logs_spec.rb +51 -0
  132. data/spec/models/get_inbound_email_events_by_uuid_spec.rb +83 -0
  133. data/spec/models/get_inbound_email_events_events_spec.rb +59 -0
  134. data/spec/models/get_inbound_email_events_spec.rb +41 -0
  135. data/spec/models/master_details_response_billing_info_address_spec.rb +65 -0
  136. data/spec/models/master_details_response_billing_info_name_spec.rb +47 -0
  137. data/spec/models/master_details_response_billing_info_spec.rb +59 -0
  138. data/spec/models/master_details_response_plan_info_features_spec.rb +65 -0
  139. data/spec/models/master_details_response_plan_info_spec.rb +75 -0
  140. data/spec/models/master_details_response_spec.rb +77 -0
  141. data/spec/models/note_data_spec.rb +53 -0
  142. data/spec/models/note_spec.rb +77 -0
  143. data/spec/models/request_contact_export_spec.rb +0 -6
  144. data/spec/models/send_transac_sms_spec.rb +6 -0
  145. data/spec/models/{send_email_attachment_spec.rb → sso_token_request_spec.rb} +8 -8
  146. data/spec/models/sub_account_details_response_plan_info_credits_emails_spec.rb +47 -0
  147. data/spec/models/sub_account_details_response_plan_info_credits_spec.rb +47 -0
  148. data/spec/models/sub_account_details_response_plan_info_features_inbox_spec.rb +47 -0
  149. data/spec/models/sub_account_details_response_plan_info_features_landing_page_spec.rb +47 -0
  150. data/spec/models/sub_account_details_response_plan_info_features_spec.rb +53 -0
  151. data/spec/models/sub_account_details_response_plan_info_features_users_spec.rb +47 -0
  152. data/spec/models/sub_account_details_response_plan_info_spec.rb +53 -0
  153. data/spec/models/sub_account_details_response_spec.rb +59 -0
  154. data/spec/models/sub_account_update_plan_request_credits_spec.rb +41 -0
  155. data/spec/models/sub_account_update_plan_request_features_spec.rb +53 -0
  156. data/spec/models/sub_account_update_plan_request_spec.rb +47 -0
  157. data/spec/models/sub_accounts_response_spec.rb +47 -0
  158. data/spec/models/sub_accounts_response_sub_accounts_spec.rb +59 -0
  159. data/spec/models/task_reminder_spec.rb +57 -0
  160. data/spec/models/task_spec.rb +137 -0
  161. data/spec/models/{send_email_spec.rb → update_batch_contacts_contacts_spec.rb} +15 -15
  162. data/spec/models/update_batch_contacts_model_spec.rb +47 -0
  163. data/spec/models/{send_template_email_spec.rb → update_batch_contacts_spec.rb} +7 -7
  164. data/spec/models/update_sms_campaign_spec.rb +6 -0
  165. data/spec/models/update_webhook_spec.rb +7 -1
  166. metadata +186 -14
  167. data/docs/SendEmail.md +0 -16
  168. data/docs/SendEmailAttachment.md +0 -9
  169. data/docs/SendTemplateEmail.md +0 -8
@@ -0,0 +1,214 @@
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
+ # Billing details of the master account organization
17
+ class MasterDetailsResponseBillingInfo
18
+ # Billing email id of master account
19
+ attr_accessor :email
20
+
21
+ # Company name of master account
22
+ attr_accessor :company_name
23
+
24
+ attr_accessor :name
25
+
26
+ attr_accessor :address
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'email' => :'email',
32
+ :'company_name' => :'companyName',
33
+ :'name' => :'name',
34
+ :'address' => :'address'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'email' => :'String',
42
+ :'company_name' => :'String',
43
+ :'name' => :'MasterDetailsResponseBillingInfoName',
44
+ :'address' => :'MasterDetailsResponseBillingInfoAddress'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ return unless attributes.is_a?(Hash)
52
+
53
+ # convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
55
+
56
+ if attributes.has_key?(:'email')
57
+ self.email = attributes[:'email']
58
+ end
59
+
60
+ if attributes.has_key?(:'companyName')
61
+ self.company_name = attributes[:'companyName']
62
+ end
63
+
64
+ if attributes.has_key?(:'name')
65
+ self.name = attributes[:'name']
66
+ end
67
+
68
+ if attributes.has_key?(:'address')
69
+ self.address = attributes[:'address']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ email == o.email &&
92
+ company_name == o.company_name &&
93
+ name == o.name &&
94
+ address == o.address
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [email, company_name, name, address].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ if type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ DateTime.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ temp_model = SibApiV3Sdk.const_get(type).new
167
+ temp_model.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ next if value.nil?
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+
213
+ end
214
+ end
@@ -0,0 +1,226 @@
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
+ # Billing address of master account
17
+ class MasterDetailsResponseBillingInfoAddress
18
+ # Street address
19
+ attr_accessor :street_address
20
+
21
+ # Locality
22
+ attr_accessor :locality
23
+
24
+ # Postal code
25
+ attr_accessor :postal_code
26
+
27
+ # State code
28
+ attr_accessor :state_code
29
+
30
+ # Country code
31
+ attr_accessor :country_code
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'street_address' => :'streetAddress',
37
+ :'locality' => :'locality',
38
+ :'postal_code' => :'postalCode',
39
+ :'state_code' => :'stateCode',
40
+ :'country_code' => :'countryCode'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'street_address' => :'String',
48
+ :'locality' => :'String',
49
+ :'postal_code' => :'String',
50
+ :'state_code' => :'String',
51
+ :'country_code' => :'String'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ return unless attributes.is_a?(Hash)
59
+
60
+ # convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
62
+
63
+ if attributes.has_key?(:'streetAddress')
64
+ self.street_address = attributes[:'streetAddress']
65
+ end
66
+
67
+ if attributes.has_key?(:'locality')
68
+ self.locality = attributes[:'locality']
69
+ end
70
+
71
+ if attributes.has_key?(:'postalCode')
72
+ self.postal_code = attributes[:'postalCode']
73
+ end
74
+
75
+ if attributes.has_key?(:'stateCode')
76
+ self.state_code = attributes[:'stateCode']
77
+ end
78
+
79
+ if attributes.has_key?(:'countryCode')
80
+ self.country_code = attributes[:'countryCode']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ street_address == o.street_address &&
103
+ locality == o.locality &&
104
+ postal_code == o.postal_code &&
105
+ state_code == o.state_code &&
106
+ country_code == o.country_code
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Fixnum] Hash code
117
+ def hash
118
+ [street_address, locality, postal_code, state_code, country_code].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def build_from_hash(attributes)
125
+ return nil unless attributes.is_a?(Hash)
126
+ self.class.swagger_types.each_pair do |key, type|
127
+ if type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
131
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ end
133
+ elsif !attributes[self.class.attribute_map[key]].nil?
134
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
136
+ end
137
+
138
+ self
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def _deserialize(type, value)
146
+ case type.to_sym
147
+ when :DateTime
148
+ DateTime.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :BOOLEAN
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ temp_model = SibApiV3Sdk.const_get(type).new
179
+ temp_model.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ next if value.nil?
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+
225
+ end
226
+ end
@@ -0,0 +1,196 @@
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
+ # Billing name of master account holder
17
+ class MasterDetailsResponseBillingInfoName
18
+ # First name for billing
19
+ attr_accessor :given_name
20
+
21
+ # Last name for billing
22
+ attr_accessor :family_name
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'given_name' => :'givenName',
28
+ :'family_name' => :'familyName'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'given_name' => :'String',
36
+ :'family_name' => :'String'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ if attributes.has_key?(:'givenName')
49
+ self.given_name = attributes[:'givenName']
50
+ end
51
+
52
+ if attributes.has_key?(:'familyName')
53
+ self.family_name = attributes[:'familyName']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ invalid_properties
62
+ end
63
+
64
+ # Check to see if the all the properties in the model are valid
65
+ # @return true if the model is valid
66
+ def valid?
67
+ true
68
+ end
69
+
70
+ # Checks equality by comparing each attribute.
71
+ # @param [Object] Object to be compared
72
+ def ==(o)
73
+ return true if self.equal?(o)
74
+ self.class == o.class &&
75
+ given_name == o.given_name &&
76
+ family_name == o.family_name
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Fixnum] Hash code
87
+ def hash
88
+ [given_name, family_name].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def build_from_hash(attributes)
95
+ return nil unless attributes.is_a?(Hash)
96
+ self.class.swagger_types.each_pair do |key, type|
97
+ if type =~ /\AArray<(.*)>/i
98
+ # check to ensure the input is an array given that the attribute
99
+ # is documented as an array but the input is not
100
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
101
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
102
+ end
103
+ elsif !attributes[self.class.attribute_map[key]].nil?
104
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
105
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
106
+ end
107
+
108
+ self
109
+ end
110
+
111
+ # Deserializes the data based on type
112
+ # @param string type Data type
113
+ # @param string value Value to be deserialized
114
+ # @return [Object] Deserialized data
115
+ def _deserialize(type, value)
116
+ case type.to_sym
117
+ when :DateTime
118
+ DateTime.parse(value)
119
+ when :Date
120
+ Date.parse(value)
121
+ when :String
122
+ value.to_s
123
+ when :Integer
124
+ value.to_i
125
+ when :Float
126
+ value.to_f
127
+ when :BOOLEAN
128
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
129
+ true
130
+ else
131
+ false
132
+ end
133
+ when :Object
134
+ # generic object (usually a Hash), return directly
135
+ value
136
+ when /\AArray<(?<inner_type>.+)>\z/
137
+ inner_type = Regexp.last_match[:inner_type]
138
+ value.map { |v| _deserialize(inner_type, v) }
139
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
140
+ k_type = Regexp.last_match[:k_type]
141
+ v_type = Regexp.last_match[:v_type]
142
+ {}.tap do |hash|
143
+ value.each do |k, v|
144
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
145
+ end
146
+ end
147
+ else # model
148
+ temp_model = SibApiV3Sdk.const_get(type).new
149
+ temp_model.build_from_hash(value)
150
+ end
151
+ end
152
+
153
+ # Returns the string representation of the object
154
+ # @return [String] String presentation of the object
155
+ def to_s
156
+ to_hash.to_s
157
+ end
158
+
159
+ # to_body is an alias to to_hash (backward compatibility)
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_body
162
+ to_hash
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ next if value.nil?
172
+ hash[param] = _to_hash(value)
173
+ end
174
+ hash
175
+ end
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+
195
+ end
196
+ end