Class: WalleeRubySdk::SubscriptionLedgerEntriesService
- Inherits:
-
Object
- Object
- WalleeRubySdk::SubscriptionLedgerEntriesService
- Defined in:
- lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_subscriptions_ledger_entries(space, opts = {}) ⇒ SubscriptionLedgerEntryListResponse
List all ledger entries.
-
#get_subscriptions_ledger_entries_id(id, space, opts = {}) ⇒ SubscriptionLedgerEntry
Retrieve a ledger entry.
-
#get_subscriptions_ledger_entries_id_with_http_info(id, space, opts = {}) ⇒ Array<(SubscriptionLedgerEntry, Integer, Hash)>
SubscriptionLedgerEntry data, response status code and response headers.
-
#get_subscriptions_ledger_entries_search(space, opts = {}) ⇒ SubscriptionLedgerEntrySearchResponse
Search ledger entries.
-
#get_subscriptions_ledger_entries_search_with_http_info(space, opts = {}) ⇒ Array<(SubscriptionLedgerEntrySearchResponse, Integer, Hash)>
SubscriptionLedgerEntrySearchResponse data, response status code and response headers.
-
#get_subscriptions_ledger_entries_with_http_info(space, opts = {}) ⇒ Array<(SubscriptionLedgerEntryListResponse, Integer, Hash)>
SubscriptionLedgerEntryListResponse data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ SubscriptionLedgerEntriesService
constructor
A new instance of SubscriptionLedgerEntriesService.
-
#post_subscriptions_ledger_entries(space, subscription_ledger_entry_create, opts = {}) ⇒ SubscriptionLedgerEntry
Create a ledger entry.
-
#post_subscriptions_ledger_entries_with_http_info(space, subscription_ledger_entry_create, opts = {}) ⇒ Array<(SubscriptionLedgerEntry, Integer, Hash)>
SubscriptionLedgerEntry data, response status code and response headers.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SubscriptionLedgerEntriesService
Returns a new instance of SubscriptionLedgerEntriesService.
28 29 30 |
# File 'lib/wallee-ruby-sdk/service/subscription_ledger_entries_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_ledger_entries_service.rb', line 25 def api_client @api_client end |
Instance Method Details
#get_subscriptions_ledger_entries(space, opts = {}) ⇒ SubscriptionLedgerEntryListResponse
List all ledger entries
40 41 42 43 |
# File 'lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb', line 40 def get_subscriptions_ledger_entries(space, opts = {}) data, _status_code, _headers = get_subscriptions_ledger_entries_with_http_info(space, opts) data end |
#get_subscriptions_ledger_entries_id(id, space, opts = {}) ⇒ SubscriptionLedgerEntry
Retrieve a ledger entry
131 132 133 134 |
# File 'lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb', line 131 def get_subscriptions_ledger_entries_id(id, space, opts = {}) data, _status_code, _headers = get_subscriptions_ledger_entries_id_with_http_info(id, space, opts) data end |
#get_subscriptions_ledger_entries_id_with_http_info(id, space, opts = {}) ⇒ Array<(SubscriptionLedgerEntry, Integer, Hash)>
Returns SubscriptionLedgerEntry data, response status code and response headers.
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 192 193 194 |
# File 'lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb', line 143 def get_subscriptions_ledger_entries_id_with_http_info(id, space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_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 SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_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 SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_id" end # resource path local_var_path = '/subscriptions/ledger-entries/{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] || 'SubscriptionLedgerEntry' = opts.merge( :operation => :"SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_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: SubscriptionLedgerEntriesService#get_subscriptions_ledger_entries_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#get_subscriptions_ledger_entries_search(space, opts = {}) ⇒ SubscriptionLedgerEntrySearchResponse
Search ledger entries
206 207 208 209 |
# File 'lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb', line 206 def get_subscriptions_ledger_entries_search(space, opts = {}) data, _status_code, _headers = get_subscriptions_ledger_entries_search_with_http_info(space, opts) data end |
#get_subscriptions_ledger_entries_search_with_http_info(space, opts = {}) ⇒ Array<(SubscriptionLedgerEntrySearchResponse, Integer, Hash)>
Returns SubscriptionLedgerEntrySearchResponse data, response status code and response headers.
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 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb', line 221 def get_subscriptions_ledger_entries_search_with_http_info(space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_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 SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_search" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_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 SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_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 SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_search, must be smaller than or equal to 10000.' end # resource path local_var_path = '/subscriptions/ledger-entries/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] || 'SubscriptionLedgerEntrySearchResponse' = opts.merge( :operation => :"SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries_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: SubscriptionLedgerEntriesService#get_subscriptions_ledger_entries_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#get_subscriptions_ledger_entries_with_http_info(space, opts = {}) ⇒ Array<(SubscriptionLedgerEntryListResponse, Integer, Hash)>
Returns SubscriptionLedgerEntryListResponse data, response status code and response headers.
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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb', line 55 def get_subscriptions_ledger_entries_with_http_info(space, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries ...' 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 SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries" end if @api_client.config.client_side_validation && !opts[:'after'].nil? && opts[:'after'] < 1 fail ArgumentError, 'invalid value for "opts[:"after"]" when calling SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries, 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 SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries, 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 SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries, 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 SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries, must be greater than or equal to 1.' end # resource path local_var_path = '/subscriptions/ledger-entries' # 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] || 'SubscriptionLedgerEntryListResponse' = opts.merge( :operation => :"SubscriptionLedgerEntriesService.get_subscriptions_ledger_entries", :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: SubscriptionLedgerEntriesService#get_subscriptions_ledger_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |
#post_subscriptions_ledger_entries(space, subscription_ledger_entry_create, opts = {}) ⇒ SubscriptionLedgerEntry
Create a ledger entry
293 294 295 296 |
# File 'lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb', line 293 def post_subscriptions_ledger_entries(space, subscription_ledger_entry_create, opts = {}) data, _status_code, _headers = post_subscriptions_ledger_entries_with_http_info(space, subscription_ledger_entry_create, opts) data end |
#post_subscriptions_ledger_entries_with_http_info(space, subscription_ledger_entry_create, opts = {}) ⇒ Array<(SubscriptionLedgerEntry, Integer, Hash)>
Returns SubscriptionLedgerEntry data, response status code and response headers.
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 354 355 356 357 358 359 360 361 |
# File 'lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb', line 305 def post_subscriptions_ledger_entries_with_http_info(space, subscription_ledger_entry_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SubscriptionLedgerEntriesService.post_subscriptions_ledger_entries ...' 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 SubscriptionLedgerEntriesService.post_subscriptions_ledger_entries" end # verify the required parameter 'subscription_ledger_entry_create' is set if @api_client.config.client_side_validation && subscription_ledger_entry_create.nil? fail ArgumentError, "Missing the required parameter 'subscription_ledger_entry_create' when calling SubscriptionLedgerEntriesService.post_subscriptions_ledger_entries" end # resource path local_var_path = '/subscriptions/ledger-entries' # 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(subscription_ledger_entry_create) # return_type return_type = opts[:debug_return_type] || 'SubscriptionLedgerEntry' = opts.merge( :operation => :"SubscriptionLedgerEntriesService.post_subscriptions_ledger_entries", :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: SubscriptionLedgerEntriesService#post_subscriptions_ledger_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}\nConnection Timeout: #{connection_timeout}" end return data, status_code, headers end |