emailguard_sdk 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.
Files changed (128) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +169 -0
  4. data/Rakefile +10 -0
  5. data/docs/BaseResponse.md +20 -0
  6. data/docs/BillingApi.md +85 -0
  7. data/docs/BillingUsageEvent.md +26 -0
  8. data/docs/BillingUsageItem.md +28 -0
  9. data/docs/BillingUsageResponse.md +22 -0
  10. data/docs/ChannelsApi.md +366 -0
  11. data/docs/CreateNotificationChannelInput.md +22 -0
  12. data/docs/CreateNotificationRuleInput.md +28 -0
  13. data/docs/EmailApi.md +72 -0
  14. data/docs/EmailDetectData.md +44 -0
  15. data/docs/EmailDetectResponse.md +22 -0
  16. data/docs/EventsApi.md +76 -0
  17. data/docs/GetNotificationChannelResponse.md +22 -0
  18. data/docs/GetNotificationChannelsResponse.md +22 -0
  19. data/docs/GetNotificationEventsResponse.md +22 -0
  20. data/docs/GetNotificationRulesResponse.md +22 -0
  21. data/docs/GetPublicTeamResponse.md +22 -0
  22. data/docs/IdDataResponse.md +22 -0
  23. data/docs/IdDataStruct.md +18 -0
  24. data/docs/InviteTeamMemberInput.md +20 -0
  25. data/docs/InvitesApi.md +220 -0
  26. data/docs/ListPublicTeamInvitesResponse.md +22 -0
  27. data/docs/ListPublicTeamMembersResponse.md +22 -0
  28. data/docs/MembersApi.md +222 -0
  29. data/docs/MessageResponse.md +20 -0
  30. data/docs/NotificationChannelResponse.md +28 -0
  31. data/docs/NotificationRuleChannelInput.md +22 -0
  32. data/docs/NotificationRuleChannelResponse.md +28 -0
  33. data/docs/NotificationRuleResponse.md +32 -0
  34. data/docs/PublicTeamInviteResponse.md +24 -0
  35. data/docs/PublicTeamMemberResponse.md +34 -0
  36. data/docs/PublicTeamResponse.md +28 -0
  37. data/docs/RulesApi.md +294 -0
  38. data/docs/TeamsApi.md +148 -0
  39. data/docs/UpdateNotificationChannelInput.md +20 -0
  40. data/docs/UpdateNotificationRuleInput.md +28 -0
  41. data/docs/UpdateTeamInput.md +24 -0
  42. data/docs/UpdateTeamMemberInput.md +22 -0
  43. data/emailguard_sdk.gemspec +39 -0
  44. data/git_push.sh +57 -0
  45. data/lib/emailguard_sdk/api/billing_api.rb +92 -0
  46. data/lib/emailguard_sdk/api/channels_api.rb +347 -0
  47. data/lib/emailguard_sdk/api/email_api.rb +86 -0
  48. data/lib/emailguard_sdk/api/events_api.rb +79 -0
  49. data/lib/emailguard_sdk/api/invites_api.rb +210 -0
  50. data/lib/emailguard_sdk/api/members_api.rb +216 -0
  51. data/lib/emailguard_sdk/api/rules_api.rb +284 -0
  52. data/lib/emailguard_sdk/api/teams_api.rb +147 -0
  53. data/lib/emailguard_sdk/api_client.rb +397 -0
  54. data/lib/emailguard_sdk/api_error.rb +58 -0
  55. data/lib/emailguard_sdk/api_model_base.rb +88 -0
  56. data/lib/emailguard_sdk/configuration.rb +322 -0
  57. data/lib/emailguard_sdk/models/base_response.rb +175 -0
  58. data/lib/emailguard_sdk/models/billing_usage_event.rb +268 -0
  59. data/lib/emailguard_sdk/models/billing_usage_item.rb +262 -0
  60. data/lib/emailguard_sdk/models/billing_usage_response.rb +186 -0
  61. data/lib/emailguard_sdk/models/create_notification_channel_input.rb +204 -0
  62. data/lib/emailguard_sdk/models/create_notification_rule_input.rb +264 -0
  63. data/lib/emailguard_sdk/models/email_detect_data.rb +266 -0
  64. data/lib/emailguard_sdk/models/email_detect_response.rb +184 -0
  65. data/lib/emailguard_sdk/models/get_notification_channel_response.rb +184 -0
  66. data/lib/emailguard_sdk/models/get_notification_channels_response.rb +186 -0
  67. data/lib/emailguard_sdk/models/get_notification_events_response.rb +186 -0
  68. data/lib/emailguard_sdk/models/get_notification_rules_response.rb +186 -0
  69. data/lib/emailguard_sdk/models/get_public_team_response.rb +184 -0
  70. data/lib/emailguard_sdk/models/id_data_response.rb +184 -0
  71. data/lib/emailguard_sdk/models/id_data_struct.rb +148 -0
  72. data/lib/emailguard_sdk/models/invite_team_member_input.rb +192 -0
  73. data/lib/emailguard_sdk/models/list_public_team_invites_response.rb +186 -0
  74. data/lib/emailguard_sdk/models/list_public_team_members_response.rb +186 -0
  75. data/lib/emailguard_sdk/models/message_response.rb +175 -0
  76. data/lib/emailguard_sdk/models/notification_channel_response.rb +200 -0
  77. data/lib/emailguard_sdk/models/notification_rule_channel_input.rb +168 -0
  78. data/lib/emailguard_sdk/models/notification_rule_channel_response.rb +198 -0
  79. data/lib/emailguard_sdk/models/notification_rule_response.rb +224 -0
  80. data/lib/emailguard_sdk/models/public_team_invite_response.rb +246 -0
  81. data/lib/emailguard_sdk/models/public_team_member_response.rb +347 -0
  82. data/lib/emailguard_sdk/models/public_team_response.rb +198 -0
  83. data/lib/emailguard_sdk/models/update_notification_channel_input.rb +160 -0
  84. data/lib/emailguard_sdk/models/update_notification_rule_input.rb +204 -0
  85. data/lib/emailguard_sdk/models/update_team_input.rb +195 -0
  86. data/lib/emailguard_sdk/models/update_team_member_input.rb +185 -0
  87. data/lib/emailguard_sdk/version.rb +15 -0
  88. data/lib/emailguard_sdk.rb +78 -0
  89. data/spec/api/billing_api_spec.rb +49 -0
  90. data/spec/api/channels_api_spec.rb +95 -0
  91. data/spec/api/email_api_spec.rb +47 -0
  92. data/spec/api/events_api_spec.rb +46 -0
  93. data/spec/api/invites_api_spec.rb +70 -0
  94. data/spec/api/members_api_spec.rb +71 -0
  95. data/spec/api/rules_api_spec.rb +83 -0
  96. data/spec/api/teams_api_spec.rb +58 -0
  97. data/spec/models/base_response_spec.rb +42 -0
  98. data/spec/models/billing_usage_event_spec.rb +60 -0
  99. data/spec/models/billing_usage_item_spec.rb +66 -0
  100. data/spec/models/billing_usage_response_spec.rb +48 -0
  101. data/spec/models/create_notification_channel_input_spec.rb +48 -0
  102. data/spec/models/create_notification_rule_input_spec.rb +66 -0
  103. data/spec/models/email_detect_data_spec.rb +114 -0
  104. data/spec/models/email_detect_response_spec.rb +48 -0
  105. data/spec/models/get_notification_channel_response_spec.rb +48 -0
  106. data/spec/models/get_notification_channels_response_spec.rb +48 -0
  107. data/spec/models/get_notification_events_response_spec.rb +48 -0
  108. data/spec/models/get_notification_rules_response_spec.rb +48 -0
  109. data/spec/models/get_public_team_response_spec.rb +48 -0
  110. data/spec/models/id_data_response_spec.rb +48 -0
  111. data/spec/models/id_data_struct_spec.rb +36 -0
  112. data/spec/models/invite_team_member_input_spec.rb +42 -0
  113. data/spec/models/list_public_team_invites_response_spec.rb +48 -0
  114. data/spec/models/list_public_team_members_response_spec.rb +48 -0
  115. data/spec/models/message_response_spec.rb +42 -0
  116. data/spec/models/notification_channel_response_spec.rb +66 -0
  117. data/spec/models/notification_rule_channel_input_spec.rb +48 -0
  118. data/spec/models/notification_rule_channel_response_spec.rb +66 -0
  119. data/spec/models/notification_rule_response_spec.rb +78 -0
  120. data/spec/models/public_team_invite_response_spec.rb +54 -0
  121. data/spec/models/public_team_member_response_spec.rb +84 -0
  122. data/spec/models/public_team_response_spec.rb +66 -0
  123. data/spec/models/update_notification_channel_input_spec.rb +42 -0
  124. data/spec/models/update_notification_rule_input_spec.rb +66 -0
  125. data/spec/models/update_team_input_spec.rb +54 -0
  126. data/spec/models/update_team_member_input_spec.rb +48 -0
  127. data/spec/spec_helper.rb +111 -0
  128. metadata +251 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 33f133b489991ffce4efa4f9275120b4a4c0ca71637a397b2289a5d11367fe80
