lib/VoucherifySdk/api/orders_api.rb in voucherify-5.0.0 vs lib/VoucherifySdk/api/orders_api.rb in voucherify-6.0.0

- old
+ new

@@ -164,14 +164,10 @@ # @return [Array<(OrdersGetResponseBody, Integer, Hash)>] OrdersGetResponseBody data, response status code and response headers private def get_order_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrdersApi.get_order ...' end - # verify the required parameter 'order_id' is set - if @api_client.config.client_side_validation && order_id.nil? - fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersApi.get_order" - end # resource path local_var_path = '/v1/orders/{orderId}'.sub('{' + 'orderId' + '}', CGI.escape(order_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -275,42 +271,30 @@ end # List Orders # Returns a list of orders. # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items. - # @option opts [Integer] :page Which page of results to return. + # @option opts [Integer] :limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. + # @option opts [Integer] :page Which page of results to return. The lowest value is 1. # @option opts [ParameterOrderListOrders] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. # @return [OrdersListResponseBody] def list_orders(opts = {}) data, _status_code, _headers = list_orders_with_http_info(opts) data end # List Orders # Returns a list of orders. # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items. - # @option opts [Integer] :page Which page of results to return. + # @option opts [Integer] :limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. + # @option opts [Integer] :page Which page of results to return. The lowest value is 1. # @option opts [ParameterOrderListOrders] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. # @return [Array<(OrdersListResponseBody, Integer, Hash)>] OrdersListResponseBody data, response status code and response headers private def list_orders_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrdersApi.list_orders ...' end - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrdersApi.list_orders, must be smaller than or equal to 100.' - end - - if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrdersApi.list_orders, must be greater than or equal to 1.' - end - - if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100 - fail ArgumentError, 'invalid value for "opts[:"page"]" when calling OrdersApi.list_orders, must be smaller than or equal to 100.' - end - # resource path local_var_path = '/v1/orders' # query parameters query_params = opts[:query_params] || {} @@ -370,13 +354,9 @@ # @option opts [OrdersUpdateRequestBody] :orders_update_request_body Specify the parameters of the order that are to be updated. # @return [Array<(OrdersUpdateResponseBody, Integer, Hash)>] OrdersUpdateResponseBody data, response status code and response headers private def update_order_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrdersApi.update_order ...' - end - # verify the required parameter 'order_id' is set - if @api_client.config.client_side_validation && order_id.nil? - fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersApi.update_order" end # resource path local_var_path = '/v1/orders/{orderId}'.sub('{' + 'orderId' + '}', CGI.escape(order_id.to_s)) # query parameters