mailsafepro 1.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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +256 -0
- data/Rakefile +10 -0
- data/docs/APIKeyCreateRequest.md +20 -0
- data/docs/APIKeyListResponse.md +22 -0
- data/docs/APIKeyMeta.md +34 -0
- data/docs/APIKeysApi.md +1241 -0
- data/docs/AuthenticationApi.md +1171 -0
- data/docs/BatchEmailResponse.md +28 -0
- data/docs/BatchValidationRequest.md +26 -0
- data/docs/BillingApi.md +689 -0
- data/docs/BodyChangePlanBillingBillingChangePlanPost.md +18 -0
- data/docs/CheckoutRequest.md +18 -0
- data/docs/CheckoutSessionResponse.md +18 -0
- data/docs/DNSInfo.md +26 -0
- data/docs/DNSRecordDKIM.md +26 -0
- data/docs/DNSRecordDMARC.md +24 -0
- data/docs/DNSRecordSPF.md +24 -0
- data/docs/DefaultApi.md +141 -0
- data/docs/DeveloperToolsApi.md +154 -0
- data/docs/EmailResponse.md +46 -0
- data/docs/EmailValidationApi.md +479 -0
- data/docs/EmailValidationRequest.md +26 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HealthApi.md +937 -0
- data/docs/JobCreateRequest.md +32 -0
- data/docs/JobCreateResponse.md +22 -0
- data/docs/JobResultEntry.md +34 -0
- data/docs/JobResultsPage.md +26 -0
- data/docs/JobStatusResponse.md +28 -0
- data/docs/JobsApi.md +433 -0
- data/docs/KeyRotationRequest.md +22 -0
- data/docs/LogsApi.md +154 -0
- data/docs/PlanEnum.md +15 -0
- data/docs/PriorityEnum.md +15 -0
- data/docs/RegisterEndpoint.md +18 -0
- data/docs/ResponseTestNotificationBillingBillingTestNotificationPostValue.md +15 -0
- data/docs/RiskLevelEnum.md +15 -0
- data/docs/RotateSecret.md +18 -0
- data/docs/SMTPInfo.md +26 -0
- data/docs/SubscriptionResponse.md +24 -0
- data/docs/UserLogin.md +20 -0
- data/docs/UserRegister.md +22 -0
- data/docs/ValidationApi.md +479 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/WebhookCreate.md +24 -0
- data/docs/WebhookResponse.md +22 -0
- data/docs/WebhookUpdate.md +24 -0
- data/docs/WebhooksApi.md +776 -0
- data/docs/WebhooksManagementApi.md +500 -0
- data/git_push.sh +57 -0
- data/lib/mailsafepro/api/api_keys_api.rb +1148 -0
- data/lib/mailsafepro/api/authentication_api.rb +1114 -0
- data/lib/mailsafepro/api/billing_api.rb +670 -0
- data/lib/mailsafepro/api/default_api.rb +149 -0
- data/lib/mailsafepro/api/developer_tools_api.rb +155 -0
- data/lib/mailsafepro/api/email_validation_api.rb +486 -0
- data/lib/mailsafepro/api/health_api.rb +877 -0
- data/lib/mailsafepro/api/jobs_api.rb +452 -0
- data/lib/mailsafepro/api/logs_api.rb +155 -0
- data/lib/mailsafepro/api/validation_api.rb +486 -0
- data/lib/mailsafepro/api/webhooks_api.rb +768 -0
- data/lib/mailsafepro/api/webhooks_management_api.rb +480 -0
- data/lib/mailsafepro/api_client.rb +397 -0
- data/lib/mailsafepro/api_error.rb +58 -0
- data/lib/mailsafepro/api_model_base.rb +88 -0
- data/lib/mailsafepro/configuration.rb +316 -0
- data/lib/mailsafepro/models/api_key_create_request.rb +185 -0
- data/lib/mailsafepro/models/api_key_list_response.rb +240 -0
- data/lib/mailsafepro/models/api_key_meta.rb +338 -0
- data/lib/mailsafepro/models/batch_email_response.rb +348 -0
- data/lib/mailsafepro/models/batch_validation_request.rb +290 -0
- data/lib/mailsafepro/models/body_change_plan_billing_billing_change_plan_post.rb +164 -0
- data/lib/mailsafepro/models/checkout_request.rb +166 -0
- data/lib/mailsafepro/models/checkout_session_response.rb +165 -0
- data/lib/mailsafepro/models/dns_info.rb +193 -0
- data/lib/mailsafepro/models/dns_record_dkim.rb +189 -0
- data/lib/mailsafepro/models/dns_record_dmarc.rb +179 -0
- data/lib/mailsafepro/models/dns_record_spf.rb +179 -0
- data/lib/mailsafepro/models/email_response.rb +454 -0
- data/lib/mailsafepro/models/email_validation_request.rb +252 -0
- data/lib/mailsafepro/models/http_validation_error.rb +149 -0
- data/lib/mailsafepro/models/job_create_request.rb +251 -0
- data/lib/mailsafepro/models/job_create_response.rb +216 -0
- data/lib/mailsafepro/models/job_result_entry.rb +257 -0
- data/lib/mailsafepro/models/job_results_page.rb +270 -0
- data/lib/mailsafepro/models/job_status_response.rb +231 -0
- data/lib/mailsafepro/models/key_rotation_request.rb +269 -0
- data/lib/mailsafepro/models/plan_enum.rb +41 -0
- data/lib/mailsafepro/models/priority_enum.rb +41 -0
- data/lib/mailsafepro/models/register_endpoint.rb +173 -0
- data/lib/mailsafepro/models/response_test_notification_billing_billing_test_notification_post_value.rb +103 -0
- data/lib/mailsafepro/models/risk_level_enum.rb +42 -0
- data/lib/mailsafepro/models/rotate_secret.rb +164 -0
- data/lib/mailsafepro/models/smtp_info.rb +206 -0
- data/lib/mailsafepro/models/subscription_response.rb +196 -0
- data/lib/mailsafepro/models/user_login.rb +211 -0
- data/lib/mailsafepro/models/user_register.rb +243 -0
- data/lib/mailsafepro/models/validation_error.rb +218 -0
- data/lib/mailsafepro/models/validation_error_loc_inner.rb +103 -0
- data/lib/mailsafepro/models/webhook_create.rb +213 -0
- data/lib/mailsafepro/models/webhook_response.rb +185 -0
- data/lib/mailsafepro/models/webhook_update.rb +204 -0
- data/lib/mailsafepro/version.rb +15 -0
- data/lib/mailsafepro.rb +88 -0
- data/mailsafepro.gemspec +39 -0
- data/spec/api/api_keys_api_spec.rb +245 -0
- data/spec/api/authentication_api_spec.rb +239 -0
- data/spec/api/billing_api_spec.rb +155 -0
- data/spec/api/default_api_spec.rb +60 -0
- data/spec/api/developer_tools_api_spec.rb +62 -0
- data/spec/api/email_validation_api_spec.rb +125 -0
- data/spec/api/health_api_spec.rb +200 -0
- data/spec/api/jobs_api_spec.rb +119 -0
- data/spec/api/logs_api_spec.rb +62 -0
- data/spec/api/validation_api_spec.rb +125 -0
- data/spec/api/webhooks_api_spec.rb +172 -0
- data/spec/api/webhooks_management_api_spec.rb +120 -0
- data/spec/models/api_key_create_request_spec.rb +42 -0
- data/spec/models/api_key_list_response_spec.rb +48 -0
- data/spec/models/api_key_meta_spec.rb +84 -0
- data/spec/models/batch_email_response_spec.rb +66 -0
- data/spec/models/batch_validation_request_spec.rb +60 -0
- data/spec/models/body_change_plan_billing_billing_change_plan_post_spec.rb +36 -0
- data/spec/models/checkout_request_spec.rb +36 -0
- data/spec/models/checkout_session_response_spec.rb +36 -0
- data/spec/models/dns_info_spec.rb +60 -0
- data/spec/models/dns_record_dkim_spec.rb +60 -0
- data/spec/models/dns_record_dmarc_spec.rb +54 -0
- data/spec/models/dns_record_spf_spec.rb +54 -0
- data/spec/models/email_response_spec.rb +120 -0
- data/spec/models/email_validation_request_spec.rb +60 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/job_create_request_spec.rb +78 -0
- data/spec/models/job_create_response_spec.rb +48 -0
- data/spec/models/job_result_entry_spec.rb +84 -0
- data/spec/models/job_results_page_spec.rb +60 -0
- data/spec/models/job_status_response_spec.rb +66 -0
- data/spec/models/key_rotation_request_spec.rb +48 -0
- data/spec/models/plan_enum_spec.rb +30 -0
- data/spec/models/priority_enum_spec.rb +30 -0
- data/spec/models/register_endpoint_spec.rb +36 -0
- data/spec/models/response_test_notification_billing_billing_test_notification_post_value_spec.rb +21 -0
- data/spec/models/risk_level_enum_spec.rb +30 -0
- data/spec/models/rotate_secret_spec.rb +36 -0
- data/spec/models/smtp_info_spec.rb +60 -0
- data/spec/models/subscription_response_spec.rb +54 -0
- data/spec/models/user_login_spec.rb +42 -0
- data/spec/models/user_register_spec.rb +48 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +54 -0
- data/spec/models/webhook_response_spec.rb +48 -0
- data/spec/models/webhook_update_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +291 -0
data/docs/BillingApi.md
ADDED
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
# MailSafePro::BillingApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**change_plan_billing_billing_change_plan_post**](BillingApi.md#change_plan_billing_billing_change_plan_post) | **POST** /billing/billing/change-plan | Change Plan |
|
|
8
|
+
| [**change_plan_billing_billing_change_plan_post_0**](BillingApi.md#change_plan_billing_billing_change_plan_post_0) | **POST** /billing/billing/change-plan | Change Plan |
|
|
9
|
+
| [**create_checkout_session_billing_billing_create_checkout_session_post**](BillingApi.md#create_checkout_session_billing_billing_create_checkout_session_post) | **POST** /billing/billing/create-checkout-session | Create Checkout Session |
|
|
10
|
+
| [**create_checkout_session_billing_billing_create_checkout_session_post_0**](BillingApi.md#create_checkout_session_billing_billing_create_checkout_session_post_0) | **POST** /billing/billing/create-checkout-session | Create Checkout Session |
|
|
11
|
+
| [**get_subscription_billing_billing_subscription_get**](BillingApi.md#get_subscription_billing_billing_subscription_get) | **GET** /billing/billing/subscription | Get Subscription |
|
|
12
|
+
| [**get_subscription_billing_billing_subscription_get_0**](BillingApi.md#get_subscription_billing_billing_subscription_get_0) | **GET** /billing/billing/subscription | Get Subscription |
|
|
13
|
+
| [**stripe_webhook_billing_billing_webhook_post**](BillingApi.md#stripe_webhook_billing_billing_webhook_post) | **POST** /billing/billing/webhook | Stripe Webhook |
|
|
14
|
+
| [**stripe_webhook_billing_billing_webhook_post_0**](BillingApi.md#stripe_webhook_billing_billing_webhook_post_0) | **POST** /billing/billing/webhook | Stripe Webhook |
|
|
15
|
+
| [**test_notification_billing_billing_test_notification_post**](BillingApi.md#test_notification_billing_billing_test_notification_post) | **POST** /billing/billing/test-notification | Test Notification |
|
|
16
|
+
| [**test_notification_billing_billing_test_notification_post_0**](BillingApi.md#test_notification_billing_billing_test_notification_post_0) | **POST** /billing/billing/test-notification | Test Notification |
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## change_plan_billing_billing_change_plan_post
|
|
20
|
+
|
|
21
|
+
> Object change_plan_billing_billing_change_plan_post(body_change_plan_billing_billing_change_plan_post)
|
|
22
|
+
|
|
23
|
+
Change Plan
|
|
24
|
+
|
|
25
|
+
Cambiar el plan del usuario.
|
|
26
|
+
|
|
27
|
+
### Examples
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
require 'time'
|
|
31
|
+
require 'mailsafepro'
|
|
32
|
+
# setup authorization
|
|
33
|
+
MailSafePro.configure do |config|
|
|
34
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
35
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
api_instance = MailSafePro::BillingApi.new
|
|
39
|
+
body_change_plan_billing_billing_change_plan_post = MailSafePro::BodyChangePlanBillingBillingChangePlanPost.new({plan: 'plan_example'}) # BodyChangePlanBillingBillingChangePlanPost |
|
|
40
|
+
|
|
41
|
+
begin
|
|
42
|
+
# Change Plan
|
|
43
|
+
result = api_instance.change_plan_billing_billing_change_plan_post(body_change_plan_billing_billing_change_plan_post)
|
|
44
|
+
p result
|
|
45
|
+
rescue MailSafePro::ApiError => e
|
|
46
|
+
puts "Error when calling BillingApi->change_plan_billing_billing_change_plan_post: #{e}"
|
|
47
|
+
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Using the change_plan_billing_billing_change_plan_post_with_http_info variant
|
|
51
|
+
|
|
52
|
+
This returns an Array which contains the response data, status code and headers.
|
|
53
|
+
|
|
54
|
+
> <Array(Object, Integer, Hash)> change_plan_billing_billing_change_plan_post_with_http_info(body_change_plan_billing_billing_change_plan_post)
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
begin
|
|
58
|
+
# Change Plan
|
|
59
|
+
data, status_code, headers = api_instance.change_plan_billing_billing_change_plan_post_with_http_info(body_change_plan_billing_billing_change_plan_post)
|
|
60
|
+
p status_code # => 2xx
|
|
61
|
+
p headers # => { ... }
|
|
62
|
+
p data # => Object
|
|
63
|
+
rescue MailSafePro::ApiError => e
|
|
64
|
+
puts "Error when calling BillingApi->change_plan_billing_billing_change_plan_post_with_http_info: #{e}"
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Parameters
|
|
69
|
+
|
|
70
|
+
| Name | Type | Description | Notes |
|
|
71
|
+
| ---- | ---- | ----------- | ----- |
|
|
72
|
+
| **body_change_plan_billing_billing_change_plan_post** | [**BodyChangePlanBillingBillingChangePlanPost**](BodyChangePlanBillingBillingChangePlanPost.md) | | |
|
|
73
|
+
|
|
74
|
+
### Return type
|
|
75
|
+
|
|
76
|
+
**Object**
|
|
77
|
+
|
|
78
|
+
### Authorization
|
|
79
|
+
|
|
80
|
+
[Bearer](../README.md#Bearer)
|
|
81
|
+
|
|
82
|
+
### HTTP request headers
|
|
83
|
+
|
|
84
|
+
- **Content-Type**: application/json
|
|
85
|
+
- **Accept**: application/json
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## change_plan_billing_billing_change_plan_post_0
|
|
89
|
+
|
|
90
|
+
> Object change_plan_billing_billing_change_plan_post_0(body_change_plan_billing_billing_change_plan_post)
|
|
91
|
+
|
|
92
|
+
Change Plan
|
|
93
|
+
|
|
94
|
+
Cambiar el plan del usuario.
|
|
95
|
+
|
|
96
|
+
### Examples
|
|
97
|
+
|
|
98
|
+
```ruby
|
|
99
|
+
require 'time'
|
|
100
|
+
require 'mailsafepro'
|
|
101
|
+
# setup authorization
|
|
102
|
+
MailSafePro.configure do |config|
|
|
103
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
104
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
api_instance = MailSafePro::BillingApi.new
|
|
108
|
+
body_change_plan_billing_billing_change_plan_post = MailSafePro::BodyChangePlanBillingBillingChangePlanPost.new({plan: 'plan_example'}) # BodyChangePlanBillingBillingChangePlanPost |
|
|
109
|
+
|
|
110
|
+
begin
|
|
111
|
+
# Change Plan
|
|
112
|
+
result = api_instance.change_plan_billing_billing_change_plan_post_0(body_change_plan_billing_billing_change_plan_post)
|
|
113
|
+
p result
|
|
114
|
+
rescue MailSafePro::ApiError => e
|
|
115
|
+
puts "Error when calling BillingApi->change_plan_billing_billing_change_plan_post_0: #{e}"
|
|
116
|
+
end
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Using the change_plan_billing_billing_change_plan_post_0_with_http_info variant
|
|
120
|
+
|
|
121
|
+
This returns an Array which contains the response data, status code and headers.
|
|
122
|
+
|
|
123
|
+
> <Array(Object, Integer, Hash)> change_plan_billing_billing_change_plan_post_0_with_http_info(body_change_plan_billing_billing_change_plan_post)
|
|
124
|
+
|
|
125
|
+
```ruby
|
|
126
|
+
begin
|
|
127
|
+
# Change Plan
|
|
128
|
+
data, status_code, headers = api_instance.change_plan_billing_billing_change_plan_post_0_with_http_info(body_change_plan_billing_billing_change_plan_post)
|
|
129
|
+
p status_code # => 2xx
|
|
130
|
+
p headers # => { ... }
|
|
131
|
+
p data # => Object
|
|
132
|
+
rescue MailSafePro::ApiError => e
|
|
133
|
+
puts "Error when calling BillingApi->change_plan_billing_billing_change_plan_post_0_with_http_info: #{e}"
|
|
134
|
+
end
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Parameters
|
|
138
|
+
|
|
139
|
+
| Name | Type | Description | Notes |
|
|
140
|
+
| ---- | ---- | ----------- | ----- |
|
|
141
|
+
| **body_change_plan_billing_billing_change_plan_post** | [**BodyChangePlanBillingBillingChangePlanPost**](BodyChangePlanBillingBillingChangePlanPost.md) | | |
|
|
142
|
+
|
|
143
|
+
### Return type
|
|
144
|
+
|
|
145
|
+
**Object**
|
|
146
|
+
|
|
147
|
+
### Authorization
|
|
148
|
+
|
|
149
|
+
[Bearer](../README.md#Bearer)
|
|
150
|
+
|
|
151
|
+
### HTTP request headers
|
|
152
|
+
|
|
153
|
+
- **Content-Type**: application/json
|
|
154
|
+
- **Accept**: application/json
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
## create_checkout_session_billing_billing_create_checkout_session_post
|
|
158
|
+
|
|
159
|
+
> <CheckoutSessionResponse> create_checkout_session_billing_billing_create_checkout_session_post(checkout_request)
|
|
160
|
+
|
|
161
|
+
Create Checkout Session
|
|
162
|
+
|
|
163
|
+
Crea una checkout session de Stripe para suscripción.
|
|
164
|
+
|
|
165
|
+
### Examples
|
|
166
|
+
|
|
167
|
+
```ruby
|
|
168
|
+
require 'time'
|
|
169
|
+
require 'mailsafepro'
|
|
170
|
+
# setup authorization
|
|
171
|
+
MailSafePro.configure do |config|
|
|
172
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
173
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
api_instance = MailSafePro::BillingApi.new
|
|
177
|
+
checkout_request = MailSafePro::CheckoutRequest.new({plan: 'plan_example'}) # CheckoutRequest |
|
|
178
|
+
|
|
179
|
+
begin
|
|
180
|
+
# Create Checkout Session
|
|
181
|
+
result = api_instance.create_checkout_session_billing_billing_create_checkout_session_post(checkout_request)
|
|
182
|
+
p result
|
|
183
|
+
rescue MailSafePro::ApiError => e
|
|
184
|
+
puts "Error when calling BillingApi->create_checkout_session_billing_billing_create_checkout_session_post: #{e}"
|
|
185
|
+
end
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
#### Using the create_checkout_session_billing_billing_create_checkout_session_post_with_http_info variant
|
|
189
|
+
|
|
190
|
+
This returns an Array which contains the response data, status code and headers.
|
|
191
|
+
|
|
192
|
+
> <Array(<CheckoutSessionResponse>, Integer, Hash)> create_checkout_session_billing_billing_create_checkout_session_post_with_http_info(checkout_request)
|
|
193
|
+
|
|
194
|
+
```ruby
|
|
195
|
+
begin
|
|
196
|
+
# Create Checkout Session
|
|
197
|
+
data, status_code, headers = api_instance.create_checkout_session_billing_billing_create_checkout_session_post_with_http_info(checkout_request)
|
|
198
|
+
p status_code # => 2xx
|
|
199
|
+
p headers # => { ... }
|
|
200
|
+
p data # => <CheckoutSessionResponse>
|
|
201
|
+
rescue MailSafePro::ApiError => e
|
|
202
|
+
puts "Error when calling BillingApi->create_checkout_session_billing_billing_create_checkout_session_post_with_http_info: #{e}"
|
|
203
|
+
end
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Parameters
|
|
207
|
+
|
|
208
|
+
| Name | Type | Description | Notes |
|
|
209
|
+
| ---- | ---- | ----------- | ----- |
|
|
210
|
+
| **checkout_request** | [**CheckoutRequest**](CheckoutRequest.md) | | |
|
|
211
|
+
|
|
212
|
+
### Return type
|
|
213
|
+
|
|
214
|
+
[**CheckoutSessionResponse**](CheckoutSessionResponse.md)
|
|
215
|
+
|
|
216
|
+
### Authorization
|
|
217
|
+
|
|
218
|
+
[Bearer](../README.md#Bearer)
|
|
219
|
+
|
|
220
|
+
### HTTP request headers
|
|
221
|
+
|
|
222
|
+
- **Content-Type**: application/json
|
|
223
|
+
- **Accept**: application/json
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## create_checkout_session_billing_billing_create_checkout_session_post_0
|
|
227
|
+
|
|
228
|
+
> <CheckoutSessionResponse> create_checkout_session_billing_billing_create_checkout_session_post_0(checkout_request)
|
|
229
|
+
|
|
230
|
+
Create Checkout Session
|
|
231
|
+
|
|
232
|
+
Crea una checkout session de Stripe para suscripción.
|
|
233
|
+
|
|
234
|
+
### Examples
|
|
235
|
+
|
|
236
|
+
```ruby
|
|
237
|
+
require 'time'
|
|
238
|
+
require 'mailsafepro'
|
|
239
|
+
# setup authorization
|
|
240
|
+
MailSafePro.configure do |config|
|
|
241
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
242
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
api_instance = MailSafePro::BillingApi.new
|
|
246
|
+
checkout_request = MailSafePro::CheckoutRequest.new({plan: 'plan_example'}) # CheckoutRequest |
|
|
247
|
+
|
|
248
|
+
begin
|
|
249
|
+
# Create Checkout Session
|
|
250
|
+
result = api_instance.create_checkout_session_billing_billing_create_checkout_session_post_0(checkout_request)
|
|
251
|
+
p result
|
|
252
|
+
rescue MailSafePro::ApiError => e
|
|
253
|
+
puts "Error when calling BillingApi->create_checkout_session_billing_billing_create_checkout_session_post_0: #{e}"
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### Using the create_checkout_session_billing_billing_create_checkout_session_post_0_with_http_info variant
|
|
258
|
+
|
|
259
|
+
This returns an Array which contains the response data, status code and headers.
|
|
260
|
+
|
|
261
|
+
> <Array(<CheckoutSessionResponse>, Integer, Hash)> create_checkout_session_billing_billing_create_checkout_session_post_0_with_http_info(checkout_request)
|
|
262
|
+
|
|
263
|
+
```ruby
|
|
264
|
+
begin
|
|
265
|
+
# Create Checkout Session
|
|
266
|
+
data, status_code, headers = api_instance.create_checkout_session_billing_billing_create_checkout_session_post_0_with_http_info(checkout_request)
|
|
267
|
+
p status_code # => 2xx
|
|
268
|
+
p headers # => { ... }
|
|
269
|
+
p data # => <CheckoutSessionResponse>
|
|
270
|
+
rescue MailSafePro::ApiError => e
|
|
271
|
+
puts "Error when calling BillingApi->create_checkout_session_billing_billing_create_checkout_session_post_0_with_http_info: #{e}"
|
|
272
|
+
end
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Parameters
|
|
276
|
+
|
|
277
|
+
| Name | Type | Description | Notes |
|
|
278
|
+
| ---- | ---- | ----------- | ----- |
|
|
279
|
+
| **checkout_request** | [**CheckoutRequest**](CheckoutRequest.md) | | |
|
|
280
|
+
|
|
281
|
+
### Return type
|
|
282
|
+
|
|
283
|
+
[**CheckoutSessionResponse**](CheckoutSessionResponse.md)
|
|
284
|
+
|
|
285
|
+
### Authorization
|
|
286
|
+
|
|
287
|
+
[Bearer](../README.md#Bearer)
|
|
288
|
+
|
|
289
|
+
### HTTP request headers
|
|
290
|
+
|
|
291
|
+
- **Content-Type**: application/json
|
|
292
|
+
- **Accept**: application/json
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
## get_subscription_billing_billing_subscription_get
|
|
296
|
+
|
|
297
|
+
> <SubscriptionResponse> get_subscription_billing_billing_subscription_get(opts)
|
|
298
|
+
|
|
299
|
+
Get Subscription
|
|
300
|
+
|
|
301
|
+
Devuelve información de suscripción (plan y próxima fecha de cobro).
|
|
302
|
+
|
|
303
|
+
### Examples
|
|
304
|
+
|
|
305
|
+
```ruby
|
|
306
|
+
require 'time'
|
|
307
|
+
require 'mailsafepro'
|
|
308
|
+
|
|
309
|
+
api_instance = MailSafePro::BillingApi.new
|
|
310
|
+
opts = {
|
|
311
|
+
x_api_key: 'x_api_key_example', # String |
|
|
312
|
+
authorization: 'authorization_example' # String |
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
begin
|
|
316
|
+
# Get Subscription
|
|
317
|
+
result = api_instance.get_subscription_billing_billing_subscription_get(opts)
|
|
318
|
+
p result
|
|
319
|
+
rescue MailSafePro::ApiError => e
|
|
320
|
+
puts "Error when calling BillingApi->get_subscription_billing_billing_subscription_get: #{e}"
|
|
321
|
+
end
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
#### Using the get_subscription_billing_billing_subscription_get_with_http_info variant
|
|
325
|
+
|
|
326
|
+
This returns an Array which contains the response data, status code and headers.
|
|
327
|
+
|
|
328
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> get_subscription_billing_billing_subscription_get_with_http_info(opts)
|
|
329
|
+
|
|
330
|
+
```ruby
|
|
331
|
+
begin
|
|
332
|
+
# Get Subscription
|
|
333
|
+
data, status_code, headers = api_instance.get_subscription_billing_billing_subscription_get_with_http_info(opts)
|
|
334
|
+
p status_code # => 2xx
|
|
335
|
+
p headers # => { ... }
|
|
336
|
+
p data # => <SubscriptionResponse>
|
|
337
|
+
rescue MailSafePro::ApiError => e
|
|
338
|
+
puts "Error when calling BillingApi->get_subscription_billing_billing_subscription_get_with_http_info: #{e}"
|
|
339
|
+
end
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Parameters
|
|
343
|
+
|
|
344
|
+
| Name | Type | Description | Notes |
|
|
345
|
+
| ---- | ---- | ----------- | ----- |
|
|
346
|
+
| **x_api_key** | **String** | | [optional] |
|
|
347
|
+
| **authorization** | **String** | | [optional] |
|
|
348
|
+
|
|
349
|
+
### Return type
|
|
350
|
+
|
|
351
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
|
352
|
+
|
|
353
|
+
### Authorization
|
|
354
|
+
|
|
355
|
+
No authorization required
|
|
356
|
+
|
|
357
|
+
### HTTP request headers
|
|
358
|
+
|
|
359
|
+
- **Content-Type**: Not defined
|
|
360
|
+
- **Accept**: application/json
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
## get_subscription_billing_billing_subscription_get_0
|
|
364
|
+
|
|
365
|
+
> <SubscriptionResponse> get_subscription_billing_billing_subscription_get_0(opts)
|
|
366
|
+
|
|
367
|
+
Get Subscription
|
|
368
|
+
|
|
369
|
+
Devuelve información de suscripción (plan y próxima fecha de cobro).
|
|
370
|
+
|
|
371
|
+
### Examples
|
|
372
|
+
|
|
373
|
+
```ruby
|
|
374
|
+
require 'time'
|
|
375
|
+
require 'mailsafepro'
|
|
376
|
+
|
|
377
|
+
api_instance = MailSafePro::BillingApi.new
|
|
378
|
+
opts = {
|
|
379
|
+
x_api_key: 'x_api_key_example', # String |
|
|
380
|
+
authorization: 'authorization_example' # String |
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
begin
|
|
384
|
+
# Get Subscription
|
|
385
|
+
result = api_instance.get_subscription_billing_billing_subscription_get_0(opts)
|
|
386
|
+
p result
|
|
387
|
+
rescue MailSafePro::ApiError => e
|
|
388
|
+
puts "Error when calling BillingApi->get_subscription_billing_billing_subscription_get_0: #{e}"
|
|
389
|
+
end
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
#### Using the get_subscription_billing_billing_subscription_get_0_with_http_info variant
|
|
393
|
+
|
|
394
|
+
This returns an Array which contains the response data, status code and headers.
|
|
395
|
+
|
|
396
|
+
> <Array(<SubscriptionResponse>, Integer, Hash)> get_subscription_billing_billing_subscription_get_0_with_http_info(opts)
|
|
397
|
+
|
|
398
|
+
```ruby
|
|
399
|
+
begin
|
|
400
|
+
# Get Subscription
|
|
401
|
+
data, status_code, headers = api_instance.get_subscription_billing_billing_subscription_get_0_with_http_info(opts)
|
|
402
|
+
p status_code # => 2xx
|
|
403
|
+
p headers # => { ... }
|
|
404
|
+
p data # => <SubscriptionResponse>
|
|
405
|
+
rescue MailSafePro::ApiError => e
|
|
406
|
+
puts "Error when calling BillingApi->get_subscription_billing_billing_subscription_get_0_with_http_info: #{e}"
|
|
407
|
+
end
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Parameters
|
|
411
|
+
|
|
412
|
+
| Name | Type | Description | Notes |
|
|
413
|
+
| ---- | ---- | ----------- | ----- |
|
|
414
|
+
| **x_api_key** | **String** | | [optional] |
|
|
415
|
+
| **authorization** | **String** | | [optional] |
|
|
416
|
+
|
|
417
|
+
### Return type
|
|
418
|
+
|
|
419
|
+
[**SubscriptionResponse**](SubscriptionResponse.md)
|
|
420
|
+
|
|
421
|
+
### Authorization
|
|
422
|
+
|
|
423
|
+
No authorization required
|
|
424
|
+
|
|
425
|
+
### HTTP request headers
|
|
426
|
+
|
|
427
|
+
- **Content-Type**: Not defined
|
|
428
|
+
- **Accept**: application/json
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
## stripe_webhook_billing_billing_webhook_post
|
|
432
|
+
|
|
433
|
+
> <WebhookResponse> stripe_webhook_billing_billing_webhook_post
|
|
434
|
+
|
|
435
|
+
Stripe Webhook
|
|
436
|
+
|
|
437
|
+
Webhook de Stripe.
|
|
438
|
+
|
|
439
|
+
### Examples
|
|
440
|
+
|
|
441
|
+
```ruby
|
|
442
|
+
require 'time'
|
|
443
|
+
require 'mailsafepro'
|
|
444
|
+
|
|
445
|
+
api_instance = MailSafePro::BillingApi.new
|
|
446
|
+
|
|
447
|
+
begin
|
|
448
|
+
# Stripe Webhook
|
|
449
|
+
result = api_instance.stripe_webhook_billing_billing_webhook_post
|
|
450
|
+
p result
|
|
451
|
+
rescue MailSafePro::ApiError => e
|
|
452
|
+
puts "Error when calling BillingApi->stripe_webhook_billing_billing_webhook_post: #{e}"
|
|
453
|
+
end
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
#### Using the stripe_webhook_billing_billing_webhook_post_with_http_info variant
|
|
457
|
+
|
|
458
|
+
This returns an Array which contains the response data, status code and headers.
|
|
459
|
+
|
|
460
|
+
> <Array(<WebhookResponse>, Integer, Hash)> stripe_webhook_billing_billing_webhook_post_with_http_info
|
|
461
|
+
|
|
462
|
+
```ruby
|
|
463
|
+
begin
|
|
464
|
+
# Stripe Webhook
|
|
465
|
+
data, status_code, headers = api_instance.stripe_webhook_billing_billing_webhook_post_with_http_info
|
|
466
|
+
p status_code # => 2xx
|
|
467
|
+
p headers # => { ... }
|
|
468
|
+
p data # => <WebhookResponse>
|
|
469
|
+
rescue MailSafePro::ApiError => e
|
|
470
|
+
puts "Error when calling BillingApi->stripe_webhook_billing_billing_webhook_post_with_http_info: #{e}"
|
|
471
|
+
end
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Parameters
|
|
475
|
+
|
|
476
|
+
This endpoint does not need any parameter.
|
|
477
|
+
|
|
478
|
+
### Return type
|
|
479
|
+
|
|
480
|
+
[**WebhookResponse**](WebhookResponse.md)
|
|
481
|
+
|
|
482
|
+
### Authorization
|
|
483
|
+
|
|
484
|
+
No authorization required
|
|
485
|
+
|
|
486
|
+
### HTTP request headers
|
|
487
|
+
|
|
488
|
+
- **Content-Type**: Not defined
|
|
489
|
+
- **Accept**: application/json
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
## stripe_webhook_billing_billing_webhook_post_0
|
|
493
|
+
|
|
494
|
+
> <WebhookResponse> stripe_webhook_billing_billing_webhook_post_0
|
|
495
|
+
|
|
496
|
+
Stripe Webhook
|
|
497
|
+
|
|
498
|
+
Webhook de Stripe.
|
|
499
|
+
|
|
500
|
+
### Examples
|
|
501
|
+
|
|
502
|
+
```ruby
|
|
503
|
+
require 'time'
|
|
504
|
+
require 'mailsafepro'
|
|
505
|
+
|
|
506
|
+
api_instance = MailSafePro::BillingApi.new
|
|
507
|
+
|
|
508
|
+
begin
|
|
509
|
+
# Stripe Webhook
|
|
510
|
+
result = api_instance.stripe_webhook_billing_billing_webhook_post_0
|
|
511
|
+
p result
|
|
512
|
+
rescue MailSafePro::ApiError => e
|
|
513
|
+
puts "Error when calling BillingApi->stripe_webhook_billing_billing_webhook_post_0: #{e}"
|
|
514
|
+
end
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
#### Using the stripe_webhook_billing_billing_webhook_post_0_with_http_info variant
|
|
518
|
+
|
|
519
|
+
This returns an Array which contains the response data, status code and headers.
|
|
520
|
+
|
|
521
|
+
> <Array(<WebhookResponse>, Integer, Hash)> stripe_webhook_billing_billing_webhook_post_0_with_http_info
|
|
522
|
+
|
|
523
|
+
```ruby
|
|
524
|
+
begin
|
|
525
|
+
# Stripe Webhook
|
|
526
|
+
data, status_code, headers = api_instance.stripe_webhook_billing_billing_webhook_post_0_with_http_info
|
|
527
|
+
p status_code # => 2xx
|
|
528
|
+
p headers # => { ... }
|
|
529
|
+
p data # => <WebhookResponse>
|
|
530
|
+
rescue MailSafePro::ApiError => e
|
|
531
|
+
puts "Error when calling BillingApi->stripe_webhook_billing_billing_webhook_post_0_with_http_info: #{e}"
|
|
532
|
+
end
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### Parameters
|
|
536
|
+
|
|
537
|
+
This endpoint does not need any parameter.
|
|
538
|
+
|
|
539
|
+
### Return type
|
|
540
|
+
|
|
541
|
+
[**WebhookResponse**](WebhookResponse.md)
|
|
542
|
+
|
|
543
|
+
### Authorization
|
|
544
|
+
|
|
545
|
+
No authorization required
|
|
546
|
+
|
|
547
|
+
### HTTP request headers
|
|
548
|
+
|
|
549
|
+
- **Content-Type**: Not defined
|
|
550
|
+
- **Accept**: application/json
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
## test_notification_billing_billing_test_notification_post
|
|
554
|
+
|
|
555
|
+
> <Hash<String, ResponseTestNotificationBillingBillingTestNotificationPostValue>> test_notification_billing_billing_test_notification_post(request_body)
|
|
556
|
+
|
|
557
|
+
Test Notification
|
|
558
|
+
|
|
559
|
+
Envía un email de prueba de cambio de plan.
|
|
560
|
+
|
|
561
|
+
### Examples
|
|
562
|
+
|
|
563
|
+
```ruby
|
|
564
|
+
require 'time'
|
|
565
|
+
require 'mailsafepro'
|
|
566
|
+
# setup authorization
|
|
567
|
+
MailSafePro.configure do |config|
|
|
568
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
569
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
570
|
+
end
|
|
571
|
+
|
|
572
|
+
api_instance = MailSafePro::BillingApi.new
|
|
573
|
+
request_body = { key: 'inner_example'} # Hash<String, String> |
|
|
574
|
+
|
|
575
|
+
begin
|
|
576
|
+
# Test Notification
|
|
577
|
+
result = api_instance.test_notification_billing_billing_test_notification_post(request_body)
|
|
578
|
+
p result
|
|
579
|
+
rescue MailSafePro::ApiError => e
|
|
580
|
+
puts "Error when calling BillingApi->test_notification_billing_billing_test_notification_post: #{e}"
|
|
581
|
+
end
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
#### Using the test_notification_billing_billing_test_notification_post_with_http_info variant
|
|
585
|
+
|
|
586
|
+
This returns an Array which contains the response data, status code and headers.
|
|
587
|
+
|
|
588
|
+
> <Array(<Hash<String, ResponseTestNotificationBillingBillingTestNotificationPostValue>>, Integer, Hash)> test_notification_billing_billing_test_notification_post_with_http_info(request_body)
|
|
589
|
+
|
|
590
|
+
```ruby
|
|
591
|
+
begin
|
|
592
|
+
# Test Notification
|
|
593
|
+
data, status_code, headers = api_instance.test_notification_billing_billing_test_notification_post_with_http_info(request_body)
|
|
594
|
+
p status_code # => 2xx
|
|
595
|
+
p headers # => { ... }
|
|
596
|
+
p data # => <Hash<String, ResponseTestNotificationBillingBillingTestNotificationPostValue>>
|
|
597
|
+
rescue MailSafePro::ApiError => e
|
|
598
|
+
puts "Error when calling BillingApi->test_notification_billing_billing_test_notification_post_with_http_info: #{e}"
|
|
599
|
+
end
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
### Parameters
|
|
603
|
+
|
|
604
|
+
| Name | Type | Description | Notes |
|
|
605
|
+
| ---- | ---- | ----------- | ----- |
|
|
606
|
+
| **request_body** | [**Hash<String, String>**](String.md) | | |
|
|
607
|
+
|
|
608
|
+
### Return type
|
|
609
|
+
|
|
610
|
+
[**Hash<String, ResponseTestNotificationBillingBillingTestNotificationPostValue>**](ResponseTestNotificationBillingBillingTestNotificationPostValue.md)
|
|
611
|
+
|
|
612
|
+
### Authorization
|
|
613
|
+
|
|
614
|
+
[Bearer](../README.md#Bearer)
|
|
615
|
+
|
|
616
|
+
### HTTP request headers
|
|
617
|
+
|
|
618
|
+
- **Content-Type**: application/json
|
|
619
|
+
- **Accept**: application/json
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
## test_notification_billing_billing_test_notification_post_0
|
|
623
|
+
|
|
624
|
+
> <Hash<String, ResponseTestNotificationBillingBillingTestNotificationPostValue>> test_notification_billing_billing_test_notification_post_0(request_body)
|
|
625
|
+
|
|
626
|
+
Test Notification
|
|
627
|
+
|
|
628
|
+
Envía un email de prueba de cambio de plan.
|
|
629
|
+
|
|
630
|
+
### Examples
|
|
631
|
+
|
|
632
|
+
```ruby
|
|
633
|
+
require 'time'
|
|
634
|
+
require 'mailsafepro'
|
|
635
|
+
# setup authorization
|
|
636
|
+
MailSafePro.configure do |config|
|
|
637
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
638
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
api_instance = MailSafePro::BillingApi.new
|
|
642
|
+
request_body = { key: 'inner_example'} # Hash<String, String> |
|
|
643
|
+
|
|
644
|
+
begin
|
|
645
|
+
# Test Notification
|
|
646
|
+
result = api_instance.test_notification_billing_billing_test_notification_post_0(request_body)
|
|
647
|
+
p result
|
|
648
|
+
rescue MailSafePro::ApiError => e
|
|
649
|
+
puts "Error when calling BillingApi->test_notification_billing_billing_test_notification_post_0: #{e}"
|
|
650
|
+
end
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
#### Using the test_notification_billing_billing_test_notification_post_0_with_http_info variant
|
|
654
|
+
|
|
655
|
+
This returns an Array which contains the response data, status code and headers.
|
|
656
|
+
|
|
657
|
+
> <Array(<Hash<String, ResponseTestNotificationBillingBillingTestNotificationPostValue>>, Integer, Hash)> test_notification_billing_billing_test_notification_post_0_with_http_info(request_body)
|
|
658
|
+
|
|
659
|
+
```ruby
|
|
660
|
+
begin
|
|
661
|
+
# Test Notification
|
|
662
|
+
data, status_code, headers = api_instance.test_notification_billing_billing_test_notification_post_0_with_http_info(request_body)
|
|
663
|
+
p status_code # => 2xx
|
|
664
|
+
p headers # => { ... }
|
|
665
|
+
p data # => <Hash<String, ResponseTestNotificationBillingBillingTestNotificationPostValue>>
|
|
666
|
+
rescue MailSafePro::ApiError => e
|
|
667
|
+
puts "Error when calling BillingApi->test_notification_billing_billing_test_notification_post_0_with_http_info: #{e}"
|
|
668
|
+
end
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
### Parameters
|
|
672
|
+
|
|
673
|
+
| Name | Type | Description | Notes |
|
|
674
|
+
| ---- | ---- | ----------- | ----- |
|
|
675
|
+
| **request_body** | [**Hash<String, String>**](String.md) | | |
|
|
676
|
+
|
|
677
|
+
### Return type
|
|
678
|
+
|
|
679
|
+
[**Hash<String, ResponseTestNotificationBillingBillingTestNotificationPostValue>**](ResponseTestNotificationBillingBillingTestNotificationPostValue.md)
|
|
680
|
+
|
|
681
|
+
### Authorization
|
|
682
|
+
|
|
683
|
+
[Bearer](../README.md#Bearer)
|
|
684
|
+
|
|
685
|
+
### HTTP request headers
|
|
686
|
+
|
|
687
|
+
- **Content-Type**: application/json
|
|
688
|
+
- **Accept**: application/json
|
|
689
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# MailSafePro::BodyChangePlanBillingBillingChangePlanPost
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **plan** | **String** | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'mailsafepro'
|
|
13
|
+
|
|
14
|
+
instance = MailSafePro::BodyChangePlanBillingBillingChangePlanPost.new(
|
|
15
|
+
plan: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|