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/SubAccount.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Sendpost::SubAccount
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | Unique ID for the sub-account. | [optional] |
|
|
8
|
+
| **api_key** | **String** | API key for the sub-account. | [optional] |
|
|
9
|
+
| **name** | **String** | Name of the sub-account. | [optional] |
|
|
10
|
+
| **labels** | [**Array<Label>**](Label.md) | Labels associated with the sub-account | [optional] |
|
|
11
|
+
| **smtp_auths** | [**Array<SMTPAuth>**](SMTPAuth.md) | SMTP Auths associated with the sub-account | [optional] |
|
|
12
|
+
| **type** | **Integer** | Type of the sub-account | [optional] |
|
|
13
|
+
| **is_plus** | **Boolean** | Indicates whether the sub-account is a Plus sub-account | [optional] |
|
|
14
|
+
| **created** | **Integer** | UNIX epoch nano timestamp when the sub-account was created. | [optional] |
|
|
15
|
+
| **created_by** | **Hash<String, Object>** | Member who created the sub-account | [optional] |
|
|
16
|
+
| **updated_by** | **Hash<String, Object>** | Member who updated the sub-account | [optional] |
|
|
17
|
+
| **blocked** | **Boolean** | Indicates whether the sub-account is blocked | [optional] |
|
|
18
|
+
| **blocked_at** | **Integer** | UNIX epoch nano timestamp when the sub-account was blocked (0 if not blocked) | [optional] |
|
|
19
|
+
| **block_reason** | **String** | Reason for blocking the sub-account | [optional] |
|
|
20
|
+
| **hb_exempt** | **Boolean** | Indicates whether the sub-account is exempt from hard bounce tracking | [optional] |
|
|
21
|
+
| **generate_weekly_report** | **Boolean** | Indicates whether weekly reports are generated for this sub-account | [optional] |
|
|
22
|
+
| **handlers** | **Array<String>** | Handlers associated with the sub-account | [optional] |
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
require 'sendpost_ruby_sdk'
|
|
28
|
+
|
|
29
|
+
instance = Sendpost::SubAccount.new(
|
|
30
|
+
id: 50441,
|
|
31
|
+
api_key: pR0YIuxYSbVwmQi2Y8Qs,
|
|
32
|
+
name: API,
|
|
33
|
+
labels: [],
|
|
34
|
+
smtp_auths: null,
|
|
35
|
+
type: 1,
|
|
36
|
+
is_plus: false,
|
|
37
|
+
created: 1733844681120384500,
|
|
38
|
+
created_by: null,
|
|
39
|
+
updated_by: null,
|
|
40
|
+
blocked: false,
|
|
41
|
+
blocked_at: 0,
|
|
42
|
+
block_reason: ,
|
|
43
|
+
hb_exempt: false,
|
|
44
|
+
generate_weekly_report: false,
|
|
45
|
+
handlers: []
|
|
46
|
+
)
|
|
47
|
+
```
|
|
48
|
+
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
# Sendpost::SubAccountApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.sendpost.io/api/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_sub_account**](SubAccountApi.md#create_sub_account) | **POST** /account/subaccount/ | Create Sub-Account |
|
|
8
|
+
| [**delete_sub_account**](SubAccountApi.md#delete_sub_account) | **DELETE** /account/subaccount/{subaccount_id} | Delete Sub-Account |
|
|
9
|
+
| [**get_all_sub_accounts**](SubAccountApi.md#get_all_sub_accounts) | **GET** /account/subaccount/ | List Sub-Accounts |
|
|
10
|
+
| [**get_sub_account**](SubAccountApi.md#get_sub_account) | **GET** /account/subaccount/{subaccount_id} | Get Sub-Account |
|
|
11
|
+
| [**update_sub_account**](SubAccountApi.md#update_sub_account) | **PUT** /account/subaccount/{subaccount_id} | Update Sub-Account |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## create_sub_account
|
|
15
|
+
|
|
16
|
+
> <SubAccount> create_sub_account(create_sub_account_request)
|
|
17
|
+
|
|
18
|
+
Create Sub-Account
|
|
19
|
+
|
|
20
|
+
Creates a new sub-account under the current account.
|
|
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::SubAccountApi.new
|
|
36
|
+
create_sub_account_request = Sendpost::CreateSubAccountRequest.new # CreateSubAccountRequest |
|
|
37
|
+
|
|
38
|
+
begin
|
|
39
|
+
# Create Sub-Account
|
|
40
|
+
result = api_instance.create_sub_account(create_sub_account_request)
|
|
41
|
+
p result
|
|
42
|
+
rescue Sendpost::ApiError => e
|
|
43
|
+
puts "Error when calling SubAccountApi->create_sub_account: #{e}"
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Using the create_sub_account_with_http_info variant
|
|
48
|
+
|
|
49
|
+
This returns an Array which contains the response data, status code and headers.
|
|
50
|
+
|
|
51
|
+
> <Array(<SubAccount>, Integer, Hash)> create_sub_account_with_http_info(create_sub_account_request)
|
|
52
|
+
|
|
53
|
+
```ruby
|
|
54
|
+
begin
|
|
55
|
+
# Create Sub-Account
|
|
56
|
+
data, status_code, headers = api_instance.create_sub_account_with_http_info(create_sub_account_request)
|
|
57
|
+
p status_code # => 2xx
|
|
58
|
+
p headers # => { ... }
|
|
59
|
+
p data # => <SubAccount>
|
|
60
|
+
rescue Sendpost::ApiError => e
|
|
61
|
+
puts "Error when calling SubAccountApi->create_sub_account_with_http_info: #{e}"
|
|
62
|
+
end
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Parameters
|
|
66
|
+
|
|
67
|
+
| Name | Type | Description | Notes |
|
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
|
69
|
+
| **create_sub_account_request** | [**CreateSubAccountRequest**](CreateSubAccountRequest.md) | | |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
[**SubAccount**](SubAccount.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_sub_account
|
|
86
|
+
|
|
87
|
+
> <DeleteSubAccountResponse> delete_sub_account(subaccount_id)
|
|
88
|
+
|
|
89
|
+
Delete Sub-Account
|
|
90
|
+
|
|
91
|
+
Deletes a specific sub-account by its ID.
|
|
92
|
+
|
|
93
|
+
### Examples
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
require 'time'
|
|
97
|
+
require 'sendpost_ruby_sdk'
|
|
98
|
+
# setup authorization
|
|
99
|
+
Sendpost.configure do |config|
|
|
100
|
+
# Configure API key authorization: accountAuth
|
|
101
|
+
config.api_key['X-Account-ApiKey'] = 'YOUR API KEY'
|
|
102
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
103
|
+
# config.api_key_prefix['X-Account-ApiKey'] = 'Bearer'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
api_instance = Sendpost::SubAccountApi.new
|
|
107
|
+
subaccount_id = 12 # Integer | The ID of the sub-account to delete.
|
|
108
|
+
|
|
109
|
+
begin
|
|
110
|
+
# Delete Sub-Account
|
|
111
|
+
result = api_instance.delete_sub_account(subaccount_id)
|
|
112
|
+
p result
|
|
113
|
+
rescue Sendpost::ApiError => e
|
|
114
|
+
puts "Error when calling SubAccountApi->delete_sub_account: #{e}"
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Using the delete_sub_account_with_http_info variant
|
|
119
|
+
|
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
|
121
|
+
|
|
122
|
+
> <Array(<DeleteSubAccountResponse>, Integer, Hash)> delete_sub_account_with_http_info(subaccount_id)
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
begin
|
|
126
|
+
# Delete Sub-Account
|
|
127
|
+
data, status_code, headers = api_instance.delete_sub_account_with_http_info(subaccount_id)
|
|
128
|
+
p status_code # => 2xx
|
|
129
|
+
p headers # => { ... }
|
|
130
|
+
p data # => <DeleteSubAccountResponse>
|
|
131
|
+
rescue Sendpost::ApiError => e
|
|
132
|
+
puts "Error when calling SubAccountApi->delete_sub_account_with_http_info: #{e}"
|
|
133
|
+
end
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
|
140
|
+
| **subaccount_id** | **Integer** | The ID of the sub-account to delete. | |
|
|
141
|
+
|
|
142
|
+
### Return type
|
|
143
|
+
|
|
144
|
+
[**DeleteSubAccountResponse**](DeleteSubAccountResponse.md)
|
|
145
|
+
|
|
146
|
+
### Authorization
|
|
147
|
+
|
|
148
|
+
[accountAuth](../README.md#accountAuth)
|
|
149
|
+
|
|
150
|
+
### HTTP request headers
|
|
151
|
+
|
|
152
|
+
- **Content-Type**: Not defined
|
|
153
|
+
- **Accept**: application/json
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## get_all_sub_accounts
|
|
157
|
+
|
|
158
|
+
> <Array<SubAccount>> get_all_sub_accounts(opts)
|
|
159
|
+
|
|
160
|
+
List Sub-Accounts
|
|
161
|
+
|
|
162
|
+
Retrieves a list of all sub-accounts associated with a specific account.
|
|
163
|
+
|
|
164
|
+
### Examples
|
|
165
|
+
|
|
166
|
+
```ruby
|
|
167
|
+
require 'time'
|
|
168
|
+
require 'sendpost_ruby_sdk'
|
|
169
|
+
# setup authorization
|
|
170
|
+
Sendpost.configure do |config|
|
|
171
|
+
# Configure API key authorization: accountAuth
|
|
172
|
+
config.api_key['X-Account-ApiKey'] = 'YOUR API KEY'
|
|
173
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
174
|
+
# config.api_key_prefix['X-Account-ApiKey'] = 'Bearer'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
api_instance = Sendpost::SubAccountApi.new
|
|
178
|
+
opts = {
|
|
179
|
+
limit: 10, # Integer | Number of records to return per request.
|
|
180
|
+
offset: 0, # Integer | Number of initial records to skip.
|
|
181
|
+
search: 'Hooli' # String | Case-insensitive search against the sub-account name.
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
begin
|
|
185
|
+
# List Sub-Accounts
|
|
186
|
+
result = api_instance.get_all_sub_accounts(opts)
|
|
187
|
+
p result
|
|
188
|
+
rescue Sendpost::ApiError => e
|
|
189
|
+
puts "Error when calling SubAccountApi->get_all_sub_accounts: #{e}"
|
|
190
|
+
end
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
#### Using the get_all_sub_accounts_with_http_info variant
|
|
194
|
+
|
|
195
|
+
This returns an Array which contains the response data, status code and headers.
|
|
196
|
+
|
|
197
|
+
> <Array(<Array<SubAccount>>, Integer, Hash)> get_all_sub_accounts_with_http_info(opts)
|
|
198
|
+
|
|
199
|
+
```ruby
|
|
200
|
+
begin
|
|
201
|
+
# List Sub-Accounts
|
|
202
|
+
data, status_code, headers = api_instance.get_all_sub_accounts_with_http_info(opts)
|
|
203
|
+
p status_code # => 2xx
|
|
204
|
+
p headers # => { ... }
|
|
205
|
+
p data # => <Array<SubAccount>>
|
|
206
|
+
rescue Sendpost::ApiError => e
|
|
207
|
+
puts "Error when calling SubAccountApi->get_all_sub_accounts_with_http_info: #{e}"
|
|
208
|
+
end
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Parameters
|
|
212
|
+
|
|
213
|
+
| Name | Type | Description | Notes |
|
|
214
|
+
| ---- | ---- | ----------- | ----- |
|
|
215
|
+
| **limit** | **Integer** | Number of records to return per request. | [optional] |
|
|
216
|
+
| **offset** | **Integer** | Number of initial records to skip. | [optional] |
|
|
217
|
+
| **search** | **String** | Case-insensitive search against the sub-account name. | [optional] |
|
|
218
|
+
|
|
219
|
+
### Return type
|
|
220
|
+
|
|
221
|
+
[**Array<SubAccount>**](SubAccount.md)
|
|
222
|
+
|
|
223
|
+
### Authorization
|
|
224
|
+
|
|
225
|
+
[accountAuth](../README.md#accountAuth)
|
|
226
|
+
|
|
227
|
+
### HTTP request headers
|
|
228
|
+
|
|
229
|
+
- **Content-Type**: Not defined
|
|
230
|
+
- **Accept**: application/json
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## get_sub_account
|
|
234
|
+
|
|
235
|
+
> <SubAccount> get_sub_account(subaccount_id)
|
|
236
|
+
|
|
237
|
+
Get Sub-Account
|
|
238
|
+
|
|
239
|
+
Retrieves a specific sub-account by its ID.
|
|
240
|
+
|
|
241
|
+
### Examples
|
|
242
|
+
|
|
243
|
+
```ruby
|
|
244
|
+
require 'time'
|
|
245
|
+
require 'sendpost_ruby_sdk'
|
|
246
|
+
# setup authorization
|
|
247
|
+
Sendpost.configure do |config|
|
|
248
|
+
# Configure API key authorization: accountAuth
|
|
249
|
+
config.api_key['X-Account-ApiKey'] = 'YOUR API KEY'
|
|
250
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
251
|
+
# config.api_key_prefix['X-Account-ApiKey'] = 'Bearer'
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
api_instance = Sendpost::SubAccountApi.new
|
|
255
|
+
subaccount_id = 11 # Integer | The ID of the sub-account to retrieve.
|
|
256
|
+
|
|
257
|
+
begin
|
|
258
|
+
# Get Sub-Account
|
|
259
|
+
result = api_instance.get_sub_account(subaccount_id)
|
|
260
|
+
p result
|
|
261
|
+
rescue Sendpost::ApiError => e
|
|
262
|
+
puts "Error when calling SubAccountApi->get_sub_account: #{e}"
|
|
263
|
+
end
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
#### Using the get_sub_account_with_http_info variant
|
|
267
|
+
|
|
268
|
+
This returns an Array which contains the response data, status code and headers.
|
|
269
|
+
|
|
270
|
+
> <Array(<SubAccount>, Integer, Hash)> get_sub_account_with_http_info(subaccount_id)
|
|
271
|
+
|
|
272
|
+
```ruby
|
|
273
|
+
begin
|
|
274
|
+
# Get Sub-Account
|
|
275
|
+
data, status_code, headers = api_instance.get_sub_account_with_http_info(subaccount_id)
|
|
276
|
+
p status_code # => 2xx
|
|
277
|
+
p headers # => { ... }
|
|
278
|
+
p data # => <SubAccount>
|
|
279
|
+
rescue Sendpost::ApiError => e
|
|
280
|
+
puts "Error when calling SubAccountApi->get_sub_account_with_http_info: #{e}"
|
|
281
|
+
end
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Parameters
|
|
285
|
+
|
|
286
|
+
| Name | Type | Description | Notes |
|
|
287
|
+
| ---- | ---- | ----------- | ----- |
|
|
288
|
+
| **subaccount_id** | **Integer** | The ID of the sub-account to retrieve. | |
|
|
289
|
+
|
|
290
|
+
### Return type
|
|
291
|
+
|
|
292
|
+
[**SubAccount**](SubAccount.md)
|
|
293
|
+
|
|
294
|
+
### Authorization
|
|
295
|
+
|
|
296
|
+
[accountAuth](../README.md#accountAuth)
|
|
297
|
+
|
|
298
|
+
### HTTP request headers
|
|
299
|
+
|
|
300
|
+
- **Content-Type**: Not defined
|
|
301
|
+
- **Accept**: application/json
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
## update_sub_account
|
|
305
|
+
|
|
306
|
+
> <SubAccount> update_sub_account(update_sub_account, subaccount_id)
|
|
307
|
+
|
|
308
|
+
Update Sub-Account
|
|
309
|
+
|
|
310
|
+
Updates the details of an existing sub-account.
|
|
311
|
+
|
|
312
|
+
### Examples
|
|
313
|
+
|
|
314
|
+
```ruby
|
|
315
|
+
require 'time'
|
|
316
|
+
require 'sendpost_ruby_sdk'
|
|
317
|
+
# setup authorization
|
|
318
|
+
Sendpost.configure do |config|
|
|
319
|
+
# Configure API key authorization: accountAuth
|
|
320
|
+
config.api_key['X-Account-ApiKey'] = 'YOUR API KEY'
|
|
321
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
322
|
+
# config.api_key_prefix['X-Account-ApiKey'] = 'Bearer'
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
api_instance = Sendpost::SubAccountApi.new
|
|
326
|
+
update_sub_account = Sendpost::UpdateSubAccount.new # UpdateSubAccount |
|
|
327
|
+
subaccount_id = 12 # Integer | The ID of the sub-account to update.
|
|
328
|
+
|
|
329
|
+
begin
|
|
330
|
+
# Update Sub-Account
|
|
331
|
+
result = api_instance.update_sub_account(update_sub_account, subaccount_id)
|
|
332
|
+
p result
|
|
333
|
+
rescue Sendpost::ApiError => e
|
|
334
|
+
puts "Error when calling SubAccountApi->update_sub_account: #{e}"
|
|
335
|
+
end
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
#### Using the update_sub_account_with_http_info variant
|
|
339
|
+
|
|
340
|
+
This returns an Array which contains the response data, status code and headers.
|
|
341
|
+
|
|
342
|
+
> <Array(<SubAccount>, Integer, Hash)> update_sub_account_with_http_info(update_sub_account, subaccount_id)
|
|
343
|
+
|
|
344
|
+
```ruby
|
|
345
|
+
begin
|
|
346
|
+
# Update Sub-Account
|
|
347
|
+
data, status_code, headers = api_instance.update_sub_account_with_http_info(update_sub_account, subaccount_id)
|
|
348
|
+
p status_code # => 2xx
|
|
349
|
+
p headers # => { ... }
|
|
350
|
+
p data # => <SubAccount>
|
|
351
|
+
rescue Sendpost::ApiError => e
|
|
352
|
+
puts "Error when calling SubAccountApi->update_sub_account_with_http_info: #{e}"
|
|
353
|
+
end
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Parameters
|
|
357
|
+
|
|
358
|
+
| Name | Type | Description | Notes |
|
|
359
|
+
| ---- | ---- | ----------- | ----- |
|
|
360
|
+
| **update_sub_account** | [**UpdateSubAccount**](UpdateSubAccount.md) | | |
|
|
361
|
+
| **subaccount_id** | **Integer** | The ID of the sub-account to update. | |
|
|
362
|
+
|
|
363
|
+
### Return type
|
|
364
|
+
|
|
365
|
+
[**SubAccount**](SubAccount.md)
|
|
366
|
+
|
|
367
|
+
### Authorization
|
|
368
|
+
|
|
369
|
+
[accountAuth](../README.md#accountAuth)
|
|
370
|
+
|
|
371
|
+
### HTTP request headers
|
|
372
|
+
|
|
373
|
+
- **Content-Type**: application/json
|
|
374
|
+
- **Accept**: application/json
|
|
375
|
+
|
data/docs/Suppression.md
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **
|
|
8
|
-
| **
|
|
9
|
-
| **
|
|
10
|
-
| **
|
|
11
|
-
| **
|
|
7
|
+
| **id** | **Integer** | The ID of the suppression | [optional] |
|
|
8
|
+
| **reason** | **Integer** | The reason for the suppression (0 = manual, 1 = unsubscribe, 2 = hard bounce, 3 = spam complaint) | [optional] |
|
|
9
|
+
| **smtp_error** | **String** | SMTP error code in case of hard bounce suppression | [optional] |
|
|
10
|
+
| **email** | **String** | The email address for the suppression | [optional] |
|
|
11
|
+
| **created** | **Integer** | UNIX epoch nano timestamp when the suppression was created | [optional] |
|
|
12
12
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
require 'sendpost_ruby_sdk'
|
|
17
17
|
|
|
18
18
|
instance = Sendpost::Suppression.new(
|
|
19
|
-
created: null,
|
|
20
|
-
email: null,
|
|
21
19
|
id: null,
|
|
22
20
|
reason: null,
|
|
23
|
-
smtp_error: null
|
|
21
|
+
smtp_error: null,
|
|
22
|
+
email: null,
|
|
23
|
+
created: null
|
|
24
24
|
)
|
|
25
25
|
```
|
|
26
26
|
|