mx-platform-ruby 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/docs/MxPlatformApi.md +83 -0
- data/lib/mx-platform-ruby/api/mx_platform_api.rb +81 -0
- data/lib/mx-platform-ruby/version.rb +1 -1
- data/openapi/config.yml +1 -1
- data/spec/api/mx_platform_api_spec.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c505ce4ad9f2566ba4eb080ca46e2ed184c534549e0981617d3081d1bcdc949
|
4
|
+
data.tar.gz: 4aceaede0825d62348c9d84afcc60e3e4cfe45b89744d7be832c93c53a4f7f82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c35e2f284e592031edc4bc5b47f9164db82fc1ebd844ce05d5ef2768aa71f6e5a372c345f9fa48f1210705638f76a82ce641d546ad0ef5b6642901877cbea0
|
7
|
+
data.tar.gz: 2e052901922e556d32422ae3334d4913f4970fc8028e900b5ba20304eb319b6a01932f491289bb6688dba25f78e77aaecbcdb350957663f0e7620993b5b7a8a3
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mx-platform-ruby (0.8.
|
4
|
+
mx-platform-ruby (0.8.4)
|
5
5
|
faraday (~> 1.0, >= 1.0.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -54,7 +54,7 @@ GEM
|
|
54
54
|
rspec-core (~> 3.10.0)
|
55
55
|
rspec-expectations (~> 3.10.0)
|
56
56
|
rspec-mocks (~> 3.10.0)
|
57
|
-
rspec-core (3.10.
|
57
|
+
rspec-core (3.10.2)
|
58
58
|
rspec-support (~> 3.10.0)
|
59
59
|
rspec-expectations (3.10.2)
|
60
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
data/docs/MxPlatformApi.md
CHANGED
@@ -37,6 +37,7 @@ All URIs are relative to *https://api.mx.com*
|
|
37
37
|
| [**list_default_categories_by_user**](MxPlatformApi.md#list_default_categories_by_user) | **GET** /users/{user_guid}/categories/default | List default categories by user |
|
38
38
|
| [**list_favorite_institutions**](MxPlatformApi.md#list_favorite_institutions) | **GET** /institutions/favorites | List favorite institutions |
|
39
39
|
| [**list_holdings**](MxPlatformApi.md#list_holdings) | **GET** /users/{user_guid}/holdings | List holdings |
|
40
|
+
| [**list_holdings_by_account**](MxPlatformApi.md#list_holdings_by_account) | **GET** /users/{user_guid}/accounts/{account_guid}/holdings | List holdings by account |
|
40
41
|
| [**list_holdings_by_member**](MxPlatformApi.md#list_holdings_by_member) | **GET** /users/{user_guid}/members/{member_guid}/holdings | List holdings by member |
|
41
42
|
| [**list_institution_credentials**](MxPlatformApi.md#list_institution_credentials) | **GET** /institutions/{institution_code}/credentials | List institution credentials |
|
42
43
|
| [**list_institutions**](MxPlatformApi.md#list_institutions) | **GET** /institutions | List institutions |
|
@@ -2503,6 +2504,88 @@ end
|
|
2503
2504
|
- **Accept**: application/vnd.mx.api.v1+json
|
2504
2505
|
|
2505
2506
|
|
2507
|
+
## list_holdings_by_account
|
2508
|
+
|
2509
|
+
> <HoldingsResponseBody> list_holdings_by_account(account_guid, user_guid, opts)
|
2510
|
+
|
2511
|
+
List holdings by account
|
2512
|
+
|
2513
|
+
This endpoint returns all holdings associated with the specified `account`.
|
2514
|
+
|
2515
|
+
### Examples
|
2516
|
+
|
2517
|
+
```ruby
|
2518
|
+
require 'time'
|
2519
|
+
require 'mx-platform-ruby'
|
2520
|
+
# setup authorization
|
2521
|
+
MxPlatformRuby.configure do |config|
|
2522
|
+
# Configure HTTP basic authorization: basicAuth
|
2523
|
+
config.username = 'YOUR USERNAME'
|
2524
|
+
config.password = 'YOUR PASSWORD'
|
2525
|
+
end
|
2526
|
+
|
2527
|
+
api_instance = MxPlatformRuby::MxPlatformApi.new
|
2528
|
+
account_guid = 'ACT-7c6f361b-e582-15b6-60c0-358f12466b4b' # String | The unique id for the `account`.
|
2529
|
+
user_guid = 'USR-fa7537f3-48aa-a683-a02a-b18940482f54' # String | The unique id for the `user`.
|
2530
|
+
opts = {
|
2531
|
+
from_date: '2015-09-20', # String | Filter holdings from this date.
|
2532
|
+
page: 1, # Integer | Specify current page.
|
2533
|
+
records_per_page: 10, # Integer | Specify records per page.
|
2534
|
+
to_date: '2019-10-20' # String | Filter holdings to this date.
|
2535
|
+
}
|
2536
|
+
|
2537
|
+
begin
|
2538
|
+
# List holdings by account
|
2539
|
+
result = api_instance.list_holdings_by_account(account_guid, user_guid, opts)
|
2540
|
+
p result
|
2541
|
+
rescue MxPlatformRuby::ApiError => e
|
2542
|
+
puts "Error when calling MxPlatformApi->list_holdings_by_account: #{e}"
|
2543
|
+
end
|
2544
|
+
```
|
2545
|
+
|
2546
|
+
#### Using the list_holdings_by_account_with_http_info variant
|
2547
|
+
|
2548
|
+
This returns an Array which contains the response data, status code and headers.
|
2549
|
+
|
2550
|
+
> <Array(<HoldingsResponseBody>, Integer, Hash)> list_holdings_by_account_with_http_info(account_guid, user_guid, opts)
|
2551
|
+
|
2552
|
+
```ruby
|
2553
|
+
begin
|
2554
|
+
# List holdings by account
|
2555
|
+
data, status_code, headers = api_instance.list_holdings_by_account_with_http_info(account_guid, user_guid, opts)
|
2556
|
+
p status_code # => 2xx
|
2557
|
+
p headers # => { ... }
|
2558
|
+
p data # => <HoldingsResponseBody>
|
2559
|
+
rescue MxPlatformRuby::ApiError => e
|
2560
|
+
puts "Error when calling MxPlatformApi->list_holdings_by_account_with_http_info: #{e}"
|
2561
|
+
end
|
2562
|
+
```
|
2563
|
+
|
2564
|
+
### Parameters
|
2565
|
+
|
2566
|
+
| Name | Type | Description | Notes |
|
2567
|
+
| ---- | ---- | ----------- | ----- |
|
2568
|
+
| **account_guid** | **String** | The unique id for the `account`. | |
|
2569
|
+
| **user_guid** | **String** | The unique id for the `user`. | |
|
2570
|
+
| **from_date** | **String** | Filter holdings from this date. | [optional] |
|
2571
|
+
| **page** | **Integer** | Specify current page. | [optional] |
|
2572
|
+
| **records_per_page** | **Integer** | Specify records per page. | [optional] |
|
2573
|
+
| **to_date** | **String** | Filter holdings to this date. | [optional] |
|
2574
|
+
|
2575
|
+
### Return type
|
2576
|
+
|
2577
|
+
[**HoldingsResponseBody**](HoldingsResponseBody.md)
|
2578
|
+
|
2579
|
+
### Authorization
|
2580
|
+
|
2581
|
+
[basicAuth](../README.md#basicAuth)
|
2582
|
+
|
2583
|
+
### HTTP request headers
|
2584
|
+
|
2585
|
+
- **Content-Type**: Not defined
|
2586
|
+
- **Accept**: application/vnd.mx.api.v1+json
|
2587
|
+
|
2588
|
+
|
2506
2589
|
## list_holdings_by_member
|
2507
2590
|
|
2508
2591
|
> <HoldingsResponseBody> list_holdings_by_member(member_guid, user_guid, opts)
|
@@ -2352,6 +2352,87 @@ module MxPlatformRuby
|
|
2352
2352
|
return data, status_code, headers
|
2353
2353
|
end
|
2354
2354
|
|
2355
|
+
# List holdings by account
|
2356
|
+
# This endpoint returns all holdings associated with the specified `account`.
|
2357
|
+
# @param account_guid [String] The unique id for the `account`.
|
2358
|
+
# @param user_guid [String] The unique id for the `user`.
|
2359
|
+
# @param [Hash] opts the optional parameters
|
2360
|
+
# @option opts [String] :from_date Filter holdings from this date.
|
2361
|
+
# @option opts [Integer] :page Specify current page.
|
2362
|
+
# @option opts [Integer] :records_per_page Specify records per page.
|
2363
|
+
# @option opts [String] :to_date Filter holdings to this date.
|
2364
|
+
# @return [HoldingsResponseBody]
|
2365
|
+
def list_holdings_by_account(account_guid, user_guid, opts = {})
|
2366
|
+
data, _status_code, _headers = list_holdings_by_account_with_http_info(account_guid, user_guid, opts)
|
2367
|
+
data
|
2368
|
+
end
|
2369
|
+
|
2370
|
+
# List holdings by account
|
2371
|
+
# This endpoint returns all holdings associated with the specified `account`.
|
2372
|
+
# @param account_guid [String] The unique id for the `account`.
|
2373
|
+
# @param user_guid [String] The unique id for the `user`.
|
2374
|
+
# @param [Hash] opts the optional parameters
|
2375
|
+
# @option opts [String] :from_date Filter holdings from this date.
|
2376
|
+
# @option opts [Integer] :page Specify current page.
|
2377
|
+
# @option opts [Integer] :records_per_page Specify records per page.
|
2378
|
+
# @option opts [String] :to_date Filter holdings to this date.
|
2379
|
+
# @return [Array<(HoldingsResponseBody, Integer, Hash)>] HoldingsResponseBody data, response status code and response headers
|
2380
|
+
def list_holdings_by_account_with_http_info(account_guid, user_guid, opts = {})
|
2381
|
+
if @api_client.config.debugging
|
2382
|
+
@api_client.config.logger.debug 'Calling API: MxPlatformApi.list_holdings_by_account ...'
|
2383
|
+
end
|
2384
|
+
# verify the required parameter 'account_guid' is set
|
2385
|
+
if @api_client.config.client_side_validation && account_guid.nil?
|
2386
|
+
fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.list_holdings_by_account"
|
2387
|
+
end
|
2388
|
+
# verify the required parameter 'user_guid' is set
|
2389
|
+
if @api_client.config.client_side_validation && user_guid.nil?
|
2390
|
+
fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.list_holdings_by_account"
|
2391
|
+
end
|
2392
|
+
# resource path
|
2393
|
+
local_var_path = '/users/{user_guid}/accounts/{account_guid}/holdings'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
|
2394
|
+
|
2395
|
+
# query parameters
|
2396
|
+
query_params = opts[:query_params] || {}
|
2397
|
+
query_params[:'from_date'] = opts[:'from_date'] if !opts[:'from_date'].nil?
|
2398
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
2399
|
+
query_params[:'records_per_page'] = opts[:'records_per_page'] if !opts[:'records_per_page'].nil?
|
2400
|
+
query_params[:'to_date'] = opts[:'to_date'] if !opts[:'to_date'].nil?
|
2401
|
+
|
2402
|
+
# header parameters
|
2403
|
+
header_params = opts[:header_params] || {}
|
2404
|
+
# HTTP header 'Accept' (if needed)
|
2405
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
|
2406
|
+
|
2407
|
+
# form parameters
|
2408
|
+
form_params = opts[:form_params] || {}
|
2409
|
+
|
2410
|
+
# http body (model)
|
2411
|
+
post_body = opts[:debug_body]
|
2412
|
+
|
2413
|
+
# return_type
|
2414
|
+
return_type = opts[:debug_return_type] || 'HoldingsResponseBody'
|
2415
|
+
|
2416
|
+
# auth_names
|
2417
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
2418
|
+
|
2419
|
+
new_options = opts.merge(
|
2420
|
+
:operation => :"MxPlatformApi.list_holdings_by_account",
|
2421
|
+
:header_params => header_params,
|
2422
|
+
:query_params => query_params,
|
2423
|
+
:form_params => form_params,
|
2424
|
+
:body => post_body,
|
2425
|
+
:auth_names => auth_names,
|
2426
|
+
:return_type => return_type
|
2427
|
+
)
|
2428
|
+
|
2429
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2430
|
+
if @api_client.config.debugging
|
2431
|
+
@api_client.config.logger.debug "API called: MxPlatformApi#list_holdings_by_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2432
|
+
end
|
2433
|
+
return data, status_code, headers
|
2434
|
+
end
|
2435
|
+
|
2355
2436
|
# List holdings by member
|
2356
2437
|
# This endpoint returns all holdings associated with the specified `member` across all accounts.
|
2357
2438
|
# @param member_guid [String] The unique id for a `member`.
|
data/openapi/config.yml
CHANGED
@@ -474,6 +474,23 @@ describe 'MxPlatformApi' do
|
|
474
474
|
end
|
475
475
|
end
|
476
476
|
|
477
|
+
# unit tests for list_holdings_by_account
|
478
|
+
# List holdings by account
|
479
|
+
# This endpoint returns all holdings associated with the specified `account`.
|
480
|
+
# @param account_guid The unique id for the `account`.
|
481
|
+
# @param user_guid The unique id for the `user`.
|
482
|
+
# @param [Hash] opts the optional parameters
|
483
|
+
# @option opts [String] :from_date Filter holdings from this date.
|
484
|
+
# @option opts [Integer] :page Specify current page.
|
485
|
+
# @option opts [Integer] :records_per_page Specify records per page.
|
486
|
+
# @option opts [String] :to_date Filter holdings to this date.
|
487
|
+
# @return [HoldingsResponseBody]
|
488
|
+
describe 'list_holdings_by_account test' do
|
489
|
+
it 'should work' do
|
490
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
491
|
+
end
|
492
|
+
end
|
493
|
+
|
477
494
|
# unit tests for list_holdings_by_member
|
478
495
|
# List holdings by member
|
479
496
|
# This endpoint returns all holdings associated with the specified `member` across all accounts.
|
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.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MX
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|