Skip to content

Commit

Permalink
Merge pull request #24 from tremendous-rewards/bs-generate-client-for…
Browse files Browse the repository at this point in the history
…-5-2-0

Regenerate client for `5.2.0`
  • Loading branch information
brianstorti authored May 30, 2024
2 parents f0ed264 + a662ff0 commit 2173740
Show file tree
Hide file tree
Showing 9 changed files with 1,133 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ lib/tremendous/api_error.rb
lib/tremendous/configuration.rb
lib/tremendous/models/balance_transaction.rb
lib/tremendous/models/campaign.rb
lib/tremendous/models/campaign_base.rb
lib/tremendous/models/create_api_key200_response.rb
lib/tremendous/models/create_campaign201_response.rb
lib/tremendous/models/create_campaign_request.rb
Expand Down Expand Up @@ -61,6 +62,7 @@ lib/tremendous/models/list_campaigns200_response_campaigns_inner_email_style.rb
lib/tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style.rb
lib/tremendous/models/list_fields200_response.rb
lib/tremendous/models/list_fields200_response_fields_inner.rb
lib/tremendous/models/list_forex_response.rb
lib/tremendous/models/list_funding_sources200_response.rb
lib/tremendous/models/list_funding_sources200_response_funding_sources_inner.rb
lib/tremendous/models/list_funding_sources200_response_funding_sources_inner_meta.rb
Expand Down Expand Up @@ -124,5 +126,7 @@ lib/tremendous/models/reward_with_link_delivery.rb
lib/tremendous/models/reward_without_link.rb
lib/tremendous/models/reward_without_link_delivery.rb
lib/tremendous/models/simulate_webhook_request.rb
lib/tremendous/models/update_campaign.rb
lib/tremendous/models/update_campaign_request.rb
lib/tremendous/models/webhook.rb
lib/tremendous/models/webhook_post.rb
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
tremendous_ruby (5.1.0)
tremendous_ruby (5.2.0)
faraday (>= 1.0.1, < 3.0)
faraday-multipart

Expand Down
4 changes: 4 additions & 0 deletions lib/tremendous.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# Models
require 'tremendous/models/balance_transaction'
require 'tremendous/models/campaign'
require 'tremendous/models/campaign_base'
require 'tremendous/models/create_api_key200_response'
require 'tremendous/models/create_campaign201_response'
require 'tremendous/models/create_campaign_request'
Expand Down Expand Up @@ -75,6 +76,7 @@
require 'tremendous/models/list_campaigns200_response_campaigns_inner_webpage_style'
require 'tremendous/models/list_fields200_response'
require 'tremendous/models/list_fields200_response_fields_inner'
require 'tremendous/models/list_forex_response'
require 'tremendous/models/list_funding_sources200_response'
require 'tremendous/models/list_funding_sources200_response_funding_sources_inner'
require 'tremendous/models/list_funding_sources200_response_funding_sources_inner_meta'
Expand Down Expand Up @@ -138,6 +140,8 @@
require 'tremendous/models/reward_without_link'
require 'tremendous/models/reward_without_link_delivery'
require 'tremendous/models/simulate_webhook_request'
require 'tremendous/models/update_campaign'
require 'tremendous/models/update_campaign_request'
require 'tremendous/models/webhook'
require 'tremendous/models/webhook_post'

Expand Down
78 changes: 69 additions & 9 deletions lib/tremendous/api/tremendous_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,66 @@ def list_fields_with_http_info(opts = {})
return data, status_code, headers
end

# List exchange rates
# Retrieve a list of exchange rates
# @param [Hash] opts the optional parameters
# @option opts [String] :base Base currency code, default is USD.
# @return [ListForexResponse]
def list_forex(opts = {})
data, _status_code, _headers = list_forex_with_http_info(opts)
data
end

# List exchange rates
# Retrieve a list of exchange rates
# @param [Hash] opts the optional parameters
# @option opts [String] :base Base currency code, default is USD.
# @return [Array<(ListForexResponse, Integer, Hash)>] ListForexResponse data, response status code and response headers
def list_forex_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: TremendousApi.list_forex ...'
end
# resource path
local_var_path = '/forex'

# query parameters
query_params = opts[:query_params] || {}
query_params[:'base'] = opts[:'base'] if !opts[:'base'].nil?

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'ListForexResponse'

# auth_names
auth_names = opts[:debug_auth_names] || ['BearerApiKey']

new_options = opts.merge(
:operation => :"TremendousApi.list_forex",
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type
)

data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: TremendousApi#list_forex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# List funding sources
# Retrieve a list of all funding sources available for ordering through the API in your organization's account.
# @param [Hash] opts the optional parameters
Expand Down Expand Up @@ -2430,20 +2490,20 @@ def simulate_webhook_with_http_info(id, simulate_webhook_request, opts = {})

# Update campaign
# @param id [String] ID of the campaign that should be updated
# @param create_campaign_request [CreateCampaignRequest] Campaign details
# @param update_campaign_request [UpdateCampaignRequest] Campaign details
# @param [Hash] opts the optional parameters
# @return [CreateCampaign201Response]
def update_campaign(id, create_campaign_request, opts = {})
data, _status_code, _headers = update_campaign_with_http_info(id, create_campaign_request, opts)
def update_campaign(id, update_campaign_request, opts = {})
data, _status_code, _headers = update_campaign_with_http_info(id, update_campaign_request, opts)
data
end

# Update campaign
# @param id [String] ID of the campaign that should be updated
# @param create_campaign_request [CreateCampaignRequest] Campaign details
# @param update_campaign_request [UpdateCampaignRequest] Campaign details
# @param [Hash] opts the optional parameters
# @return [Array<(CreateCampaign201Response, Integer, Hash)>] CreateCampaign201Response data, response status code and response headers
def update_campaign_with_http_info(id, create_campaign_request, opts = {})
def update_campaign_with_http_info(id, update_campaign_request, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: TremendousApi.update_campaign ...'
end
Expand All @@ -2456,9 +2516,9 @@ def update_campaign_with_http_info(id, create_campaign_request, opts = {})
fail ArgumentError, "invalid value for 'id' when calling TremendousApi.update_campaign, must conform to the pattern #{pattern}."
end

# verify the required parameter 'create_campaign_request' is set
if @api_client.config.client_side_validation && create_campaign_request.nil?
fail ArgumentError, "Missing the required parameter 'create_campaign_request' when calling TremendousApi.update_campaign"
# verify the required parameter 'update_campaign_request' is set
if @api_client.config.client_side_validation && update_campaign_request.nil?
fail ArgumentError, "Missing the required parameter 'update_campaign_request' when calling TremendousApi.update_campaign"
end
# resource path
local_var_path = '/campaigns/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
Expand All @@ -2480,7 +2540,7 @@ def update_campaign_with_http_info(id, create_campaign_request, opts = {})
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_campaign_request)
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_campaign_request)

# return_type
return_type = opts[:debug_return_type] || 'CreateCampaign201Response'
Expand Down
Loading

0 comments on commit 2173740

Please sign in to comment.