Class: SwaggerClient::SaleApi
- Inherits:
-
Object
- Object
- SwaggerClient::SaleApi
- Defined in:
- lib/swagger_client/api/sale_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ SaleApi
constructor
A new instance of SaleApi.
-
#sale_checkout_shopping_cart(request, site_id, version, opts = {}) ⇒ Object
Purchase pricing options, packages, retail products, or tips for a client.
-
#sale_checkout_shopping_cart_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Purchase pricing options, packages, retail products, or tips for a client.
-
#sale_get_accepted_card_types(site_id, version, opts = {}) ⇒ Array<String>
Get credit cards types that a site accepts.
-
#sale_get_accepted_card_types_with_http_info(site_id, version, opts = {}) ⇒ Array<(Array<String>, Fixnum, Hash)>
Get credit cards types that a site accepts.
-
#sale_get_contracts(request_location_id, site_id, version, opts = {}) ⇒ GetContractsResponse
Get contracts available for purchase at a site.
-
#sale_get_contracts_with_http_info(request_location_id, site_id, version, opts = {}) ⇒ Array<(GetContractsResponse, Fixnum, Hash)>
Get contracts available for purchase at a site.
-
#sale_get_custom_payment_methods(site_id, version, opts = {}) ⇒ GetCustomPaymentMethodsResponse
Get payment methods that can be used to pay for sales at a site.
-
#sale_get_custom_payment_methods_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetCustomPaymentMethodsResponse, Fixnum, Hash)>
Get payment methods that can be used to pay for sales at a site.
-
#sale_get_gift_cards(site_id, version, opts = {}) ⇒ GetGiftCardResponse
Get gift cards available for purchase at a site.
-
#sale_get_gift_cards_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetGiftCardResponse, Fixnum, Hash)>
Get gift cards available for purchase at a site.
-
#sale_get_packages(site_id, version, opts = {}) ⇒ GetPackagesResponse
Get packages available for purchase at a site.
-
#sale_get_packages_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetPackagesResponse, Fixnum, Hash)>
Get packages available for purchase at a site.
-
#sale_get_products(site_id, version, opts = {}) ⇒ GetProductsResponse
Get retail products available for purchase at a site.
-
#sale_get_products_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetProductsResponse, Fixnum, Hash)>
Get retail products available for purchase at a site.
-
#sale_get_sales(site_id, version, opts = {}) ⇒ GetSalesResponse
Get sales completed at a site.
-
#sale_get_sales_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetSalesResponse, Fixnum, Hash)>
Get sales completed at a site.
-
#sale_get_services(site_id, version, opts = {}) ⇒ GetServicesResponse
Get pricing options available for purchase at a site.
-
#sale_get_services_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetServicesResponse, Fixnum, Hash)>
Get pricing options available for purchase at a site.
-
#sale_purchase_contract(request, site_id, version, opts = {}) ⇒ PurchaseContractResponse
Purchase a contract for a client.
-
#sale_purchase_contract_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(PurchaseContractResponse, Fixnum, Hash)>
Purchase a contract for a client.
-
#sale_purchase_gift_card(request, site_id, version, opts = {}) ⇒ PurchaseGiftCardResponse
Purchase a gift card for a client.
-
#sale_purchase_gift_card_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(PurchaseGiftCardResponse, Fixnum, Hash)>
Purchase a gift card for a client.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/swagger_client/api/sale_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#sale_checkout_shopping_cart(request, site_id, version, opts = {}) ⇒ Object
Purchase pricing options, packages, retail products, or tips for a client. This endpoint provides a wide range of functionality. For example, you can use it when a client purchases new pricing options, retail products, packages, and tips. You can also combine purchasing a new pricing option and many other functions, such as booking a client into a class, booking a new appointment for a client, enrolling a client into an enrollment or course, or reconciling an unpaid, already booked appointment or class. Use this call when a client purchases: * a pricing option, after calling ‘GET Services` and choosing a specific pricing option’s ID * a retail product, after calling `GET Products` and choosing a specific retail product’s ID * a package, after calling `GET Packages` and choosing a specific package’s ID * a tip to give to a staff member, after calling `GET Staff` and choosing a specific staff member ID, and the amount that the client wants to tip The documentation provides explanations of the request body and response, as well as the cart item metadata, payment item metadata, and purchased cart items.
30 31 32 33 |
# File 'lib/swagger_client/api/sale_api.rb', line 30 def sale_checkout_shopping_cart(request, site_id, version, opts = {}) data, _status_code, _headers = sale_checkout_shopping_cart_with_http_info(request, site_id, version, opts) data end |
#sale_checkout_shopping_cart_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
Purchase pricing options, packages, retail products, or tips for a client. This endpoint provides a wide range of functionality. For example, you can use it when a client purchases new pricing options, retail products, packages, and tips. You can also combine purchasing a new pricing option and many other functions, such as booking a client into a class, booking a new appointment for a client, enrolling a client into an enrollment or course, or reconciling an unpaid, already booked appointment or class. Use this call when a client purchases: * a pricing option, after calling `GET Services` and choosing a specific pricing option’s ID * a retail product, after calling `GET Products` and choosing a specific retail product’s ID * a package, after calling `GET Packages` and choosing a specific package’s ID * a tip to give to a staff member, after calling `GET Staff` and choosing a specific staff member ID, and the amount that the client wants to tip The documentation provides explanations of the request body and response, as well as the cart item metadata, payment item metadata, and purchased cart items.
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 89 90 91 |
# File 'lib/swagger_client/api/sale_api.rb', line 43 def sale_checkout_shopping_cart_with_http_info(request, site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_checkout_shopping_cart ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SaleApi.sale_checkout_shopping_cart" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_checkout_shopping_cart" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_checkout_shopping_cart" end # resource path local_var_path = '/public/v{version}/sale/checkoutshoppingcart'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_checkout_shopping_cart\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_get_accepted_card_types(site_id, version, opts = {}) ⇒ Array<String>
Get credit cards types that a site accepts. Gets a list of card types that the site accepts. You can also use ‘GET Sites` to return the Site object, which contains individual accepted card types for requested sites. This endpoint has no query parameters.The response returns a list of strings. Possible values are: * Visa * MasterCard * Discover * AMEX
99 100 101 102 |
# File 'lib/swagger_client/api/sale_api.rb', line 99 def sale_get_accepted_card_types(site_id, version, opts = {}) data, _status_code, _headers = sale_get_accepted_card_types_with_http_info(site_id, version, opts) data end |
#sale_get_accepted_card_types_with_http_info(site_id, version, opts = {}) ⇒ Array<(Array<String>, Fixnum, Hash)>
Get credit cards types that a site accepts. Gets a list of card types that the site accepts. You can also use `GET Sites` to return the Site object, which contains individual accepted card types for requested sites. This endpoint has no query parameters.The response returns a list of strings. Possible values are: * Visa * MasterCard * Discover * AMEX
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 |
# File 'lib/swagger_client/api/sale_api.rb', line 111 def sale_get_accepted_card_types_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_get_accepted_card_types ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_accepted_card_types" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_accepted_card_types" end # resource path local_var_path = '/public/v{version}/sale/acceptedcardtypes'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<String>') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_get_accepted_card_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_get_contracts(request_location_id, site_id, version, opts = {}) ⇒ GetContractsResponse
Get contracts available for purchase at a site.
166 167 168 169 |
# File 'lib/swagger_client/api/sale_api.rb', line 166 def sale_get_contracts(request_location_id, site_id, version, opts = {}) data, _status_code, _headers = sale_get_contracts_with_http_info(request_location_id, site_id, version, opts) data end |
#sale_get_contracts_with_http_info(request_location_id, site_id, version, opts = {}) ⇒ Array<(GetContractsResponse, Fixnum, Hash)>
Get contracts available for purchase at a site.
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 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/swagger_client/api/sale_api.rb', line 183 def sale_get_contracts_with_http_info(request_location_id, site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_get_contracts ...' end # verify the required parameter 'request_location_id' is set if @api_client.config.client_side_validation && request_location_id.nil? fail ArgumentError, "Missing the required parameter 'request_location_id' when calling SaleApi.sale_get_contracts" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_contracts" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_contracts" end # resource path local_var_path = '/public/v{version}/sale/contracts'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.locationId'] = request_location_id query_params[:'request.consumerId'] = opts[:'request_consumer_id'] if !opts[:'request_consumer_id'].nil? query_params[:'request.contractIds'] = @api_client.build_collection_param(opts[:'request_contract_ids'], :multi) if !opts[:'request_contract_ids'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.soldOnline'] = opts[:'request_sold_online'] if !opts[:'request_sold_online'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetContractsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_get_contracts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_get_custom_payment_methods(site_id, version, opts = {}) ⇒ GetCustomPaymentMethodsResponse
Get payment methods that can be used to pay for sales at a site.
244 245 246 247 |
# File 'lib/swagger_client/api/sale_api.rb', line 244 def sale_get_custom_payment_methods(site_id, version, opts = {}) data, _status_code, _headers = sale_get_custom_payment_methods_with_http_info(site_id, version, opts) data end |
#sale_get_custom_payment_methods_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetCustomPaymentMethodsResponse, Fixnum, Hash)>
Get payment methods that can be used to pay for sales at a site.
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 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/swagger_client/api/sale_api.rb', line 257 def sale_get_custom_payment_methods_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_get_custom_payment_methods ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_custom_payment_methods" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_custom_payment_methods" end # resource path local_var_path = '/public/v{version}/sale/custompaymentmethods'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetCustomPaymentMethodsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_get_custom_payment_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_get_gift_cards(site_id, version, opts = {}) ⇒ GetGiftCardResponse
Get gift cards available for purchase at a site.
313 314 315 316 |
# File 'lib/swagger_client/api/sale_api.rb', line 313 def sale_get_gift_cards(site_id, version, opts = {}) data, _status_code, _headers = sale_get_gift_cards_with_http_info(site_id, version, opts) data end |
#sale_get_gift_cards_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetGiftCardResponse, Fixnum, Hash)>
Get gift cards available for purchase at a site.
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 369 370 371 372 373 374 375 376 |
# File 'lib/swagger_client/api/sale_api.rb', line 329 def sale_get_gift_cards_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_get_gift_cards ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_gift_cards" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_gift_cards" end # resource path local_var_path = '/public/v{version}/sale/giftcards'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.ids'] = @api_client.build_collection_param(opts[:'request_ids'], :multi) if !opts[:'request_ids'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.soldOnline'] = opts[:'request_sold_online'] if !opts[:'request_sold_online'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetGiftCardResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_get_gift_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_get_packages(site_id, version, opts = {}) ⇒ GetPackagesResponse
Get packages available for purchase at a site. A package is typically used to combine multiple services and/or products into a single offering. Staff members can check out multiple appointments while selling the package, and can discount the items included. For example, a spa might bundle a massage, a pedicure, a manicure, a facial, and a few selected beauty products into a package.
388 389 390 391 |
# File 'lib/swagger_client/api/sale_api.rb', line 388 def sale_get_packages(site_id, version, opts = {}) data, _status_code, _headers = sale_get_packages_with_http_info(site_id, version, opts) data end |
#sale_get_packages_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetPackagesResponse, Fixnum, Hash)>
Get packages available for purchase at a site. A package is typically used to combine multiple services and/or products into a single offering. Staff members can check out multiple appointments while selling the package, and can discount the items included. For example, a spa might bundle a massage, a pedicure, a manicure, a facial, and a few selected beauty products into a package.
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/swagger_client/api/sale_api.rb', line 404 def sale_get_packages_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_get_packages ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_packages" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_packages" end # resource path local_var_path = '/public/v{version}/sale/packages'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.packageIds'] = @api_client.build_collection_param(opts[:'request_package_ids'], :multi) if !opts[:'request_package_ids'].nil? query_params[:'request.sellOnline'] = opts[:'request_sell_online'] if !opts[:'request_sell_online'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetPackagesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_get_packages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_get_products(site_id, version, opts = {}) ⇒ GetProductsResponse
Get retail products available for purchase at a site.
465 466 467 468 |
# File 'lib/swagger_client/api/sale_api.rb', line 465 def sale_get_products(site_id, version, opts = {}) data, _status_code, _headers = sale_get_products_with_http_info(site_id, version, opts) data end |
#sale_get_products_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetProductsResponse, Fixnum, Hash)>
Get retail products available for purchase at a site.
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 |
# File 'lib/swagger_client/api/sale_api.rb', line 484 def sale_get_products_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_get_products ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_products" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_products" end # resource path local_var_path = '/public/v{version}/sale/products'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.categoryIds'] = @api_client.build_collection_param(opts[:'request_category_ids'], :multi) if !opts[:'request_category_ids'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.productIds'] = @api_client.build_collection_param(opts[:'request_product_ids'], :multi) if !opts[:'request_product_ids'].nil? query_params[:'request.searchText'] = opts[:'request_search_text'] if !opts[:'request_search_text'].nil? query_params[:'request.sellOnline'] = opts[:'request_sell_online'] if !opts[:'request_sell_online'].nil? query_params[:'request.subCategoryIds'] = @api_client.build_collection_param(opts[:'request_sub_category_ids'], :multi) if !opts[:'request_sub_category_ids'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetProductsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_get_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_get_sales(site_id, version, opts = {}) ⇒ GetSalesResponse
Get sales completed at a site.
541 542 543 544 |
# File 'lib/swagger_client/api/sale_api.rb', line 541 def sale_get_sales(site_id, version, opts = {}) data, _status_code, _headers = sale_get_sales_with_http_info(site_id, version, opts) data end |
#sale_get_sales_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetSalesResponse, Fixnum, Hash)>
Get sales completed at a site.
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 |
# File 'lib/swagger_client/api/sale_api.rb', line 552 def sale_get_sales_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_get_sales ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_sales" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_sales" end # resource path local_var_path = '/public/v{version}/sale/sales'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetSalesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_get_sales\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_get_services(site_id, version, opts = {}) ⇒ GetServicesResponse
Get pricing options available for purchase at a site
612 613 614 615 |
# File 'lib/swagger_client/api/sale_api.rb', line 612 def sale_get_services(site_id, version, opts = {}) data, _status_code, _headers = sale_get_services_with_http_info(site_id, version, opts) data end |
#sale_get_services_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetServicesResponse, Fixnum, Hash)>
Get pricing options available for purchase at a site
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 |
# File 'lib/swagger_client/api/sale_api.rb', line 634 def sale_get_services_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_get_services ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_services" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_services" end # resource path local_var_path = '/public/v{version}/sale/services'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.classId'] = opts[:'request_class_id'] if !opts[:'request_class_id'].nil? query_params[:'request.classScheduleId'] = opts[:'request_class_schedule_id'] if !opts[:'request_class_schedule_id'].nil? query_params[:'request.hideRelatedPrograms'] = opts[:'request_hide_related_programs'] if !opts[:'request_hide_related_programs'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.programIds'] = @api_client.build_collection_param(opts[:'request_program_ids'], :multi) if !opts[:'request_program_ids'].nil? query_params[:'request.sellOnline'] = opts[:'request_sell_online'] if !opts[:'request_sell_online'].nil? query_params[:'request.serviceIds'] = @api_client.build_collection_param(opts[:'request_service_ids'], :multi) if !opts[:'request_service_ids'].nil? query_params[:'request.sessionTypeIds'] = @api_client.build_collection_param(opts[:'request_session_type_ids'], :multi) if !opts[:'request_session_type_ids'].nil? query_params[:'request.staffId'] = opts[:'request_staff_id'] if !opts[:'request_staff_id'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetServicesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_get_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_purchase_contract(request, site_id, version, opts = {}) ⇒ PurchaseContractResponse
Purchase a contract for a client. Allows a client to sign up for a contract or autopay using the information returned from the ‘GET Contracts` endpoint. The client can pay with a new credit card or with a stored credit card. The client must exist at the site specified before this call is made. This endpoint allows a developer to specify whether a client pays now or pays on the `StartDate`.If you are building a client-facing experience, you should talk with the business owner to understand the owner’s policies before you give clients a choice of the two payment types.
696 697 698 699 |
# File 'lib/swagger_client/api/sale_api.rb', line 696 def sale_purchase_contract(request, site_id, version, opts = {}) data, _status_code, _headers = sale_purchase_contract_with_http_info(request, site_id, version, opts) data end |
#sale_purchase_contract_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(PurchaseContractResponse, Fixnum, Hash)>
Purchase a contract for a client. Allows a client to sign up for a contract or autopay using the information returned from the `GET Contracts` endpoint. The client can pay with a new credit card or with a stored credit card. The client must exist at the site specified before this call is made. This endpoint allows a developer to specify whether a client pays now or pays on the `StartDate`.If you are building a client-facing experience, you should talk with the business owner to understand the owner’s policies before you give clients a choice of the two payment types.
709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 |
# File 'lib/swagger_client/api/sale_api.rb', line 709 def sale_purchase_contract_with_http_info(request, site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_purchase_contract ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SaleApi.sale_purchase_contract" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_purchase_contract" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_purchase_contract" end # resource path local_var_path = '/public/v{version}/sale/purchasecontract'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PurchaseContractResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_purchase_contract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sale_purchase_gift_card(request, site_id, version, opts = {}) ⇒ PurchaseGiftCardResponse
Purchase a gift card for a client. Allows a client to purchase a gift card from a business in a variety of designs. The card can be emailed to the recipient on a specific day, and a card title and a personal message can be added.
766 767 768 769 |
# File 'lib/swagger_client/api/sale_api.rb', line 766 def sale_purchase_gift_card(request, site_id, version, opts = {}) data, _status_code, _headers = sale_purchase_gift_card_with_http_info(request, site_id, version, opts) data end |
#sale_purchase_gift_card_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(PurchaseGiftCardResponse, Fixnum, Hash)>
Purchase a gift card for a client. Allows a client to purchase a gift card from a business in a variety of designs. The card can be emailed to the recipient on a specific day, and a card title and a personal message can be added.
779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 |
# File 'lib/swagger_client/api/sale_api.rb', line 779 def sale_purchase_gift_card_with_http_info(request, site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SaleApi.sale_purchase_gift_card ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling SaleApi.sale_purchase_gift_card" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_purchase_gift_card" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_purchase_gift_card" end # resource path local_var_path = '/public/v{version}/sale/purchasegiftcard'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PurchaseGiftCardResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SaleApi#sale_purchase_gift_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |