lib/VoucherifySdk/api/vouchers_api.rb in voucherify-6.0.0 vs lib/VoucherifySdk/api/vouchers_api.rb in voucherify-7.0.0
- old
+ new
@@ -584,11 +584,12 @@
# List Voucher Transactions
# List transactions that are associated with credit movements on a gift card or loyalty card.
# @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
# @param [Hash] opts the optional parameters
# @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 [ParameterOrderListTransactions] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [String] :starting_after_id A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID.
# @return [VouchersTransactionsListResponseBody]
def list_voucher_transactions(code, opts = {})
data, _status_code, _headers = list_voucher_transactions_with_http_info(code, opts)
data
end
@@ -596,11 +597,12 @@
# List Voucher Transactions
# List transactions that are associated with credit movements on a gift card or loyalty card.
# @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
# @param [Hash] opts the optional parameters
# @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 [ParameterOrderListTransactions] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [String] :starting_after_id A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID.
# @return [Array<(VouchersTransactionsListResponseBody, Integer, Hash)>] VouchersTransactionsListResponseBody data, response status code and response headers
private def list_voucher_transactions_with_http_info(code, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: VouchersApi.list_voucher_transactions ...'
end
@@ -608,10 +610,11 @@
local_var_path = '/v1/vouchers/{code}/transactions'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
# query parameters
query_params = opts[:query_params] || {}
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'starting_after_id'] = opts[:'starting_after_id'] if !opts[:'starting_after_id'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])