Class: Solifyn::OrdersApi
- Inherits:
-
Object
- Object
- Solifyn::OrdersApi
- Defined in:
- lib/solifyn/api/orders_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) ⇒ OrdersApi
constructor
A new instance of OrdersApi.
-
#orders_get(id, opts = {}) ⇒ Order
Retrieve Order Retrieve details of a specific order/payment by ID.
-
#orders_get_invoice(id, opts = {}) ⇒ Invoice
Get Order Invoice Retrieve the generated invoice details for the specified order.
-
#orders_get_invoice_with_http_info(id, opts = {}) ⇒ Array<(Invoice, Integer, Hash)>
Get Order Invoice Retrieve the generated invoice details for the specified order.
-
#orders_get_with_http_info(id, opts = {}) ⇒ Array<(Order, Integer, Hash)>
Retrieve Order Retrieve details of a specific order/payment by ID.
-
#orders_list(opts = {}) ⇒ OrderList
List Orders List and query orders/payments belonging to your active business.
-
#orders_list_with_http_info(opts = {}) ⇒ Array<(OrderList, Integer, Hash)>
List Orders List and query orders/payments belonging to your active business.
-
#orders_update(id, order_update, opts = {}) ⇒ Order
Update Order Billing Address Update the billing details of an existing order.
-
#orders_update_with_http_info(id, order_update, opts = {}) ⇒ Array<(Order, Integer, Hash)>
Update Order Billing Address Update the billing details of an existing order.
-
#refunds_create(id, order_refund_create, opts = {}) ⇒ nil
Create Refund Initiate a full or partial refund for a specific payment/order.
-
#refunds_create_with_http_info(id, order_refund_create, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Create Refund Initiate a full or partial refund for a specific payment/order.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/solifyn/api/orders_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#orders_get(id, opts = {}) ⇒ Order
Retrieve Order Retrieve details of a specific order/payment by ID.
27 28 29 30 |
# File 'lib/solifyn/api/orders_api.rb', line 27 def orders_get(id, opts = {}) data, _status_code, _headers = orders_get_with_http_info(id, opts) data end |
#orders_get_invoice(id, opts = {}) ⇒ Invoice
Get Order Invoice Retrieve the generated invoice details for the specified order.
90 91 92 93 |
# File 'lib/solifyn/api/orders_api.rb', line 90 def orders_get_invoice(id, opts = {}) data, _status_code, _headers = orders_get_invoice_with_http_info(id, opts) data end |
#orders_get_invoice_with_http_info(id, opts = {}) ⇒ Array<(Invoice, Integer, Hash)>
Get Order Invoice Retrieve the generated invoice details for the specified order.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/solifyn/api/orders_api.rb', line 100 def orders_get_invoice_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrdersApi.orders_get_invoice ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.orders_get_invoice" end # resource path local_var_path = '/v1/orders/{id}/invoice'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Invoice' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"OrdersApi.orders_get_invoice", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrdersApi#orders_get_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#orders_get_with_http_info(id, opts = {}) ⇒ Array<(Order, Integer, Hash)>
Retrieve Order Retrieve details of a specific order/payment by ID.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/solifyn/api/orders_api.rb', line 37 def orders_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrdersApi.orders_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.orders_get" end # resource path local_var_path = '/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Order' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"OrdersApi.orders_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrdersApi#orders_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#orders_list(opts = {}) ⇒ OrderList
List Orders List and query orders/payments belonging to your active business.
159 160 161 162 |
# File 'lib/solifyn/api/orders_api.rb', line 159 def orders_list(opts = {}) data, _status_code, _headers = orders_list_with_http_info(opts) data end |
#orders_list_with_http_info(opts = {}) ⇒ Array<(OrderList, Integer, Hash)>
List Orders List and query orders/payments belonging to your active business.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/solifyn/api/orders_api.rb', line 175 def orders_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrdersApi.orders_list ...' end # resource path local_var_path = '/v1/orders' # query parameters query_params = opts[:query_params] || {} query_params[:'createdAtLte'] = opts[:'created_at_lte'] if !opts[:'created_at_lte'].nil? query_params[:'createdAtGte'] = opts[:'created_at_gte'] if !opts[:'created_at_gte'].nil? query_params[:'product_id'] = opts[:'product_id'] if !opts[:'product_id'].nil? query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'pageNumber'] = opts[:'page_number'] if !opts[:'page_number'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'OrderList' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"OrdersApi.orders_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrdersApi#orders_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#orders_update(id, order_update, opts = {}) ⇒ Order
Update Order Billing Address Update the billing details of an existing order.
232 233 234 235 |
# File 'lib/solifyn/api/orders_api.rb', line 232 def orders_update(id, order_update, opts = {}) data, _status_code, _headers = orders_update_with_http_info(id, order_update, opts) data end |
#orders_update_with_http_info(id, order_update, opts = {}) ⇒ Array<(Order, Integer, Hash)>
Update Order Billing Address Update the billing details of an existing order.
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/solifyn/api/orders_api.rb', line 243 def orders_update_with_http_info(id, order_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrdersApi.orders_update ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.orders_update" end # verify the required parameter 'order_update' is set if @api_client.config.client_side_validation && order_update.nil? fail ArgumentError, "Missing the required parameter 'order_update' when calling OrdersApi.orders_update" end # resource path local_var_path = '/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(order_update) # return_type return_type = opts[:debug_return_type] || 'Order' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"OrdersApi.orders_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrdersApi#orders_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#refunds_create(id, order_refund_create, opts = {}) ⇒ nil
Create Refund Initiate a full or partial refund for a specific payment/order.
306 307 308 309 |
# File 'lib/solifyn/api/orders_api.rb', line 306 def refunds_create(id, order_refund_create, opts = {}) refunds_create_with_http_info(id, order_refund_create, opts) nil end |
#refunds_create_with_http_info(id, order_refund_create, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Create Refund Initiate a full or partial refund for a specific payment/order.
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/solifyn/api/orders_api.rb', line 317 def refunds_create_with_http_info(id, order_refund_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrdersApi.refunds_create ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.refunds_create" end # verify the required parameter 'order_refund_create' is set if @api_client.config.client_side_validation && order_refund_create.nil? fail ArgumentError, "Missing the required parameter 'order_refund_create' when calling OrdersApi.refunds_create" end # resource path local_var_path = '/v1/orders/{id}/refund'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(order_refund_create) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"OrdersApi.refunds_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrdersApi#refunds_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |