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.
-
#discount_codes ⇒ Object
Returns the value of attribute discount_codes.
-
#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.
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 78 79 |
# File 'lib/open_api_sdk/dub.rb', line 45 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.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def analytics @analytics end |
#bounties ⇒ Object
Returns the value of attribute bounties.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def bounties @bounties end |
#commissions ⇒ Object
Returns the value of attribute commissions.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def commissions @commissions end |
#customers ⇒ Object
Returns the value of attribute customers.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def customers @customers end |
#discount_codes ⇒ Object
Returns the value of attribute discount_codes.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def discount_codes @discount_codes end |
#domains ⇒ Object
Returns the value of attribute domains.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def domains @domains end |
#embed_tokens ⇒ Object
Returns the value of attribute embed_tokens.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def @embed_tokens end |
#events ⇒ Object
Returns the value of attribute events.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def events @events end |
#folders ⇒ Object
Returns the value of attribute folders.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def folders @folders end |
#links ⇒ Object
Returns the value of attribute links.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def links @links end |
#partner_applications ⇒ Object
Returns the value of attribute partner_applications.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def partner_applications @partner_applications end |
#partners ⇒ Object
Returns the value of attribute partners.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def partners @partners end |
#payouts ⇒ Object
Returns the value of attribute payouts.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def payouts @payouts end |
#qr_codes ⇒ Object
Returns the value of attribute qr_codes.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def qr_codes @qr_codes end |
#tags ⇒ Object
Returns the value of attribute tags.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def @tags end |
#track ⇒ Object
Returns the value of attribute track.
21 22 23 |
# File 'lib/open_api_sdk/dub.rb', line 21 def track @track end |
Instance Method Details
#get_url(base_url:, url_variables: nil) ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/open_api_sdk/dub.rb', line 102 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
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/open_api_sdk/dub.rb', line 82 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) @discount_codes = DiscountCodes.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 |