mx-platform-ruby 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 633ac15d0a242e33d7a2e6e8e822d33dcf49604fbbdd3ede811655ae6d333221
4
- data.tar.gz: 853e87b4bc16ae383ae138400cce437e4be86641b4d8d5f65d3bbc470f1baef4
3
+ metadata.gz: 7f44975b00f2bdf10c89ce33faa117c1ccf3d054b8dd2865bfbe7525022ba134
4
+ data.tar.gz: 3106281466bbd8b640045dd2591644e01c86657d70a8aa55caf141caa9ac3420
5
5
  SHA512:
6
- metadata.gz: aa179190cf17c5c79eebc03fdbcfd6cd3077a25d61ca668f2306715ca6433dc9d215110e933af9a6a646953a3a854c11118e20ecedfb40da219223a7615ac99b
7
- data.tar.gz: ca372ccfe3bd0937fe0cc3923ec8b04007abf750796707db7edcf003d4fa7196771f8eb3120339c404fd419ce07ae1076dafe17db8213bd150dd136d7093b3c0
6
+ metadata.gz: 2e8ba61ff2fa97d8d4b703c0b07d6e03c4315b3c82967759eff150ab083cec7b3e81eca1c06e5a38731a8dd4ef64382ce885caa01ed477d6f2057e288137097e
7
+ data.tar.gz: 48c7af2ffd3f9f68a2e14c7b72f69f3381dccfbec84cd89a7917d52ca2ab7e52204bb7abfba6dc50eb1cfb31a1a5e1f5df0385463fdb27a6586cbce1af81a407
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mx-platform-ruby (0.9.2)
4
+ mx-platform-ruby (0.9.3)
5
5
  faraday (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -38,7 +38,7 @@ Please follow the [installation](#installation) procedure and then run the follo
38
38
  ```ruby
39
39
  require 'mx-platform-ruby'
40
40
 
41
- MxPlatformRuby.configure do |config|
41
+ ::MxPlatformRuby.configure do |config|
42
42
  # Configure with your Client ID/API Key from https://dashboard.mx.com
43
43
  config.username = 'Your Client ID'
44
44
  config.password = 'Your API Key'
@@ -51,16 +51,16 @@ api_client = ::MxPlatformRuby::ApiClient.new
51
51
  api_client.default_headers['Accept'] = 'application/vnd.mx.api.v1+json'
52
52
  mx_platform_api = ::MxPlatformRuby::MxPlatformApi.new(api_client)
53
53
 
54
- user_create_request_body = MxPlatformRuby::UserCreateRequestBody.new(
55
- user: MxPlatformRuby::UserCreateRequest.new(
56
- metadata: "Creating a user!"
54
+ request_body = ::MxPlatformRuby::UserCreateRequestBody.new(
55
+ user: ::MxPlatformRuby::UserCreateRequest.new(
56
+ metadata: 'Creating a user!'
57
57
  )
58
58
  )
59
59
 
60
60
  begin
61
- result = mx_platform_api.create_user(user_create_request_body)
62
- p result
63
- rescue MxPlatformRuby::ApiError => e
61
+ response = mx_platform_api.create_user(request_body)
62
+ p response
63
+ rescue ::MxPlatformRuby::ApiError => e
64
64
  puts "Error when calling MxPlatformApi->create_user: #{e}"
65
65
  end
66
66
  ```
@@ -4368,7 +4368,7 @@ end
4368
4368
 
4369
4369
  ## read_default_category
4370
4370
 
4371
- > <CategoryResponseBody> read_default_category(category_guid, user_guid)
4371
+ > <CategoryResponseBody> read_default_category(category_guid)
4372
4372
 
4373
4373
  Read a default category
4374
4374
 
@@ -4388,11 +4388,10 @@ end
4388
4388
 
4389
4389
  api_instance = MxPlatformRuby::MxPlatformApi.new
4390
4390
  category_guid = 'CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874' # String | The unique id for a `category`.
4391
- user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`.
4392
4391
 
4393
4392
  begin
4394
4393
  # Read a default category
4395
- result = api_instance.read_default_category(category_guid, user_guid)
4394
+ result = api_instance.read_default_category(category_guid)
4396
4395
  p result
4397
4396
  rescue MxPlatformRuby::ApiError => e
4398
4397
  puts "Error when calling MxPlatformApi->read_default_category: #{e}"
@@ -4403,12 +4402,12 @@ end
4403
4402
 
4404
4403
  This returns an Array which contains the response data, status code and headers.
4405
4404
 
4406
- > <Array(<CategoryResponseBody>, Integer, Hash)> read_default_category_with_http_info(category_guid, user_guid)
4405
+ > <Array(<CategoryResponseBody>, Integer, Hash)> read_default_category_with_http_info(category_guid)
4407
4406
 
4408
4407
  ```ruby
4409
4408
  begin
4410
4409
  # Read a default category
4411
- data, status_code, headers = api_instance.read_default_category_with_http_info(category_guid, user_guid)
4410
+ data, status_code, headers = api_instance.read_default_category_with_http_info(category_guid)
4412
4411
  p status_code # => 2xx
4413
4412
  p headers # => { ... }
4414
4413
  p data # => <CategoryResponseBody>
@@ -4422,7 +4421,6 @@ end
4422
4421
  | Name | Type | Description | Notes |
4423
4422
  | ---- | ---- | ----------- | ----- |
4424
4423
  | **category_guid** | **String** | The unique id for a &#x60;category&#x60;. | |
4425
- | **user_guid** | **String** | The unique id for a &#x60;user&#x60;. | |
4426
4424
 
4427
4425
  ### Return type
4428
4426
 
@@ -5518,7 +5516,7 @@ end
5518
5516
 
5519
5517
  ## request_connect_widget_url
5520
5518
 
5521
- > <ConnectWidgetResponseBody> request_connect_widget_url(user_guid, opts)
5519
+ > <ConnectWidgetResponseBody> request_connect_widget_url(user_guid, connect_widget_request_body)
5522
5520
 
5523
5521
  Request connect widget url
5524
5522
 
@@ -5538,13 +5536,11 @@ end
5538
5536
 
5539
5537
  api_instance = MxPlatformRuby::MxPlatformApi.new
5540
5538
  user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for a `user`.
5541
- opts = {
5542
- connect_widget_request_body: MxPlatformRuby::ConnectWidgetRequestBody.new # ConnectWidgetRequestBody | Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
5543
- }
5539
+ connect_widget_request_body = MxPlatformRuby::ConnectWidgetRequestBody.new # ConnectWidgetRequestBody | Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
5544
5540
 
5545
5541
  begin
5546
5542
  # Request connect widget url
5547
- result = api_instance.request_connect_widget_url(user_guid, opts)
5543
+ result = api_instance.request_connect_widget_url(user_guid, connect_widget_request_body)
5548
5544
  p result
5549
5545
  rescue MxPlatformRuby::ApiError => e
5550
5546
  puts "Error when calling MxPlatformApi->request_connect_widget_url: #{e}"
@@ -5555,12 +5551,12 @@ end
5555
5551
 
5556
5552
  This returns an Array which contains the response data, status code and headers.
5557
5553
 
5558
- > <Array(<ConnectWidgetResponseBody>, Integer, Hash)> request_connect_widget_url_with_http_info(user_guid, opts)
5554
+ > <Array(<ConnectWidgetResponseBody>, Integer, Hash)> request_connect_widget_url_with_http_info(user_guid, connect_widget_request_body)
5559
5555
 
5560
5556
  ```ruby
5561
5557
  begin
5562
5558
  # Request connect widget url
5563
- data, status_code, headers = api_instance.request_connect_widget_url_with_http_info(user_guid, opts)
5559
+ data, status_code, headers = api_instance.request_connect_widget_url_with_http_info(user_guid, connect_widget_request_body)
5564
5560
  p status_code # => 2xx
5565
5561
  p headers # => { ... }
5566
5562
  p data # => <ConnectWidgetResponseBody>
@@ -5574,7 +5570,7 @@ end
5574
5570
  | Name | Type | Description | Notes |
5575
5571
  | ---- | ---- | ----------- | ----- |
5576
5572
  | **user_guid** | **String** | The unique id for a &#x60;user&#x60;. | |
5577
- | **connect_widget_request_body** | [**ConnectWidgetRequestBody**](ConnectWidgetRequestBody.md) | Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) | [optional] |
5573
+ | **connect_widget_request_body** | [**ConnectWidgetRequestBody**](ConnectWidgetRequestBody.md) | Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials) | |
5578
5574
 
5579
5575
  ### Return type
5580
5576
 
@@ -4098,21 +4098,19 @@ module MxPlatformRuby
4098
4098
  # Read a default category
4099
4099
  # Use this endpoint to read the attributes of a default category.
4100
4100
  # @param category_guid [String] The unique id for a &#x60;category&#x60;.
4101
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
4102
4101
  # @param [Hash] opts the optional parameters
4103
4102
  # @return [CategoryResponseBody]
4104
- def read_default_category(category_guid, user_guid, opts = {})
4105
- data, _status_code, _headers = read_default_category_with_http_info(category_guid, user_guid, opts)
4103
+ def read_default_category(category_guid, opts = {})
4104
+ data, _status_code, _headers = read_default_category_with_http_info(category_guid, opts)
4106
4105
  data
4107
4106
  end
4108
4107
 
4109
4108
  # Read a default category
4110
4109
  # Use this endpoint to read the attributes of a default category.
4111
4110
  # @param category_guid [String] The unique id for a &#x60;category&#x60;.
4112
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
4113
4111
  # @param [Hash] opts the optional parameters
4114
4112
  # @return [Array<(CategoryResponseBody, Integer, Hash)>] CategoryResponseBody data, response status code and response headers
4115
- def read_default_category_with_http_info(category_guid, user_guid, opts = {})
4113
+ def read_default_category_with_http_info(category_guid, opts = {})
4116
4114
  if @api_client.config.debugging
4117
4115
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.read_default_category ...'
4118
4116
  end
@@ -4120,12 +4118,8 @@ module MxPlatformRuby
4120
4118
  if @api_client.config.client_side_validation && category_guid.nil?
4121
4119
  fail ArgumentError, "Missing the required parameter 'category_guid' when calling MxPlatformApi.read_default_category"
4122
4120
  end
4123
- # verify the required parameter 'user_guid' is set
4124
- if @api_client.config.client_side_validation && user_guid.nil?
4125
- fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.read_default_category"
4126
- end
4127
4121
  # resource path
4128
- local_var_path = '/categories/{category_guid}'.sub('{' + 'category_guid' + '}', CGI.escape(category_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
4122
+ local_var_path = '/categories/{category_guid}'.sub('{' + 'category_guid' + '}', CGI.escape(category_guid.to_s))
4129
4123
 
4130
4124
  # query parameters
4131
4125
  query_params = opts[:query_params] || {}
@@ -5196,21 +5190,21 @@ module MxPlatformRuby
5196
5190
  # Request connect widget url
5197
5191
  # This endpoint will return a URL for an embeddable version of MX Connect.
5198
5192
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5193
+ # @param connect_widget_request_body [ConnectWidgetRequestBody] Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
5199
5194
  # @param [Hash] opts the optional parameters
5200
- # @option opts [ConnectWidgetRequestBody] :connect_widget_request_body Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
5201
5195
  # @return [ConnectWidgetResponseBody]
5202
- def request_connect_widget_url(user_guid, opts = {})
5203
- data, _status_code, _headers = request_connect_widget_url_with_http_info(user_guid, opts)
5196
+ def request_connect_widget_url(user_guid, connect_widget_request_body, opts = {})
5197
+ data, _status_code, _headers = request_connect_widget_url_with_http_info(user_guid, connect_widget_request_body, opts)
5204
5198
  data
5205
5199
  end
5206
5200
 
5207
5201
  # Request connect widget url
5208
5202
  # This endpoint will return a URL for an embeddable version of MX Connect.
5209
5203
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5204
+ # @param connect_widget_request_body [ConnectWidgetRequestBody] Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
5210
5205
  # @param [Hash] opts the optional parameters
5211
- # @option opts [ConnectWidgetRequestBody] :connect_widget_request_body Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
5212
5206
  # @return [Array<(ConnectWidgetResponseBody, Integer, Hash)>] ConnectWidgetResponseBody data, response status code and response headers
5213
- def request_connect_widget_url_with_http_info(user_guid, opts = {})
5207
+ def request_connect_widget_url_with_http_info(user_guid, connect_widget_request_body, opts = {})
5214
5208
  if @api_client.config.debugging
5215
5209
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.request_connect_widget_url ...'
5216
5210
  end
@@ -5218,6 +5212,10 @@ module MxPlatformRuby
5218
5212
  if @api_client.config.client_side_validation && user_guid.nil?
5219
5213
  fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.request_connect_widget_url"
5220
5214
  end
5215
+ # verify the required parameter 'connect_widget_request_body' is set
5216
+ if @api_client.config.client_side_validation && connect_widget_request_body.nil?
5217
+ fail ArgumentError, "Missing the required parameter 'connect_widget_request_body' when calling MxPlatformApi.request_connect_widget_url"
5218
+ end
5221
5219
  # resource path
5222
5220
  local_var_path = '/users/{user_guid}/connect_widget_url'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
5223
5221
 
@@ -5238,7 +5236,7 @@ module MxPlatformRuby
5238
5236
  form_params = opts[:form_params] || {}
5239
5237
 
5240
5238
  # http body (model)
5241
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'connect_widget_request_body'])
5239
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_widget_request_body)
5242
5240
 
5243
5241
  # return_type
5244
5242
  return_type = opts[:debug_return_type] || 'ConnectWidgetResponseBody'
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.4.0
11
11
  =end
12
12
 
13
13
  module MxPlatformRuby
14
- VERSION = '0.9.2'
14
+ VERSION = '0.9.3'
15
15
  end
data/openapi/config.yml CHANGED
@@ -6,6 +6,6 @@ gemHomepage: https://github.com/mxenabled/mx-platform-ruby
6
6
  gemLicense: MIT
7
7
  gemName: mx-platform-ruby
8
8
  gemRequiredRubyVersion: ">= 2.6"
9
- gemVersion: 0.9.2
9
+ gemVersion: 0.9.3
10
10
  library: faraday
11
11
  moduleName: MxPlatformRuby
@@ -38,7 +38,7 @@ Please follow the [installation](#installation) procedure and then run the follo
38
38
  ```ruby
39
39
  require 'mx-platform-ruby'
40
40
 
41
- MxPlatformRuby.configure do |config|
41
+ ::MxPlatformRuby.configure do |config|
42
42
  # Configure with your Client ID/API Key from https://dashboard.mx.com
43
43
  config.username = 'Your Client ID'
44
44
  config.password = 'Your API Key'
@@ -51,16 +51,16 @@ api_client = ::MxPlatformRuby::ApiClient.new
51
51
  api_client.default_headers['Accept'] = 'application/vnd.mx.api.v1+json'
52
52
  mx_platform_api = ::MxPlatformRuby::MxPlatformApi.new(api_client)
53
53
 
54
- user_create_request_body = MxPlatformRuby::UserCreateRequestBody.new(
55
- user: MxPlatformRuby::UserCreateRequest.new(
56
- metadata: "Creating a user!"
54
+ request_body = ::MxPlatformRuby::UserCreateRequestBody.new(
55
+ user: ::MxPlatformRuby::UserCreateRequest.new(
56
+ metadata: 'Creating a user!'
57
57
  )
58
58
  )
59
59
 
60
60
  begin
61
- result = mx_platform_api.create_user(user_create_request_body)
62
- p result
63
- rescue MxPlatformRuby::ApiError => e
61
+ response = mx_platform_api.create_user(request_body)
62
+ p response
63
+ rescue ::MxPlatformRuby::ApiError => e
64
64
  puts "Error when calling MxPlatformApi->create_user: #{e}"
65
65
  end
66
66
  ```
@@ -835,7 +835,6 @@ describe 'MxPlatformApi' do
835
835
  # Read a default category
836
836
  # Use this endpoint to read the attributes of a default category.
837
837
  # @param category_guid The unique id for a &#x60;category&#x60;.
838
- # @param user_guid The unique id for a &#x60;user&#x60;.
839
838
  # @param [Hash] opts the optional parameters
840
839
  # @return [CategoryResponseBody]
841
840
  describe 'read_default_category test' do
@@ -1042,8 +1041,8 @@ describe 'MxPlatformApi' do
1042
1041
  # Request connect widget url
1043
1042
  # This endpoint will return a URL for an embeddable version of MX Connect.
1044
1043
  # @param user_guid The unique id for a &#x60;user&#x60;.
1044
+ # @param connect_widget_request_body Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
1045
1045
  # @param [Hash] opts the optional parameters
1046
- # @option opts [ConnectWidgetRequestBody] :connect_widget_request_body Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)
1047
1046
  # @return [ConnectWidgetResponseBody]
1048
1047
  describe 'request_connect_widget_url test' do
1049
1048
  it 'should work' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mx-platform-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - MX
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2022-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday