Class: UltracartClient::OrderApi
- Inherits:
-
Object
- Object
- UltracartClient::OrderApi
- Defined in:
- lib/ultracart_api/api/order_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Class Method Summary collapse
Instance Method Summary collapse
-
#adjust_order_total(order_id, desired_total, opts = {}) ⇒ BaseResponse
Adjusts an order total Adjusts an order total.
-
#adjust_order_total_with_http_info(order_id, desired_total, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Adjusts an order total Adjusts an order total.
-
#cancel_order(order_id, opts = {}) ⇒ BaseResponse
Cancel an order Cancel an order on the UltraCart account.
-
#cancel_order_with_http_info(order_id, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Cancel an order Cancel an order on the UltraCart account.
-
#delete_order(order_id, opts = {}) ⇒ nil
Delete an order Delete an order on the UltraCart account.
-
#delete_order_with_http_info(order_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete an order Delete an order on the UltraCart account.
-
#duplicate_order(order_id, opts = {}) ⇒ OrderResponse
Duplicate an order Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
-
#duplicate_order_with_http_info(order_id, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Duplicate an order Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
-
#format(order_id, format_options, opts = {}) ⇒ OrderFormatResponse
Format order Format the order for display at text or html.
-
#format_with_http_info(order_id, format_options, opts = {}) ⇒ Array<(OrderFormatResponse, Fixnum, Hash)>
Format order Format the order for display at text or html.
-
#generate_order_token(order_id, opts = {}) ⇒ OrderTokenResponse
Generate an order token for a given order id Retrieves a single order token for a given order id.
-
#generate_order_token_with_http_info(order_id, opts = {}) ⇒ Array<(OrderTokenResponse, Fixnum, Hash)>
Generate an order token for a given order id Retrieves a single order token for a given order id.
-
#generate_packing_slip_all_dc(order_id, opts = {}) ⇒ OrderPackingSlipResponse
Generate a packing slip for this order across all distribution centers.
-
#generate_packing_slip_all_dc_with_http_info(order_id, opts = {}) ⇒ Array<(OrderPackingSlipResponse, Fixnum, Hash)>
Generate a packing slip for this order across all distribution centers.
-
#generate_packing_slip_specific_dc(distribution_center_code, order_id, opts = {}) ⇒ OrderPackingSlipResponse
Generate a packing slip for this order for the given distribution center.
-
#generate_packing_slip_specific_dc_with_http_info(distribution_center_code, order_id, opts = {}) ⇒ Array<(OrderPackingSlipResponse, Fixnum, Hash)>
Generate a packing slip for this order for the given distribution center.
-
#get_accounts_receivable_retry_config(opts = {}) ⇒ AccountsReceivableRetryConfigResponse
Retrieve A/R Retry Configuration Retrieve A/R Retry Configuration.
-
#get_accounts_receivable_retry_config_with_http_info(opts = {}) ⇒ Array<(AccountsReceivableRetryConfigResponse, Fixnum, Hash)>
Retrieve A/R Retry Configuration Retrieve A/R Retry Configuration.
-
#get_accounts_receivable_retry_stats(opts = {}) ⇒ AccountsReceivableRetryStatsResponse
Retrieve A/R Retry Statistics Retrieve A/R Retry Statistics.
-
#get_accounts_receivable_retry_stats_with_http_info(opts = {}) ⇒ Array<(AccountsReceivableRetryStatsResponse, Fixnum, Hash)>
Retrieve A/R Retry Statistics Retrieve A/R Retry Statistics.
-
#get_order(order_id, opts = {}) ⇒ OrderResponse
Retrieve an order Retrieves a single order using the specified order id.
-
#get_order_by_token(order_by_token_query, opts = {}) ⇒ OrderResponse
Retrieve an order using a token Retrieves a single order using the specified order token.
-
#get_order_by_token_with_http_info(order_by_token_query, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Retrieve an order using a token Retrieves a single order using the specified order token.
-
#get_order_with_http_info(order_id, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Retrieve an order Retrieves a single order using the specified order id.
-
#get_orders(opts = {}) ⇒ OrdersResponse
Retrieve orders Retrieves a group of orders from the account.
-
#get_orders_batch(order_batch, opts = {}) ⇒ OrdersResponse
Retrieve order batch Retrieves a group of orders from the account based on an array of order ids.
-
#get_orders_batch_with_http_info(order_batch, opts = {}) ⇒ Array<(OrdersResponse, Fixnum, Hash)>
Retrieve order batch Retrieves a group of orders from the account based on an array of order ids.
-
#get_orders_by_query(order_query, opts = {}) ⇒ OrdersResponse
Retrieve orders by query Retrieves a group of orders from the account based on a query object.
-
#get_orders_by_query_with_http_info(order_query, opts = {}) ⇒ Array<(OrdersResponse, Fixnum, Hash)>
Retrieve orders by query Retrieves a group of orders from the account based on a query object.
-
#get_orders_with_http_info(opts = {}) ⇒ Array<(OrdersResponse, Fixnum, Hash)>
Retrieve orders Retrieves a group of orders from the account.
-
#initialize(api_client = ApiClient.default) ⇒ OrderApi
constructor
A new instance of OrderApi.
-
#insert_order(order, opts = {}) ⇒ OrderResponse
Insert an order Inserts a new order on the UltraCart account.
-
#insert_order_with_http_info(order, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Insert an order Inserts a new order on the UltraCart account.
-
#process_payment(order_id, process_payment_request, opts = {}) ⇒ OrderProcessPaymentResponse
Process payment Process payment on order.
-
#process_payment_with_http_info(order_id, process_payment_request, opts = {}) ⇒ Array<(OrderProcessPaymentResponse, Fixnum, Hash)>
Process payment Process payment on order.
-
#refund_order(order, order_id, opts = {}) ⇒ OrderResponse
Refund an order Perform a refund operation on an order and then update the order if successful.
-
#refund_order_with_http_info(order, order_id, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Refund an order Perform a refund operation on an order and then update the order if successful.
-
#replacement(order_id, replacement, opts = {}) ⇒ OrderReplacementResponse
Replacement order Create a replacement order based upon a previous order.
-
#replacement_with_http_info(order_id, replacement, opts = {}) ⇒ Array<(OrderReplacementResponse, Fixnum, Hash)>
Replacement order Create a replacement order based upon a previous order.
-
#resend_receipt(order_id, opts = {}) ⇒ BaseResponse
Resend receipt Resend the receipt for an order on the UltraCart account.
-
#resend_receipt_with_http_info(order_id, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Resend receipt Resend the receipt for an order on the UltraCart account.
-
#resend_shipment_confirmation(order_id, opts = {}) ⇒ BaseResponse
Resend shipment confirmation Resend shipment confirmation for an order on the UltraCart account.
-
#resend_shipment_confirmation_with_http_info(order_id, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Resend shipment confirmation Resend shipment confirmation for an order on the UltraCart account.
-
#update_accounts_receivable_retry_config(retry_config, opts = {}) ⇒ BaseResponse
Update A/R Retry Configuration Update A/R Retry Configuration.
-
#update_accounts_receivable_retry_config_with_http_info(retry_config, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Update A/R Retry Configuration Update A/R Retry Configuration.
-
#update_order(order, order_id, opts = {}) ⇒ OrderResponse
Update an order Update a new order on the UltraCart account.
-
#update_order_with_http_info(order, order_id, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Update an order Update a new order on the UltraCart account.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ultracart_api/api/order_api.rb', line 17 def api_client @api_client end |
Class Method Details
.new_using_api_key(simple_key, verify_ssl = true, debugging = false) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ultracart_api/api/order_api.rb', line 23 def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false) api_config = Configuration.new api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key api_config.api_version = '2017-03-01' api_config.verify_ssl = verify_ssl api_client = ApiClient.new(api_config) api_client.config.debugging = debugging UltracartClient::OrderApi.new(api_client) end |
Instance Method Details
#adjust_order_total(order_id, desired_total, opts = {}) ⇒ BaseResponse
Adjusts an order total Adjusts an order total. Adjusts individual items appropriately and considers taxes. Desired total should be provided in the same currency as the order and must be less than the current total and greater than zero. This call will change the order total. It returns true if the desired total is achieved. If the goal seeking algorithm falls short (usually by pennies), this method returns back false. View the merchant notes for the order for further details.
41 42 43 44 |
# File 'lib/ultracart_api/api/order_api.rb', line 41 def adjust_order_total(order_id, desired_total, opts = {}) data, _status_code, _headers = adjust_order_total_with_http_info(order_id, desired_total, opts) data end |
#adjust_order_total_with_http_info(order_id, desired_total, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Adjusts an order total Adjusts an order total. Adjusts individual items appropriately and considers taxes. Desired total should be provided in the same currency as the order and must be less than the current total and greater than zero. This call will change the order total. It returns true if the desired total is achieved. If the goal seeking algorithm falls short (usually by pennies), this method returns back false. View the merchant notes for the order for further details.
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 92 93 94 95 |
# File 'lib/ultracart_api/api/order_api.rb', line 52 def adjust_order_total_with_http_info(order_id, desired_total, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.adjust_order_total ...' 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 OrderApi.adjust_order_total" end # verify the required parameter 'desired_total' is set if @api_client.config.client_side_validation && desired_total.nil? fail ArgumentError, "Missing the required parameter 'desired_total' when calling OrderApi.adjust_order_total" end # resource path local_var_path = '/order/orders/{order_id}/adjust_order_total/{desired_total}'.sub('{' + 'order_id' + '}', order_id.to_s).sub('{' + 'desired_total' + '}', desired_total.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'BaseResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#adjust_order_total\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#cancel_order(order_id, opts = {}) ⇒ BaseResponse
Cancel an order Cancel an order on the UltraCart account. If the success flag is false, then consult the error message for why it failed.
101 102 103 104 |
# File 'lib/ultracart_api/api/order_api.rb', line 101 def cancel_order(order_id, opts = {}) data, _status_code, _headers = cancel_order_with_http_info(order_id, opts) data end |
#cancel_order_with_http_info(order_id, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Cancel an order Cancel an order on the UltraCart account. If the success flag is false, then consult the error message for why it failed.
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 |
# File 'lib/ultracart_api/api/order_api.rb', line 111 def cancel_order_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.cancel_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 OrderApi.cancel_order" end # resource path local_var_path = '/order/orders/{order_id}/cancel'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'BaseResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#cancel_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_order(order_id, opts = {}) ⇒ nil
Delete an order Delete an order on the UltraCart account.
156 157 158 159 |
# File 'lib/ultracart_api/api/order_api.rb', line 156 def delete_order(order_id, opts = {}) delete_order_with_http_info(order_id, opts) nil end |
#delete_order_with_http_info(order_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete an order Delete an order on the UltraCart account.
166 167 168 169 170 171 172 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 |
# File 'lib/ultracart_api/api/order_api.rb', line 166 def delete_order_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.delete_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 OrderApi.delete_order" end # resource path local_var_path = '/order/orders/{order_id}'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#delete_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#duplicate_order(order_id, opts = {}) ⇒ OrderResponse
Duplicate an order Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
211 212 213 214 |
# File 'lib/ultracart_api/api/order_api.rb', line 211 def duplicate_order(order_id, opts = {}) data, _status_code, _headers = duplicate_order_with_http_info(order_id, opts) data end |
#duplicate_order_with_http_info(order_id, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Duplicate an order Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/ultracart_api/api/order_api.rb', line 222 def duplicate_order_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.duplicate_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 OrderApi.duplicate_order" end # resource path local_var_path = '/order/orders/{order_id}/duplicate'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#duplicate_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#format(order_id, format_options, opts = {}) ⇒ OrderFormatResponse
Format order Format the order for display at text or html
269 270 271 272 |
# File 'lib/ultracart_api/api/order_api.rb', line 269 def format(order_id, , opts = {}) data, _status_code, _headers = format_with_http_info(order_id, , opts) data end |
#format_with_http_info(order_id, format_options, opts = {}) ⇒ Array<(OrderFormatResponse, Fixnum, Hash)>
Format order Format the order for display at text or html
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/ultracart_api/api/order_api.rb', line 280 def format_with_http_info(order_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.format ...' 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 OrderApi.format" end # verify the required parameter 'format_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'format_options' when calling OrderApi.format" end # resource path local_var_path = '/order/orders/{order_id}/format'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderFormatResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#format\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#generate_order_token(order_id, opts = {}) ⇒ OrderTokenResponse
Generate an order token for a given order id Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
329 330 331 332 |
# File 'lib/ultracart_api/api/order_api.rb', line 329 def generate_order_token(order_id, opts = {}) data, _status_code, _headers = generate_order_token_with_http_info(order_id, opts) data end |
#generate_order_token_with_http_info(order_id, opts = {}) ⇒ Array<(OrderTokenResponse, Fixnum, Hash)>
Generate an order token for a given order id Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
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 377 378 |
# File 'lib/ultracart_api/api/order_api.rb', line 339 def generate_order_token_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.generate_order_token ...' 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 OrderApi.generate_order_token" end # resource path local_var_path = '/order/orders/token/{order_id}'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderTokenResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#generate_order_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#generate_packing_slip_all_dc(order_id, opts = {}) ⇒ OrderPackingSlipResponse
Generate a packing slip for this order across all distribution centers. The packing slip PDF that is returned is base 64 encoded
384 385 386 387 |
# File 'lib/ultracart_api/api/order_api.rb', line 384 def generate_packing_slip_all_dc(order_id, opts = {}) data, _status_code, _headers = generate_packing_slip_all_dc_with_http_info(order_id, opts) data end |
#generate_packing_slip_all_dc_with_http_info(order_id, opts = {}) ⇒ Array<(OrderPackingSlipResponse, Fixnum, Hash)>
Generate a packing slip for this order across all distribution centers. The packing slip PDF that is returned is base 64 encoded
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 426 427 428 429 430 431 432 433 |
# File 'lib/ultracart_api/api/order_api.rb', line 394 def generate_packing_slip_all_dc_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.generate_packing_slip_all_dc ...' 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 OrderApi.generate_packing_slip_all_dc" end # resource path local_var_path = '/order/orders/{order_id}/packing_slip'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderPackingSlipResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#generate_packing_slip_all_dc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#generate_packing_slip_specific_dc(distribution_center_code, order_id, opts = {}) ⇒ OrderPackingSlipResponse
Generate a packing slip for this order for the given distribution center. The packing slip PDF that is returned is base 64 encoded
440 441 442 443 |
# File 'lib/ultracart_api/api/order_api.rb', line 440 def generate_packing_slip_specific_dc(distribution_center_code, order_id, opts = {}) data, _status_code, _headers = generate_packing_slip_specific_dc_with_http_info(distribution_center_code, order_id, opts) data end |
#generate_packing_slip_specific_dc_with_http_info(distribution_center_code, order_id, opts = {}) ⇒ Array<(OrderPackingSlipResponse, Fixnum, Hash)>
Generate a packing slip for this order for the given distribution center. The packing slip PDF that is returned is base 64 encoded
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/ultracart_api/api/order_api.rb', line 451 def generate_packing_slip_specific_dc_with_http_info(distribution_center_code, order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.generate_packing_slip_specific_dc ...' end # verify the required parameter 'distribution_center_code' is set if @api_client.config.client_side_validation && distribution_center_code.nil? fail ArgumentError, "Missing the required parameter 'distribution_center_code' when calling OrderApi.generate_packing_slip_specific_dc" 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 OrderApi.generate_packing_slip_specific_dc" end # resource path local_var_path = '/order/orders/{order_id}/packing_slip/{distribution_center_code}'.sub('{' + 'distribution_center_code' + '}', distribution_center_code.to_s).sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderPackingSlipResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#generate_packing_slip_specific_dc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_accounts_receivable_retry_config(opts = {}) ⇒ AccountsReceivableRetryConfigResponse
Retrieve A/R Retry Configuration Retrieve A/R Retry Configuration. This is primarily an internal API call. It is doubtful you would ever need to use it.
499 500 501 502 |
# File 'lib/ultracart_api/api/order_api.rb', line 499 def get_accounts_receivable_retry_config(opts = {}) data, _status_code, _headers = get_accounts_receivable_retry_config_with_http_info(opts) data end |
#get_accounts_receivable_retry_config_with_http_info(opts = {}) ⇒ Array<(AccountsReceivableRetryConfigResponse, Fixnum, Hash)>
Retrieve A/R Retry Configuration Retrieve A/R Retry Configuration. This is primarily an internal API call. It is doubtful you would ever need to use it.
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 535 536 537 538 539 540 541 542 543 |
# File 'lib/ultracart_api/api/order_api.rb', line 508 def get_accounts_receivable_retry_config_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.get_accounts_receivable_retry_config ...' end # resource path local_var_path = '/order/accountsReceivableRetryConfig' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'AccountsReceivableRetryConfigResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#get_accounts_receivable_retry_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_accounts_receivable_retry_stats(opts = {}) ⇒ AccountsReceivableRetryStatsResponse
Retrieve A/R Retry Statistics Retrieve A/R Retry Statistics. This is primarily an internal API call. It is doubtful you would ever need to use it.
550 551 552 553 |
# File 'lib/ultracart_api/api/order_api.rb', line 550 def get_accounts_receivable_retry_stats(opts = {}) data, _status_code, _headers = get_accounts_receivable_retry_stats_with_http_info(opts) data end |
#get_accounts_receivable_retry_stats_with_http_info(opts = {}) ⇒ Array<(AccountsReceivableRetryStatsResponse, Fixnum, Hash)>
Retrieve A/R Retry Statistics Retrieve A/R Retry Statistics. This is primarily an internal API call. It is doubtful you would ever need to use it.
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 595 596 597 598 |
# File 'lib/ultracart_api/api/order_api.rb', line 561 def get_accounts_receivable_retry_stats_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.get_accounts_receivable_retry_stats ...' end # resource path local_var_path = '/order/accountsReceivableRetryConfig/stats' # query parameters query_params = {} query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'AccountsReceivableRetryStatsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#get_accounts_receivable_retry_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_order(order_id, opts = {}) ⇒ OrderResponse
Retrieve an order Retrieves a single order using the specified order id.
605 606 607 608 |
# File 'lib/ultracart_api/api/order_api.rb', line 605 def get_order(order_id, opts = {}) data, _status_code, _headers = get_order_with_http_info(order_id, opts) data end |
#get_order_by_token(order_by_token_query, opts = {}) ⇒ OrderResponse
Retrieve an order using a token Retrieves a single order using the specified order token.
663 664 665 666 |
# File 'lib/ultracart_api/api/order_api.rb', line 663 def get_order_by_token(order_by_token_query, opts = {}) data, _status_code, _headers = get_order_by_token_with_http_info(order_by_token_query, opts) data end |
#get_order_by_token_with_http_info(order_by_token_query, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Retrieve an order using a token Retrieves a single order using the specified order token.
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/ultracart_api/api/order_api.rb', line 674 def get_order_by_token_with_http_info(order_by_token_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.get_order_by_token ...' end # verify the required parameter 'order_by_token_query' is set if @api_client.config.client_side_validation && order_by_token_query.nil? fail ArgumentError, "Missing the required parameter 'order_by_token_query' when calling OrderApi.get_order_by_token" end # resource path local_var_path = '/order/orders/token' # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order_by_token_query) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#get_order_by_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_order_with_http_info(order_id, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Retrieve an order Retrieves a single order using the specified order id.
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 |
# File 'lib/ultracart_api/api/order_api.rb', line 616 def get_order_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.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 OrderApi.get_order" end # resource path local_var_path = '/order/orders/{order_id}'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_orders(opts = {}) ⇒ OrdersResponse
Retrieve orders Retrieves a group of orders from the account. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
750 751 752 753 |
# File 'lib/ultracart_api/api/order_api.rb', line 750 def get_orders(opts = {}) data, _status_code, _headers = get_orders_with_http_info(opts) data end |
#get_orders_batch(order_batch, opts = {}) ⇒ OrdersResponse
Retrieve order batch Retrieves a group of orders from the account based on an array of order ids. If more than 500 order ids are specified, the API call will fail with a bad request error.
863 864 865 866 |
# File 'lib/ultracart_api/api/order_api.rb', line 863 def get_orders_batch(order_batch, opts = {}) data, _status_code, _headers = get_orders_batch_with_http_info(order_batch, opts) data end |
#get_orders_batch_with_http_info(order_batch, opts = {}) ⇒ Array<(OrdersResponse, Fixnum, Hash)>
Retrieve order batch Retrieves a group of orders from the account based on an array of order ids. If more than 500 order ids are specified, the API call will fail with a bad request error.
874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 |
# File 'lib/ultracart_api/api/order_api.rb', line 874 def get_orders_batch_with_http_info(order_batch, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.get_orders_batch ...' end # verify the required parameter 'order_batch' is set if @api_client.config.client_side_validation && order_batch.nil? fail ArgumentError, "Missing the required parameter 'order_batch' when calling OrderApi.get_orders_batch" end # resource path local_var_path = '/order/orders/batch' # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order_batch) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrdersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#get_orders_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_orders_by_query(order_query, opts = {}) ⇒ OrdersResponse
Retrieve orders by query Retrieves a group of orders from the account based on a query object. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
924 925 926 927 |
# File 'lib/ultracart_api/api/order_api.rb', line 924 def get_orders_by_query(order_query, opts = {}) data, _status_code, _headers = get_orders_by_query_with_http_info(order_query, opts) data end |
#get_orders_by_query_with_http_info(order_query, opts = {}) ⇒ Array<(OrdersResponse, Fixnum, Hash)>
Retrieve orders by query Retrieves a group of orders from the account based on a query object. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 |
# File 'lib/ultracart_api/api/order_api.rb', line 938 def get_orders_by_query_with_http_info(order_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.get_orders_by_query ...' end # verify the required parameter 'order_query' is set if @api_client.config.client_side_validation && order_query.nil? fail ArgumentError, "Missing the required parameter 'order_query' when calling OrderApi.get_orders_by_query" end # resource path local_var_path = '/order/orders/query' # query parameters query_params = {} query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil? query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil? query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil? query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order_query) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrdersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#get_orders_by_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_orders_with_http_info(opts = {}) ⇒ Array<(OrdersResponse, Fixnum, Hash)>
Retrieve orders Retrieves a group of orders from the account. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
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 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 |
# File 'lib/ultracart_api/api/order_api.rb', line 790 def get_orders_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.get_orders ...' end # resource path local_var_path = '/order/orders' # query parameters query_params = {} query_params[:'order_id'] = opts[:'order_id'] if !opts[:'order_id'].nil? query_params[:'payment_method'] = opts[:'payment_method'] if !opts[:'payment_method'].nil? query_params[:'company'] = opts[:'company'] if !opts[:'company'].nil? query_params[:'first_name'] = opts[:'first_name'] if !opts[:'first_name'].nil? query_params[:'last_name'] = opts[:'last_name'] if !opts[:'last_name'].nil? query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil? query_params[:'state_region'] = opts[:'state_region'] if !opts[:'state_region'].nil? query_params[:'postal_code'] = opts[:'postal_code'] if !opts[:'postal_code'].nil? query_params[:'country_code'] = opts[:'country_code'] if !opts[:'country_code'].nil? query_params[:'phone'] = opts[:'phone'] if !opts[:'phone'].nil? query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'cc_email'] = opts[:'cc_email'] if !opts[:'cc_email'].nil? query_params[:'total'] = opts[:'total'] if !opts[:'total'].nil? query_params[:'screen_branding_theme_code'] = opts[:'screen_branding_theme_code'] if !opts[:'screen_branding_theme_code'].nil? query_params[:'storefront_host_name'] = opts[:'storefront_host_name'] if !opts[:'storefront_host_name'].nil? query_params[:'creation_date_begin'] = opts[:'creation_date_begin'] if !opts[:'creation_date_begin'].nil? query_params[:'creation_date_end'] = opts[:'creation_date_end'] if !opts[:'creation_date_end'].nil? query_params[:'payment_date_begin'] = opts[:'payment_date_begin'] if !opts[:'payment_date_begin'].nil? query_params[:'payment_date_end'] = opts[:'payment_date_end'] if !opts[:'payment_date_end'].nil? query_params[:'shipment_date_begin'] = opts[:'shipment_date_begin'] if !opts[:'shipment_date_begin'].nil? query_params[:'shipment_date_end'] = opts[:'shipment_date_end'] if !opts[:'shipment_date_end'].nil? query_params[:'rma'] = opts[:'rma'] if !opts[:'rma'].nil? query_params[:'purchase_order_number'] = opts[:'purchase_order_number'] if !opts[:'purchase_order_number'].nil? query_params[:'item_id'] = opts[:'item_id'] if !opts[:'item_id'].nil? query_params[:'current_stage'] = opts[:'current_stage'] if !opts[:'current_stage'].nil? query_params[:'channel_partner_code'] = opts[:'channel_partner_code'] if !opts[:'channel_partner_code'].nil? query_params[:'channel_partner_order_id'] = opts[:'channel_partner_order_id'] if !opts[:'channel_partner_order_id'].nil? query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil? query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil? query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil? query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrdersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#get_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#insert_order(order, opts = {}) ⇒ OrderResponse
Insert an order Inserts a new order on the UltraCart account. This is probably NOT the method you want. This is for channel orders. For regular orders the customer is entering, use the CheckoutApi. It has many, many more features, checks, and validations.
988 989 990 991 |
# File 'lib/ultracart_api/api/order_api.rb', line 988 def insert_order(order, opts = {}) data, _status_code, _headers = insert_order_with_http_info(order, opts) data end |
#insert_order_with_http_info(order, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Insert an order Inserts a new order on the UltraCart account. This is probably NOT the method you want. This is for channel orders. For regular orders the customer is entering, use the CheckoutApi. It has many, many more features, checks, and validations.
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 |
# File 'lib/ultracart_api/api/order_api.rb', line 999 def insert_order_with_http_info(order, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.insert_order ...' end # verify the required parameter 'order' is set if @api_client.config.client_side_validation && order.nil? fail ArgumentError, "Missing the required parameter 'order' when calling OrderApi.insert_order" end # resource path local_var_path = '/order/orders' # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#insert_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#process_payment(order_id, process_payment_request, opts = {}) ⇒ OrderProcessPaymentResponse
Process payment Process payment on order
1046 1047 1048 1049 |
# File 'lib/ultracart_api/api/order_api.rb', line 1046 def process_payment(order_id, process_payment_request, opts = {}) data, _status_code, _headers = process_payment_with_http_info(order_id, process_payment_request, opts) data end |
#process_payment_with_http_info(order_id, process_payment_request, opts = {}) ⇒ Array<(OrderProcessPaymentResponse, Fixnum, Hash)>
Process payment Process payment on order
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'lib/ultracart_api/api/order_api.rb', line 1057 def process_payment_with_http_info(order_id, process_payment_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.process_payment ...' 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 OrderApi.process_payment" end # verify the required parameter 'process_payment_request' is set if @api_client.config.client_side_validation && process_payment_request.nil? fail ArgumentError, "Missing the required parameter 'process_payment_request' when calling OrderApi.process_payment" end # resource path local_var_path = '/order/orders/{order_id}/process_payment'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(process_payment_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderProcessPaymentResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#process_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#refund_order(order, order_id, opts = {}) ⇒ OrderResponse
Refund an order Perform a refund operation on an order and then update the order if successful
1113 1114 1115 1116 |
# File 'lib/ultracart_api/api/order_api.rb', line 1113 def refund_order(order, order_id, opts = {}) data, _status_code, _headers = refund_order_with_http_info(order, order_id, opts) data end |
#refund_order_with_http_info(order, order_id, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Refund an order Perform a refund operation on an order and then update the order if successful
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 |
# File 'lib/ultracart_api/api/order_api.rb', line 1130 def refund_order_with_http_info(order, order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.refund_order ...' end # verify the required parameter 'order' is set if @api_client.config.client_side_validation && order.nil? fail ArgumentError, "Missing the required parameter 'order' when calling OrderApi.refund_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 OrderApi.refund_order" end # resource path local_var_path = '/order/orders/{order_id}/refund'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} query_params[:'reject_after_refund'] = opts[:'reject_after_refund'] if !opts[:'reject_after_refund'].nil? query_params[:'skip_customer_notification'] = opts[:'skip_customer_notification'] if !opts[:'skip_customer_notification'].nil? query_params[:'auto_order_cancel'] = opts[:'auto_order_cancel'] if !opts[:'auto_order_cancel'].nil? query_params[:'manual_refund'] = opts[:'manual_refund'] if !opts[:'manual_refund'].nil? query_params[:'reverse_affiliate_transactions'] = opts[:'reverse_affiliate_transactions'] if !opts[:'reverse_affiliate_transactions'].nil? query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#refund_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#replacement(order_id, replacement, opts = {}) ⇒ OrderReplacementResponse
Replacement order Create a replacement order based upon a previous order
1186 1187 1188 1189 |
# File 'lib/ultracart_api/api/order_api.rb', line 1186 def replacement(order_id, replacement, opts = {}) data, _status_code, _headers = replacement_with_http_info(order_id, replacement, opts) data end |
#replacement_with_http_info(order_id, replacement, opts = {}) ⇒ Array<(OrderReplacementResponse, Fixnum, Hash)>
Replacement order Create a replacement order based upon a previous order
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 |
# File 'lib/ultracart_api/api/order_api.rb', line 1197 def replacement_with_http_info(order_id, replacement, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.replacement ...' 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 OrderApi.replacement" end # verify the required parameter 'replacement' is set if @api_client.config.client_side_validation && replacement.nil? fail ArgumentError, "Missing the required parameter 'replacement' when calling OrderApi.replacement" end # resource path local_var_path = '/order/orders/{order_id}/replacement'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(replacement) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'OrderReplacementResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#replacement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#resend_receipt(order_id, opts = {}) ⇒ BaseResponse
Resend receipt Resend the receipt for an order on the UltraCart account.
1246 1247 1248 1249 |
# File 'lib/ultracart_api/api/order_api.rb', line 1246 def resend_receipt(order_id, opts = {}) data, _status_code, _headers = resend_receipt_with_http_info(order_id, opts) data end |
#resend_receipt_with_http_info(order_id, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Resend receipt Resend the receipt for an order on the UltraCart account.
1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 |
# File 'lib/ultracart_api/api/order_api.rb', line 1256 def resend_receipt_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.resend_receipt ...' 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 OrderApi.resend_receipt" end # resource path local_var_path = '/order/orders/{order_id}/resend_receipt'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'BaseResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#resend_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#resend_shipment_confirmation(order_id, opts = {}) ⇒ BaseResponse
Resend shipment confirmation Resend shipment confirmation for an order on the UltraCart account.
1301 1302 1303 1304 |
# File 'lib/ultracart_api/api/order_api.rb', line 1301 def resend_shipment_confirmation(order_id, opts = {}) data, _status_code, _headers = resend_shipment_confirmation_with_http_info(order_id, opts) data end |
#resend_shipment_confirmation_with_http_info(order_id, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Resend shipment confirmation Resend shipment confirmation for an order on the UltraCart account.
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 |
# File 'lib/ultracart_api/api/order_api.rb', line 1311 def resend_shipment_confirmation_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.resend_shipment_confirmation ...' 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 OrderApi.resend_shipment_confirmation" end # resource path local_var_path = '/order/orders/{order_id}/resend_shipment_confirmation'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'BaseResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#resend_shipment_confirmation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_accounts_receivable_retry_config(retry_config, opts = {}) ⇒ BaseResponse
Update A/R Retry Configuration Update A/R Retry Configuration. This is primarily an internal API call. It is doubtful you would ever need to use it.
1356 1357 1358 1359 |
# File 'lib/ultracart_api/api/order_api.rb', line 1356 def update_accounts_receivable_retry_config(retry_config, opts = {}) data, _status_code, _headers = update_accounts_receivable_retry_config_with_http_info(retry_config, opts) data end |
#update_accounts_receivable_retry_config_with_http_info(retry_config, opts = {}) ⇒ Array<(BaseResponse, Fixnum, Hash)>
Update A/R Retry Configuration Update A/R Retry Configuration. This is primarily an internal API call. It is doubtful you would ever need to use it.
1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 |
# File 'lib/ultracart_api/api/order_api.rb', line 1366 def update_accounts_receivable_retry_config_with_http_info(retry_config, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.update_accounts_receivable_retry_config ...' end # verify the required parameter 'retry_config' is set if @api_client.config.client_side_validation && retry_config.nil? fail ArgumentError, "Missing the required parameter 'retry_config' when calling OrderApi.update_accounts_receivable_retry_config" end # resource path local_var_path = '/order/accountsReceivableRetryConfig' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(retry_config) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'BaseResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#update_accounts_receivable_retry_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_order(order, order_id, opts = {}) ⇒ OrderResponse
Update an order Update a new order on the UltraCart account. This is probably NOT the method you want. It is rare to update a completed order. This will not trigger charges, emails, or any other automation.
1413 1414 1415 1416 |
# File 'lib/ultracart_api/api/order_api.rb', line 1413 def update_order(order, order_id, opts = {}) data, _status_code, _headers = update_order_with_http_info(order, order_id, opts) data end |
#update_order_with_http_info(order, order_id, opts = {}) ⇒ Array<(OrderResponse, Fixnum, Hash)>
Update an order Update a new order on the UltraCart account. This is probably NOT the method you want. It is rare to update a completed order. This will not trigger charges, emails, or any other automation.
1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 |
# File 'lib/ultracart_api/api/order_api.rb', line 1425 def update_order_with_http_info(order, order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrderApi.update_order ...' end # verify the required parameter 'order' is set if @api_client.config.client_side_validation && order.nil? fail ArgumentError, "Missing the required parameter 'order' when calling OrderApi.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 OrderApi.update_order" end # resource path local_var_path = '/order/orders/{order_id}'.sub('{' + 'order_id' + '}', order_id.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(order) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrderApi#update_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |