pingram 0.1.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/README.md +54 -0
- data/Rakefile +10 -0
- data/lib/pingram/api/account_api.rb +506 -0
- data/lib/pingram/api/addresses_api.rb +209 -0
- data/lib/pingram/api/components_api.rb +396 -0
- data/lib/pingram/api/default_api.rb +88 -0
- data/lib/pingram/api/domains_api.rb +204 -0
- data/lib/pingram/api/editor_api.rb +88 -0
- data/lib/pingram/api/environments_api.rb +215 -0
- data/lib/pingram/api/health_api.rb +77 -0
- data/lib/pingram/api/insights_api.rb +88 -0
- data/lib/pingram/api/keys_api.rb +204 -0
- data/lib/pingram/api/logs_api.rb +375 -0
- data/lib/pingram/api/members_api.rb +433 -0
- data/lib/pingram/api/sender_api.rb +221 -0
- data/lib/pingram/api/templates_api.rb +479 -0
- data/lib/pingram/api/types_api.rb +335 -0
- data/lib/pingram/api/user_api.rb +587 -0
- data/lib/pingram/api/users_api.rb +228 -0
- data/lib/pingram/api_client.rb +397 -0
- data/lib/pingram/api_error.rb +58 -0
- data/lib/pingram/api_model_base.rb +88 -0
- data/lib/pingram/client_wrapper.rb +212 -0
- data/lib/pingram/configuration.rb +330 -0
- data/lib/pingram/models/account_addresses_response.rb +166 -0
- data/lib/pingram/models/account_addresses_response_addresses_inner.rb +301 -0
- data/lib/pingram/models/account_get_response.rb +354 -0
- data/lib/pingram/models/account_get_response_pending_downgrade_usage_limit.rb +201 -0
- data/lib/pingram/models/address_response.rb +164 -0
- data/lib/pingram/models/auto_join_get_response.rb +192 -0
- data/lib/pingram/models/auto_join_post_response.rb +192 -0
- data/lib/pingram/models/auto_join_request_body.rb +166 -0
- data/lib/pingram/models/bee_token_v2.rb +190 -0
- data/lib/pingram/models/billing_post_request_body.rb +216 -0
- data/lib/pingram/models/billing_post_response_body.rb +367 -0
- data/lib/pingram/models/billing_post_response_body_pending_downgrade_usage_limit.rb +202 -0
- data/lib/pingram/models/channels_enum.rb +45 -0
- data/lib/pingram/models/create_account_request_body.rb +164 -0
- data/lib/pingram/models/create_account_response.rb +190 -0
- data/lib/pingram/models/create_address_request.rb +182 -0
- data/lib/pingram/models/create_key_request.rb +227 -0
- data/lib/pingram/models/create_key_response.rb +308 -0
- data/lib/pingram/models/delete_key_response.rb +165 -0
- data/lib/pingram/models/delete_user_response.rb +164 -0
- data/lib/pingram/models/email_auth_token_post_request.rb +147 -0
- data/lib/pingram/models/email_component_patch_request.rb +174 -0
- data/lib/pingram/models/email_component_post_request.rb +217 -0
- data/lib/pingram/models/email_component_response.rb +424 -0
- data/lib/pingram/models/email_component_response_referenced_by_inner.rb +238 -0
- data/lib/pingram/models/environment.rb +270 -0
- data/lib/pingram/models/environment_create_request.rb +164 -0
- data/lib/pingram/models/environment_patch_request.rb +176 -0
- data/lib/pingram/models/get_account_metadata_response.rb +164 -0
- data/lib/pingram/models/get_account_metadata_response_user_account_metadata.rb +216 -0
- data/lib/pingram/models/get_email_components_response_inner.rb +424 -0
- data/lib/pingram/models/get_environments_response_inner.rb +270 -0
- data/lib/pingram/models/get_inapp_notifications_response.rb +166 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner.rb +389 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options.rb +206 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_instant.rb +191 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_off.rb +164 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_replies_inner.rb +190 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template.rb +103 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template_any_of.rb +301 -0
- data/lib/pingram/models/get_keys_response.rb +168 -0
- data/lib/pingram/models/get_keys_response_keys_inner.rb +371 -0
- data/lib/pingram/models/get_logs_response.rb +175 -0
- data/lib/pingram/models/get_logs_response_messages_inner.rb +419 -0
- data/lib/pingram/models/get_logs_response_messages_inner_attachments_inner.rb +225 -0
- data/lib/pingram/models/get_members_response_inner.rb +236 -0
- data/lib/pingram/models/get_metrics_response_inner.rb +238 -0
- data/lib/pingram/models/get_metrics_response_inner_messages_inner.rb +159 -0
- data/lib/pingram/models/get_notifications_response_inner.rb +317 -0
- data/lib/pingram/models/get_notifications_response_inner_deduplication.rb +164 -0
- data/lib/pingram/models/get_notifications_response_inner_options.rb +201 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email.rb +242 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email_daily.rb +173 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email_monthly.rb +216 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email_weekly.rb +182 -0
- data/lib/pingram/models/get_notifications_response_inner_templates_inner.rb +214 -0
- data/lib/pingram/models/get_notifications_response_inner_throttling.rb +294 -0
- data/lib/pingram/models/get_senders_response_inner.rb +342 -0
- data/lib/pingram/models/get_templates_response.rb +103 -0
- data/lib/pingram/models/get_users_response.rb +201 -0
- data/lib/pingram/models/get_users_response_users_inner.rb +268 -0
- data/lib/pingram/models/get_users_response_users_inner_email_suppression_status.rb +214 -0
- data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner.rb +252 -0
- data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner_device.rb +209 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token.rb +317 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_authed_user.rb +192 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_enterprise.rb +156 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_incoming_webhook.rb +174 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_response_metadata.rb +200 -0
- data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner.rb +164 -0
- data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub.rb +191 -0
- data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub_keys.rb +190 -0
- data/lib/pingram/models/in_app_notification_patch_request.rb +231 -0
- data/lib/pingram/models/in_app_notification_unread_clear_request.rb +156 -0
- data/lib/pingram/models/inapp_unread_count_response.rb +164 -0
- data/lib/pingram/models/inbound_request_body.rb +103 -0
- data/lib/pingram/models/inbound_response_body.rb +216 -0
- data/lib/pingram/models/inbound_response_body_results_inner.rb +216 -0
- data/lib/pingram/models/ingishts_post_request.rb +288 -0
- data/lib/pingram/models/ingishts_post_request_label_options.rb +147 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner.rb +208 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat.rb +211 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric.rb +171 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric_dimensions_inner.rb +159 -0
- data/lib/pingram/models/intercom_webhook.rb +293 -0
- data/lib/pingram/models/intercom_webhook_data.rb +164 -0
- data/lib/pingram/models/intercom_webhook_data_item.rb +103 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of.rb +453 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts.rb +216 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts_contacts_inner.rb +199 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_source.rb +260 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_source_author.rb +208 -0
- data/lib/pingram/models/invite_post_response.rb +156 -0
- data/lib/pingram/models/log_query_post_body.rb +251 -0
- data/lib/pingram/models/logs_bulk_request.rb +167 -0
- data/lib/pingram/models/logs_get_response.rb +167 -0
- data/lib/pingram/models/logs_get_response_logs_inner.rb +1808 -0
- data/lib/pingram/models/logs_query_response.rb +165 -0
- data/lib/pingram/models/logs_query_result_response.rb +194 -0
- data/lib/pingram/models/logs_retention_response.rb +165 -0
- data/lib/pingram/models/logs_tail_response.rb +167 -0
- data/lib/pingram/models/member_invite_request.rb +173 -0
- data/lib/pingram/models/member_update_request.rb +164 -0
- data/lib/pingram/models/message_response.rb +164 -0
- data/lib/pingram/models/notification.rb +317 -0
- data/lib/pingram/models/notification_create_request.rb +227 -0
- data/lib/pingram/models/notification_patch_request.rb +203 -0
- data/lib/pingram/models/post_email_test_request.rb +303 -0
- data/lib/pingram/models/post_email_test_response.rb +175 -0
- data/lib/pingram/models/post_senders_request_body.rb +164 -0
- data/lib/pingram/models/post_user_request.rb +215 -0
- data/lib/pingram/models/sender_post_body.rb +324 -0
- data/lib/pingram/models/sender_post_body_email.rb +217 -0
- data/lib/pingram/models/sender_post_body_inapp.rb +182 -0
- data/lib/pingram/models/sender_post_body_mobile_push.rb +190 -0
- data/lib/pingram/models/sender_post_body_options.rb +165 -0
- data/lib/pingram/models/sender_post_body_options_apn.rb +201 -0
- data/lib/pingram/models/sender_post_body_options_email.rb +209 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner.rb +103 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of.rb +190 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of1.rb +199 -0
- data/lib/pingram/models/sender_post_body_options_fcm.rb +147 -0
- data/lib/pingram/models/sender_post_body_options_fcm_android.rb +208 -0
- data/lib/pingram/models/sender_post_body_slack.rb +299 -0
- data/lib/pingram/models/sender_post_body_slack_metadata.rb +173 -0
- data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner.rb +257 -0
- data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner_external_ref.rb +174 -0
- data/lib/pingram/models/sender_post_body_sms.rb +156 -0
- data/lib/pingram/models/sender_post_body_sms_auto_reply.rb +164 -0
- data/lib/pingram/models/sender_post_body_to.rb +251 -0
- data/lib/pingram/models/sender_post_body_user.rb +268 -0
- data/lib/pingram/models/sender_post_body_web_push.rb +208 -0
- data/lib/pingram/models/sender_post_response.rb +192 -0
- data/lib/pingram/models/set_default_template_request.rb +204 -0
- data/lib/pingram/models/slack_interactivity_response.rb +165 -0
- data/lib/pingram/models/slack_oauth_request.rb +190 -0
- data/lib/pingram/models/success_response.rb +164 -0
- data/lib/pingram/models/supabase_configure_request.rb +242 -0
- data/lib/pingram/models/supabase_configure_response.rb +173 -0
- data/lib/pingram/models/supabase_o_auth_request.rb +216 -0
- data/lib/pingram/models/supabase_o_auth_response.rb +173 -0
- data/lib/pingram/models/supabase_projects_response.rb +166 -0
- data/lib/pingram/models/supabase_projects_response_projects_inner.rb +268 -0
- data/lib/pingram/models/supabase_status_response.rb +208 -0
- data/lib/pingram/models/template.rb +301 -0
- data/lib/pingram/models/template_patch_request.rb +104 -0
- data/lib/pingram/models/template_patch_request_any_of.rb +199 -0
- data/lib/pingram/models/template_patch_request_any_of1.rb +187 -0
- data/lib/pingram/models/template_patch_request_any_of1_batch.rb +217 -0
- data/lib/pingram/models/template_patch_request_any_of1_instant.rb +184 -0
- data/lib/pingram/models/template_post_request.rb +346 -0
- data/lib/pingram/models/template_post_request_batch.rb +217 -0
- data/lib/pingram/models/template_post_request_instant.rb +183 -0
- data/lib/pingram/models/update_address_request.rb +182 -0
- data/lib/pingram/models/user.rb +268 -0
- data/lib/pingram/models/user_suppression_delete_response.rb +164 -0
- data/lib/pingram/models/webhook_response.rb +182 -0
- data/lib/pingram/version.rb +15 -0
- data/lib/pingram.rb +215 -0
- data/pingram.gemspec +38 -0
- metadata +270 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 0c951aa3cd438ee832684fd8f74b0f390ec1e7f53cc4e70f858227c2cbbafe63
|
|
4
|
+
data.tar.gz: bf75873543f652a29338ab32953f3634bd43ee37f1678ef481198967a68415ef
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 791ddbbde1279750fb20c0cac0619a65d07cbee88f419ac6d8def2f85eb856e09ac4f693646ae28b13d482740494d3d43a69c758b3b0bbbf0fa0796db1eaf5cd
|
|
7
|
+
data.tar.gz: af6dbb081bac9426f3dfdb67a613b981269fc9ffca2497b14f0673337a7729d3695e4237bbb50a5358de7ef488726ba6057aff61f89d375a1e726799f7e5580f
|
data/Gemfile
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# pingram
|
|
2
|
+
|
|
3
|
+
Official Ruby SDK for Pingram. Send notifications via Email, SMS, Push, In-App, and more from your server-side Ruby code.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Ruby 2.4+
|
|
8
|
+
- Dependencies: see the gem for details (e.g. faraday).
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
gem install pingram
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Or add to your `Gemfile`:
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
gem 'pingram'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then run `bundle install`.
|
|
23
|
+
|
|
24
|
+
## Quick start
|
|
25
|
+
|
|
26
|
+
Use **Pingram::Client** with your **API key**, then call `send(body)` or the namespaced APIs (`default_api`, `account`, `sender`, etc.).
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
require 'pingram'
|
|
30
|
+
|
|
31
|
+
client = Pingram::Client.new(api_key: 'pingram_sk_...')
|
|
32
|
+
|
|
33
|
+
# Send a notification (delegates to the default/sender API)
|
|
34
|
+
body = Pingram::SenderPostBody.new(
|
|
35
|
+
notification_id: 'your_notification_id',
|
|
36
|
+
to: { id: 'user_123' }
|
|
37
|
+
)
|
|
38
|
+
response = client.send(body)
|
|
39
|
+
|
|
40
|
+
# Or use namespaced APIs: client.default_api, client.account, client.sender, ...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
You can override the base URL: `Pingram::Client.new(api_key: '...', base_url: 'https://api.example.com')`.
|
|
44
|
+
|
|
45
|
+
## What can I call?
|
|
46
|
+
|
|
47
|
+
- **`client.send(body)`** – send a notification (high-level).
|
|
48
|
+
- **`client.domains`**, **`client.account`**, **`client.sender`**, etc. – low-level API objects with methods like `domains_list_domains`, `account_get_account_details`, `sender_test_email`, and so on.
|
|
49
|
+
|
|
50
|
+
For the full list of methods, see **API_REFERENCE.md** in the gem or [documentation](https://docs.pingram.io).
|
|
51
|
+
|
|
52
|
+
## Links
|
|
53
|
+
|
|
54
|
+
- [Documentation](https://docs.pingram.io)
|
data/Rakefile
ADDED
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#NotificationAPI
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Pingram
|
|
16
|
+
class AccountApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Configure SMTP settings for a Supabase project
|
|
23
|
+
# @param supabase_configure_request [SupabaseConfigureRequest]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [SupabaseConfigureResponse]
|
|
26
|
+
def account_configure_supabase_smtp(supabase_configure_request, opts = {})
|
|
27
|
+
data, _status_code, _headers = account_configure_supabase_smtp_with_http_info(supabase_configure_request, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Configure SMTP settings for a Supabase project
|
|
32
|
+
# @param supabase_configure_request [SupabaseConfigureRequest]
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(SupabaseConfigureResponse, Integer, Hash)>] SupabaseConfigureResponse data, response status code and response headers
|
|
35
|
+
def account_configure_supabase_smtp_with_http_info(supabase_configure_request, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_configure_supabase_smtp ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'supabase_configure_request' is set
|
|
40
|
+
if @api_client.config.client_side_validation && supabase_configure_request.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'supabase_configure_request' when calling AccountApi.account_configure_supabase_smtp"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/account/supabase/configure'
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
53
|
+
# HTTP header 'Content-Type'
|
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
55
|
+
if !content_type.nil?
|
|
56
|
+
header_params['Content-Type'] = content_type
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(supabase_configure_request)
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'SupabaseConfigureResponse'
|
|
67
|
+
|
|
68
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"AccountApi.account_configure_supabase_smtp",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: AccountApi#account_configure_supabase_smtp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Get account information for the authenticated user
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @return [AccountGetResponse]
|
|
91
|
+
def account_get_account_details(opts = {})
|
|
92
|
+
data, _status_code, _headers = account_get_account_details_with_http_info(opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Get account information for the authenticated user
|
|
97
|
+
# @param [Hash] opts the optional parameters
|
|
98
|
+
# @return [Array<(AccountGetResponse, Integer, Hash)>] AccountGetResponse data, response status code and response headers
|
|
99
|
+
def account_get_account_details_with_http_info(opts = {})
|
|
100
|
+
if @api_client.config.debugging
|
|
101
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_get_account_details ...'
|
|
102
|
+
end
|
|
103
|
+
# resource path
|
|
104
|
+
local_var_path = '/account'
|
|
105
|
+
|
|
106
|
+
# query parameters
|
|
107
|
+
query_params = opts[:query_params] || {}
|
|
108
|
+
|
|
109
|
+
# header parameters
|
|
110
|
+
header_params = opts[:header_params] || {}
|
|
111
|
+
# HTTP header 'Accept' (if needed)
|
|
112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
113
|
+
|
|
114
|
+
# form parameters
|
|
115
|
+
form_params = opts[:form_params] || {}
|
|
116
|
+
|
|
117
|
+
# http body (model)
|
|
118
|
+
post_body = opts[:debug_body]
|
|
119
|
+
|
|
120
|
+
# return_type
|
|
121
|
+
return_type = opts[:debug_return_type] || 'AccountGetResponse'
|
|
122
|
+
|
|
123
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
124
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
125
|
+
|
|
126
|
+
new_options = opts.merge(
|
|
127
|
+
:operation => :"AccountApi.account_get_account_details",
|
|
128
|
+
:header_params => header_params,
|
|
129
|
+
:query_params => query_params,
|
|
130
|
+
:form_params => form_params,
|
|
131
|
+
:body => post_body,
|
|
132
|
+
:auth_names => auth_names,
|
|
133
|
+
:return_type => return_type
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
137
|
+
if @api_client.config.debugging
|
|
138
|
+
@api_client.config.logger.debug "API called: AccountApi#account_get_account_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
139
|
+
end
|
|
140
|
+
return data, status_code, headers
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Get Supabase integration status for the account
|
|
144
|
+
# @param [Hash] opts the optional parameters
|
|
145
|
+
# @return [SupabaseStatusResponse]
|
|
146
|
+
def account_get_supabase_status(opts = {})
|
|
147
|
+
data, _status_code, _headers = account_get_supabase_status_with_http_info(opts)
|
|
148
|
+
data
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Get Supabase integration status for the account
|
|
152
|
+
# @param [Hash] opts the optional parameters
|
|
153
|
+
# @return [Array<(SupabaseStatusResponse, Integer, Hash)>] SupabaseStatusResponse data, response status code and response headers
|
|
154
|
+
def account_get_supabase_status_with_http_info(opts = {})
|
|
155
|
+
if @api_client.config.debugging
|
|
156
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_get_supabase_status ...'
|
|
157
|
+
end
|
|
158
|
+
# resource path
|
|
159
|
+
local_var_path = '/account/supabase/status'
|
|
160
|
+
|
|
161
|
+
# query parameters
|
|
162
|
+
query_params = opts[:query_params] || {}
|
|
163
|
+
|
|
164
|
+
# header parameters
|
|
165
|
+
header_params = opts[:header_params] || {}
|
|
166
|
+
# HTTP header 'Accept' (if needed)
|
|
167
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
168
|
+
|
|
169
|
+
# form parameters
|
|
170
|
+
form_params = opts[:form_params] || {}
|
|
171
|
+
|
|
172
|
+
# http body (model)
|
|
173
|
+
post_body = opts[:debug_body]
|
|
174
|
+
|
|
175
|
+
# return_type
|
|
176
|
+
return_type = opts[:debug_return_type] || 'SupabaseStatusResponse'
|
|
177
|
+
|
|
178
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
179
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
180
|
+
|
|
181
|
+
new_options = opts.merge(
|
|
182
|
+
:operation => :"AccountApi.account_get_supabase_status",
|
|
183
|
+
:header_params => header_params,
|
|
184
|
+
:query_params => query_params,
|
|
185
|
+
:form_params => form_params,
|
|
186
|
+
:body => post_body,
|
|
187
|
+
:auth_names => auth_names,
|
|
188
|
+
:return_type => return_type
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
192
|
+
if @api_client.config.debugging
|
|
193
|
+
@api_client.config.logger.debug "API called: AccountApi#account_get_supabase_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
194
|
+
end
|
|
195
|
+
return data, status_code, headers
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# List Supabase projects for the connected account
|
|
199
|
+
# @param [Hash] opts the optional parameters
|
|
200
|
+
# @return [SupabaseProjectsResponse]
|
|
201
|
+
def account_list_supabase_projects(opts = {})
|
|
202
|
+
data, _status_code, _headers = account_list_supabase_projects_with_http_info(opts)
|
|
203
|
+
data
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# List Supabase projects for the connected account
|
|
207
|
+
# @param [Hash] opts the optional parameters
|
|
208
|
+
# @return [Array<(SupabaseProjectsResponse, Integer, Hash)>] SupabaseProjectsResponse data, response status code and response headers
|
|
209
|
+
def account_list_supabase_projects_with_http_info(opts = {})
|
|
210
|
+
if @api_client.config.debugging
|
|
211
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_list_supabase_projects ...'
|
|
212
|
+
end
|
|
213
|
+
# resource path
|
|
214
|
+
local_var_path = '/account/supabase/projects'
|
|
215
|
+
|
|
216
|
+
# query parameters
|
|
217
|
+
query_params = opts[:query_params] || {}
|
|
218
|
+
|
|
219
|
+
# header parameters
|
|
220
|
+
header_params = opts[:header_params] || {}
|
|
221
|
+
# HTTP header 'Accept' (if needed)
|
|
222
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
223
|
+
|
|
224
|
+
# form parameters
|
|
225
|
+
form_params = opts[:form_params] || {}
|
|
226
|
+
|
|
227
|
+
# http body (model)
|
|
228
|
+
post_body = opts[:debug_body]
|
|
229
|
+
|
|
230
|
+
# return_type
|
|
231
|
+
return_type = opts[:debug_return_type] || 'SupabaseProjectsResponse'
|
|
232
|
+
|
|
233
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
234
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
235
|
+
|
|
236
|
+
new_options = opts.merge(
|
|
237
|
+
:operation => :"AccountApi.account_list_supabase_projects",
|
|
238
|
+
:header_params => header_params,
|
|
239
|
+
:query_params => query_params,
|
|
240
|
+
:form_params => form_params,
|
|
241
|
+
:body => post_body,
|
|
242
|
+
:auth_names => auth_names,
|
|
243
|
+
:return_type => return_type
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
247
|
+
if @api_client.config.debugging
|
|
248
|
+
@api_client.config.logger.debug "API called: AccountApi#account_list_supabase_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
249
|
+
end
|
|
250
|
+
return data, status_code, headers
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Get or create Stripe customer and optionally create checkout session
|
|
254
|
+
# @param billing_post_request_body [BillingPostRequestBody]
|
|
255
|
+
# @param [Hash] opts the optional parameters
|
|
256
|
+
# @return [BillingPostResponseBody]
|
|
257
|
+
def account_prepare_checkout_session(billing_post_request_body, opts = {})
|
|
258
|
+
data, _status_code, _headers = account_prepare_checkout_session_with_http_info(billing_post_request_body, opts)
|
|
259
|
+
data
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Get or create Stripe customer and optionally create checkout session
|
|
263
|
+
# @param billing_post_request_body [BillingPostRequestBody]
|
|
264
|
+
# @param [Hash] opts the optional parameters
|
|
265
|
+
# @return [Array<(BillingPostResponseBody, Integer, Hash)>] BillingPostResponseBody data, response status code and response headers
|
|
266
|
+
def account_prepare_checkout_session_with_http_info(billing_post_request_body, opts = {})
|
|
267
|
+
if @api_client.config.debugging
|
|
268
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_prepare_checkout_session ...'
|
|
269
|
+
end
|
|
270
|
+
# verify the required parameter 'billing_post_request_body' is set
|
|
271
|
+
if @api_client.config.client_side_validation && billing_post_request_body.nil?
|
|
272
|
+
fail ArgumentError, "Missing the required parameter 'billing_post_request_body' when calling AccountApi.account_prepare_checkout_session"
|
|
273
|
+
end
|
|
274
|
+
# resource path
|
|
275
|
+
local_var_path = '/billing'
|
|
276
|
+
|
|
277
|
+
# query parameters
|
|
278
|
+
query_params = opts[:query_params] || {}
|
|
279
|
+
|
|
280
|
+
# header parameters
|
|
281
|
+
header_params = opts[:header_params] || {}
|
|
282
|
+
# HTTP header 'Accept' (if needed)
|
|
283
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
284
|
+
# HTTP header 'Content-Type'
|
|
285
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
286
|
+
if !content_type.nil?
|
|
287
|
+
header_params['Content-Type'] = content_type
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# form parameters
|
|
291
|
+
form_params = opts[:form_params] || {}
|
|
292
|
+
|
|
293
|
+
# http body (model)
|
|
294
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(billing_post_request_body)
|
|
295
|
+
|
|
296
|
+
# return_type
|
|
297
|
+
return_type = opts[:debug_return_type] || 'BillingPostResponseBody'
|
|
298
|
+
|
|
299
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
300
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
301
|
+
|
|
302
|
+
new_options = opts.merge(
|
|
303
|
+
:operation => :"AccountApi.account_prepare_checkout_session",
|
|
304
|
+
:header_params => header_params,
|
|
305
|
+
:query_params => query_params,
|
|
306
|
+
:form_params => form_params,
|
|
307
|
+
:body => post_body,
|
|
308
|
+
:auth_names => auth_names,
|
|
309
|
+
:return_type => return_type
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
313
|
+
if @api_client.config.debugging
|
|
314
|
+
@api_client.config.logger.debug "API called: AccountApi#account_prepare_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
315
|
+
end
|
|
316
|
+
return data, status_code, headers
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Revoke Supabase integration (removes stored tokens and project info)
|
|
320
|
+
# @param [Hash] opts the optional parameters
|
|
321
|
+
# @return [SupabaseConfigureResponse]
|
|
322
|
+
def account_revoke_supabase(opts = {})
|
|
323
|
+
data, _status_code, _headers = account_revoke_supabase_with_http_info(opts)
|
|
324
|
+
data
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Revoke Supabase integration (removes stored tokens and project info)
|
|
328
|
+
# @param [Hash] opts the optional parameters
|
|
329
|
+
# @return [Array<(SupabaseConfigureResponse, Integer, Hash)>] SupabaseConfigureResponse data, response status code and response headers
|
|
330
|
+
def account_revoke_supabase_with_http_info(opts = {})
|
|
331
|
+
if @api_client.config.debugging
|
|
332
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_revoke_supabase ...'
|
|
333
|
+
end
|
|
334
|
+
# resource path
|
|
335
|
+
local_var_path = '/account/supabase'
|
|
336
|
+
|
|
337
|
+
# query parameters
|
|
338
|
+
query_params = opts[:query_params] || {}
|
|
339
|
+
|
|
340
|
+
# header parameters
|
|
341
|
+
header_params = opts[:header_params] || {}
|
|
342
|
+
# HTTP header 'Accept' (if needed)
|
|
343
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
344
|
+
|
|
345
|
+
# form parameters
|
|
346
|
+
form_params = opts[:form_params] || {}
|
|
347
|
+
|
|
348
|
+
# http body (model)
|
|
349
|
+
post_body = opts[:debug_body]
|
|
350
|
+
|
|
351
|
+
# return_type
|
|
352
|
+
return_type = opts[:debug_return_type] || 'SupabaseConfigureResponse'
|
|
353
|
+
|
|
354
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
355
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
356
|
+
|
|
357
|
+
new_options = opts.merge(
|
|
358
|
+
:operation => :"AccountApi.account_revoke_supabase",
|
|
359
|
+
:header_params => header_params,
|
|
360
|
+
:query_params => query_params,
|
|
361
|
+
:form_params => form_params,
|
|
362
|
+
:body => post_body,
|
|
363
|
+
:auth_names => auth_names,
|
|
364
|
+
:return_type => return_type
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
368
|
+
if @api_client.config.debugging
|
|
369
|
+
@api_client.config.logger.debug "API called: AccountApi#account_revoke_supabase\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
370
|
+
end
|
|
371
|
+
return data, status_code, headers
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Exchange Supabase OAuth authorization code for tokens
|
|
375
|
+
# @param supabase_o_auth_request [SupabaseOAuthRequest]
|
|
376
|
+
# @param [Hash] opts the optional parameters
|
|
377
|
+
# @return [SupabaseOAuthResponse]
|
|
378
|
+
def account_supabase_o_auth(supabase_o_auth_request, opts = {})
|
|
379
|
+
data, _status_code, _headers = account_supabase_o_auth_with_http_info(supabase_o_auth_request, opts)
|
|
380
|
+
data
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Exchange Supabase OAuth authorization code for tokens
|
|
384
|
+
# @param supabase_o_auth_request [SupabaseOAuthRequest]
|
|
385
|
+
# @param [Hash] opts the optional parameters
|
|
386
|
+
# @return [Array<(SupabaseOAuthResponse, Integer, Hash)>] SupabaseOAuthResponse data, response status code and response headers
|
|
387
|
+
def account_supabase_o_auth_with_http_info(supabase_o_auth_request, opts = {})
|
|
388
|
+
if @api_client.config.debugging
|
|
389
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_supabase_o_auth ...'
|
|
390
|
+
end
|
|
391
|
+
# verify the required parameter 'supabase_o_auth_request' is set
|
|
392
|
+
if @api_client.config.client_side_validation && supabase_o_auth_request.nil?
|
|
393
|
+
fail ArgumentError, "Missing the required parameter 'supabase_o_auth_request' when calling AccountApi.account_supabase_o_auth"
|
|
394
|
+
end
|
|
395
|
+
# resource path
|
|
396
|
+
local_var_path = '/account/supabase/oauth'
|
|
397
|
+
|
|
398
|
+
# query parameters
|
|
399
|
+
query_params = opts[:query_params] || {}
|
|
400
|
+
|
|
401
|
+
# header parameters
|
|
402
|
+
header_params = opts[:header_params] || {}
|
|
403
|
+
# HTTP header 'Accept' (if needed)
|
|
404
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
405
|
+
# HTTP header 'Content-Type'
|
|
406
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
407
|
+
if !content_type.nil?
|
|
408
|
+
header_params['Content-Type'] = content_type
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# form parameters
|
|
412
|
+
form_params = opts[:form_params] || {}
|
|
413
|
+
|
|
414
|
+
# http body (model)
|
|
415
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(supabase_o_auth_request)
|
|
416
|
+
|
|
417
|
+
# return_type
|
|
418
|
+
return_type = opts[:debug_return_type] || 'SupabaseOAuthResponse'
|
|
419
|
+
|
|
420
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
421
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
422
|
+
|
|
423
|
+
new_options = opts.merge(
|
|
424
|
+
:operation => :"AccountApi.account_supabase_o_auth",
|
|
425
|
+
:header_params => header_params,
|
|
426
|
+
:query_params => query_params,
|
|
427
|
+
:form_params => form_params,
|
|
428
|
+
:body => post_body,
|
|
429
|
+
:auth_names => auth_names,
|
|
430
|
+
:return_type => return_type
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
434
|
+
if @api_client.config.debugging
|
|
435
|
+
@api_client.config.logger.debug "API called: AccountApi#account_supabase_o_auth\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
436
|
+
end
|
|
437
|
+
return data, status_code, headers
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Create or update an account name
|
|
441
|
+
# @param create_account_request_body [CreateAccountRequestBody]
|
|
442
|
+
# @param [Hash] opts the optional parameters
|
|
443
|
+
# @return [CreateAccountResponse]
|
|
444
|
+
def account_update_account(create_account_request_body, opts = {})
|
|
445
|
+
data, _status_code, _headers = account_update_account_with_http_info(create_account_request_body, opts)
|
|
446
|
+
data
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
# Create or update an account name
|
|
450
|
+
# @param create_account_request_body [CreateAccountRequestBody]
|
|
451
|
+
# @param [Hash] opts the optional parameters
|
|
452
|
+
# @return [Array<(CreateAccountResponse, Integer, Hash)>] CreateAccountResponse data, response status code and response headers
|
|
453
|
+
def account_update_account_with_http_info(create_account_request_body, opts = {})
|
|
454
|
+
if @api_client.config.debugging
|
|
455
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_update_account ...'
|
|
456
|
+
end
|
|
457
|
+
# verify the required parameter 'create_account_request_body' is set
|
|
458
|
+
if @api_client.config.client_side_validation && create_account_request_body.nil?
|
|
459
|
+
fail ArgumentError, "Missing the required parameter 'create_account_request_body' when calling AccountApi.account_update_account"
|
|
460
|
+
end
|
|
461
|
+
# resource path
|
|
462
|
+
local_var_path = '/account'
|
|
463
|
+
|
|
464
|
+
# query parameters
|
|
465
|
+
query_params = opts[:query_params] || {}
|
|
466
|
+
|
|
467
|
+
# header parameters
|
|
468
|
+
header_params = opts[:header_params] || {}
|
|
469
|
+
# HTTP header 'Accept' (if needed)
|
|
470
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
471
|
+
# HTTP header 'Content-Type'
|
|
472
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
473
|
+
if !content_type.nil?
|
|
474
|
+
header_params['Content-Type'] = content_type
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# form parameters
|
|
478
|
+
form_params = opts[:form_params] || {}
|
|
479
|
+
|
|
480
|
+
# http body (model)
|
|
481
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_account_request_body)
|
|
482
|
+
|
|
483
|
+
# return_type
|
|
484
|
+
return_type = opts[:debug_return_type] || 'CreateAccountResponse'
|
|
485
|
+
|
|
486
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
487
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
488
|
+
|
|
489
|
+
new_options = opts.merge(
|
|
490
|
+
:operation => :"AccountApi.account_update_account",
|
|
491
|
+
:header_params => header_params,
|
|
492
|
+
:query_params => query_params,
|
|
493
|
+
:form_params => form_params,
|
|
494
|
+
:body => post_body,
|
|
495
|
+
:auth_names => auth_names,
|
|
496
|
+
:return_type => return_type
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
500
|
+
if @api_client.config.debugging
|
|
501
|
+
@api_client.config.logger.debug "API called: AccountApi#account_update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
502
|
+
end
|
|
503
|
+
return data, status_code, headers
|
|
504
|
+
end
|
|
505
|
+
end
|
|
506
|
+
end
|