Class: WalleeRubySdk::SubscriptionProductPeriodFeesService
- Inherits:
-
Object
- Object
- WalleeRubySdk::SubscriptionProductPeriodFeesService
- Defined in:
- lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_subscriptions_products_period_fees_id(id, space, opts = {}) ⇒ nil
Delete a period fee.
-
#delete_subscriptions_products_period_fees_id_with_http_info(id, space, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
-
#get_subscriptions_products_period_fees(space, opts = {}) ⇒ ProductPeriodFeeListResponse
List all period fees.
-
#get_subscriptions_products_period_fees_id(id, space, opts = {}) ⇒ ProductPeriodFee
Retrieve a period fee.
-
#get_subscriptions_products_period_fees_id_with_http_info(id, space, opts = {}) ⇒ Array<(ProductPeriodFee, Integer, Hash)>
ProductPeriodFee data, response status code and response headers.
-
#get_subscriptions_products_period_fees_search(space, opts = {}) ⇒ ProductPeriodFeeSearchResponse
Search period fees.
-
#get_subscriptions_products_period_fees_search_with_http_info(space, opts = {}) ⇒ Array<(ProductPeriodFeeSearchResponse, Integer, Hash)>
ProductPeriodFeeSearchResponse data, response status code and response headers.
-
#get_subscriptions_products_period_fees_with_http_info(space, opts = {}) ⇒ Array<(ProductPeriodFeeListResponse, Integer, Hash)>
ProductPeriodFeeListResponse data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ SubscriptionProductPeriodFeesService
constructor
A new instance of SubscriptionProductPeriodFeesService.
-
#patch_subscriptions_products_period_fees_id(id, space, product_period_fee_update, opts = {}) ⇒ ProductPeriodFee
Update a period fee.
-
#patch_subscriptions_products_period_fees_id_with_http_info(id, space, product_period_fee_update, opts = {}) ⇒ Array<(ProductPeriodFee, Integer, Hash)>
ProductPeriodFee data, response status code and response headers.
-
#post_subscriptions_products_period_fees(space, product_period_fee_update, opts = {}) ⇒ ProductPeriodFee
Create a period fee.
-
#post_subscriptions_products_period_fees_with_http_info(space, product_period_fee_update, opts = {}) ⇒ Array<(ProductPeriodFee, Integer, Hash)>
ProductPeriodFee data, response status code and response headers.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SubscriptionProductPeriodFeesService
Returns a new instance of SubscriptionProductPeriodFeesService.
28 29 30 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 28 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
25 26 27 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 25 def api_client @api_client end |
Instance Method Details
#delete_subscriptions_products_period_fees_id(id, space, opts = {}) ⇒ nil
Delete a period fee
36 37 38 39 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 36 def delete_subscriptions_products_period_fees_id(id, space, opts = {}) delete_subscriptions_products_period_fees_id_with_http_info(id, space, opts) nil end |
#delete_subscriptions_products_period_fees_id_with_http_info(id, space, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, response status code and response headers.
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 92 93 94 95 96 97 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 47 def delete_subscriptions_products_period_fees_id_with_http_info(id, space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionProductPeriodFeesService.delete_subscriptions_products_period_fees_id ...' 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 SubscriptionProductPeriodFeesService.delete_subscriptions_products_period_fees_id" end # verify the required parameter 'space' is set if @api_client.config.client_side_validation && space.nil? fail ArgumentError, "Missing the required parameter 'space' when calling SubscriptionProductPeriodFeesService.delete_subscriptions_products_period_fees_id" end # resource path local_var_path = '/subscriptions/products/period-fees/{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'] header_params[:'Space'] = space # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] = opts.merge( :operation => :"SubscriptionProductPeriodFeesService.delete_subscriptions_products_period_fees_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionProductPeriodFeesService#delete_subscriptions_products_period_fees_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#get_subscriptions_products_period_fees(space, opts = {}) ⇒ ProductPeriodFeeListResponse
List all period fees
109 110 111 112 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 109 def get_subscriptions_products_period_fees(space, opts = {}) data, _status_code, _headers = get_subscriptions_products_period_fees_with_http_info(space, opts) data end |
#get_subscriptions_products_period_fees_id(id, space, opts = {}) ⇒ ProductPeriodFee
Retrieve a period fee
200 201 202 203 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 200 def get_subscriptions_products_period_fees_id(id, space, opts = {}) data, _status_code, _headers = get_subscriptions_products_period_fees_id_with_http_info(id, space, opts) data end |
#get_subscriptions_products_period_fees_id_with_http_info(id, space, opts = {}) ⇒ Array<(ProductPeriodFee, Integer, Hash)>
Returns ProductPeriodFee data, response status code and response headers.
212 213 214 215 216 217 218 219 220 221 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 263 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 212 def get_subscriptions_products_period_fees_id_with_http_info(id, space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_id ...' 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 SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_id" end # verify the required parameter 'space' is set if @api_client.config.client_side_validation && space.nil? fail ArgumentError, "Missing the required parameter 'space' when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_id" end # resource path local_var_path = '/subscriptions/products/period-fees/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].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'] header_params[:'Space'] = space # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProductPeriodFee' = opts.merge( :operation => :"SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionProductPeriodFeesService#get_subscriptions_products_period_fees_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#get_subscriptions_products_period_fees_search(space, opts = {}) ⇒ ProductPeriodFeeSearchResponse
Search period fees
275 276 277 278 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 275 def get_subscriptions_products_period_fees_search(space, opts = {}) data, _status_code, _headers = get_subscriptions_products_period_fees_search_with_http_info(space, opts) data end |
#get_subscriptions_products_period_fees_search_with_http_info(space, opts = {}) ⇒ Array<(ProductPeriodFeeSearchResponse, Integer, Hash)>
Returns ProductPeriodFeeSearchResponse data, response status code and response headers.
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 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 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 290 def get_subscriptions_products_period_fees_search_with_http_info(space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_search ...' end # verify the required parameter 'space' is set if @api_client.config.client_side_validation && space.nil? fail ArgumentError, "Missing the required parameter 'space' when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_search" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_search, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_search, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 10000 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_search, must be smaller than or equal to 10000.' end # resource path local_var_path = '/subscriptions/products/period-fees/search' # query parameters query_params = opts[:query_params] || {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil? query_params[:'limit'] = opts[:'limit'] unless opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] unless opts[:'offset'].nil? query_params[:'order'] = opts[:'order'] unless opts[:'order'].nil? query_params[:'query'] = opts[:'query'] unless opts[:'query'].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'] header_params[:'Space'] = space # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProductPeriodFeeSearchResponse' = opts.merge( :operation => :"SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees_search", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionProductPeriodFeesService#get_subscriptions_products_period_fees_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#get_subscriptions_products_period_fees_with_http_info(space, opts = {}) ⇒ Array<(ProductPeriodFeeListResponse, Integer, Hash)>
Returns ProductPeriodFeeListResponse data, response status code and response headers.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 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 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 124 def get_subscriptions_products_period_fees_with_http_info(space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees ...' end # verify the required parameter 'space' is set if @api_client.config.client_side_validation && space.nil? fail ArgumentError, "Missing the required parameter 'space' when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees" end if @api_client.config.client_side_validation && !opts[:'after'].nil? && opts[:'after'] < 1 fail ArgumentError, 'invalid value for "opts[:"after"]" when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'before'].nil? && opts[:'before'] < 1 fail ArgumentError, 'invalid value for "opts[:"before"]" when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees, must be greater than or equal to 1.' end # resource path local_var_path = '/subscriptions/products/period-fees' # query parameters query_params = opts[:query_params] || {} query_params[:'after'] = opts[:'after'] unless opts[:'after'].nil? query_params[:'before'] = opts[:'before'] unless opts[:'before'].nil? query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].nil? query_params[:'limit'] = opts[:'limit'] unless opts[:'limit'].nil? query_params[:'order'] = opts[:'order'] unless opts[:'order'].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'] header_params[:'Space'] = space # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProductPeriodFeeListResponse' = opts.merge( :operation => :"SubscriptionProductPeriodFeesService.get_subscriptions_products_period_fees", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionProductPeriodFeesService#get_subscriptions_products_period_fees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#patch_subscriptions_products_period_fees_id(id, space, product_period_fee_update, opts = {}) ⇒ ProductPeriodFee
Update a period fee
363 364 365 366 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 363 def patch_subscriptions_products_period_fees_id(id, space, product_period_fee_update, opts = {}) data, _status_code, _headers = patch_subscriptions_products_period_fees_id_with_http_info(id, space, product_period_fee_update, opts) data end |
#patch_subscriptions_products_period_fees_id_with_http_info(id, space, product_period_fee_update, opts = {}) ⇒ Array<(ProductPeriodFee, Integer, Hash)>
Returns ProductPeriodFee data, response status code and response headers.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 376 def patch_subscriptions_products_period_fees_id_with_http_info(id, space, product_period_fee_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionProductPeriodFeesService.patch_subscriptions_products_period_fees_id ...' 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 SubscriptionProductPeriodFeesService.patch_subscriptions_products_period_fees_id" end # verify the required parameter 'space' is set if @api_client.config.client_side_validation && space.nil? fail ArgumentError, "Missing the required parameter 'space' when calling SubscriptionProductPeriodFeesService.patch_subscriptions_products_period_fees_id" end # verify the required parameter 'product_period_fee_update' is set if @api_client.config.client_side_validation && product_period_fee_update.nil? fail ArgumentError, "Missing the required parameter 'product_period_fee_update' when calling SubscriptionProductPeriodFeesService.patch_subscriptions_products_period_fees_id" end # resource path local_var_path = '/subscriptions/products/period-fees/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) unless content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Space'] = space # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(product_period_fee_update) # return_type return_type = opts[:debug_return_type] || 'ProductPeriodFee' = opts.merge( :operation => :"SubscriptionProductPeriodFeesService.patch_subscriptions_products_period_fees_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionProductPeriodFeesService#patch_subscriptions_products_period_fees_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#post_subscriptions_products_period_fees(space, product_period_fee_update, opts = {}) ⇒ ProductPeriodFee
Create a period fee
445 446 447 448 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 445 def post_subscriptions_products_period_fees(space, product_period_fee_update, opts = {}) data, _status_code, _headers = post_subscriptions_products_period_fees_with_http_info(space, product_period_fee_update, opts) data end |
#post_subscriptions_products_period_fees_with_http_info(space, product_period_fee_update, opts = {}) ⇒ Array<(ProductPeriodFee, Integer, Hash)>
Returns ProductPeriodFee data, response status code and response headers.
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 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb', line 457 def post_subscriptions_products_period_fees_with_http_info(space, product_period_fee_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionProductPeriodFeesService.post_subscriptions_products_period_fees ...' end # verify the required parameter 'space' is set if @api_client.config.client_side_validation && space.nil? fail ArgumentError, "Missing the required parameter 'space' when calling SubscriptionProductPeriodFeesService.post_subscriptions_products_period_fees" end # verify the required parameter 'product_period_fee_update' is set if @api_client.config.client_side_validation && product_period_fee_update.nil? fail ArgumentError, "Missing the required parameter 'product_period_fee_update' when calling SubscriptionProductPeriodFeesService.post_subscriptions_products_period_fees" end # resource path local_var_path = '/subscriptions/products/period-fees' # query parameters query_params = opts[:query_params] || {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) unless opts[:'expand'].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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) unless content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Space'] = space # form parameters form_params = opts[:form_params] || {} # connection timeout connection_timeout = @api_client.config.timeout # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(product_period_fee_update) # return_type return_type = opts[:debug_return_type] || 'ProductPeriodFee' = opts.merge( :operation => :"SubscriptionProductPeriodFeesService.post_subscriptions_products_period_fees", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST.to_sym.downcase, local_var_path, , connection_timeout) if @api_client.config.debugging @api_client.config.logger.debug "API called: SubscriptionProductPeriodFeesService#post_subscriptions_products_period_fees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |