sib-api-v3-sdk 8.1.0 → 9.1.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 +82 -33
- data/docs/Body.md +3 -11
- data/docs/Body1.md +3 -11
- data/docs/Body10.md +11 -0
- data/docs/Body11.md +8 -0
- data/docs/Body12.md +11 -0
- data/docs/Body2.md +11 -0
- data/docs/Body3.md +9 -0
- data/docs/Body4.md +9 -0
- data/docs/Body5.md +11 -0
- data/docs/Body6.md +18 -0
- data/docs/Body7.md +17 -0
- data/docs/Body8.md +13 -0
- data/docs/Body9.md +8 -0
- data/docs/CompaniesApi.md +425 -0
- data/docs/CompaniesList.md +8 -0
- data/docs/Company.md +11 -0
- data/docs/CompanyAttributes.md +7 -0
- data/docs/CompanyAttributesInner.md +12 -0
- data/docs/ContactsApi.md +8 -2
- data/docs/{ListsApi.md → ConversationsApi.md} +115 -133
- data/docs/ConversationsMessage.md +17 -0
- data/docs/ConversationsMessageFile.md +12 -0
- data/docs/ConversationsMessageFileImageInfo.md +10 -0
- data/docs/CreateContact.md +1 -1
- data/docs/CreateEmailCampaign.md +2 -0
- data/docs/CreateEmailCampaignRecipients.md +1 -0
- data/docs/CreateSubAccount.md +3 -3
- data/docs/CreateSubAccountResponse.md +8 -0
- data/docs/Deal.md +11 -0
- data/docs/DealAttributes.md +7 -0
- data/docs/DealAttributesInner.md +12 -0
- data/docs/DealsApi.md +476 -0
- data/docs/DealsList.md +8 -0
- data/docs/EmailCampaignsApi.md +6 -5
- data/docs/FileData.md +3 -6
- data/docs/FileDownloadableLink.md +8 -0
- data/docs/FileList.md +7 -0
- data/docs/FilesApi.md +318 -0
- data/docs/GetCampaignStats.md +2 -0
- data/docs/GetScheduledEmailByBatchId.md +9 -0
- data/docs/GetScheduledEmailByBatchIdBatches.md +10 -0
- data/docs/GetScheduledEmailByMessageId.md +10 -0
- data/docs/GetSsoToken.md +1 -1
- data/docs/InboundParsingApi.md +60 -0
- data/docs/InlineResponse200.md +8 -0
- data/docs/InlineResponse201.md +8 -0
- data/docs/InlineResponse2011.md +8 -0
- data/docs/MasterAccountApi.md +6 -6
- data/docs/NoteData.md +1 -0
- data/docs/NoteId.md +8 -0
- data/docs/NoteList.md +7 -0
- data/docs/NotesApi.md +312 -0
- data/docs/Pipeline.md +8 -0
- data/docs/PipelineStage.md +9 -0
- data/docs/ScheduleSmtpEmail.md +10 -0
- data/docs/SendSmtpEmail.md +3 -1
- data/docs/SubAccountDetailsResponsePlanInfoCredits.md +1 -1
- data/docs/SubAccountsResponseSubAccounts.md +4 -4
- data/docs/Task.md +0 -11
- data/docs/TaskList.md +8 -0
- data/docs/TaskReminder.md +1 -1
- data/docs/TaskTypes.md +0 -1
- data/docs/{FoldersApi.md → TasksApi.md} +95 -91
- data/docs/TransactionalEmailsApi.md +201 -2
- data/docs/UpdateContact.md +1 -1
- data/docs/UpdateEmailCampaign.md +3 -1
- data/docs/UpdateEmailCampaignRecipients.md +2 -1
- data/docs/UpdateSmtpTemplate.md +1 -1
- data/docs/UploadImageModel.md +8 -0
- data/lib/sib-api-v3-sdk/api/companies_api.rb +409 -0
- data/lib/sib-api-v3-sdk/api/contacts_api.rb +26 -0
- data/lib/sib-api-v3-sdk/api/conversations_api.rb +504 -0
- data/lib/sib-api-v3-sdk/api/deals_api.rb +454 -0
- data/lib/sib-api-v3-sdk/api/email_campaigns_api.rb +13 -8
- data/lib/sib-api-v3-sdk/api/files_api.rb +313 -0
- data/lib/sib-api-v3-sdk/api/inbound_parsing_api.rb +57 -1
- data/lib/sib-api-v3-sdk/api/master_account_api.rb +9 -9
- data/lib/sib-api-v3-sdk/api/notes_api.rb +308 -0
- data/lib/sib-api-v3-sdk/api/process_api.rb +4 -0
- data/lib/sib-api-v3-sdk/api/reseller_api.rb +4 -0
- data/lib/sib-api-v3-sdk/api/sms_campaigns_api.rb +4 -0
- data/lib/sib-api-v3-sdk/api/tasks_api.rb +375 -0
- data/lib/sib-api-v3-sdk/api/transactional_emails_api.rb +222 -3
- data/lib/sib-api-v3-sdk/models/body.rb +16 -111
- data/lib/sib-api-v3-sdk/models/body_1.rb +16 -116
- data/lib/sib-api-v3-sdk/models/body_10.rb +225 -0
- data/lib/sib-api-v3-sdk/models/body_11.rb +190 -0
- data/lib/sib-api-v3-sdk/models/body_12.rb +215 -0
- data/lib/sib-api-v3-sdk/models/body_2.rb +223 -0
- data/lib/sib-api-v3-sdk/models/body_3.rb +200 -0
- data/lib/sib-api-v3-sdk/models/body_4.rb +195 -0
- data/lib/sib-api-v3-sdk/models/body_5.rb +223 -0
- data/lib/sib-api-v3-sdk/models/body_6.rb +320 -0
- data/lib/sib-api-v3-sdk/models/body_7.rb +281 -0
- data/lib/sib-api-v3-sdk/models/body_8.rb +245 -0
- data/lib/sib-api-v3-sdk/models/body_9.rb +190 -0
- data/lib/sib-api-v3-sdk/models/companies_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/company.rb +220 -0
- data/lib/sib-api-v3-sdk/models/company_attributes.rb +176 -0
- data/lib/sib-api-v3-sdk/models/company_attributes_inner.rb +223 -0
- data/lib/sib-api-v3-sdk/models/conversations_message.rb +324 -0
- data/lib/sib-api-v3-sdk/models/conversations_message_file.rb +239 -0
- data/lib/sib-api-v3-sdk/models/conversations_message_file_image_info.rb +236 -0
- data/lib/sib-api-v3-sdk/models/create_contact.rb +1 -1
- data/lib/sib-api-v3-sdk/models/create_email_campaign.rb +24 -4
- data/lib/sib-api-v3-sdk/models/create_email_campaign_recipients.rb +17 -5
- data/lib/sib-api-v3-sdk/models/create_sub_account.rb +3 -3
- data/lib/sib-api-v3-sdk/models/create_sub_account_response.rb +190 -0
- data/lib/sib-api-v3-sdk/models/deal.rb +220 -0
- data/lib/sib-api-v3-sdk/models/deal_attributes.rb +176 -0
- data/lib/sib-api-v3-sdk/models/deal_attributes_inner.rb +223 -0
- data/lib/sib-api-v3-sdk/models/deals_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/file_data.rb +22 -54
- data/lib/sib-api-v3-sdk/models/file_downloadable_link.rb +190 -0
- data/lib/sib-api-v3-sdk/models/file_list.rb +176 -0
- data/lib/sib-api-v3-sdk/models/get_campaign_stats.rb +21 -1
- data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_batch_id.rb +196 -0
- data/lib/sib-api-v3-sdk/models/{contact.rb → get_scheduled_email_by_batch_id_batches.rb} +62 -74
- data/lib/sib-api-v3-sdk/models/get_scheduled_email_by_message_id.rb +254 -0
- data/lib/sib-api-v3-sdk/models/get_sso_token.rb +1 -1
- data/lib/sib-api-v3-sdk/models/inline_response_200.rb +191 -0
- data/lib/sib-api-v3-sdk/models/inline_response_201.rb +191 -0
- data/lib/sib-api-v3-sdk/models/inline_response_201_1.rb +191 -0
- data/lib/sib-api-v3-sdk/models/note_data.rb +16 -4
- data/lib/sib-api-v3-sdk/models/note_id.rb +186 -0
- data/lib/sib-api-v3-sdk/models/note_list.rb +176 -0
- data/lib/sib-api-v3-sdk/models/pipeline.rb +188 -0
- data/lib/sib-api-v3-sdk/models/pipeline_stage.rb +196 -0
- data/lib/sib-api-v3-sdk/models/schedule_smtp_email.rb +206 -0
- data/lib/sib-api-v3-sdk/models/send_smtp_email.rb +24 -4
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits.rb +2 -2
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_credits_emails.rb +1 -1
- data/lib/sib-api-v3-sdk/models/sub_account_details_response_plan_info_features.rb +1 -1
- data/lib/sib-api-v3-sdk/models/sub_accounts_response_sub_accounts.rb +4 -4
- data/lib/sib-api-v3-sdk/models/task.rb +4 -119
- data/lib/sib-api-v3-sdk/models/task_list.rb +188 -0
- data/lib/sib-api-v3-sdk/models/task_reminder.rb +1 -1
- data/lib/sib-api-v3-sdk/models/task_types.rb +1 -11
- data/lib/sib-api-v3-sdk/models/update_contact.rb +1 -1
- data/lib/sib-api-v3-sdk/models/update_email_campaign.rb +25 -5
- data/lib/sib-api-v3-sdk/models/update_email_campaign_recipients.rb +18 -6
- data/lib/sib-api-v3-sdk/models/update_smtp_template.rb +1 -1
- data/lib/sib-api-v3-sdk/models/upload_image_model.rb +190 -0
- data/lib/sib-api-v3-sdk/version.rb +1 -1
- data/lib/sib-api-v3-sdk.rb +44 -5
- data/spec/api/companies_api_spec.rb +119 -0
- data/spec/api/contacts_api_spec.rb +2 -0
- data/spec/api/{crm_api_spec.rb → conversations_api_spec.rb} +54 -94
- data/spec/api/{lists_api_spec.rb → deals_api_spec.rb} +51 -68
- data/spec/api/email_campaigns_api_spec.rb +1 -1
- data/spec/api/files_api_spec.rb +99 -0
- data/spec/api/inbound_parsing_api_spec.rb +12 -0
- data/spec/api/master_account_api_spec.rb +4 -4
- data/spec/api/notes_api_spec.rb +97 -0
- data/spec/api/{folders_api_spec.rb → tasks_api_spec.rb} +47 -41
- data/spec/api/transactional_emails_api_spec.rb +44 -0
- data/spec/models/body_10_spec.rb +59 -0
- data/spec/models/body_11_spec.rb +41 -0
- data/spec/models/body_12_spec.rb +59 -0
- data/spec/models/body_1_spec.rb +2 -50
- data/spec/models/body_2_spec.rb +59 -0
- data/spec/models/body_3_spec.rb +47 -0
- data/spec/models/body_4_spec.rb +47 -0
- data/spec/models/body_5_spec.rb +59 -0
- data/spec/models/body_6_spec.rb +101 -0
- data/spec/models/{contact_spec.rb → body_7_spec.rb} +26 -14
- data/spec/{api/attributes_api_spec.rb → models/body_8_spec.rb} +22 -34
- data/spec/models/body_9_spec.rb +41 -0
- data/spec/models/body_spec.rb +2 -50
- data/spec/models/companies_list_spec.rb +41 -0
- data/spec/models/company_attributes_inner_spec.rb +65 -0
- data/spec/models/company_attributes_spec.rb +35 -0
- data/spec/models/company_spec.rb +59 -0
- data/spec/models/conversations_message_file_image_info_spec.rb +53 -0
- data/spec/models/conversations_message_file_spec.rb +65 -0
- data/spec/models/conversations_message_spec.rb +99 -0
- data/spec/models/create_email_campaign_recipients_spec.rb +6 -0
- data/spec/models/create_email_campaign_spec.rb +12 -0
- data/spec/models/create_sub_account_response_spec.rb +41 -0
- data/spec/models/deal_attributes_inner_spec.rb +65 -0
- data/spec/models/deal_attributes_spec.rb +35 -0
- data/spec/models/deal_spec.rb +59 -0
- data/spec/models/deals_list_spec.rb +41 -0
- data/spec/models/file_data_spec.rb +3 -21
- data/spec/models/file_downloadable_link_spec.rb +41 -0
- data/spec/models/file_list_spec.rb +35 -0
- data/spec/models/get_campaign_stats_spec.rb +12 -0
- data/spec/models/get_scheduled_email_by_batch_id_batches_spec.rb +57 -0
- data/spec/models/get_scheduled_email_by_batch_id_spec.rb +47 -0
- data/spec/models/get_scheduled_email_by_message_id_spec.rb +57 -0
- data/spec/models/inline_response_200_spec.rb +41 -0
- data/spec/models/inline_response_201_1_spec.rb +41 -0
- data/spec/models/inline_response_201_spec.rb +41 -0
- data/spec/models/note_data_spec.rb +6 -0
- data/spec/models/note_id_spec.rb +41 -0
- data/spec/models/note_list_spec.rb +35 -0
- data/spec/models/pipeline_spec.rb +41 -0
- data/spec/models/pipeline_stage_spec.rb +47 -0
- data/spec/models/schedule_smtp_email_spec.rb +53 -0
- data/spec/models/send_smtp_email_spec.rb +12 -0
- data/spec/models/task_list_spec.rb +41 -0
- data/spec/models/task_spec.rb +0 -66
- data/spec/models/task_types_spec.rb +0 -6
- data/spec/models/update_email_campaign_recipients_spec.rb +6 -0
- data/spec/models/update_email_campaign_spec.rb +12 -0
- data/spec/models/upload_image_model_spec.rb +41 -0
- metadata +179 -23
- data/docs/AttributesApi.md +0 -246
- data/docs/CRMApi.md +0 -762
- data/docs/Contact.md +0 -15
- data/lib/sib-api-v3-sdk/api/attributes_api.rb +0 -274
- data/lib/sib-api-v3-sdk/api/crm_api.rb +0 -716
- data/lib/sib-api-v3-sdk/api/folders_api.rb +0 -383
- data/lib/sib-api-v3-sdk/api/lists_api.rb +0 -562
data/docs/Contact.md
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# SibApiV3Sdk::Contact
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
Name | Type | Description | Notes
|
5
|
-
------------ | ------------- | ------------- | -------------
|
6
|
-
**virtual_next_task** | **Object** | Next incomplete task of contact | [optional]
|
7
|
-
**email** | **String** | Contact email |
|
8
|
-
**assign_to_id** | **String** | User id to whom contact is assigned | [optional]
|
9
|
-
**contacts_id** | **Integer** | Contact id | [optional]
|
10
|
-
**crm_lists** | **Object** | CRM lists in which contact is added |
|
11
|
-
**attributes** | **Object** | Contact attributes e.g firstname / lastname / SMS etc. | [optional]
|
12
|
-
**created_at** | **DateTime** | Contact created date/time | [optional]
|
13
|
-
**updated_at** | **DateTime** | Contact updated date/time | [optional]
|
14
|
-
|
15
|
-
|
@@ -1,274 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#SendinBlue API
|
3
|
-
|
4
|
-
#SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 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 'uri'
|
14
|
-
|
15
|
-
module SibApiV3Sdk
|
16
|
-
class AttributesApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
|
23
|
-
# Set custom user_agent if explicitly passed in api
|
24
|
-
# default will still remain Swagger-Codegen/#{VERSION}/ruby
|
25
|
-
def setUserAgent(user_agent)
|
26
|
-
@user_agent = user_agent
|
27
|
-
if user_agent.is_a?(String) && user_agent.downcase.start_with?('sendinblue_')
|
28
|
-
@api_client.default_headers['User-Agent'] = @user_agent
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
# Create contact attribute
|
33
|
-
# @param attribute_category Category of the attribute
|
34
|
-
# @param attribute_name Name of the attribute
|
35
|
-
# @param create_attribute Values to create an attribute
|
36
|
-
# @param [Hash] opts the optional parameters
|
37
|
-
# @return [nil]
|
38
|
-
def create_attribute(attribute_category, attribute_name, create_attribute, opts = {})
|
39
|
-
create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, opts)
|
40
|
-
nil
|
41
|
-
end
|
42
|
-
|
43
|
-
# Create contact attribute
|
44
|
-
# @param attribute_category Category of the attribute
|
45
|
-
# @param attribute_name Name of the attribute
|
46
|
-
# @param create_attribute Values to create an attribute
|
47
|
-
# @param [Hash] opts the optional parameters
|
48
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
49
|
-
def create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, opts = {})
|
50
|
-
if @api_client.config.debugging
|
51
|
-
@api_client.config.logger.debug 'Calling API: AttributesApi.create_attribute ...'
|
52
|
-
end
|
53
|
-
# verify the required parameter 'attribute_category' is set
|
54
|
-
if @api_client.config.client_side_validation && attribute_category.nil?
|
55
|
-
fail ArgumentError, "Missing the required parameter 'attribute_category' when calling AttributesApi.create_attribute"
|
56
|
-
end
|
57
|
-
# verify enum value
|
58
|
-
if @api_client.config.client_side_validation && !['normal', 'transactional', 'category', 'calculated', 'global'].include?(attribute_category)
|
59
|
-
fail ArgumentError, "invalid value for 'attribute_category', must be one of normal, transactional, category, calculated, global"
|
60
|
-
end
|
61
|
-
# verify the required parameter 'attribute_name' is set
|
62
|
-
if @api_client.config.client_side_validation && attribute_name.nil?
|
63
|
-
fail ArgumentError, "Missing the required parameter 'attribute_name' when calling AttributesApi.create_attribute"
|
64
|
-
end
|
65
|
-
# verify the required parameter 'create_attribute' is set
|
66
|
-
if @api_client.config.client_side_validation && create_attribute.nil?
|
67
|
-
fail ArgumentError, "Missing the required parameter 'create_attribute' when calling AttributesApi.create_attribute"
|
68
|
-
end
|
69
|
-
# resource path
|
70
|
-
local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
|
71
|
-
|
72
|
-
# query parameters
|
73
|
-
query_params = {}
|
74
|
-
|
75
|
-
# header parameters
|
76
|
-
header_params = {}
|
77
|
-
# HTTP header 'Accept' (if needed)
|
78
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
79
|
-
# HTTP header 'Content-Type'
|
80
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
81
|
-
|
82
|
-
# form parameters
|
83
|
-
form_params = {}
|
84
|
-
|
85
|
-
# http body (model)
|
86
|
-
post_body = @api_client.object_to_http_body(create_attribute)
|
87
|
-
auth_names = ['api-key', 'partner-key']
|
88
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
89
|
-
:header_params => header_params,
|
90
|
-
:query_params => query_params,
|
91
|
-
:form_params => form_params,
|
92
|
-
:body => post_body,
|
93
|
-
:auth_names => auth_names)
|
94
|
-
if @api_client.config.debugging
|
95
|
-
@api_client.config.logger.debug "API called: AttributesApi#create_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
96
|
-
end
|
97
|
-
return data, status_code, headers
|
98
|
-
end
|
99
|
-
# Delete an attribute
|
100
|
-
# @param attribute_category Category of the attribute
|
101
|
-
# @param attribute_name Name of the existing attribute
|
102
|
-
# @param [Hash] opts the optional parameters
|
103
|
-
# @return [nil]
|
104
|
-
def delete_attribute(attribute_category, attribute_name, opts = {})
|
105
|
-
delete_attribute_with_http_info(attribute_category, attribute_name, opts)
|
106
|
-
nil
|
107
|
-
end
|
108
|
-
|
109
|
-
# Delete an attribute
|
110
|
-
# @param attribute_category Category of the attribute
|
111
|
-
# @param attribute_name Name of the existing attribute
|
112
|
-
# @param [Hash] opts the optional parameters
|
113
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
114
|
-
def delete_attribute_with_http_info(attribute_category, attribute_name, opts = {})
|
115
|
-
if @api_client.config.debugging
|
116
|
-
@api_client.config.logger.debug 'Calling API: AttributesApi.delete_attribute ...'
|
117
|
-
end
|
118
|
-
# verify the required parameter 'attribute_category' is set
|
119
|
-
if @api_client.config.client_side_validation && attribute_category.nil?
|
120
|
-
fail ArgumentError, "Missing the required parameter 'attribute_category' when calling AttributesApi.delete_attribute"
|
121
|
-
end
|
122
|
-
# verify enum value
|
123
|
-
if @api_client.config.client_side_validation && !['normal', 'transactional', 'category', 'calculated', 'global'].include?(attribute_category)
|
124
|
-
fail ArgumentError, "invalid value for 'attribute_category', must be one of normal, transactional, category, calculated, global"
|
125
|
-
end
|
126
|
-
# verify the required parameter 'attribute_name' is set
|
127
|
-
if @api_client.config.client_side_validation && attribute_name.nil?
|
128
|
-
fail ArgumentError, "Missing the required parameter 'attribute_name' when calling AttributesApi.delete_attribute"
|
129
|
-
end
|
130
|
-
# resource path
|
131
|
-
local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
|
132
|
-
|
133
|
-
# query parameters
|
134
|
-
query_params = {}
|
135
|
-
|
136
|
-
# header parameters
|
137
|
-
header_params = {}
|
138
|
-
# HTTP header 'Accept' (if needed)
|
139
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
140
|
-
# HTTP header 'Content-Type'
|
141
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
142
|
-
|
143
|
-
# form parameters
|
144
|
-
form_params = {}
|
145
|
-
|
146
|
-
# http body (model)
|
147
|
-
post_body = nil
|
148
|
-
auth_names = ['api-key', 'partner-key']
|
149
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
150
|
-
:header_params => header_params,
|
151
|
-
:query_params => query_params,
|
152
|
-
:form_params => form_params,
|
153
|
-
:body => post_body,
|
154
|
-
:auth_names => auth_names)
|
155
|
-
if @api_client.config.debugging
|
156
|
-
@api_client.config.logger.debug "API called: AttributesApi#delete_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
157
|
-
end
|
158
|
-
return data, status_code, headers
|
159
|
-
end
|
160
|
-
# List all attributes
|
161
|
-
# @param [Hash] opts the optional parameters
|
162
|
-
# @return [GetAttributes]
|
163
|
-
def get_attributes(opts = {})
|
164
|
-
data, _status_code, _headers = get_attributes_with_http_info(opts)
|
165
|
-
data
|
166
|
-
end
|
167
|
-
|
168
|
-
# List all attributes
|
169
|
-
# @param [Hash] opts the optional parameters
|
170
|
-
# @return [Array<(GetAttributes, Fixnum, Hash)>] GetAttributes data, response status code and response headers
|
171
|
-
def get_attributes_with_http_info(opts = {})
|
172
|
-
if @api_client.config.debugging
|
173
|
-
@api_client.config.logger.debug 'Calling API: AttributesApi.get_attributes ...'
|
174
|
-
end
|
175
|
-
# resource path
|
176
|
-
local_var_path = '/contacts/attributes'
|
177
|
-
|
178
|
-
# query parameters
|
179
|
-
query_params = {}
|
180
|
-
|
181
|
-
# header parameters
|
182
|
-
header_params = {}
|
183
|
-
# HTTP header 'Accept' (if needed)
|
184
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
185
|
-
# HTTP header 'Content-Type'
|
186
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
187
|
-
|
188
|
-
# form parameters
|
189
|
-
form_params = {}
|
190
|
-
|
191
|
-
# http body (model)
|
192
|
-
post_body = nil
|
193
|
-
auth_names = ['api-key', 'partner-key']
|
194
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
195
|
-
:header_params => header_params,
|
196
|
-
:query_params => query_params,
|
197
|
-
:form_params => form_params,
|
198
|
-
:body => post_body,
|
199
|
-
:auth_names => auth_names,
|
200
|
-
:return_type => 'GetAttributes')
|
201
|
-
if @api_client.config.debugging
|
202
|
-
@api_client.config.logger.debug "API called: AttributesApi#get_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
203
|
-
end
|
204
|
-
return data, status_code, headers
|
205
|
-
end
|
206
|
-
# Update contact attribute
|
207
|
-
# @param attribute_category Category of the attribute
|
208
|
-
# @param attribute_name Name of the existing attribute
|
209
|
-
# @param update_attribute Values to update an attribute
|
210
|
-
# @param [Hash] opts the optional parameters
|
211
|
-
# @return [nil]
|
212
|
-
def update_attribute(attribute_category, attribute_name, update_attribute, opts = {})
|
213
|
-
update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, opts)
|
214
|
-
nil
|
215
|
-
end
|
216
|
-
|
217
|
-
# Update contact attribute
|
218
|
-
# @param attribute_category Category of the attribute
|
219
|
-
# @param attribute_name Name of the existing attribute
|
220
|
-
# @param update_attribute Values to update an attribute
|
221
|
-
# @param [Hash] opts the optional parameters
|
222
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
223
|
-
def update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, opts = {})
|
224
|
-
if @api_client.config.debugging
|
225
|
-
@api_client.config.logger.debug 'Calling API: AttributesApi.update_attribute ...'
|
226
|
-
end
|
227
|
-
# verify the required parameter 'attribute_category' is set
|
228
|
-
if @api_client.config.client_side_validation && attribute_category.nil?
|
229
|
-
fail ArgumentError, "Missing the required parameter 'attribute_category' when calling AttributesApi.update_attribute"
|
230
|
-
end
|
231
|
-
# verify enum value
|
232
|
-
if @api_client.config.client_side_validation && !['category', 'calculated', 'global'].include?(attribute_category)
|
233
|
-
fail ArgumentError, "invalid value for 'attribute_category', must be one of category, calculated, global"
|
234
|
-
end
|
235
|
-
# verify the required parameter 'attribute_name' is set
|
236
|
-
if @api_client.config.client_side_validation && attribute_name.nil?
|
237
|
-
fail ArgumentError, "Missing the required parameter 'attribute_name' when calling AttributesApi.update_attribute"
|
238
|
-
end
|
239
|
-
# verify the required parameter 'update_attribute' is set
|
240
|
-
if @api_client.config.client_side_validation && update_attribute.nil?
|
241
|
-
fail ArgumentError, "Missing the required parameter 'update_attribute' when calling AttributesApi.update_attribute"
|
242
|
-
end
|
243
|
-
# resource path
|
244
|
-
local_var_path = '/contacts/attributes/{attributeCategory}/{attributeName}'.sub('{' + 'attributeCategory' + '}', attribute_category.to_s).sub('{' + 'attributeName' + '}', attribute_name.to_s)
|
245
|
-
|
246
|
-
# query parameters
|
247
|
-
query_params = {}
|
248
|
-
|
249
|
-
# header parameters
|
250
|
-
header_params = {}
|
251
|
-
# HTTP header 'Accept' (if needed)
|
252
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
253
|
-
# HTTP header 'Content-Type'
|
254
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
255
|
-
|
256
|
-
# form parameters
|
257
|
-
form_params = {}
|
258
|
-
|
259
|
-
# http body (model)
|
260
|
-
post_body = @api_client.object_to_http_body(update_attribute)
|
261
|
-
auth_names = ['api-key', 'partner-key']
|
262
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
263
|
-
:header_params => header_params,
|
264
|
-
:query_params => query_params,
|
265
|
-
:form_params => form_params,
|
266
|
-
:body => post_body,
|
267
|
-
:auth_names => auth_names)
|
268
|
-
if @api_client.config.debugging
|
269
|
-
@api_client.config.logger.debug "API called: AttributesApi#update_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
270
|
-
end
|
271
|
-
return data, status_code, headers
|
272
|
-
end
|
273
|
-
end
|
274
|
-
end
|