sendpost_ruby_sdk 1.2.2 → 2.0.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/LICENSE +21 -0
- data/README.md +580 -145
- data/docs/AccountStats.md +20 -0
- data/docs/AccountStatsStat.md +38 -0
- data/docs/AggregateStat.md +38 -0
- data/docs/AggregateStats.md +38 -0
- data/docs/AggregatedEmailStats.md +38 -0
- data/docs/Attachment.md +4 -4
- data/docs/AutoWarmupPlan.md +80 -0
- data/docs/CopyTo.md +5 -5
- data/docs/CreateDomainRequest.md +18 -0
- data/docs/CreateSubAccountRequest.md +18 -0
- data/docs/CreateSuppressionRequest.md +24 -0
- data/docs/CreateSuppressionRequestHardBounceInner.md +18 -0
- data/docs/{SuppressionEmail.md → CreateSuppressionRequestManualInner.md} +3 -3
- data/docs/CreateSuppressionRequestSpamComplaintInner.md +18 -0
- data/docs/CreateSuppressionRequestUnsubscribeInner.md +18 -0
- data/docs/CreateWebhookRequest.md +46 -0
- data/docs/DeleteResponse.md +2 -2
- data/docs/DeleteSubAccountResponse.md +20 -0
- data/docs/DeleteSuppression200ResponseInner.md +20 -0
- data/docs/DeleteSuppressionRequest.md +18 -0
- data/docs/DeleteWebhookResponse.md +20 -0
- data/docs/Device.md +1 -1
- data/docs/Domain.md +56 -0
- data/docs/DomainApi.md +301 -0
- data/docs/DomainDkim.md +22 -0
- data/docs/DomainDmarc.md +22 -0
- data/docs/DomainGpt.md +22 -0
- data/docs/DomainReturnPath.md +22 -0
- data/docs/DomainTrack.md +22 -0
- data/docs/EIP.md +18 -0
- data/docs/{From.md → EmailAddress.md} +4 -4
- data/docs/EmailApi.md +38 -32
- data/docs/EmailMessage.md +30 -24
- data/docs/EmailMessageFrom.md +20 -0
- data/docs/EmailMessageObject.md +46 -0
- data/docs/{ReplyTo.md → EmailMessageReplyTo.md} +5 -5
- data/docs/EmailMessageToInner.md +26 -0
- data/docs/EmailMessageToInnerBccInner.md +22 -0
- data/docs/EmailMessageToInnerCcInner.md +22 -0
- data/docs/EmailMessageWithTemplate.md +52 -0
- data/docs/EmailResponse.md +8 -8
- data/docs/EmailStats.md +20 -0
- data/docs/EmailStatsStats.md +38 -0
- data/docs/Event.md +56 -0
- data/docs/EventMetadata.md +13 -13
- data/docs/{City.md → GeoLocation.md} +8 -8
- data/docs/IP.md +62 -0
- data/docs/IPAllocationRequest.md +20 -0
- data/docs/IPApi.md +375 -0
- data/docs/IPDeletionResponse.md +20 -0
- data/docs/IPPool.md +42 -0
- data/docs/IPPoolCreateRequest.md +28 -0
- data/docs/IPPoolDeleteResponse.md +20 -0
- data/docs/IPPoolUpdateRequest.md +24 -0
- data/docs/IPPoolsApi.md +361 -0
- data/docs/IPUpdateRequest.md +18 -0
- data/docs/Label.md +22 -0
- data/docs/Member.md +40 -0
- data/docs/Message.md +76 -0
- data/docs/MessageApi.md +79 -0
- data/docs/MessageHeaderTo.md +26 -0
- data/docs/MessageTo.md +26 -0
- data/docs/{Os.md → OperatingSystem.md} +7 -7
- data/docs/Person.md +20 -0
- data/docs/{To.md → Recipient.md} +7 -7
- data/docs/SMTPAuth.md +26 -0
- data/docs/Stat.md +20 -0
- data/docs/StatStats.md +38 -0
- data/docs/StatsAApi.md +307 -0
- data/docs/StatsApi.md +237 -0
- data/docs/SubAccount.md +48 -0
- data/docs/SubAccountApi.md +375 -0
- data/docs/Suppression.md +8 -8
- data/docs/SuppressionApi.md +76 -134
- data/docs/ThirdPartySendingProvider.md +38 -0
- data/docs/UpdateSubAccount.md +18 -0
- data/docs/UpdateWebhook.md +46 -0
- data/docs/UserAgent.md +4 -4
- data/docs/Webhook.md +54 -0
- data/docs/WebhookApi.md +375 -0
- data/git_push.sh +1 -1
- data/lib/sendpost_ruby_sdk/api/domain_api.rb +290 -0
- data/lib/sendpost_ruby_sdk/api/email_api.rb +33 -35
- data/lib/sendpost_ruby_sdk/api/ip_api.rb +356 -0
- data/lib/sendpost_ruby_sdk/api/ip_pools_api.rb +356 -0
- data/lib/sendpost_ruby_sdk/api/message_api.rb +85 -0
- data/lib/sendpost_ruby_sdk/api/stats_a_api.rb +320 -0
- data/lib/sendpost_ruby_sdk/api/stats_api.rb +260 -0
- data/lib/sendpost_ruby_sdk/api/sub_account_api.rb +356 -0
- data/lib/sendpost_ruby_sdk/api/suppression_api.rb +81 -141
- data/lib/sendpost_ruby_sdk/api/webhook_api.rb +356 -0
- data/lib/sendpost_ruby_sdk/api_client.rb +26 -24
- data/lib/sendpost_ruby_sdk/api_error.rb +3 -3
- data/lib/sendpost_ruby_sdk/configuration.rb +28 -3
- data/lib/sendpost_ruby_sdk/models/account_stats.rb +229 -0
- data/lib/sendpost_ruby_sdk/models/account_stats_stat.rb +310 -0
- data/lib/sendpost_ruby_sdk/models/aggregate_stat.rb +321 -0
- data/lib/sendpost_ruby_sdk/models/aggregate_stats.rb +310 -0
- data/lib/sendpost_ruby_sdk/models/aggregated_email_stats.rb +321 -0
- data/lib/sendpost_ruby_sdk/models/attachment.rb +15 -7
- data/lib/sendpost_ruby_sdk/models/auto_warmup_plan.rb +531 -0
- data/lib/sendpost_ruby_sdk/models/copy_to.rb +28 -19
- data/lib/sendpost_ruby_sdk/models/create_domain_request.rb +221 -0
- data/lib/sendpost_ruby_sdk/models/create_sub_account_request.rb +221 -0
- data/lib/sendpost_ruby_sdk/models/create_suppression_request.rb +259 -0
- data/lib/sendpost_ruby_sdk/models/create_suppression_request_hard_bounce_inner.rb +220 -0
- data/lib/sendpost_ruby_sdk/models/create_suppression_request_manual_inner.rb +220 -0
- data/lib/sendpost_ruby_sdk/models/create_suppression_request_spam_complaint_inner.rb +220 -0
- data/lib/sendpost_ruby_sdk/models/create_suppression_request_unsubscribe_inner.rb +220 -0
- data/lib/sendpost_ruby_sdk/models/create_webhook_request.rb +361 -0
- data/lib/sendpost_ruby_sdk/models/delete_response.rb +15 -7
- data/lib/sendpost_ruby_sdk/models/delete_sub_account_response.rb +231 -0
- data/lib/sendpost_ruby_sdk/models/delete_suppression200_response_inner.rb +231 -0
- data/lib/sendpost_ruby_sdk/models/delete_suppression_request.rb +222 -0
- data/lib/sendpost_ruby_sdk/models/delete_webhook_response.rb +231 -0
- data/lib/sendpost_ruby_sdk/models/device.rb +13 -7
- data/lib/sendpost_ruby_sdk/models/domain.rb +406 -0
- data/lib/sendpost_ruby_sdk/models/domain_dkim.rb +239 -0
- data/lib/sendpost_ruby_sdk/models/domain_dmarc.rb +239 -0
- data/lib/sendpost_ruby_sdk/models/domain_gpt.rb +239 -0
- data/lib/sendpost_ruby_sdk/models/domain_return_path.rb +239 -0
- data/lib/sendpost_ruby_sdk/models/domain_track.rb +239 -0
- data/lib/sendpost_ruby_sdk/models/eip.rb +238 -0
- data/lib/sendpost_ruby_sdk/models/email_address.rb +229 -0
- data/lib/sendpost_ruby_sdk/models/email_message.rb +121 -86
- data/lib/sendpost_ruby_sdk/models/email_message_from.rb +229 -0
- data/lib/sendpost_ruby_sdk/models/email_message_object.rb +354 -0
- data/lib/sendpost_ruby_sdk/models/email_message_reply_to.rb +229 -0
- data/lib/sendpost_ruby_sdk/models/email_message_to_inner.rb +262 -0
- data/lib/sendpost_ruby_sdk/models/email_message_to_inner_bcc_inner.rb +240 -0
- data/lib/sendpost_ruby_sdk/models/email_message_to_inner_cc_inner.rb +240 -0
- data/lib/sendpost_ruby_sdk/models/email_message_with_template.rb +392 -0
- data/lib/sendpost_ruby_sdk/models/email_response.rb +40 -32
- data/lib/sendpost_ruby_sdk/models/email_stats.rb +230 -0
- data/lib/sendpost_ruby_sdk/models/email_stats_stats.rb +321 -0
- data/lib/sendpost_ruby_sdk/models/event.rb +393 -0
- data/lib/sendpost_ruby_sdk/models/event_metadata.rb +59 -53
- data/lib/sendpost_ruby_sdk/models/geo_location.rb +256 -0
- data/lib/sendpost_ruby_sdk/models/ip.rb +491 -0
- data/lib/sendpost_ruby_sdk/models/ip_allocation_request.rb +266 -0
- data/lib/sendpost_ruby_sdk/models/ip_deletion_response.rb +265 -0
- data/lib/sendpost_ruby_sdk/models/ip_pool.rb +335 -0
- data/lib/sendpost_ruby_sdk/models/ip_pool_create_request.rb +269 -0
- data/lib/sendpost_ruby_sdk/models/ip_pool_delete_response.rb +229 -0
- data/lib/sendpost_ruby_sdk/models/ip_pool_update_request.rb +249 -0
- data/lib/sendpost_ruby_sdk/models/ip_update_request.rb +238 -0
- data/lib/sendpost_ruby_sdk/models/label.rb +241 -0
- data/lib/sendpost_ruby_sdk/models/member.rb +331 -0
- data/lib/sendpost_ruby_sdk/models/message.rb +523 -0
- data/lib/sendpost_ruby_sdk/models/message_header_to.rb +268 -0
- data/lib/sendpost_ruby_sdk/models/message_to.rb +268 -0
- data/lib/sendpost_ruby_sdk/models/operating_system.rb +256 -0
- data/lib/sendpost_ruby_sdk/models/person.rb +231 -0
- data/lib/sendpost_ruby_sdk/models/recipient.rb +263 -0
- data/lib/sendpost_ruby_sdk/models/smtp_auth.rb +261 -0
- data/lib/sendpost_ruby_sdk/models/stat.rb +230 -0
- data/lib/sendpost_ruby_sdk/models/stat_stats.rb +321 -0
- data/lib/sendpost_ruby_sdk/models/sub_account.rb +415 -0
- data/lib/sendpost_ruby_sdk/models/suppression.rb +40 -29
- data/lib/sendpost_ruby_sdk/models/third_party_sending_provider.rb +310 -0
- data/lib/sendpost_ruby_sdk/models/update_sub_account.rb +221 -0
- data/lib/sendpost_ruby_sdk/models/update_webhook.rb +368 -0
- data/lib/sendpost_ruby_sdk/models/user_agent.rb +13 -7
- data/lib/sendpost_ruby_sdk/models/webhook.rb +405 -0
- data/lib/sendpost_ruby_sdk/version.rb +4 -4
- data/lib/sendpost_ruby_sdk.rb +72 -15
- data/spec/api/domain_api_spec.rb +85 -0
- data/spec/api/email_api_spec.rb +9 -9
- data/spec/api/ip_api_spec.rb +98 -0
- data/spec/api/ip_pools_api_spec.rb +98 -0
- data/spec/api/message_api_spec.rb +47 -0
- data/spec/api/stats_a_api_spec.rb +89 -0
- data/spec/api/stats_api_spec.rb +78 -0
- data/spec/api/sub_account_api_spec.rb +98 -0
- data/spec/api/suppression_api_spec.rb +22 -34
- data/spec/api/webhook_api_spec.rb +98 -0
- data/spec/models/account_stats_spec.rb +42 -0
- data/spec/models/account_stats_stat_spec.rb +96 -0
- data/spec/models/aggregate_stat_spec.rb +96 -0
- data/spec/models/aggregate_stats_spec.rb +96 -0
- data/spec/models/aggregated_email_stats_spec.rb +96 -0
- data/spec/models/attachment_spec.rb +6 -4
- data/spec/models/auto_warmup_plan_spec.rb +222 -0
- data/spec/models/copy_to_spec.rb +8 -6
- data/spec/models/create_domain_request_spec.rb +36 -0
- data/spec/models/create_sub_account_request_spec.rb +36 -0
- data/spec/models/create_suppression_request_hard_bounce_inner_spec.rb +36 -0
- data/spec/models/create_suppression_request_manual_inner_spec.rb +36 -0
- data/spec/models/create_suppression_request_spam_complaint_inner_spec.rb +36 -0
- data/spec/models/create_suppression_request_spec.rb +54 -0
- data/spec/models/create_suppression_request_unsubscribe_inner_spec.rb +36 -0
- data/spec/models/create_webhook_request_spec.rb +120 -0
- data/spec/models/delete_response_spec.rb +6 -4
- data/spec/models/delete_sub_account_response_spec.rb +42 -0
- data/spec/models/delete_suppression200_response_inner_spec.rb +42 -0
- data/spec/models/delete_suppression_request_spec.rb +36 -0
- data/spec/models/delete_webhook_response_spec.rb +42 -0
- data/spec/models/device_spec.rb +6 -4
- data/spec/models/domain_dkim_spec.rb +48 -0
- data/spec/models/domain_dmarc_spec.rb +48 -0
- data/spec/models/domain_gpt_spec.rb +48 -0
- data/spec/models/domain_return_path_spec.rb +48 -0
- data/spec/models/domain_spec.rb +150 -0
- data/spec/models/domain_track_spec.rb +48 -0
- data/spec/models/eip_spec.rb +36 -0
- data/spec/models/email_address_spec.rb +42 -0
- data/spec/models/email_message_from_spec.rb +42 -0
- data/spec/models/email_message_object_spec.rb +120 -0
- data/spec/models/email_message_reply_to_spec.rb +42 -0
- data/spec/models/email_message_spec.rb +37 -17
- data/spec/models/email_message_to_inner_bcc_inner_spec.rb +48 -0
- data/spec/models/email_message_to_inner_cc_inner_spec.rb +48 -0
- data/spec/models/email_message_to_inner_spec.rb +60 -0
- data/spec/models/email_message_with_template_spec.rb +138 -0
- data/spec/models/email_response_spec.rb +10 -8
- data/spec/models/email_stats_spec.rb +42 -0
- data/spec/models/email_stats_stats_spec.rb +96 -0
- data/spec/models/event_metadata_spec.rb +24 -10
- data/spec/models/event_spec.rb +150 -0
- data/spec/models/geo_location_spec.rb +60 -0
- data/spec/models/ip_allocation_request_spec.rb +42 -0
- data/spec/models/ip_deletion_response_spec.rb +42 -0
- data/spec/models/ip_pool_create_request_spec.rb +66 -0
- data/spec/models/ip_pool_delete_response_spec.rb +42 -0
- data/spec/models/ip_pool_spec.rb +108 -0
- data/spec/models/ip_pool_update_request_spec.rb +54 -0
- data/spec/models/ip_spec.rb +168 -0
- data/spec/models/ip_update_request_spec.rb +36 -0
- data/spec/models/label_spec.rb +48 -0
- data/spec/models/member_spec.rb +102 -0
- data/spec/models/message_header_to_spec.rb +60 -0
- data/spec/models/message_spec.rb +210 -0
- data/spec/models/message_to_spec.rb +60 -0
- data/spec/models/operating_system_spec.rb +60 -0
- data/spec/models/person_spec.rb +42 -0
- data/spec/models/recipient_spec.rb +60 -0
- data/spec/models/smtp_auth_spec.rb +60 -0
- data/spec/models/stat_spec.rb +42 -0
- data/spec/models/stat_stats_spec.rb +96 -0
- data/spec/models/sub_account_spec.rb +130 -0
- data/spec/models/suppression_spec.rb +11 -9
- data/spec/models/third_party_sending_provider_spec.rb +96 -0
- data/spec/models/update_sub_account_spec.rb +36 -0
- data/spec/models/update_webhook_spec.rb +120 -0
- data/spec/models/user_agent_spec.rb +6 -4
- data/spec/models/webhook_spec.rb +144 -0
- data/spec/spec_helper.rb +3 -3
- metadata +288 -67
- data/config-ruby.json +0 -11
- data/docs/CountStat.md +0 -18
- data/docs/QEmailMessage.md +0 -70
- data/docs/QEvent.md +0 -42
- data/docs/RDSuppression.md +0 -18
- data/docs/RSuppression.md +0 -24
- data/docs/WebhookEvent.md +0 -20
- data/generate-libs.bash +0 -1
- data/lib/sendpost_ruby_sdk/models/city.rb +0 -250
- data/lib/sendpost_ruby_sdk/models/count_stat.rb +0 -214
- data/lib/sendpost_ruby_sdk/models/from.rb +0 -223
- data/lib/sendpost_ruby_sdk/models/os.rb +0 -250
- data/lib/sendpost_ruby_sdk/models/q_email_message.rb +0 -456
- data/lib/sendpost_ruby_sdk/models/q_event.rb +0 -324
- data/lib/sendpost_ruby_sdk/models/r_suppression.rb +0 -249
- data/lib/sendpost_ruby_sdk/models/rd_suppression.rb +0 -216
- data/lib/sendpost_ruby_sdk/models/reply_to.rb +0 -223
- data/lib/sendpost_ruby_sdk/models/suppression_email.rb +0 -214
- data/lib/sendpost_ruby_sdk/models/to.rb +0 -254
- data/lib/sendpost_ruby_sdk/models/webhook_event.rb +0 -223
- data/sendpost.yaml +0 -666
- data/sendpost_ruby_sdk.gemspec +0 -38
- data/spec/api_client_spec.rb +0 -228
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/city_spec.rb +0 -58
- data/spec/models/count_stat_spec.rb +0 -34
- data/spec/models/from_spec.rb +0 -40
- data/spec/models/os_spec.rb +0 -58
- data/spec/models/q_email_message_spec.rb +0 -190
- data/spec/models/q_event_spec.rb +0 -106
- data/spec/models/r_suppression_spec.rb +0 -52
- data/spec/models/rd_suppression_spec.rb +0 -34
- data/spec/models/reply_to_spec.rb +0 -40
- data/spec/models/suppression_email_spec.rb +0 -34
- data/spec/models/to_spec.rb +0 -58
- data/spec/models/webhook_event_spec.rb +0 -40
data/docs/IPPoolsApi.md
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
# Sendpost::IPPoolsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.sendpost.io/api/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_ip_pool**](IPPoolsApi.md#create_ip_pool) | **POST** /account/ippool | Create IPPool |
|
|
8
|
+
| [**delete_ip_pool**](IPPoolsApi.md#delete_ip_pool) | **DELETE** /account/ippool/{ippool_id} | Delete IPPool |
|
|
9
|
+
| [**get_all_ip_pools**](IPPoolsApi.md#get_all_ip_pools) | **GET** /account/ippool | List IPPools |
|
|
10
|
+
| [**get_ip_pool_by_id**](IPPoolsApi.md#get_ip_pool_by_id) | **GET** /account/ippool/{ippool_id} | Get IPPool |
|
|
11
|
+
| [**update_ip_pool**](IPPoolsApi.md#update_ip_pool) | **PUT** /account/ippool/{ippool_id} | Update IPPool |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## create_ip_pool
|
|
15
|
+
|
|
16
|
+
> <IPPool> create_ip_pool(ip_pool_create_request)
|
|
17
|
+
|
|
18
|
+
Create IPPool
|
|
19
|
+
|
|
20
|
+
Creates a new IPPool with the specified name, IPs, and third-party sending providers.
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require 'time'
|
|
26
|
+
require 'sendpost_ruby_sdk'
|
|
27
|
+
# setup authorization
|
|
28
|
+
Sendpost.configure do |config|
|
|
29
|
+
# Configure API key authorization: accountAuth
|
|
30
|
+
config.api_key['X-Account-ApiKey'] = 'YOUR API KEY'
|
|
31
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
32
|
+
# config.api_key_prefix['X-Account-ApiKey'] = 'Bearer'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
api_instance = Sendpost::IPPoolsApi.new
|
|
36
|
+
ip_pool_create_request = Sendpost::IPPoolCreateRequest.new # IPPoolCreateRequest |
|
|
37
|
+
|
|
38
|
+
begin
|
|
39
|
+
# Create IPPool
|
|
40
|
+
result = api_instance.create_ip_pool(ip_pool_create_request)
|
|
41
|
+
p result
|
|
42
|
+
rescue Sendpost::ApiError => e
|
|
43
|
+
puts "Error when calling IPPoolsApi->create_ip_pool: #{e}"
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Using the create_ip_pool_with_http_info variant
|
|
48
|
+
|
|
49
|
+
This returns an Array which contains the response data, status code and headers.
|
|
50
|
+
|
|
51
|
+
> <Array(<IPPool>, Integer, Hash)> create_ip_pool_with_http_info(ip_pool_create_request)
|
|
52
|
+
|
|
53
|
+
```ruby
|
|
54
|
+
begin
|
|
55
|
+
# Create IPPool
|
|
56
|
+
data, status_code, headers = api_instance.create_ip_pool_with_http_info(ip_pool_create_request)
|
|
57
|
+
p status_code # => 2xx
|
|
58
|
+
p headers # => { ... }
|
|
59
|
+
p data # => <IPPool>
|
|
60
|
+
rescue Sendpost::ApiError => e
|
|
61
|
+
puts "Error when calling IPPoolsApi->create_ip_pool_with_http_info: #{e}"
|
|
62
|
+
end
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Parameters
|
|
66
|
+
|
|
67
|
+
| Name | Type | Description | Notes |
|
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
|
69
|
+
| **ip_pool_create_request** | [**IPPoolCreateRequest**](IPPoolCreateRequest.md) | | |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
[**IPPool**](IPPool.md)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[accountAuth](../README.md#accountAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: application/json
|
|
82
|
+
- **Accept**: application/json
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## delete_ip_pool
|
|
86
|
+
|
|
87
|
+
> <IPPoolDeleteResponse> delete_ip_pool(ippool_id)
|
|
88
|
+
|
|
89
|
+
Delete IPPool
|
|
90
|
+
|
|
91
|
+
Delete a specific IPPool based on its ID.
|
|
92
|
+
|
|
93
|
+
### Examples
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
require 'time'
|
|
97
|
+
require 'sendpost_ruby_sdk'
|
|
98
|
+
|
|
99
|
+
api_instance = Sendpost::IPPoolsApi.new
|
|
100
|
+
ippool_id = 756 # Integer | The ID of the IPPool to delete
|
|
101
|
+
|
|
102
|
+
begin
|
|
103
|
+
# Delete IPPool
|
|
104
|
+
result = api_instance.delete_ip_pool(ippool_id)
|
|
105
|
+
p result
|
|
106
|
+
rescue Sendpost::ApiError => e
|
|
107
|
+
puts "Error when calling IPPoolsApi->delete_ip_pool: #{e}"
|
|
108
|
+
end
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### Using the delete_ip_pool_with_http_info variant
|
|
112
|
+
|
|
113
|
+
This returns an Array which contains the response data, status code and headers.
|
|
114
|
+
|
|
115
|
+
> <Array(<IPPoolDeleteResponse>, Integer, Hash)> delete_ip_pool_with_http_info(ippool_id)
|
|
116
|
+
|
|
117
|
+
```ruby
|
|
118
|
+
begin
|
|
119
|
+
# Delete IPPool
|
|
120
|
+
data, status_code, headers = api_instance.delete_ip_pool_with_http_info(ippool_id)
|
|
121
|
+
p status_code # => 2xx
|
|
122
|
+
p headers # => { ... }
|
|
123
|
+
p data # => <IPPoolDeleteResponse>
|
|
124
|
+
rescue Sendpost::ApiError => e
|
|
125
|
+
puts "Error when calling IPPoolsApi->delete_ip_pool_with_http_info: #{e}"
|
|
126
|
+
end
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Parameters
|
|
130
|
+
|
|
131
|
+
| Name | Type | Description | Notes |
|
|
132
|
+
| ---- | ---- | ----------- | ----- |
|
|
133
|
+
| **ippool_id** | **Integer** | The ID of the IPPool to delete | |
|
|
134
|
+
|
|
135
|
+
### Return type
|
|
136
|
+
|
|
137
|
+
[**IPPoolDeleteResponse**](IPPoolDeleteResponse.md)
|
|
138
|
+
|
|
139
|
+
### Authorization
|
|
140
|
+
|
|
141
|
+
No authorization required
|
|
142
|
+
|
|
143
|
+
### HTTP request headers
|
|
144
|
+
|
|
145
|
+
- **Content-Type**: Not defined
|
|
146
|
+
- **Accept**: application/json
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
## get_all_ip_pools
|
|
150
|
+
|
|
151
|
+
> <Array<IPPool>> get_all_ip_pools(opts)
|
|
152
|
+
|
|
153
|
+
List IPPools
|
|
154
|
+
|
|
155
|
+
Retrieves a list of all IPPools and information about all IPs contained in that pool.
|
|
156
|
+
|
|
157
|
+
### Examples
|
|
158
|
+
|
|
159
|
+
```ruby
|
|
160
|
+
require 'time'
|
|
161
|
+
require 'sendpost_ruby_sdk'
|
|
162
|
+
# setup authorization
|
|
163
|
+
Sendpost.configure do |config|
|
|
164
|
+
# Configure API key authorization: accountAuth
|
|
165
|
+
config.api_key['X-Account-ApiKey'] = 'YOUR API KEY'
|
|
166
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
167
|
+
# config.api_key_prefix['X-Account-ApiKey'] = 'Bearer'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
api_instance = Sendpost::IPPoolsApi.new
|
|
171
|
+
opts = {
|
|
172
|
+
limit: 10, # Integer | Number of records to return per request
|
|
173
|
+
offset: 0, # Integer | Number of initial records to skip
|
|
174
|
+
search: 'Transactional' # String | Case insensitive search against IPPool name
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
begin
|
|
178
|
+
# List IPPools
|
|
179
|
+
result = api_instance.get_all_ip_pools(opts)
|
|
180
|
+
p result
|
|
181
|
+
rescue Sendpost::ApiError => e
|
|
182
|
+
puts "Error when calling IPPoolsApi->get_all_ip_pools: #{e}"
|
|
183
|
+
end
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### Using the get_all_ip_pools_with_http_info variant
|
|
187
|
+
|
|
188
|
+
This returns an Array which contains the response data, status code and headers.
|
|
189
|
+
|
|
190
|
+
> <Array(<Array<IPPool>>, Integer, Hash)> get_all_ip_pools_with_http_info(opts)
|
|
191
|
+
|
|
192
|
+
```ruby
|
|
193
|
+
begin
|
|
194
|
+
# List IPPools
|
|
195
|
+
data, status_code, headers = api_instance.get_all_ip_pools_with_http_info(opts)
|
|
196
|
+
p status_code # => 2xx
|
|
197
|
+
p headers # => { ... }
|
|
198
|
+
p data # => <Array<IPPool>>
|
|
199
|
+
rescue Sendpost::ApiError => e
|
|
200
|
+
puts "Error when calling IPPoolsApi->get_all_ip_pools_with_http_info: #{e}"
|
|
201
|
+
end
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Parameters
|
|
205
|
+
|
|
206
|
+
| Name | Type | Description | Notes |
|
|
207
|
+
| ---- | ---- | ----------- | ----- |
|
|
208
|
+
| **limit** | **Integer** | Number of records to return per request | [optional] |
|
|
209
|
+
| **offset** | **Integer** | Number of initial records to skip | [optional] |
|
|
210
|
+
| **search** | **String** | Case insensitive search against IPPool name | [optional] |
|
|
211
|
+
|
|
212
|
+
### Return type
|
|
213
|
+
|
|
214
|
+
[**Array<IPPool>**](IPPool.md)
|
|
215
|
+
|
|
216
|
+
### Authorization
|
|
217
|
+
|
|
218
|
+
[accountAuth](../README.md#accountAuth)
|
|
219
|
+
|
|
220
|
+
### HTTP request headers
|
|
221
|
+
|
|
222
|
+
- **Content-Type**: Not defined
|
|
223
|
+
- **Accept**: application/json
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## get_ip_pool_by_id
|
|
227
|
+
|
|
228
|
+
> <IPPool> get_ip_pool_by_id(ippool_id)
|
|
229
|
+
|
|
230
|
+
Get IPPool
|
|
231
|
+
|
|
232
|
+
Retrieves details of a specific IPPool based on its ID.
|
|
233
|
+
|
|
234
|
+
### Examples
|
|
235
|
+
|
|
236
|
+
```ruby
|
|
237
|
+
require 'time'
|
|
238
|
+
require 'sendpost_ruby_sdk'
|
|
239
|
+
# setup authorization
|
|
240
|
+
Sendpost.configure do |config|
|
|
241
|
+
# Configure API key authorization: accountAuth
|
|
242
|
+
config.api_key['X-Account-ApiKey'] = 'YOUR API KEY'
|
|
243
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
244
|
+
# config.api_key_prefix['X-Account-ApiKey'] = 'Bearer'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
api_instance = Sendpost::IPPoolsApi.new
|
|
248
|
+
ippool_id = 74 # Integer | The ID of the IPPool whose information you want to retrieve
|
|
249
|
+
|
|
250
|
+
begin
|
|
251
|
+
# Get IPPool
|
|
252
|
+
result = api_instance.get_ip_pool_by_id(ippool_id)
|
|
253
|
+
p result
|
|
254
|
+
rescue Sendpost::ApiError => e
|
|
255
|
+
puts "Error when calling IPPoolsApi->get_ip_pool_by_id: #{e}"
|
|
256
|
+
end
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
#### Using the get_ip_pool_by_id_with_http_info variant
|
|
260
|
+
|
|
261
|
+
This returns an Array which contains the response data, status code and headers.
|
|
262
|
+
|
|
263
|
+
> <Array(<IPPool>, Integer, Hash)> get_ip_pool_by_id_with_http_info(ippool_id)
|
|
264
|
+
|
|
265
|
+
```ruby
|
|
266
|
+
begin
|
|
267
|
+
# Get IPPool
|
|
268
|
+
data, status_code, headers = api_instance.get_ip_pool_by_id_with_http_info(ippool_id)
|
|
269
|
+
p status_code # => 2xx
|
|
270
|
+
p headers # => { ... }
|
|
271
|
+
p data # => <IPPool>
|
|
272
|
+
rescue Sendpost::ApiError => e
|
|
273
|
+
puts "Error when calling IPPoolsApi->get_ip_pool_by_id_with_http_info: #{e}"
|
|
274
|
+
end
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Parameters
|
|
278
|
+
|
|
279
|
+
| Name | Type | Description | Notes |
|
|
280
|
+
| ---- | ---- | ----------- | ----- |
|
|
281
|
+
| **ippool_id** | **Integer** | The ID of the IPPool whose information you want to retrieve | |
|
|
282
|
+
|
|
283
|
+
### Return type
|
|
284
|
+
|
|
285
|
+
[**IPPool**](IPPool.md)
|
|
286
|
+
|
|
287
|
+
### Authorization
|
|
288
|
+
|
|
289
|
+
[accountAuth](../README.md#accountAuth)
|
|
290
|
+
|
|
291
|
+
### HTTP request headers
|
|
292
|
+
|
|
293
|
+
- **Content-Type**: Not defined
|
|
294
|
+
- **Accept**: application/json
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
## update_ip_pool
|
|
298
|
+
|
|
299
|
+
> <IPPool> update_ip_pool(ip_pool_update_request, ippool_id)
|
|
300
|
+
|
|
301
|
+
Update IPPool
|
|
302
|
+
|
|
303
|
+
Update the details of an existing IPPool by its ID.
|
|
304
|
+
|
|
305
|
+
### Examples
|
|
306
|
+
|
|
307
|
+
```ruby
|
|
308
|
+
require 'time'
|
|
309
|
+
require 'sendpost_ruby_sdk'
|
|
310
|
+
|
|
311
|
+
api_instance = Sendpost::IPPoolsApi.new
|
|
312
|
+
ip_pool_update_request = Sendpost::IPPoolUpdateRequest.new # IPPoolUpdateRequest |
|
|
313
|
+
ippool_id = 756 # Integer | The ID of the IPPool to update
|
|
314
|
+
|
|
315
|
+
begin
|
|
316
|
+
# Update IPPool
|
|
317
|
+
result = api_instance.update_ip_pool(ip_pool_update_request, ippool_id)
|
|
318
|
+
p result
|
|
319
|
+
rescue Sendpost::ApiError => e
|
|
320
|
+
puts "Error when calling IPPoolsApi->update_ip_pool: #{e}"
|
|
321
|
+
end
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
#### Using the update_ip_pool_with_http_info variant
|
|
325
|
+
|
|
326
|
+
This returns an Array which contains the response data, status code and headers.
|
|
327
|
+
|
|
328
|
+
> <Array(<IPPool>, Integer, Hash)> update_ip_pool_with_http_info(ip_pool_update_request, ippool_id)
|
|
329
|
+
|
|
330
|
+
```ruby
|
|
331
|
+
begin
|
|
332
|
+
# Update IPPool
|
|
333
|
+
data, status_code, headers = api_instance.update_ip_pool_with_http_info(ip_pool_update_request, ippool_id)
|
|
334
|
+
p status_code # => 2xx
|
|
335
|
+
p headers # => { ... }
|
|
336
|
+
p data # => <IPPool>
|
|
337
|
+
rescue Sendpost::ApiError => e
|
|
338
|
+
puts "Error when calling IPPoolsApi->update_ip_pool_with_http_info: #{e}"
|
|
339
|
+
end
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Parameters
|
|
343
|
+
|
|
344
|
+
| Name | Type | Description | Notes |
|
|
345
|
+
| ---- | ---- | ----------- | ----- |
|
|
346
|
+
| **ip_pool_update_request** | [**IPPoolUpdateRequest**](IPPoolUpdateRequest.md) | | |
|
|
347
|
+
| **ippool_id** | **Integer** | The ID of the IPPool to update | |
|
|
348
|
+
|
|
349
|
+
### Return type
|
|
350
|
+
|
|
351
|
+
[**IPPool**](IPPool.md)
|
|
352
|
+
|
|
353
|
+
### Authorization
|
|
354
|
+
|
|
355
|
+
No authorization required
|
|
356
|
+
|
|
357
|
+
### HTTP request headers
|
|
358
|
+
|
|
359
|
+
- **Content-Type**: application/json
|
|
360
|
+
- **Accept**: application/json
|
|
361
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Sendpost::IPUpdateRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **auto_warmup_enabled** | **Boolean** | Whether the IP warmup should happen automatically or be managed manually | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'sendpost_ruby_sdk'
|
|
13
|
+
|
|
14
|
+
instance = Sendpost::IPUpdateRequest.new(
|
|
15
|
+
auto_warmup_enabled: false
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/Label.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Sendpost::Label
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | Unique ID for the label | [optional] |
|
|
8
|
+
| **name** | **String** | Name of the label | [optional] |
|
|
9
|
+
| **created** | **Integer** | UNIX epoch nano timestamp when the label was created | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'sendpost_ruby_sdk'
|
|
15
|
+
|
|
16
|
+
instance = Sendpost::Label.new(
|
|
17
|
+
id: 325,
|
|
18
|
+
name: Free Tier,
|
|
19
|
+
created: 1685427871489941179
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/Member.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Sendpost::Member
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | Unique ID for the member | [optional] |
|
|
8
|
+
| **is_verified** | **Boolean** | Indicates whether the member is verified | [optional] |
|
|
9
|
+
| **is_forbidden** | **Boolean** | Indicates whether the member is forbidden | [optional] |
|
|
10
|
+
| **firebase_uid** | **String** | Firebase UID for the member | [optional] |
|
|
11
|
+
| **email** | **String** | Email for the member | [optional] |
|
|
12
|
+
| **name** | **String** | Name for the member | [optional] |
|
|
13
|
+
| **url** | **String** | Logo URL for the member | [optional] |
|
|
14
|
+
| **company_name** | **String** | Company name for the member | [optional] |
|
|
15
|
+
| **onboard_q_answered** | **Boolean** | Indicates whether the member has answered onboarding question | [optional] |
|
|
16
|
+
| **phone_number** | **String** | Phone number for the member | [optional] |
|
|
17
|
+
| **notes_color** | **String** | Color for the member's notes | [optional] |
|
|
18
|
+
| **created** | **Integer** | UNIX epoch nano timestamp when the member was created | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'sendpost_ruby_sdk'
|
|
24
|
+
|
|
25
|
+
instance = Sendpost::Member.new(
|
|
26
|
+
id: 117,
|
|
27
|
+
is_verified: true,
|
|
28
|
+
is_forbidden: false,
|
|
29
|
+
firebase_uid: 1234567890,
|
|
30
|
+
email: raj@piedpiper.com,
|
|
31
|
+
name: Raj,
|
|
32
|
+
url: https://www.sendpost.io/logo.png,
|
|
33
|
+
company_name: SendPost,
|
|
34
|
+
onboard_q_answered: true,
|
|
35
|
+
phone_number: +919876543210,
|
|
36
|
+
notes_color: #000000,
|
|
37
|
+
created: 1567512491588004044
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
data/docs/Message.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Sendpost::Message
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **message_id** | **String** | Unique ID for the message. | [optional] |
|
|
8
|
+
| **account_id** | **Integer** | Account ID associated with the message. | [optional] |
|
|
9
|
+
| **sub_account_id** | **Integer** | Sub-account ID associated with the message. | [optional] |
|
|
10
|
+
| **ip_id** | **Integer** | IP ID used for sending the message. | [optional] |
|
|
11
|
+
| **account_ip_pool_id** | **Integer** | Account IP Pool ID associated with the message. | [optional] |
|
|
12
|
+
| **public_ip** | **String** | Public IP address used for sending the message. | [optional] |
|
|
13
|
+
| **local_ip** | **String** | Local IP address used for sending the message. | [optional] |
|
|
14
|
+
| **email_type** | **String** | Type of email service used. | [optional] |
|
|
15
|
+
| **submitted_at** | **Integer** | UNIX epoch nano timestamp when message was submitted. | [optional] |
|
|
16
|
+
| **from** | [**Person**](.md) | Object comprising name and email address of the sender | [optional] |
|
|
17
|
+
| **reply_to** | [**Person**](.md) | Object comprising name and email addresses to which email replies will go to | [optional] |
|
|
18
|
+
| **to** | [**MessageTo**](MessageTo.md) | | [optional] |
|
|
19
|
+
| **header_to** | [**MessageHeaderTo**](MessageHeaderTo.md) | | [optional] |
|
|
20
|
+
| **header_cc** | **Array<String>** | List of CC recipients from email headers | [optional] |
|
|
21
|
+
| **header_bcc** | **Array<String>** | List of BCC recipients from email headers | [optional] |
|
|
22
|
+
| **attachments** | **Array<String>** | List of attachments | [optional] |
|
|
23
|
+
| **groups** | **Array<String>** | List of groups associated with the message | [optional] |
|
|
24
|
+
| **ip_pool** | **String** | IP Pool from which emails will go out. Relevant only for customers on dedicated IP plans. | [optional] |
|
|
25
|
+
| **headers** | **Hash<String, String>** | Key-Value pair which are added to every email message being sent and also with webhooks triggered on events such as email delivered, open, click etc. They are useful to identify email, recipient etc. in your internal system | [optional] |
|
|
26
|
+
| **custom_fields** | **Hash<String, String>** | Key-Value pair of custom fields at message level | [optional] |
|
|
27
|
+
| **subject** | **String** | Email subject line. | [optional] |
|
|
28
|
+
| **pre_text** | **String** | Text which appears on mobile right after email subject line. | [optional] |
|
|
29
|
+
| **html_body** | **String** | HTML email content. | [optional] |
|
|
30
|
+
| **text_body** | **String** | Text email content. | [optional] |
|
|
31
|
+
| **amp_body** | **String** | AMP email content. | [optional] |
|
|
32
|
+
| **track_opens** | **Boolean** | Indicates if email opens need to be tracked. | [optional] |
|
|
33
|
+
| **track_clicks** | **Boolean** | Indicates if email clicks need to be tracked. | [optional] |
|
|
34
|
+
| **attempt** | **Integer** | Number of delivery attempts made for the message. | [optional] |
|
|
35
|
+
| **webhook_endpoint** | **String** | Webhook endpoint URL for the message. | [optional] |
|
|
36
|
+
| **mx_records** | **Array<String>** | List of MX records for the recipient domain | [optional] |
|
|
37
|
+
|
|
38
|
+
## Example
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
require 'sendpost_ruby_sdk'
|
|
42
|
+
|
|
43
|
+
instance = Sendpost::Message.new(
|
|
44
|
+
message_id: c486c7e5-4b0b-4ce5-b392-6ac2a453dcb6,
|
|
45
|
+
account_id: 1837,
|
|
46
|
+
sub_account_id: 46499,
|
|
47
|
+
ip_id: 46,
|
|
48
|
+
account_ip_pool_id: 0,
|
|
49
|
+
public_ip: 34.196.37.102,
|
|
50
|
+
local_ip: 10.1.0.195,
|
|
51
|
+
email_type: googleworkspace,
|
|
52
|
+
submitted_at: 1766396394503841392,
|
|
53
|
+
from: null,
|
|
54
|
+
reply_to: null,
|
|
55
|
+
to: null,
|
|
56
|
+
header_to: null,
|
|
57
|
+
header_cc: [],
|
|
58
|
+
header_bcc: null,
|
|
59
|
+
attachments: [],
|
|
60
|
+
groups: [],
|
|
61
|
+
ip_pool: ,
|
|
62
|
+
headers: {X-SendPost-Mock-Email=, X-SendPost-Mock-Time-Shift=},
|
|
63
|
+
custom_fields: {},
|
|
64
|
+
subject: Test Email from SendPost Java SDK,
|
|
65
|
+
pre_text: ,
|
|
66
|
+
html_body: <h1>Hello from SendPost!</h1><p>This is a test email sent using the SendPost Java SDK from Maven Central.</p>,
|
|
67
|
+
text_body: Hello from SendPost! This is a test email sent using the SendPost Java SDK from Maven Central.,
|
|
68
|
+
amp_body: ,
|
|
69
|
+
track_opens: true,
|
|
70
|
+
track_clicks: true,
|
|
71
|
+
attempt: 0,
|
|
72
|
+
webhook_endpoint: ,
|
|
73
|
+
mx_records: [alt3.aspmx.l.google.com, alt4.aspmx.l.google.com, alt1.aspmx.l.google.com, alt2.aspmx.l.google.com, aspmx.l.google.com]
|
|
74
|
+
)
|
|
75
|
+
```
|
|
76
|
+
|
data/docs/MessageApi.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Sendpost::MessageApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.sendpost.io/api/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_message_by_id**](MessageApi.md#get_message_by_id) | **GET** /account/message/{message_id} | Get Message |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## get_message_by_id
|
|
11
|
+
|
|
12
|
+
> <Message> get_message_by_id(message_id)
|
|
13
|
+
|
|
14
|
+
Get Message
|
|
15
|
+
|
|
16
|
+
Retrieve detailed information about a specific message by its ID.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'sendpost_ruby_sdk'
|
|
23
|
+
# setup authorization
|
|
24
|
+
Sendpost.configure do |config|
|
|
25
|
+
# Configure API key authorization: accountAuth
|
|
26
|
+
config.api_key['X-Account-ApiKey'] = 'YOUR API KEY'
|
|
27
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
28
|
+
# config.api_key_prefix['X-Account-ApiKey'] = 'Bearer'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
api_instance = Sendpost::MessageApi.new
|
|
32
|
+
message_id = 'message_id_example' # String | The ID of the message to retrieve.
|
|
33
|
+
|
|
34
|
+
begin
|
|
35
|
+
# Get Message
|
|
36
|
+
result = api_instance.get_message_by_id(message_id)
|
|
37
|
+
p result
|
|
38
|
+
rescue Sendpost::ApiError => e
|
|
39
|
+
puts "Error when calling MessageApi->get_message_by_id: #{e}"
|
|
40
|
+
end
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### Using the get_message_by_id_with_http_info variant
|
|
44
|
+
|
|
45
|
+
This returns an Array which contains the response data, status code and headers.
|
|
46
|
+
|
|
47
|
+
> <Array(<Message>, Integer, Hash)> get_message_by_id_with_http_info(message_id)
|
|
48
|
+
|
|
49
|
+
```ruby
|
|
50
|
+
begin
|
|
51
|
+
# Get Message
|
|
52
|
+
data, status_code, headers = api_instance.get_message_by_id_with_http_info(message_id)
|
|
53
|
+
p status_code # => 2xx
|
|
54
|
+
p headers # => { ... }
|
|
55
|
+
p data # => <Message>
|
|
56
|
+
rescue Sendpost::ApiError => e
|
|
57
|
+
puts "Error when calling MessageApi->get_message_by_id_with_http_info: #{e}"
|
|
58
|
+
end
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Parameters
|
|
62
|
+
|
|
63
|
+
| Name | Type | Description | Notes |
|
|
64
|
+
| ---- | ---- | ----------- | ----- |
|
|
65
|
+
| **message_id** | **String** | The ID of the message to retrieve. | |
|
|
66
|
+
|
|
67
|
+
### Return type
|
|
68
|
+
|
|
69
|
+
[**Message**](Message.md)
|
|
70
|
+
|
|
71
|
+
### Authorization
|
|
72
|
+
|
|
73
|
+
[accountAuth](../README.md#accountAuth)
|
|
74
|
+
|
|
75
|
+
### HTTP request headers
|
|
76
|
+
|
|
77
|
+
- **Content-Type**: Not defined
|
|
78
|
+
- **Accept**: application/json
|
|
79
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Sendpost::MessageHeaderTo
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | Name of the recipient. | [optional] |
|
|
8
|
+
| **email** | **String** | Email address of the recipient. | [optional] |
|
|
9
|
+
| **cc** | **Array<String>** | List of CC recipients | [optional] |
|
|
10
|
+
| **bcc** | **Array<String>** | List of BCC recipients | [optional] |
|
|
11
|
+
| **custom_fields** | **Hash<String, String>** | Key-Value pair of custom fields. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'sendpost_ruby_sdk'
|
|
17
|
+
|
|
18
|
+
instance = Sendpost::MessageHeaderTo.new(
|
|
19
|
+
name: Test Recipient,
|
|
20
|
+
email: aditya@sendx.io,
|
|
21
|
+
cc: [],
|
|
22
|
+
bcc: [],
|
|
23
|
+
custom_fields: {}
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
data/docs/MessageTo.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Sendpost::MessageTo
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | Name of the recipient. | [optional] |
|
|
8
|
+
| **email** | **String** | Email address of the recipient. | [optional] |
|
|
9
|
+
| **cc** | **Array<String>** | List of CC recipients | [optional] |
|
|
10
|
+
| **bcc** | **Array<String>** | List of BCC recipients | [optional] |
|
|
11
|
+
| **custom_fields** | **Hash<String, String>** | Key-Value pair of custom fields. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'sendpost_ruby_sdk'
|
|
17
|
+
|
|
18
|
+
instance = Sendpost::MessageTo.new(
|
|
19
|
+
name: Test Recipient,
|
|
20
|
+
email: aditya@sendx.io,
|
|
21
|
+
cc: [],
|
|
22
|
+
bcc: [],
|
|
23
|
+
custom_fields: {}
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Sendpost::
|
|
1
|
+
# Sendpost::OperatingSystem
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
```ruby
|
|
16
16
|
require 'sendpost_ruby_sdk'
|
|
17
17
|
|
|
18
|
-
instance = Sendpost::
|
|
19
|
-
family:
|
|
20
|
-
major:
|
|
21
|
-
minor:
|
|
22
|
-
patch:
|
|
23
|
-
patch_minor:
|
|
18
|
+
instance = Sendpost::OperatingSystem.new(
|
|
19
|
+
family: Windows,
|
|
20
|
+
major: 10,
|
|
21
|
+
minor: 0,
|
|
22
|
+
patch: 0,
|
|
23
|
+
patch_minor: 0
|
|
24
24
|
)
|
|
25
25
|
```
|
|
26
26
|
|
data/docs/Person.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Sendpost::Person
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | Name of the person. | [optional] |
|
|
8
|
+
| **email** | **String** | Email address of the person. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'sendpost_ruby_sdk'
|
|
14
|
+
|
|
15
|
+
instance = Sendpost::Person.new(
|
|
16
|
+
name: PiedPipers,
|
|
17
|
+
email: team@piedpiper.com
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|