Skip to content

Commit

Permalink
fix: fix POST /orders "created" response schema
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmazza committed Nov 8, 2024
1 parent 8416d82 commit c98b770
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ lib/tremendous/models/create_order200_response.rb
lib/tremendous/models/create_order200_response_order.rb
lib/tremendous/models/create_order200_response_order_rewards_inner.rb
lib/tremendous/models/create_order200_response_order_rewards_inner_delivery.rb
lib/tremendous/models/create_order201_response.rb
lib/tremendous/models/create_order_request.rb
lib/tremendous/models/create_organization.rb
lib/tremendous/models/create_organization200_response.rb
Expand Down Expand Up @@ -90,6 +89,7 @@ lib/tremendous/models/get_funding_source200_response.rb
lib/tremendous/models/get_member200_response.rb
lib/tremendous/models/get_member200_response_member.rb
lib/tremendous/models/get_member200_response_member_events_inner.rb
lib/tremendous/models/get_order200_response.rb
lib/tremendous/models/get_organization200_response.rb
lib/tremendous/models/get_product_response.rb
lib/tremendous/models/get_reward200_response.rb
Expand Down
2 changes: 1 addition & 1 deletion lib/tremendous.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
require 'tremendous/models/create_order200_response_order'
require 'tremendous/models/create_order200_response_order_rewards_inner'
require 'tremendous/models/create_order200_response_order_rewards_inner_delivery'
require 'tremendous/models/create_order201_response'
require 'tremendous/models/create_order_request'
require 'tremendous/models/create_organization'
require 'tremendous/models/create_organization200_response'
Expand Down Expand Up @@ -104,6 +103,7 @@
require 'tremendous/models/get_member200_response'
require 'tremendous/models/get_member200_response_member'
require 'tremendous/models/get_member200_response_member_events_inner'
require 'tremendous/models/get_order200_response'
require 'tremendous/models/get_organization200_response'
require 'tremendous/models/get_product_response'
require 'tremendous/models/get_reward200_response'
Expand Down
18 changes: 9 additions & 9 deletions lib/tremendous/api/tremendous_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def initialize(api_client = ApiClient.default)
# Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable 'Allow approvals via API' via the organization''s 'Order Approvals' settings from the Tremendous dashboard.
# @param id [String] ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it's possible to use it instead.
# @param [Hash] opts the optional parameters
# @return [CreateOrder201Response]
# @return [GetOrder200Response]
def approve_order(id, opts = {})
data, _status_code, _headers = approve_order_with_http_info(id, opts)
data
Expand All @@ -33,7 +33,7 @@ def approve_order(id, opts = {})
# Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable 'Allow approvals via API' via the organization''s 'Order Approvals' settings from the Tremendous dashboard.
# @param id [String] ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it's possible to use it instead.
# @param [Hash] opts the optional parameters
# @return [Array<(CreateOrder201Response, Integer, Hash)>] CreateOrder201Response data, response status code and response headers
# @return [Array<(GetOrder200Response, Integer, Hash)>] GetOrder200Response data, response status code and response headers
def approve_order_with_http_info(id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: TremendousApi.approve_order ...'
Expand Down Expand Up @@ -65,7 +65,7 @@ def approve_order_with_http_info(id, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'CreateOrder201Response'
return_type = opts[:debug_return_type] || 'GetOrder200Response'

# auth_names
auth_names = opts[:debug_auth_names] || ['BearerApiKey']
Expand Down Expand Up @@ -1549,7 +1549,7 @@ def get_member_with_http_info(id, opts = {})
# Retrieve the order, identified by the given `id` in the URL
# @param id [String] ID of the order that should be retrieved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it&#39;s possible to use it instead.
# @param [Hash] opts the optional parameters
# @return [CreateOrder201Response]
# @return [GetOrder200Response]
def get_order(id, opts = {})
data, _status_code, _headers = get_order_with_http_info(id, opts)
data
Expand All @@ -1559,7 +1559,7 @@ def get_order(id, opts = {})
# Retrieve the order, identified by the given &#x60;id&#x60; in the URL
# @param id [String] ID of the order that should be retrieved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it&#39;s possible to use it instead.
# @param [Hash] opts the optional parameters
# @return [Array<(CreateOrder201Response, Integer, Hash)>] CreateOrder201Response data, response status code and response headers
# @return [Array<(GetOrder200Response, Integer, Hash)>] GetOrder200Response data, response status code and response headers
def get_order_with_http_info(id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: TremendousApi.get_order ...'
Expand All @@ -1586,7 +1586,7 @@ def get_order_with_http_info(id, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'CreateOrder201Response'
return_type = opts[:debug_return_type] || 'GetOrder200Response'

# auth_names
auth_names = opts[:debug_auth_names] || ['BearerApiKey']
Expand Down Expand Up @@ -2953,7 +2953,7 @@ def list_webhooks_with_http_info(opts = {})
# Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable 'Allow approvals via API' via the organization''s 'Order Approvals' settings from the Tremendous dashboard.
# @param id [String] ID of the order that should be rejected. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it&#39;s possible to use it instead.
# @param [Hash] opts the optional parameters
# @return [CreateOrder201Response]
# @return [GetOrder200Response]
def reject_order(id, opts = {})
data, _status_code, _headers = reject_order_with_http_info(id, opts)
data
Expand All @@ -2963,7 +2963,7 @@ def reject_order(id, opts = {})
# Rejects an order that is pending review, identified by the given &#x60;id&#x60; in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable &#39;Allow approvals via API&#39; via the organization&#39;&#39;s &#39;Order Approvals&#39; settings from the Tremendous dashboard.
# @param id [String] ID of the order that should be rejected. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it&#39;s possible to use it instead.
# @param [Hash] opts the optional parameters
# @return [Array<(CreateOrder201Response, Integer, Hash)>] CreateOrder201Response data, response status code and response headers
# @return [Array<(GetOrder200Response, Integer, Hash)>] GetOrder200Response data, response status code and response headers
def reject_order_with_http_info(id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: TremendousApi.reject_order ...'
Expand Down Expand Up @@ -2995,7 +2995,7 @@ def reject_order_with_http_info(id, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'CreateOrder201Response'
return_type = opts[:debug_return_type] || 'GetOrder200Response'

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

0 comments on commit c98b770

Please sign in to comment.