sendx-ruby-sdk 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +28 -19
- data/lib/sendx-ruby-sdk/api/campaign_api.rb +1 -1
- data/lib/sendx-ruby-sdk/api/contact_api.rb +41 -41
- data/lib/sendx-ruby-sdk/api/event_api.rb +158 -0
- data/lib/sendx-ruby-sdk/api/getting_started_api.rb +158 -0
- data/lib/sendx-ruby-sdk/api/list_api.rb +1 -1
- data/lib/sendx-ruby-sdk/api/reports_api.rb +1 -1
- data/lib/sendx-ruby-sdk/api/sender_api.rb +1 -1
- data/lib/sendx-ruby-sdk/api/tags_api.rb +1 -1
- data/lib/sendx-ruby-sdk/api_client.rb +1 -1
- data/lib/sendx-ruby-sdk/api_error.rb +1 -1
- data/lib/sendx-ruby-sdk/configuration.rb +1 -1
- data/lib/sendx-ruby-sdk/models/campaign.rb +1 -1
- data/lib/sendx-ruby-sdk/models/campaign_dashboard_data.rb +1 -1
- data/lib/sendx-ruby-sdk/models/campaign_request.rb +1 -1
- data/lib/sendx-ruby-sdk/models/contact.rb +1 -1
- data/lib/sendx-ruby-sdk/models/contact_request.rb +1 -1
- data/lib/sendx-ruby-sdk/models/create_response.rb +1 -1
- data/lib/sendx-ruby-sdk/models/custom_event_request.rb +275 -0
- data/lib/sendx-ruby-sdk/models/dashboard_stats.rb +1 -1
- data/lib/sendx-ruby-sdk/models/delete_campaign200_response.rb +1 -1
- data/lib/sendx-ruby-sdk/models/delete_request.rb +1 -1
- data/lib/sendx-ruby-sdk/models/delete_response.rb +1 -1
- data/lib/sendx-ruby-sdk/models/event_response.rb +235 -0
- data/lib/sendx-ruby-sdk/models/identify_request.rb +284 -0
- data/lib/sendx-ruby-sdk/models/identify_response.rb +232 -0
- data/lib/sendx-ruby-sdk/models/last_sent_campaign_stat.rb +1 -1
- data/lib/sendx-ruby-sdk/models/list_model.rb +1 -1
- data/lib/sendx-ruby-sdk/models/list_request.rb +1 -1
- data/lib/sendx-ruby-sdk/models/report_data.rb +1 -1
- data/lib/sendx-ruby-sdk/models/response.rb +1 -1
- data/lib/sendx-ruby-sdk/models/revenue_event_request.rb +290 -0
- data/lib/sendx-ruby-sdk/models/sender.rb +1 -1
- data/lib/sendx-ruby-sdk/models/sender_request.rb +1 -1
- data/lib/sendx-ruby-sdk/models/sender_response.rb +1 -1
- data/lib/sendx-ruby-sdk/models/tag.rb +1 -1
- data/lib/sendx-ruby-sdk/models/tag_request.rb +1 -1
- data/lib/sendx-ruby-sdk/models/track_request.rb +237 -0
- data/lib/sendx-ruby-sdk/models/track_response.rb +223 -0
- data/lib/sendx-ruby-sdk/version.rb +2 -2
- data/lib/sendx-ruby-sdk.rb +10 -1
- data/spec/api/event_api_spec.rb +59 -0
- data/spec/api/getting_started_api_spec.rb +59 -0
- data/spec/models/custom_event_request_spec.rb +54 -0
- data/spec/models/event_response_spec.rb +48 -0
- data/spec/models/identify_request_spec.rb +72 -0
- data/spec/models/identify_response_spec.rb +48 -0
- data/spec/models/revenue_event_request_spec.rb +60 -0
- data/spec/models/track_request_spec.rb +48 -0
- data/spec/models/track_response_spec.rb +42 -0
- data/spec/spec_helper.rb +1 -1
- metadata +29 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38894a39717dc8728c8b8ed3378158e0519a994c3647a928f5c08e5db5f76126
|
4
|
+
data.tar.gz: 9e2d5e999d7ddd8b4b02c0f85a4231034e756a886058c3f1612e07f52567f0d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd677afcec408905aeba611e444b3a2eb56d44acc1357df892a0c6d2691798a2e14c23d857c4e52c960d5370b5edf6af1bb60173a838c53177a3c008bf8274f2
|
7
|
+
data.tar.gz: c6b1cdefe416359ac146ffe46b7f9c95bdc76f224905d2ded2d543402bfdc07ec67537df738b4942d4795ee35f3732b6203fa04685884e0e0e64aa9dc4399b57
|
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
# sendx-ruby-sdk
|
1
|
+
# [SendX Ruby SDK](https://rubygems.org/gems/sendx-ruby-sdk)
|
2
|
+
[](https://badge.fury.io/rb/sendx-ruby-sdk)
|
2
3
|
|
3
4
|
SendX - the Ruby gem for the SendX REST API
|
4
5
|
|
5
|
-
|
6
|
+
## Introduction
|
6
7
|
|
7
8
|
SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations.
|
8
9
|
|
@@ -14,29 +15,26 @@ The SendX Rest API doesn’t support bulk updates. You can work on only one obje
|
|
14
15
|
|
15
16
|
### Build a gem
|
16
17
|
|
17
|
-
To build the Ruby code into a gem:
|
18
18
|
|
19
|
-
|
20
|
-
gem build sendx-ruby-sdk.gemspec
|
21
|
-
```
|
22
|
-
|
23
|
-
Then either install the gem locally:
|
19
|
+
To install the gem:
|
24
20
|
|
21
|
+
Install via command line
|
25
22
|
```shell
|
26
|
-
gem install
|
23
|
+
gem install sendx-ruby-sdk
|
27
24
|
```
|
28
25
|
|
29
|
-
|
30
|
-
|
31
|
-
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
26
|
+
Install via Gemfile
|
32
27
|
|
33
|
-
|
28
|
+
```ruby
|
29
|
+
source "https://rubygems.pkg.github.com/sendx" do
|
30
|
+
gem "sendx-ruby-sdk", "1.1.0"
|
31
|
+
end
|
32
|
+
```
|
34
33
|
|
35
|
-
gem 'sendx-ruby-sdk', '~> 1.0.0'
|
36
34
|
|
37
35
|
### Install from Git
|
38
36
|
|
39
|
-
|
37
|
+
The Ruby gem is hosted at a git repository: https://github.com/sendx/sendx-ruby-sdk, add the following in the Gemfile:
|
40
38
|
|
41
39
|
gem 'sendx-ruby-sdk', :git => 'https://github.com/sendx/sendx-ruby-sdk.git'
|
42
40
|
|
@@ -99,11 +97,15 @@ Class | Method | HTTP request | Description
|
|
99
97
|
*SendX::CampaignApi* | [**get_all_campaigns**](docs/CampaignApi.md#get_all_campaigns) | **GET** /campaign | Get All Campaigns
|
100
98
|
*SendX::CampaignApi* | [**get_campaign_by_id**](docs/CampaignApi.md#get_campaign_by_id) | **GET** /campaign/{campaignId} | Get Campaign By Id
|
101
99
|
*SendX::ContactApi* | [**create_contact**](docs/ContactApi.md#create_contact) | **POST** /contact | Create a contact
|
102
|
-
*SendX::ContactApi* | [**delete_contact**](docs/ContactApi.md#delete_contact) | **DELETE** /contact/{
|
100
|
+
*SendX::ContactApi* | [**delete_contact**](docs/ContactApi.md#delete_contact) | **DELETE** /contact/{identifier} | Delete Contact
|
103
101
|
*SendX::ContactApi* | [**get_all_contacts**](docs/ContactApi.md#get_all_contacts) | **GET** /contact | Get All Contacts
|
104
|
-
*SendX::ContactApi* | [**get_contact_by_id**](docs/ContactApi.md#get_contact_by_id) | **GET** /contact/{
|
105
|
-
*SendX::ContactApi* | [**unsubscribe_contact**](docs/ContactApi.md#unsubscribe_contact) | **POST** /contact/unsubscribe/{
|
106
|
-
*SendX::ContactApi* | [**update_contact**](docs/ContactApi.md#update_contact) | **PUT** /contact/{
|
102
|
+
*SendX::ContactApi* | [**get_contact_by_id**](docs/ContactApi.md#get_contact_by_id) | **GET** /contact/{identifier} | Get Contact by Identifier
|
103
|
+
*SendX::ContactApi* | [**unsubscribe_contact**](docs/ContactApi.md#unsubscribe_contact) | **POST** /contact/unsubscribe/{identifier} | Unsubscribe Contact
|
104
|
+
*SendX::ContactApi* | [**update_contact**](docs/ContactApi.md#update_contact) | **PUT** /contact/{identifier} | Update Contact
|
105
|
+
*SendX::EventApi* | [**create_revenue_event**](docs/EventApi.md#create_revenue_event) | **POST** /events/revenue | Record a revenue event for a specific contact
|
106
|
+
*SendX::EventApi* | [**push_custom_event**](docs/EventApi.md#push_custom_event) | **POST** /events/custom | Push a custom event associated with a contact
|
107
|
+
*SendX::GettingStartedApi* | [**identify_contact**](docs/GettingStartedApi.md#identify_contact) | **POST** /contact/identify | Identify contact
|
108
|
+
*SendX::GettingStartedApi* | [**tracking_contact**](docs/GettingStartedApi.md#tracking_contact) | **POST** /contact/track | Add Tracking info
|
107
109
|
*SendX::ListApi* | [**create_list**](docs/ListApi.md#create_list) | **POST** /list | Create List
|
108
110
|
*SendX::ListApi* | [**delete_list**](docs/ListApi.md#delete_list) | **DELETE** /list/{listId} | Delete List
|
109
111
|
*SendX::ListApi* | [**get_all_lists**](docs/ListApi.md#get_all_lists) | **GET** /list | Get All Lists
|
@@ -127,20 +129,27 @@ Class | Method | HTTP request | Description
|
|
127
129
|
- [SendX::Contact](docs/Contact.md)
|
128
130
|
- [SendX::ContactRequest](docs/ContactRequest.md)
|
129
131
|
- [SendX::CreateResponse](docs/CreateResponse.md)
|
132
|
+
- [SendX::CustomEventRequest](docs/CustomEventRequest.md)
|
130
133
|
- [SendX::DashboardStats](docs/DashboardStats.md)
|
131
134
|
- [SendX::DeleteCampaign200Response](docs/DeleteCampaign200Response.md)
|
132
135
|
- [SendX::DeleteRequest](docs/DeleteRequest.md)
|
133
136
|
- [SendX::DeleteResponse](docs/DeleteResponse.md)
|
137
|
+
- [SendX::EventResponse](docs/EventResponse.md)
|
138
|
+
- [SendX::IdentifyRequest](docs/IdentifyRequest.md)
|
139
|
+
- [SendX::IdentifyResponse](docs/IdentifyResponse.md)
|
134
140
|
- [SendX::LastSentCampaignStat](docs/LastSentCampaignStat.md)
|
135
141
|
- [SendX::ListModel](docs/ListModel.md)
|
136
142
|
- [SendX::ListRequest](docs/ListRequest.md)
|
137
143
|
- [SendX::ReportData](docs/ReportData.md)
|
138
144
|
- [SendX::Response](docs/Response.md)
|
145
|
+
- [SendX::RevenueEventRequest](docs/RevenueEventRequest.md)
|
139
146
|
- [SendX::Sender](docs/Sender.md)
|
140
147
|
- [SendX::SenderRequest](docs/SenderRequest.md)
|
141
148
|
- [SendX::SenderResponse](docs/SenderResponse.md)
|
142
149
|
- [SendX::Tag](docs/Tag.md)
|
143
150
|
- [SendX::TagRequest](docs/TagRequest.md)
|
151
|
+
- [SendX::TrackRequest](docs/TrackRequest.md)
|
152
|
+
- [SendX::TrackResponse](docs/TrackResponse.md)
|
144
153
|
|
145
154
|
|
146
155
|
## Documentation for Authorization
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
## Introduction SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations. The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: support@sendx.io
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.8.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
## Introduction SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations. The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: support@sendx.io
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.8.0
|
@@ -89,29 +89,29 @@ module SendX
|
|
89
89
|
|
90
90
|
# Delete Contact
|
91
91
|
# Deletes Contact
|
92
|
-
# @param
|
92
|
+
# @param identifier [String] The Contact ID/ Email to delete
|
93
93
|
# @param [Hash] opts the optional parameters
|
94
94
|
# @return [Response]
|
95
|
-
def delete_contact(
|
96
|
-
data, _status_code, _headers = delete_contact_with_http_info(
|
95
|
+
def delete_contact(identifier, opts = {})
|
96
|
+
data, _status_code, _headers = delete_contact_with_http_info(identifier, opts)
|
97
97
|
data
|
98
98
|
end
|
99
99
|
|
100
100
|
# Delete Contact
|
101
101
|
# Deletes Contact
|
102
|
-
# @param
|
102
|
+
# @param identifier [String] The Contact ID/ Email to delete
|
103
103
|
# @param [Hash] opts the optional parameters
|
104
104
|
# @return [Array<(Response, Integer, Hash)>] Response data, response status code and response headers
|
105
|
-
def delete_contact_with_http_info(
|
105
|
+
def delete_contact_with_http_info(identifier, opts = {})
|
106
106
|
if @api_client.config.debugging
|
107
107
|
@api_client.config.logger.debug 'Calling API: ContactApi.delete_contact ...'
|
108
108
|
end
|
109
|
-
# verify the required parameter '
|
110
|
-
if @api_client.config.client_side_validation &&
|
111
|
-
fail ArgumentError, "Missing the required parameter '
|
109
|
+
# verify the required parameter 'identifier' is set
|
110
|
+
if @api_client.config.client_side_validation && identifier.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactApi.delete_contact"
|
112
112
|
end
|
113
113
|
# resource path
|
114
|
-
local_var_path = '/contact/{
|
114
|
+
local_var_path = '/contact/{identifier}'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))
|
115
115
|
|
116
116
|
# query parameters
|
117
117
|
query_params = opts[:query_params] || {}
|
@@ -223,31 +223,31 @@ module SendX
|
|
223
223
|
return data, status_code, headers
|
224
224
|
end
|
225
225
|
|
226
|
-
# Get Contact by
|
227
|
-
# Retrieve a specific contact by its
|
228
|
-
# @param
|
226
|
+
# Get Contact by Identifier
|
227
|
+
# Retrieve a specific contact by its identifier.
|
228
|
+
# @param identifier [String] The ID or Email of the contact to retrieve.
|
229
229
|
# @param [Hash] opts the optional parameters
|
230
230
|
# @return [Contact]
|
231
|
-
def get_contact_by_id(
|
232
|
-
data, _status_code, _headers = get_contact_by_id_with_http_info(
|
231
|
+
def get_contact_by_id(identifier, opts = {})
|
232
|
+
data, _status_code, _headers = get_contact_by_id_with_http_info(identifier, opts)
|
233
233
|
data
|
234
234
|
end
|
235
235
|
|
236
|
-
# Get Contact by
|
237
|
-
# Retrieve a specific contact by its
|
238
|
-
# @param
|
236
|
+
# Get Contact by Identifier
|
237
|
+
# Retrieve a specific contact by its identifier.
|
238
|
+
# @param identifier [String] The ID or Email of the contact to retrieve.
|
239
239
|
# @param [Hash] opts the optional parameters
|
240
240
|
# @return [Array<(Contact, Integer, Hash)>] Contact data, response status code and response headers
|
241
|
-
def get_contact_by_id_with_http_info(
|
241
|
+
def get_contact_by_id_with_http_info(identifier, opts = {})
|
242
242
|
if @api_client.config.debugging
|
243
243
|
@api_client.config.logger.debug 'Calling API: ContactApi.get_contact_by_id ...'
|
244
244
|
end
|
245
|
-
# verify the required parameter '
|
246
|
-
if @api_client.config.client_side_validation &&
|
247
|
-
fail ArgumentError, "Missing the required parameter '
|
245
|
+
# verify the required parameter 'identifier' is set
|
246
|
+
if @api_client.config.client_side_validation && identifier.nil?
|
247
|
+
fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactApi.get_contact_by_id"
|
248
248
|
end
|
249
249
|
# resource path
|
250
|
-
local_var_path = '/contact/{
|
250
|
+
local_var_path = '/contact/{identifier}'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))
|
251
251
|
|
252
252
|
# query parameters
|
253
253
|
query_params = opts[:query_params] || {}
|
@@ -288,29 +288,29 @@ module SendX
|
|
288
288
|
|
289
289
|
# Unsubscribe Contact
|
290
290
|
# Unsubscribe a globally existing contact
|
291
|
-
# @param
|
291
|
+
# @param identifier [String] The Contact ID or email to unsubscribe
|
292
292
|
# @param [Hash] opts the optional parameters
|
293
293
|
# @return [Response]
|
294
|
-
def unsubscribe_contact(
|
295
|
-
data, _status_code, _headers = unsubscribe_contact_with_http_info(
|
294
|
+
def unsubscribe_contact(identifier, opts = {})
|
295
|
+
data, _status_code, _headers = unsubscribe_contact_with_http_info(identifier, opts)
|
296
296
|
data
|
297
297
|
end
|
298
298
|
|
299
299
|
# Unsubscribe Contact
|
300
300
|
# Unsubscribe a globally existing contact
|
301
|
-
# @param
|
301
|
+
# @param identifier [String] The Contact ID or email to unsubscribe
|
302
302
|
# @param [Hash] opts the optional parameters
|
303
303
|
# @return [Array<(Response, Integer, Hash)>] Response data, response status code and response headers
|
304
|
-
def unsubscribe_contact_with_http_info(
|
304
|
+
def unsubscribe_contact_with_http_info(identifier, opts = {})
|
305
305
|
if @api_client.config.debugging
|
306
306
|
@api_client.config.logger.debug 'Calling API: ContactApi.unsubscribe_contact ...'
|
307
307
|
end
|
308
|
-
# verify the required parameter '
|
309
|
-
if @api_client.config.client_side_validation &&
|
310
|
-
fail ArgumentError, "Missing the required parameter '
|
308
|
+
# verify the required parameter 'identifier' is set
|
309
|
+
if @api_client.config.client_side_validation && identifier.nil?
|
310
|
+
fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactApi.unsubscribe_contact"
|
311
311
|
end
|
312
312
|
# resource path
|
313
|
-
local_var_path = '/contact/unsubscribe/{
|
313
|
+
local_var_path = '/contact/unsubscribe/{identifier}'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))
|
314
314
|
|
315
315
|
# query parameters
|
316
316
|
query_params = opts[:query_params] || {}
|
@@ -352,21 +352,21 @@ module SendX
|
|
352
352
|
# Update Contact
|
353
353
|
# Update Contact with given data
|
354
354
|
# @param contact_request [ContactRequest]
|
355
|
-
# @param
|
355
|
+
# @param identifier [String] The ID or email of the Contact to update
|
356
356
|
# @param [Hash] opts the optional parameters
|
357
357
|
# @return [Contact]
|
358
|
-
def update_contact(contact_request,
|
359
|
-
data, _status_code, _headers = update_contact_with_http_info(contact_request,
|
358
|
+
def update_contact(contact_request, identifier, opts = {})
|
359
|
+
data, _status_code, _headers = update_contact_with_http_info(contact_request, identifier, opts)
|
360
360
|
data
|
361
361
|
end
|
362
362
|
|
363
363
|
# Update Contact
|
364
364
|
# Update Contact with given data
|
365
365
|
# @param contact_request [ContactRequest]
|
366
|
-
# @param
|
366
|
+
# @param identifier [String] The ID or email of the Contact to update
|
367
367
|
# @param [Hash] opts the optional parameters
|
368
368
|
# @return [Array<(Contact, Integer, Hash)>] Contact data, response status code and response headers
|
369
|
-
def update_contact_with_http_info(contact_request,
|
369
|
+
def update_contact_with_http_info(contact_request, identifier, opts = {})
|
370
370
|
if @api_client.config.debugging
|
371
371
|
@api_client.config.logger.debug 'Calling API: ContactApi.update_contact ...'
|
372
372
|
end
|
@@ -374,12 +374,12 @@ module SendX
|
|
374
374
|
if @api_client.config.client_side_validation && contact_request.nil?
|
375
375
|
fail ArgumentError, "Missing the required parameter 'contact_request' when calling ContactApi.update_contact"
|
376
376
|
end
|
377
|
-
# verify the required parameter '
|
378
|
-
if @api_client.config.client_side_validation &&
|
379
|
-
fail ArgumentError, "Missing the required parameter '
|
377
|
+
# verify the required parameter 'identifier' is set
|
378
|
+
if @api_client.config.client_side_validation && identifier.nil?
|
379
|
+
fail ArgumentError, "Missing the required parameter 'identifier' when calling ContactApi.update_contact"
|
380
380
|
end
|
381
381
|
# resource path
|
382
|
-
local_var_path = '/contact/{
|
382
|
+
local_var_path = '/contact/{identifier}'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s))
|
383
383
|
|
384
384
|
# query parameters
|
385
385
|
query_params = opts[:query_params] || {}
|
@@ -0,0 +1,158 @@
|
|
1
|
+
=begin
|
2
|
+
#SendX REST API
|
3
|
+
|
4
|
+
## Introduction SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations. The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: support@sendx.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module SendX
|
16
|
+
class EventApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Record a revenue event for a specific contact
|
23
|
+
# Records a revenue event, which can be attributed to campaigns, drips, workflows, or other sources of user interaction.
|
24
|
+
# @param revenue_event_request [RevenueEventRequest]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [EventResponse]
|
27
|
+
def create_revenue_event(revenue_event_request, opts = {})
|
28
|
+
data, _status_code, _headers = create_revenue_event_with_http_info(revenue_event_request, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Record a revenue event for a specific contact
|
33
|
+
# Records a revenue event, which can be attributed to campaigns, drips, workflows, or other sources of user interaction.
|
34
|
+
# @param revenue_event_request [RevenueEventRequest]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(EventResponse, Integer, Hash)>] EventResponse data, response status code and response headers
|
37
|
+
def create_revenue_event_with_http_info(revenue_event_request, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: EventApi.create_revenue_event ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'revenue_event_request' is set
|
42
|
+
if @api_client.config.client_side_validation && revenue_event_request.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'revenue_event_request' when calling EventApi.create_revenue_event"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/events/revenue'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
57
|
+
if !content_type.nil?
|
58
|
+
header_params['Content-Type'] = content_type
|
59
|
+
end
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(revenue_event_request)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:debug_return_type] || 'EventResponse'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:operation => :"EventApi.create_revenue_event",
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: EventApi#create_revenue_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Push a custom event associated with a contact
|
91
|
+
# Pushes a custom event with properties and values for a specified contact.
|
92
|
+
# @param custom_event_request [CustomEventRequest]
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [EventResponse]
|
95
|
+
def push_custom_event(custom_event_request, opts = {})
|
96
|
+
data, _status_code, _headers = push_custom_event_with_http_info(custom_event_request, opts)
|
97
|
+
data
|
98
|
+
end
|
99
|
+
|
100
|
+
# Push a custom event associated with a contact
|
101
|
+
# Pushes a custom event with properties and values for a specified contact.
|
102
|
+
# @param custom_event_request [CustomEventRequest]
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [Array<(EventResponse, Integer, Hash)>] EventResponse data, response status code and response headers
|
105
|
+
def push_custom_event_with_http_info(custom_event_request, opts = {})
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug 'Calling API: EventApi.push_custom_event ...'
|
108
|
+
end
|
109
|
+
# verify the required parameter 'custom_event_request' is set
|
110
|
+
if @api_client.config.client_side_validation && custom_event_request.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'custom_event_request' when calling EventApi.push_custom_event"
|
112
|
+
end
|
113
|
+
# resource path
|
114
|
+
local_var_path = '/events/custom'
|
115
|
+
|
116
|
+
# query parameters
|
117
|
+
query_params = opts[:query_params] || {}
|
118
|
+
|
119
|
+
# header parameters
|
120
|
+
header_params = opts[:header_params] || {}
|
121
|
+
# HTTP header 'Accept' (if needed)
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
123
|
+
# HTTP header 'Content-Type'
|
124
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
125
|
+
if !content_type.nil?
|
126
|
+
header_params['Content-Type'] = content_type
|
127
|
+
end
|
128
|
+
|
129
|
+
# form parameters
|
130
|
+
form_params = opts[:form_params] || {}
|
131
|
+
|
132
|
+
# http body (model)
|
133
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(custom_event_request)
|
134
|
+
|
135
|
+
# return_type
|
136
|
+
return_type = opts[:debug_return_type] || 'EventResponse'
|
137
|
+
|
138
|
+
# auth_names
|
139
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
140
|
+
|
141
|
+
new_options = opts.merge(
|
142
|
+
:operation => :"EventApi.push_custom_event",
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => return_type
|
149
|
+
)
|
150
|
+
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "API called: EventApi#push_custom_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
154
|
+
end
|
155
|
+
return data, status_code, headers
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
@@ -0,0 +1,158 @@
|
|
1
|
+
=begin
|
2
|
+
#SendX REST API
|
3
|
+
|
4
|
+
## Introduction SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations. The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: support@sendx.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module SendX
|
16
|
+
class GettingStartedApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Identify contact
|
23
|
+
# Identify a contact by email address. If the contact already exists, it will be updated.
|
24
|
+
# @param identify_request [IdentifyRequest]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [IdentifyResponse]
|
27
|
+
def identify_contact(identify_request, opts = {})
|
28
|
+
data, _status_code, _headers = identify_contact_with_http_info(identify_request, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Identify contact
|
33
|
+
# Identify a contact by email address. If the contact already exists, it will be updated.
|
34
|
+
# @param identify_request [IdentifyRequest]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(IdentifyResponse, Integer, Hash)>] IdentifyResponse data, response status code and response headers
|
37
|
+
def identify_contact_with_http_info(identify_request, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: GettingStartedApi.identify_contact ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'identify_request' is set
|
42
|
+
if @api_client.config.client_side_validation && identify_request.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'identify_request' when calling GettingStartedApi.identify_contact"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/contact/identify'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
57
|
+
if !content_type.nil?
|
58
|
+
header_params['Content-Type'] = content_type
|
59
|
+
end
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(identify_request)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:debug_return_type] || 'IdentifyResponse'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:operation => :"GettingStartedApi.identify_contact",
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: GettingStartedApi#identify_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Add Tracking info
|
91
|
+
# Track a contact
|
92
|
+
# @param track_request [TrackRequest]
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [TrackResponse]
|
95
|
+
def tracking_contact(track_request, opts = {})
|
96
|
+
data, _status_code, _headers = tracking_contact_with_http_info(track_request, opts)
|
97
|
+
data
|
98
|
+
end
|
99
|
+
|
100
|
+
# Add Tracking info
|
101
|
+
# Track a contact
|
102
|
+
# @param track_request [TrackRequest]
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [Array<(TrackResponse, Integer, Hash)>] TrackResponse data, response status code and response headers
|
105
|
+
def tracking_contact_with_http_info(track_request, opts = {})
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug 'Calling API: GettingStartedApi.tracking_contact ...'
|
108
|
+
end
|
109
|
+
# verify the required parameter 'track_request' is set
|
110
|
+
if @api_client.config.client_side_validation && track_request.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'track_request' when calling GettingStartedApi.tracking_contact"
|
112
|
+
end
|
113
|
+
# resource path
|
114
|
+
local_var_path = '/contact/track'
|
115
|
+
|
116
|
+
# query parameters
|
117
|
+
query_params = opts[:query_params] || {}
|
118
|
+
|
119
|
+
# header parameters
|
120
|
+
header_params = opts[:header_params] || {}
|
121
|
+
# HTTP header 'Accept' (if needed)
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
123
|
+
# HTTP header 'Content-Type'
|
124
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
125
|
+
if !content_type.nil?
|
126
|
+
header_params['Content-Type'] = content_type
|
127
|
+
end
|
128
|
+
|
129
|
+
# form parameters
|
130
|
+
form_params = opts[:form_params] || {}
|
131
|
+
|
132
|
+
# http body (model)
|
133
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(track_request)
|
134
|
+
|
135
|
+
# return_type
|
136
|
+
return_type = opts[:debug_return_type] || 'TrackResponse'
|
137
|
+
|
138
|
+
# auth_names
|
139
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyAuth']
|
140
|
+
|
141
|
+
new_options = opts.merge(
|
142
|
+
:operation => :"GettingStartedApi.tracking_contact",
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => return_type
|
149
|
+
)
|
150
|
+
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "API called: GettingStartedApi#tracking_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
154
|
+
end
|
155
|
+
return data, status_code, headers
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
## Introduction SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations. The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: support@sendx.io
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.8.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
## Introduction SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations. The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: support@sendx.io
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.8.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
## Introduction SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations. The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: support@sendx.io
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.8.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
## Introduction SendX is an email marketing product. It helps you convert website visitors to customers, send them promotional emails, engage with them using drip sequences and craft custom journeys using powerful but simple automations. The SendX API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. The SendX Rest API doesn’t support bulk updates. You can work on only one object per request. <br>
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.0.
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: support@sendx.io
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.8.0
|