Class: Clerk::OpenAPIClient
- Inherits:
-
Object
- Object
- Clerk::OpenAPIClient
- Defined in:
- lib/clerk/openapiclient.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#actor_tokens ⇒ Object
Returns the value of attribute actor_tokens.
-
#allowlist_identifiers ⇒ Object
Returns the value of attribute allowlist_identifiers.
-
#api_keys ⇒ Object
Returns the value of attribute api_keys.
-
#beta_features ⇒ Object
Returns the value of attribute beta_features.
-
#billing ⇒ Object
Returns the value of attribute billing.
-
#blocklist_identifiers ⇒ Object
Returns the value of attribute blocklist_identifiers.
-
#clients ⇒ Object
Returns the value of attribute clients.
-
#domains ⇒ Object
Returns the value of attribute domains.
-
#email_addresses ⇒ Object
Returns the value of attribute email_addresses.
-
#email_and_sms_templates ⇒ Object
Returns the value of attribute email_and_sms_templates.
-
#email_sms_templates ⇒ Object
Returns the value of attribute email_sms_templates.
-
#instance_settings ⇒ Object
Returns the value of attribute instance_settings.
-
#invitations ⇒ Object
Returns the value of attribute invitations.
-
#jwks ⇒ Object
Returns the value of attribute jwks.
-
#jwt_templates ⇒ Object
Returns the value of attribute jwt_templates.
-
#m2m ⇒ Object
Returns the value of attribute m2m.
-
#machines ⇒ Object
Returns the value of attribute machines.
-
#miscellaneous ⇒ Object
Returns the value of attribute miscellaneous.
-
#oauth_access_tokens ⇒ Object
Returns the value of attribute oauth_access_tokens.
-
#oauth_applications ⇒ Object
Returns the value of attribute oauth_applications.
-
#organization_domains ⇒ Object
Returns the value of attribute organization_domains.
-
#organization_invitations ⇒ Object
Returns the value of attribute organization_invitations.
-
#organization_memberships ⇒ Object
Returns the value of attribute organization_memberships.
-
#organization_permissions ⇒ Object
Returns the value of attribute organization_permissions.
-
#organization_roles ⇒ Object
Returns the value of attribute organization_roles.
-
#organizations ⇒ Object
Returns the value of attribute organizations.
-
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
-
#proxy_checks ⇒ Object
Returns the value of attribute proxy_checks.
-
#redirect_urls ⇒ Object
Returns the value of attribute redirect_urls.
-
#role_sets ⇒ Object
Returns the value of attribute role_sets.
-
#saml_connections ⇒ Object
Returns the value of attribute saml_connections.
-
#sessions ⇒ Object
Returns the value of attribute sessions.
-
#sign_in_tokens ⇒ Object
Returns the value of attribute sign_in_tokens.
-
#sign_ups ⇒ Object
Returns the value of attribute sign_ups.
-
#templates ⇒ Object
Returns the value of attribute templates.
-
#testing_tokens ⇒ Object
Returns the value of attribute testing_tokens.
-
#users ⇒ Object
Returns the value of attribute users.
-
#waitlist_entries ⇒ Object
Returns the value of attribute waitlist_entries.
-
#webhooks ⇒ Object
Returns the value of attribute webhooks.
Instance Method Summary collapse
- #get_url(base_url:, url_variables: nil) ⇒ Object
- #init_sdks ⇒ Object
-
#initialize(client: nil, retry_config: nil, timeout_ms: nil, bearer_auth: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil) ⇒ OpenAPIClient
constructor
Instantiates the SDK, configuring it with the provided parameters.
Constructor Details
#initialize(client: nil, retry_config: nil, timeout_ms: nil, bearer_auth: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil) ⇒ OpenAPIClient
Instantiates the SDK, configuring it with the provided parameters.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/clerk/openapiclient.rb', line 30 def initialize(client: nil, retry_config: nil, timeout_ms: nil, bearer_auth: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil) = { request: { params_encoder: Faraday::FlatParamsEncoder } } [:request][:timeout] = (timeout_ms.to_f / 1000) unless timeout_ms.nil? client ||= Faraday.new(**) do |f| f.request :multipart, { flat_encode: true } # f.response :logger, nil, { headers: true, bodies: true, errors: true } end if !server_url.nil? if !url_params.nil? server_url = Utils.template_url(server_url, url_params) end end server_idx = 0 if server_idx.nil? hooks = SDKHooks::Hooks.new @sdk_configuration = SDKConfiguration.new( client, hooks, retry_config, timeout_ms, bearer_auth, security_source, server_url, server_idx ) @sdk_configuration = hooks.sdk_init(config: @sdk_configuration) init_sdks end |
Instance Attribute Details
#actor_tokens ⇒ Object
Returns the value of attribute actor_tokens.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def actor_tokens @actor_tokens end |
#allowlist_identifiers ⇒ Object
Returns the value of attribute allowlist_identifiers.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def allowlist_identifiers @allowlist_identifiers end |
#api_keys ⇒ Object
Returns the value of attribute api_keys.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def api_keys @api_keys end |
#beta_features ⇒ Object
Returns the value of attribute beta_features.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def beta_features @beta_features end |
#billing ⇒ Object
Returns the value of attribute billing.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def billing @billing end |
#blocklist_identifiers ⇒ Object
Returns the value of attribute blocklist_identifiers.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def blocklist_identifiers @blocklist_identifiers end |
#clients ⇒ Object
Returns the value of attribute clients.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def clients @clients end |
#domains ⇒ Object
Returns the value of attribute domains.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def domains @domains end |
#email_addresses ⇒ Object
Returns the value of attribute email_addresses.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def email_addresses @email_addresses end |
#email_and_sms_templates ⇒ Object
Returns the value of attribute email_and_sms_templates.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def email_and_sms_templates @email_and_sms_templates end |
#email_sms_templates ⇒ Object
Returns the value of attribute email_sms_templates.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def email_sms_templates @email_sms_templates end |
#instance_settings ⇒ Object
Returns the value of attribute instance_settings.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def instance_settings @instance_settings end |
#invitations ⇒ Object
Returns the value of attribute invitations.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def invitations @invitations end |
#jwks ⇒ Object
Returns the value of attribute jwks.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def jwks @jwks end |
#jwt_templates ⇒ Object
Returns the value of attribute jwt_templates.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def jwt_templates @jwt_templates end |
#m2m ⇒ Object
Returns the value of attribute m2m.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def m2m @m2m end |
#machines ⇒ Object
Returns the value of attribute machines.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def machines @machines end |
#miscellaneous ⇒ Object
Returns the value of attribute miscellaneous.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def miscellaneous @miscellaneous end |
#oauth_access_tokens ⇒ Object
Returns the value of attribute oauth_access_tokens.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def oauth_access_tokens @oauth_access_tokens end |
#oauth_applications ⇒ Object
Returns the value of attribute oauth_applications.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def oauth_applications @oauth_applications end |
#organization_domains ⇒ Object
Returns the value of attribute organization_domains.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def organization_domains @organization_domains end |
#organization_invitations ⇒ Object
Returns the value of attribute organization_invitations.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def organization_invitations @organization_invitations end |
#organization_memberships ⇒ Object
Returns the value of attribute organization_memberships.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def organization_memberships @organization_memberships end |
#organization_permissions ⇒ Object
Returns the value of attribute organization_permissions.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def end |
#organization_roles ⇒ Object
Returns the value of attribute organization_roles.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def organization_roles @organization_roles end |
#organizations ⇒ Object
Returns the value of attribute organizations.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def organizations @organizations end |
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def phone_numbers @phone_numbers end |
#proxy_checks ⇒ Object
Returns the value of attribute proxy_checks.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def proxy_checks @proxy_checks end |
#redirect_urls ⇒ Object
Returns the value of attribute redirect_urls.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def redirect_urls @redirect_urls end |
#role_sets ⇒ Object
Returns the value of attribute role_sets.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def role_sets @role_sets end |
#saml_connections ⇒ Object
Returns the value of attribute saml_connections.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def saml_connections @saml_connections end |
#sessions ⇒ Object
Returns the value of attribute sessions.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def sessions @sessions end |
#sign_in_tokens ⇒ Object
Returns the value of attribute sign_in_tokens.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def sign_in_tokens @sign_in_tokens end |
#sign_ups ⇒ Object
Returns the value of attribute sign_ups.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def sign_ups @sign_ups end |
#templates ⇒ Object
Returns the value of attribute templates.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def templates @templates end |
#testing_tokens ⇒ Object
Returns the value of attribute testing_tokens.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def testing_tokens @testing_tokens end |
#users ⇒ Object
Returns the value of attribute users.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def users @users end |
#waitlist_entries ⇒ Object
Returns the value of attribute waitlist_entries.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def waitlist_entries @waitlist_entries end |
#webhooks ⇒ Object
Returns the value of attribute webhooks.
18 19 20 |
# File 'lib/clerk/openapiclient.rb', line 18 def webhooks @webhooks end |
Instance Method Details
#get_url(base_url:, url_variables: nil) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/clerk/openapiclient.rb', line 110 def get_url(base_url:, url_variables: nil) sd_base_url, = @sdk_configuration.get_server_details if base_url.nil? base_url = sd_base_url end if url_variables.nil? url_variables = end return Utils.template_url base_url, url_variables end |
#init_sdks ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/clerk/openapiclient.rb', line 67 def init_sdks @miscellaneous = Miscellaneous.new(@sdk_configuration) @jwks = Jwks.new(@sdk_configuration) @clients = Clients.new(@sdk_configuration) @email_addresses = EmailAddresses.new(@sdk_configuration) @phone_numbers = PhoneNumbers.new(@sdk_configuration) @sessions = Sessions.new(@sdk_configuration) @email_sms_templates = EmailSMSTemplates.new(@sdk_configuration) @email_and_sms_templates = EmailAndSmsTemplates.new(@sdk_configuration) @templates = Templates.new(@sdk_configuration) @users = Users.new(@sdk_configuration) @invitations = Invitations.new(@sdk_configuration) @organization_invitations = OrganizationInvitations.new(@sdk_configuration) @allowlist_identifiers = AllowlistIdentifiers.new(@sdk_configuration) @blocklist_identifiers = BlocklistIdentifiers.new(@sdk_configuration) @beta_features = BetaFeatures.new(@sdk_configuration) @actor_tokens = ActorTokens.new(@sdk_configuration) @domains = Domains.new(@sdk_configuration) @instance_settings = InstanceSettings.new(@sdk_configuration) @webhooks = Webhooks.new(@sdk_configuration) @jwt_templates = JwtTemplates.new(@sdk_configuration) @machines = Machines.new(@sdk_configuration) @organizations = Organizations.new(@sdk_configuration) @organization_roles = OrganizationRoles.new(@sdk_configuration) @organization_memberships = OrganizationMemberships.new(@sdk_configuration) @organization_domains = OrganizationDomains.new(@sdk_configuration) @proxy_checks = ProxyChecks.new(@sdk_configuration) @redirect_urls = RedirectUrls.new(@sdk_configuration) @sign_in_tokens = SignInTokens.new(@sdk_configuration) @sign_ups = SignUps.new(@sdk_configuration) @oauth_applications = OauthApplications.new(@sdk_configuration) @saml_connections = SamlConnections.new(@sdk_configuration) @testing_tokens = TestingTokens.new(@sdk_configuration) @waitlist_entries = WaitlistEntries.new(@sdk_configuration) @billing = Billing.new(@sdk_configuration) = OrganizationPermissions.new(@sdk_configuration) @role_sets = RoleSets.new(@sdk_configuration) @api_keys = APIKeys.new(@sdk_configuration) @m2m = M2m.new(@sdk_configuration) @oauth_access_tokens = OauthAccessTokens.new(@sdk_configuration) end |