Class: Solifyn::CheckoutApi
- Inherits:
-
Object
- Object
- Solifyn::CheckoutApi
- Defined in:
- lib/solifyn/api/checkout_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#checkout_create(create_checkout_dto, opts = {}) ⇒ CheckoutResponseDto
Create Checkout Session Create a new payment configuration for a product.
-
#checkout_create_collection(create_collection_checkout_dto, opts = {}) ⇒ CheckoutResponseDto
Create Collection Checkout Session Create a new payment configuration for a product bundle/collection.
-
#checkout_create_collection_with_http_info(create_collection_checkout_dto, opts = {}) ⇒ Array<(CheckoutResponseDto, Integer, Hash)>
Create Collection Checkout Session Create a new payment configuration for a product bundle/collection.
-
#checkout_create_setup(create_setup_checkout_dto, opts = {}) ⇒ nil
Create Setup Checkout Configuration Create a new checkout session in setup mode for collecting cards without immediate charge.
-
#checkout_create_setup_with_http_info(create_setup_checkout_dto, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Create Setup Checkout Configuration Create a new checkout session in setup mode for collecting cards without immediate charge.
-
#checkout_create_with_http_info(create_checkout_dto, opts = {}) ⇒ Array<(CheckoutResponseDto, Integer, Hash)>
Create Checkout Session Create a new payment configuration for a product.
-
#checkout_get_session(id, opts = {}) ⇒ CheckoutSessionDetailsDto
Get Checkout Session Details Retrieve checkout details to mount the custom embedded checkout.
-
#checkout_get_session_with_http_info(id, opts = {}) ⇒ Array<(CheckoutSessionDetailsDto, Integer, Hash)>
Get Checkout Session Details Retrieve checkout details to mount the custom embedded checkout.
-
#checkout_price_preview(product_id, addons, opts = {}) ⇒ PricePreviewResponseDto
Get Converted Price Preview Pre-calculate target currencies, applied discounts, and PWYW values before mounting the checkout.
-
#checkout_price_preview_with_http_info(product_id, addons, opts = {}) ⇒ Array<(PricePreviewResponseDto, Integer, Hash)>
Get Converted Price Preview Pre-calculate target currencies, applied discounts, and PWYW values before mounting the checkout.
-
#checkout_supported_currencies(opts = {}) ⇒ Array<SupportedCurrenciesResponseDto>
Get Supported Currencies Retrieve all currencies supported for payouts and conversions.
-
#checkout_supported_currencies_with_http_info(opts = {}) ⇒ Array<(Array<SupportedCurrenciesResponseDto>, Integer, Hash)>
Get Supported Currencies Retrieve all currencies supported for payouts and conversions.
-
#initialize(api_client = ApiClient.default) ⇒ CheckoutApi
constructor
A new instance of CheckoutApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CheckoutApi
Returns a new instance of CheckoutApi.
19 20 21 |
# File 'lib/solifyn/api/checkout_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/solifyn/api/checkout_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#checkout_create(create_checkout_dto, opts = {}) ⇒ CheckoutResponseDto
Create Checkout Session Create a new payment configuration for a product. Returns redirect URLs pointing to the custom checkout layout.
27 28 29 30 |
# File 'lib/solifyn/api/checkout_api.rb', line 27 def checkout_create(create_checkout_dto, opts = {}) data, _status_code, _headers = checkout_create_with_http_info(create_checkout_dto, opts) data end |
#checkout_create_collection(create_collection_checkout_dto, opts = {}) ⇒ CheckoutResponseDto
Create Collection Checkout Session Create a new payment configuration for a product bundle/collection.
95 96 97 98 |
# File 'lib/solifyn/api/checkout_api.rb', line 95 def checkout_create_collection(create_collection_checkout_dto, opts = {}) data, _status_code, _headers = checkout_create_collection_with_http_info(create_collection_checkout_dto, opts) data end |
#checkout_create_collection_with_http_info(create_collection_checkout_dto, opts = {}) ⇒ Array<(CheckoutResponseDto, Integer, Hash)>
Create Collection Checkout Session Create a new payment configuration for a product bundle/collection.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/solifyn/api/checkout_api.rb', line 105 def checkout_create_collection_with_http_info(create_collection_checkout_dto, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CheckoutApi.checkout_create_collection ...' end # verify the required parameter 'create_collection_checkout_dto' is set if @api_client.config.client_side_validation && create_collection_checkout_dto.nil? fail ArgumentError, "Missing the required parameter 'create_collection_checkout_dto' when calling CheckoutApi.checkout_create_collection" end # resource path local_var_path = '/v1/checkout/collection/create' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_collection_checkout_dto) # return_type return_type = opts[:debug_return_type] || 'CheckoutResponseDto' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CheckoutApi.checkout_create_collection", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CheckoutApi#checkout_create_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#checkout_create_setup(create_setup_checkout_dto, opts = {}) ⇒ nil
Create Setup Checkout Configuration Create a new checkout session in setup mode for collecting cards without immediate charge.
163 164 165 166 |
# File 'lib/solifyn/api/checkout_api.rb', line 163 def checkout_create_setup(create_setup_checkout_dto, opts = {}) checkout_create_setup_with_http_info(create_setup_checkout_dto, opts) nil end |
#checkout_create_setup_with_http_info(create_setup_checkout_dto, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Create Setup Checkout Configuration Create a new checkout session in setup mode for collecting cards without immediate charge.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/solifyn/api/checkout_api.rb', line 173 def checkout_create_setup_with_http_info(create_setup_checkout_dto, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CheckoutApi.checkout_create_setup ...' end # verify the required parameter 'create_setup_checkout_dto' is set if @api_client.config.client_side_validation && create_setup_checkout_dto.nil? fail ArgumentError, "Missing the required parameter 'create_setup_checkout_dto' when calling CheckoutApi.checkout_create_setup" end # resource path local_var_path = '/v1/checkout/setup-configuration' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_setup_checkout_dto) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CheckoutApi.checkout_create_setup", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CheckoutApi#checkout_create_setup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#checkout_create_with_http_info(create_checkout_dto, opts = {}) ⇒ Array<(CheckoutResponseDto, Integer, Hash)>
Create Checkout Session Create a new payment configuration for a product. Returns redirect URLs pointing to the custom checkout layout.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/solifyn/api/checkout_api.rb', line 37 def checkout_create_with_http_info(create_checkout_dto, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CheckoutApi.checkout_create ...' end # verify the required parameter 'create_checkout_dto' is set if @api_client.config.client_side_validation && create_checkout_dto.nil? fail ArgumentError, "Missing the required parameter 'create_checkout_dto' when calling CheckoutApi.checkout_create" end # resource path local_var_path = '/v1/checkout/create' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_checkout_dto) # return_type return_type = opts[:debug_return_type] || 'CheckoutResponseDto' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CheckoutApi.checkout_create", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CheckoutApi#checkout_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#checkout_get_session(id, opts = {}) ⇒ CheckoutSessionDetailsDto
Get Checkout Session Details Retrieve checkout details to mount the custom embedded checkout.
229 230 231 232 |
# File 'lib/solifyn/api/checkout_api.rb', line 229 def checkout_get_session(id, opts = {}) data, _status_code, _headers = checkout_get_session_with_http_info(id, opts) data end |
#checkout_get_session_with_http_info(id, opts = {}) ⇒ Array<(CheckoutSessionDetailsDto, Integer, Hash)>
Get Checkout Session Details Retrieve checkout details to mount the custom embedded checkout.
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/solifyn/api/checkout_api.rb', line 239 def checkout_get_session_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CheckoutApi.checkout_get_session ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CheckoutApi.checkout_get_session" end # resource path local_var_path = '/v1/checkout/session/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CheckoutSessionDetailsDto' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CheckoutApi.checkout_get_session", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CheckoutApi#checkout_get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#checkout_price_preview(product_id, addons, opts = {}) ⇒ PricePreviewResponseDto
Get Converted Price Preview Pre-calculate target currencies, applied discounts, and PWYW values before mounting the checkout.
297 298 299 300 |
# File 'lib/solifyn/api/checkout_api.rb', line 297 def checkout_price_preview(product_id, addons, opts = {}) data, _status_code, _headers = checkout_price_preview_with_http_info(product_id, addons, opts) data end |
#checkout_price_preview_with_http_info(product_id, addons, opts = {}) ⇒ Array<(PricePreviewResponseDto, Integer, Hash)>
Get Converted Price Preview Pre-calculate target currencies, applied discounts, and PWYW values before mounting the checkout.
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/solifyn/api/checkout_api.rb', line 312 def checkout_price_preview_with_http_info(product_id, addons, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CheckoutApi.checkout_price_preview ...' end # verify the required parameter 'product_id' is set if @api_client.config.client_side_validation && product_id.nil? fail ArgumentError, "Missing the required parameter 'product_id' when calling CheckoutApi.checkout_price_preview" end # verify the required parameter 'addons' is set if @api_client.config.client_side_validation && addons.nil? fail ArgumentError, "Missing the required parameter 'addons' when calling CheckoutApi.checkout_price_preview" end # resource path local_var_path = '/v1/checkout/price-preview' # query parameters query_params = opts[:query_params] || {} query_params[:'productId'] = product_id query_params[:'addons'] = addons query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? query_params[:'discount'] = opts[:'discount'] if !opts[:'discount'].nil? query_params[:'qty'] = opts[:'qty'] if !opts[:'qty'].nil? query_params[:'customPrice'] = opts[:'custom_price'] if !opts[:'custom_price'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PricePreviewResponseDto' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CheckoutApi.checkout_price_preview", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CheckoutApi#checkout_price_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#checkout_supported_currencies(opts = {}) ⇒ Array<SupportedCurrenciesResponseDto>
Get Supported Currencies Retrieve all currencies supported for payouts and conversions.
374 375 376 377 |
# File 'lib/solifyn/api/checkout_api.rb', line 374 def checkout_supported_currencies(opts = {}) data, _status_code, _headers = checkout_supported_currencies_with_http_info(opts) data end |
#checkout_supported_currencies_with_http_info(opts = {}) ⇒ Array<(Array<SupportedCurrenciesResponseDto>, Integer, Hash)>
Get Supported Currencies Retrieve all currencies supported for payouts and conversions.
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/solifyn/api/checkout_api.rb', line 383 def checkout_supported_currencies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CheckoutApi.checkout_supported_currencies ...' end # resource path local_var_path = '/v1/checkout/supported-currencies' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<SupportedCurrenciesResponseDto>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"CheckoutApi.checkout_supported_currencies", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CheckoutApi#checkout_supported_currencies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |