sendx-ruby-sdk 1.0.1 → 1.0.2
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 +12 -15
- data/lib/sendx-ruby-sdk/api/contact_api.rb +40 -40
- data/lib/sendx-ruby-sdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a42a2cd69e7b9ea8e4162a38183effa20ede3c7954be0281883f927d29387df
|
4
|
+
data.tar.gz: 3831f17146ae2e3d23043f0e8ede428a85e8118b27c4c3cc2337a178d22f8472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9212032cb16a569bd2a394a1f87bb8e27b0fb08dc363b363d43f910b5413ff614a6e335d9dcec11930b9ff2fb3f885317d871daa1883c2aefc654709fe71f5ca
|
7
|
+
data.tar.gz: 17bb196b661df70d5180214f73e90e9ff224df8eaab050bf36b44e3f9c116ee34d180b79d62f1c858d0287410b69b82f8270476663f2d8e9e1fd0c96e70cca7e
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# SendX Ruby SDK
|
2
2
|
|
3
3
|
SendX - the Ruby gem for the SendX REST API
|
4
4
|
|
5
|
-
|
5
|
+
## Introduction
|
6
6
|
|
7
7
|
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
8
|
|
@@ -14,29 +14,26 @@ The SendX Rest API doesn’t support bulk updates. You can work on only one obje
|
|
14
14
|
|
15
15
|
### Build a gem
|
16
16
|
|
17
|
-
To build the Ruby code into a gem:
|
18
17
|
|
19
|
-
|
20
|
-
gem build sendx-ruby-sdk.gemspec
|
21
|
-
```
|
22
|
-
|
23
|
-
Then either install the gem locally:
|
18
|
+
To install the gem:
|
24
19
|
|
20
|
+
Install via command line
|
25
21
|
```shell
|
26
|
-
gem install
|
22
|
+
gem install sendx-ruby-sdk
|
27
23
|
```
|
28
24
|
|
29
|
-
|
30
|
-
|
31
|
-
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
25
|
+
Install via Gemfile
|
32
26
|
|
33
|
-
|
27
|
+
```ruby
|
28
|
+
source "https://rubygems.pkg.github.com/sendx" do
|
29
|
+
gem "sendx-ruby-sdk", "1.0.1"
|
30
|
+
end
|
31
|
+
```
|
34
32
|
|
35
|
-
gem 'sendx-ruby-sdk', '~> 1.0.0'
|
36
33
|
|
37
34
|
### Install from Git
|
38
35
|
|
39
|
-
|
36
|
+
The Ruby gem is hosted at a git repository: https://github.com/sendx/sendx-ruby-sdk, add the following in the Gemfile:
|
40
37
|
|
41
38
|
gem 'sendx-ruby-sdk', :git => 'https://github.com/sendx/sendx-ruby-sdk.git'
|
42
39
|
|
@@ -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] || {}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendx-ruby-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SendX
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|