lib/VoucherifySdk/api/vouchers_api.rb in voucherify-7.0.0 vs lib/VoucherifySdk/api/vouchers_api.rb in voucherify-8.0.0
- old
+ new
@@ -330,21 +330,21 @@
end
# Generate Random Code
# Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new stand alone voucher if no campaign name or campaign_id is provided. In case of the loyalty card, a campaign name is required. You can optionally use the code parameter to define a specific code or the code_config parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API. This method will return an error when trying to create a voucher that already exists.
# @param [Hash] opts the optional parameters
- # @option opts [Object] :body Specify the details of the voucher that you would like to create.
+ # @option opts [VouchersCreateRequestBody] :vouchers_create_request_body Specify the details of the voucher that you would like to create.
# @return [VouchersCreateResponseBody]
def generate_random_code(opts = {})
data, _status_code, _headers = generate_random_code_with_http_info(opts)
data
end
# Generate Random Code
# Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new stand alone voucher if no campaign name or campaign_id is provided. In case of the loyalty card, a campaign name is required. You can optionally use the code parameter to define a specific code or the code_config parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API. This method will return an error when trying to create a voucher that already exists.
# @param [Hash] opts the optional parameters
- # @option opts [Object] :body Specify the details of the voucher that you would like to create.
+ # @option opts [VouchersCreateRequestBody] :vouchers_create_request_body Specify the details of the voucher that you would like to create.
# @return [Array<(VouchersCreateResponseBody, Integer, Hash)>] VouchersCreateResponseBody data, response status code and response headers
private def generate_random_code_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: VouchersApi.generate_random_code ...'
end
@@ -366,10 +366,10 @@
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'vouchers_create_request_body'])
# return_type
return_type = opts[:debug_return_type] || 'VouchersCreateResponseBody'
# auth_names