4
+ data.tar.gz: 47f9e45fbf7940df7eaedeab0771a899af7f8481a8220ad323f72706ed4495a7
5
+ SHA512:
6
+ metadata.gz: f70fb0998aaa866c185e82719c4a07cfa2626ebf130afb59ce582f616ab60272c67db4e9a237a5cd9157212536dbb3d0ffb00e2f7e4bb00109b4d8fd100f02a6
7
+ data.tar.gz: 78b789290088d57e92dd95fc80ac3499efff1734ed919f05c3591e269158ba8e191ae79885bfb6d8a439d4e46c876be037f469294b773bac69f50ad85a76f231
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md ADDED
@@ -0,0 +1,169 @@
1
+ # emailguard_sdk
2
+
3
+ Emailguard - the Ruby gem for the EmailGuard Public API
4
+
5
+ Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
6
+
7
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
+
9
+ - API version: 1.0
10
+ - Package version: 1.0.0
11
+ - Generator version: 7.23.0
12
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
13
+ For more information, please visit [https://emailguard.co](https://emailguard.co)
14
+
15
+ ## Installation
16
+
17
+ ### Build a gem
18
+
19
+ To build the Ruby code into a gem:
20
+
21
+ ```shell
22
+ gem build emailguard_sdk.gemspec
23
+ ```
24
+
25
+ Then either install the gem locally:
26
+
27
+ ```shell
28
+ gem install ./emailguard_sdk-1.0.0.gem
29
+ ```
30
+
31
+ (for development, run `gem install --dev ./emailguard_sdk-1.0.0.gem` to install the development dependencies)
32
+
33
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
34
+
35
+ Finally add this to the Gemfile:
36
+
37
+ gem 'emailguard_sdk', '~> 1.0.0'
38
+
39
+ ### Install from Git
40
+
41
+ If the Ruby gem is hosted at a git repository: https://github.com/emailguard/emailguard-ruby, then add the following in the Gemfile:
42
+
43
+ gem 'emailguard_sdk', :git => 'https://github.com/emailguard/emailguard-ruby.git'
44
+
45
+ ### Include the Ruby code directly
46
+
47
+ Include the Ruby code directly using `-I` as follows:
48
+
49
+ ```shell
50
+ ruby -Ilib script.rb
51
+ ```
52
+
53
+ ## Getting Started
54
+
55
+ Please follow the [installation](#installation) procedure and then run the following code:
56
+
57
+ ```ruby
58
+ # Load the gem
59
+ require 'emailguard_sdk'
60
+
61
+ # Setup authorization
62
+ Emailguard.configure do |config|
63
+ # Configure API key authorization: ApiKeyAuth
64
+ config.api_key['Authorization'] = 'YOUR API KEY'
65
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
66
+ # config.api_key_prefix['Authorization'] = 'Bearer'
67
+ end
68
+
69
+ api_instance = Emailguard::BillingApi.new
70
+ opts = {
71
+ range: 'current', # String | Period selector: current, previous, or custom
72
+ start: 'start_example', # String | Custom range start (RFC3339 or YYYY-MM-DD); required when range=custom
73
+ _end: '_end_example' # String | Custom range end (RFC3339 or YYYY-MM-DD); required when range=custom
74
+ }
75
+
76
+ begin
77
+ #Get billing usage
78
+ result = api_instance.api_v1_team_billing_usage_get(opts)
79
+ p result
80
+ rescue Emailguard::ApiError => e
81
+ puts "Exception when calling BillingApi->api_v1_team_billing_usage_get: #{e}"
82
+ end
83
+
84
+ ```
85
+
86
+ ## Documentation for API Endpoints
87
+
88
+ All URIs are relative to *http://api.emailguard.co*
89
+
90
+ Class | Method | HTTP request | Description
91
+ ------------ | ------------- | ------------- | -------------
92
+ *Emailguard::BillingApi* | [**api_v1_team_billing_usage_get**](docs/BillingApi.md#api_v1_team_billing_usage_get) | **GET** /api/v1/team/billing/usage | Get billing usage
93
+ *Emailguard::ChannelsApi* | [**api_v1_team_notifications_channels_channel_id_delete**](docs/ChannelsApi.md#api_v1_team_notifications_channels_channel_id_delete) | **DELETE** /api/v1/team/notifications/channels/{channelId} | Delete notification channel
94
+ *Emailguard::ChannelsApi* | [**api_v1_team_notifications_channels_channel_id_put**](docs/ChannelsApi.md#api_v1_team_notifications_channels_channel_id_put) | **PUT** /api/v1/team/notifications/channels/{channelId} | Update notification channel
95
+ *Emailguard::ChannelsApi* | [**api_v1_team_notifications_channels_channel_id_test_post**](docs/ChannelsApi.md#api_v1_team_notifications_channels_channel_id_test_post) | **POST** /api/v1/team/notifications/channels/{channelId}/test | Test notification channel
96
+ *Emailguard::ChannelsApi* | [**api_v1_team_notifications_channels_get**](docs/ChannelsApi.md#api_v1_team_notifications_channels_get) | **GET** /api/v1/team/notifications/channels | List notification channels
97
+ *Emailguard::ChannelsApi* | [**api_v1_team_notifications_channels_post**](docs/ChannelsApi.md#api_v1_team_notifications_channels_post) | **POST** /api/v1/team/notifications/channels | Create notification channel
98
+ *Emailguard::EmailApi* | [**api_v1_emails_detect_get**](docs/EmailApi.md#api_v1_emails_detect_get) | **GET** /api/v1/emails/detect | Detect email characteristics
99
+ *Emailguard::EventsApi* | [**api_v1_team_notifications_events_get**](docs/EventsApi.md#api_v1_team_notifications_events_get) | **GET** /api/v1/team/notifications/events | List notification events
100
+ *Emailguard::InvitesApi* | [**api_v1_team_members_invites_get**](docs/InvitesApi.md#api_v1_team_members_invites_get) | **GET** /api/v1/team/members/invites | List pending team invites
101
+ *Emailguard::InvitesApi* | [**api_v1_team_members_invites_invite_id_delete**](docs/InvitesApi.md#api_v1_team_members_invites_invite_id_delete) | **DELETE** /api/v1/team/members/invites/{inviteId} | Cancel a pending invite
102
+ *Emailguard::InvitesApi* | [**api_v1_team_members_invites_post**](docs/InvitesApi.md#api_v1_team_members_invites_post) | **POST** /api/v1/team/members/invites | Invite a team member
103
+ *Emailguard::MembersApi* | [**api_v1_team_members_get**](docs/MembersApi.md#api_v1_team_members_get) | **GET** /api/v1/team/members | List team members
104
+ *Emailguard::MembersApi* | [**api_v1_team_members_user_id_delete**](docs/MembersApi.md#api_v1_team_members_user_id_delete) | **DELETE** /api/v1/team/members/{userId} | Remove a team member
105
+ *Emailguard::MembersApi* | [**api_v1_team_members_user_id_patch**](docs/MembersApi.md#api_v1_team_members_user_id_patch) | **PATCH** /api/v1/team/members/{userId} | Update a team member role
106
+ *Emailguard::RulesApi* | [**api_v1_team_notifications_rules_get**](docs/RulesApi.md#api_v1_team_notifications_rules_get) | **GET** /api/v1/team/notifications/rules | List notification rules
107
+ *Emailguard::RulesApi* | [**api_v1_team_notifications_rules_post**](docs/RulesApi.md#api_v1_team_notifications_rules_post) | **POST** /api/v1/team/notifications/rules | Create notification rule
108
+ *Emailguard::RulesApi* | [**api_v1_team_notifications_rules_rule_id_delete**](docs/RulesApi.md#api_v1_team_notifications_rules_rule_id_delete) | **DELETE** /api/v1/team/notifications/rules/{ruleId} | Delete notification rule
109
+ *Emailguard::RulesApi* | [**api_v1_team_notifications_rules_rule_id_put**](docs/RulesApi.md#api_v1_team_notifications_rules_rule_id_put) | **PUT** /api/v1/team/notifications/rules/{ruleId} | Update notification rule
110
+ *Emailguard::TeamsApi* | [**api_v1_team_get**](docs/TeamsApi.md#api_v1_team_get) | **GET** /api/v1/team | Get team
111
+ *Emailguard::TeamsApi* | [**api_v1_team_patch**](docs/TeamsApi.md#api_v1_team_patch) | **PATCH** /api/v1/team | Update team
112
+
113
+
114
+ ## Documentation for Models
115
+
116
+ - [Emailguard::BaseResponse](docs/BaseResponse.md)
117
+ - [Emailguard::BillingUsageEvent](docs/BillingUsageEvent.md)
118
+ - [Emailguard::BillingUsageItem](docs/BillingUsageItem.md)
119
+ - [Emailguard::BillingUsageResponse](docs/BillingUsageResponse.md)
120
+ - [Emailguard::CreateNotificationChannelInput](docs/CreateNotificationChannelInput.md)
121
+ - [Emailguard::CreateNotificationRuleInput](docs/CreateNotificationRuleInput.md)
122
+ - [Emailguard::EmailDetectData](docs/EmailDetectData.md)
123
+ - [Emailguard::EmailDetectResponse](docs/EmailDetectResponse.md)
124
+ - [Emailguard::GetNotificationChannelResponse](docs/GetNotificationChannelResponse.md)
125
+ - [Emailguard::GetNotificationChannelsResponse](docs/GetNotificationChannelsResponse.md)
126
+ - [Emailguard::GetNotificationEventsResponse](docs/GetNotificationEventsResponse.md)
127
+ - [Emailguard::GetNotificationRulesResponse](docs/GetNotificationRulesResponse.md)
128
+ - [Emailguard::GetPublicTeamResponse](docs/GetPublicTeamResponse.md)
129
+ - [Emailguard::IdDataResponse](docs/IdDataResponse.md)
130
+ - [Emailguard::IdDataStruct](docs/IdDataStruct.md)
131
+ - [Emailguard::InviteTeamMemberInput](docs/InviteTeamMemberInput.md)
132
+ - [Emailguard::ListPublicTeamInvitesResponse](docs/ListPublicTeamInvitesResponse.md)
133
+ - [Emailguard::ListPublicTeamMembersResponse](docs/ListPublicTeamMembersResponse.md)
134
+ - [Emailguard::MessageResponse](docs/MessageResponse.md)
135
+ - [Emailguard::NotificationChannelResponse](docs/NotificationChannelResponse.md)
136
+ - [Emailguard::NotificationRuleChannelInput](docs/NotificationRuleChannelInput.md)
137
+ - [Emailguard::NotificationRuleChannelResponse](docs/NotificationRuleChannelResponse.md)
138
+ - [Emailguard::NotificationRuleResponse](docs/NotificationRuleResponse.md)
139
+ - [Emailguard::PublicTeamInviteResponse](docs/PublicTeamInviteResponse.md)
140
+ - [Emailguard::PublicTeamMemberResponse](docs/PublicTeamMemberResponse.md)
141
+ - [Emailguard::PublicTeamResponse](docs/PublicTeamResponse.md)
142
+ - [Emailguard::UpdateNotificationChannelInput](docs/UpdateNotificationChannelInput.md)
143
+ - [Emailguard::UpdateNotificationRuleInput](docs/UpdateNotificationRuleInput.md)
144
+ - [Emailguard::UpdateTeamInput](docs/UpdateTeamInput.md)
145
+ - [Emailguard::UpdateTeamMemberInput](docs/UpdateTeamMemberInput.md)
146
+
147
+
148
+ ## Documentation for Authorization
149
+
150
+
151
+ Authentication schemes defined for the API:
152
+ ### ApiKeyAuth
153
+
154
+
155
+ - **Type**: API key
156
+ - **API key parameter name**: Authorization
157
+ - **Location**: HTTP header
158
+
159
+ ### BasicAuth
160
+
161
+ - **Type**: HTTP basic authentication
162
+
163
+ ### BearerAuth
164
+
165
+
166
+ - **Type**: API key
167
+ - **API key parameter name**: Authorization
168
+ - **Location**: HTTP header
169
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,20 @@
1
+ # Emailguard::BaseResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **String** | Machine-readable status code (for example OK or INVALID_BODY). | |
8
+ | **message** | **String** | Human-readable detail when the code is not OK. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'emailguard_sdk'
14
+
15
+ instance = Emailguard::BaseResponse.new(
16
+ code: null,
17
+ message: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,85 @@
1
+ # Emailguard::BillingApi
2
+
3
+ All URIs are relative to *http://api.emailguard.co*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**api_v1_team_billing_usage_get**](BillingApi.md#api_v1_team_billing_usage_get) | **GET** /api/v1/team/billing/usage | Get billing usage |
8
+
9
+
10
+ ## api_v1_team_billing_usage_get
11
+
12
+ > <BillingUsageResponse> api_v1_team_billing_usage_get(opts)
13
+
14
+ Get billing usage
15
+
16
+ Returns metered feature usage for the team's billing period. Defaults to the current period; use `range=previous` or `range=custom` with `start` and `end` to query other windows.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'emailguard_sdk'
23
+ # setup authorization
24
+ Emailguard.configure do |config|
25
+ # Configure API key authorization: ApiKeyAuth
26
+ config.api_key['Authorization'] = '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['Authorization'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = Emailguard::BillingApi.new
32
+ opts = {
33
+ range: 'current', # String | Period selector: current, previous, or custom
34
+ start: 'start_example', # String | Custom range start (RFC3339 or YYYY-MM-DD); required when range=custom
35
+ _end: '_end_example' # String | Custom range end (RFC3339 or YYYY-MM-DD); required when range=custom
36
+ }
37
+
38
+ begin
39
+ # Get billing usage
40
+ result = api_instance.api_v1_team_billing_usage_get(opts)
41
+ p result
42
+ rescue Emailguard::ApiError => e
43
+ puts "Error when calling BillingApi->api_v1_team_billing_usage_get: #{e}"
44
+ end
45
+ ```
46
+
47
+ #### Using the api_v1_team_billing_usage_get_with_http_info variant
48
+
49
+ This returns an Array which contains the response data, status code and headers.
50
+
51
+ > <Array(<BillingUsageResponse>, Integer, Hash)> api_v1_team_billing_usage_get_with_http_info(opts)
52
+
53
+ ```ruby
54
+ begin
55
+ # Get billing usage
56
+ data, status_code, headers = api_instance.api_v1_team_billing_usage_get_with_http_info(opts)
57
+ p status_code # => 2xx
58
+ p headers # => { ... }
59
+ p data # => <BillingUsageResponse>
60
+ rescue Emailguard::ApiError => e
61
+ puts "Error when calling BillingApi->api_v1_team_billing_usage_get_with_http_info: #{e}"
62
+ end
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **range** | **String** | Period selector: current, previous, or custom | [optional] |
70
+ | **start** | **String** | Custom range start (RFC3339 or YYYY-MM-DD); required when range&#x3D;custom | [optional] |
71
+ | **_end** | **String** | Custom range end (RFC3339 or YYYY-MM-DD); required when range&#x3D;custom | [optional] |
72
+
73
+ ### Return type
74
+
75
+ [**BillingUsageResponse**](BillingUsageResponse.md)
76
+
77
+ ### Authorization
78
+
79
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
80
+
81
+ ### HTTP request headers
82
+
83
+ - **Content-Type**: Not defined
84
+ - **Accept**: application/json
85
+
@@ -0,0 +1,26 @@
1
+ # Emailguard::BillingUsageEvent
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **delta** | **Integer** | | |
8
+ | **event_type** | **String** | | |
9
+ | **metadata** | **String** | | |
10
+ | **usage_after** | **Integer** | | |
11
+ | **usage_before** | **Integer** | | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'emailguard_sdk'
17
+
18
+ instance = Emailguard::BillingUsageEvent.new(
19
+ delta: null,
20
+ event_type: null,
21
+ metadata: null,
22
+ usage_after: null,
23
+ usage_before: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,28 @@
1
+ # Emailguard::BillingUsageItem
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **events** | [**Array&lt;BillingUsageEvent&gt;**](BillingUsageEvent.md) | | [optional] |
8
+ | **feature_key** | **String** | | |
9
+ | **limit** | **Integer** | | [optional] |
10
+ | **period_end** | **String** | | |
11
+ | **period_start** | **String** | | |
12
+ | **usage** | **Integer** | | |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'emailguard_sdk'
18
+
19
+ instance = Emailguard::BillingUsageItem.new(
20
+ events: null,
21
+ feature_key: null,
22
+ limit: null,
23
+ period_end: null,
24
+ period_start: null,
25
+ usage: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,22 @@
1
+ # Emailguard::BillingUsageResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **String** | Machine-readable status code (for example OK or INVALID_BODY). | |
8
+ | **data** | [**Array&lt;BillingUsageItem&gt;**](BillingUsageItem.md) | | [optional] |
9
+ | **message** | **String** | Human-readable detail when the code is not OK. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'emailguard_sdk'
15
+
16
+ instance = Emailguard::BillingUsageResponse.new(
17
+ code: null,
18
+ data: null,
19
+ message: null
20
+ )
21
+ ```
22
+