Class: OpenApiSDK::Dub
- Inherits:
-
Object
- Object
- OpenApiSDK::Dub
- Extended by:
- T::Sig
- Defined in:
- lib/open_api_sdk/dub.rb
Instance Attribute Summary collapse
-
#analytics ⇒ Object
Returns the value of attribute analytics.
-
#bounties ⇒ Object
Returns the value of attribute bounties.
-
#commissions ⇒ Object
Returns the value of attribute commissions.
-
#customers ⇒ Object
Returns the value of attribute customers.
-
#domains ⇒ Object
Returns the value of attribute domains.
-
#embed_tokens ⇒ Object
Returns the value of attribute embed_tokens.
-
#events ⇒ Object
Returns the value of attribute events.
-
#folders ⇒ Object
Returns the value of attribute folders.
-
#links ⇒ Object
Returns the value of attribute links.
-
#partner_applications ⇒ Object
Returns the value of attribute partner_applications.
-
#partners ⇒ Object
Returns the value of attribute partners.
-
#payouts ⇒ Object
Returns the value of attribute payouts.
-
#qr_codes ⇒ Object
Returns the value of attribute qr_codes.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#track ⇒ Object
Returns the value of attribute track.
Instance Method Summary collapse
- #get_url(base_url:, url_variables: nil) ⇒ Object
- #init_sdks ⇒ Object
-
#initialize(client: nil, retry_config: nil, timeout_ms: nil, security: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil) ⇒ Dub
constructor
A new instance of Dub.
Constructor Details
#initialize(client: nil, retry_config: nil, timeout_ms: nil, security: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil) ⇒ Dub
Returns a new instance of Dub.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/open_api_sdk/dub.rb', line 43 def initialize(client: nil, retry_config: nil, timeout_ms: nil, security: 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, {} # 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, security, security_source, server_url, server_idx ) @sdk_configuration = hooks.sdk_init(config: @sdk_configuration) init_sdks end |
Instance Attribute Details
#analytics ⇒ Object
Returns the value of attribute analytics.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def analytics @analytics end |
#bounties ⇒ Object
Returns the value of attribute bounties.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def bounties @bounties end |
#commissions ⇒ Object
Returns the value of attribute commissions.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def commissions @commissions end |
#customers ⇒ Object
Returns the value of attribute customers.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def customers @customers end |
#domains ⇒ Object
Returns the value of attribute domains.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def domains @domains end |
#embed_tokens ⇒ Object
Returns the value of attribute embed_tokens.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def @embed_tokens end |
#events ⇒ Object
Returns the value of attribute events.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def events @events end |
#folders ⇒ Object
Returns the value of attribute folders.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def folders @folders end |
#links ⇒ Object
Returns the value of attribute links.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def links @links end |
#partner_applications ⇒ Object
Returns the value of attribute partner_applications.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def partner_applications @partner_applications end |
#partners ⇒ Object
Returns the value of attribute partners.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def partners @partners end |
#payouts ⇒ Object
Returns the value of attribute payouts.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def payouts @payouts end |
#qr_codes ⇒ Object
Returns the value of attribute qr_codes.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def qr_codes @qr_codes end |
#tags ⇒ Object
Returns the value of attribute tags.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def @tags end |
#track ⇒ Object
Returns the value of attribute track.
19 20 21 |
# File 'lib/open_api_sdk/dub.rb', line 19 def track @track end |
Instance Method Details
#get_url(base_url:, url_variables: nil) ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/open_api_sdk/dub.rb', line 99 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
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/open_api_sdk/dub.rb', line 80 def init_sdks @links = Links.new(@sdk_configuration) @analytics = Analytics.new(@sdk_configuration) @events = Events.new(@sdk_configuration) @tags = Tags.new(@sdk_configuration) @folders = Folders.new(@sdk_configuration) @domains = Domains.new(@sdk_configuration) @track = Track.new(@sdk_configuration) @customers = Customers.new(@sdk_configuration) @partners = Partners.new(@sdk_configuration) @partner_applications = PartnerApplications.new(@sdk_configuration) @commissions = Commissions.new(@sdk_configuration) @payouts = Payouts.new(@sdk_configuration) @embed_tokens = EmbedTokens.new(@sdk_configuration) @qr_codes = QRCodes.new(@sdk_configuration) @bounties = Bounties.new(@sdk_configuration) end |