DealMakerAPI 0.87.0 → 0.88.2

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.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -7
  3. data/docs/CompanyApi.md +67 -0
  4. data/docs/DealApi.md +0 -71
  5. data/docs/InvestorApi.md +83 -14
  6. data/docs/{CreateInvestorRequest.md → PostDealsIdInvestors.md} +2 -4
  7. data/docs/{UpdateInvestorRequest.md → PutDealsIdInvestors.md} +2 -4
  8. data/docs/V1EntitiesBulkUpload.md +1 -1
  9. data/docs/V1EntitiesDividend.md +24 -0
  10. data/docs/V1EntitiesDividends.md +18 -0
  11. data/lib/DealMakerAPI/api/company_api.rb +63 -0
  12. data/lib/DealMakerAPI/api/deal_api.rb +0 -66
  13. data/lib/DealMakerAPI/api/investor_api.rb +94 -15
  14. data/lib/DealMakerAPI/models/{create_investor_request.rb → post_deals_id_investors.rb} +5 -14
  15. data/lib/DealMakerAPI/models/{update_investor_request.rb → put_deals_id_investors.rb} +5 -14
  16. data/lib/DealMakerAPI/models/v1_entities_bulk_upload.rb +35 -1
  17. data/lib/DealMakerAPI/models/v1_entities_dividend.rb +245 -0
  18. data/lib/DealMakerAPI/models/v1_entities_dividends.rb +215 -0
  19. data/lib/DealMakerAPI/version.rb +1 -1
  20. data/lib/DealMakerAPI.rb +4 -2
  21. data/spec/api/company_api_spec.rb +12 -0
  22. data/spec/api/deal_api_spec.rb +0 -13
  23. data/spec/api/investor_api_spec.rb +16 -2
  24. data/spec/models/add506c_document_request_spec.rb +3 -1
  25. data/spec/models/add_document_request_spec.rb +3 -1
  26. data/spec/models/bulk_upload_investors_request_spec.rb +3 -1
  27. data/spec/models/create_bulk_upload_detail_request_spec.rb +3 -1
  28. data/spec/models/create_bulk_upload_request_spec.rb +3 -1
  29. data/spec/models/create_company_request_spec.rb +3 -1
  30. data/spec/models/create_deal_setup_request_spec.rb +3 -1
  31. data/spec/models/create_shareholder_action_request_spec.rb +3 -1
  32. data/spec/models/edit_investor_tags_request_spec.rb +3 -1
  33. data/spec/models/generate_url_request_spec.rb +3 -1
  34. data/spec/models/patch_investor_profiles_corporations_beneficial_owners_inner_spec.rb +3 -1
  35. data/spec/models/patch_investor_profiles_corporations_spec.rb +3 -1
  36. data/spec/models/patch_investor_profiles_individuals_spec.rb +3 -1
  37. data/spec/models/patch_investor_profiles_joints_spec.rb +3 -1
  38. data/spec/models/patch_investor_profiles_trusts_spec.rb +3 -1
  39. data/spec/models/patch_investor_request_spec.rb +3 -1
  40. data/spec/models/{create_investor_request_spec.rb → post_deals_id_investors_spec.rb} +8 -12
  41. data/spec/models/post_investor_profiles_corporations_beneficial_owners_inner_spec.rb +3 -1
  42. data/spec/models/post_investor_profiles_corporations_spec.rb +3 -1
  43. data/spec/models/post_investor_profiles_individuals_spec.rb +3 -1
  44. data/spec/models/post_investor_profiles_joints_spec.rb +3 -1
  45. data/spec/models/post_investor_profiles_trusts_spec.rb +3 -1
  46. data/spec/models/post_investor_profiles_trusts_trustees_inner_spec.rb +3 -1
  47. data/spec/models/post_webhooks_request_spec.rb +3 -1
  48. data/spec/models/{update_investor_request_spec.rb → put_deals_id_investors_spec.rb} +8 -12
  49. data/spec/models/put_deals_id_script_tag_environment_request_spec.rb +3 -1
  50. data/spec/models/put_webhooks_id_request_spec.rb +3 -1
  51. data/spec/models/v1_entities_address_spec.rb +3 -1
  52. data/spec/models/v1_entities_addresses_spec.rb +3 -1
  53. data/spec/models/v1_entities_attachment_spec.rb +3 -1
  54. data/spec/models/v1_entities_background_check_search_spec.rb +3 -1
  55. data/spec/models/v1_entities_bulk_upload_detail_spec.rb +3 -1
  56. data/spec/models/v1_entities_bulk_upload_details_spec.rb +3 -1
  57. data/spec/models/v1_entities_bulk_upload_spec.rb +7 -1
  58. data/spec/models/v1_entities_bulk_uploads_spec.rb +3 -1
  59. data/spec/models/v1_entities_company_deal_spec.rb +3 -1
  60. data/spec/models/v1_entities_company_deals_spec.rb +3 -1
  61. data/spec/models/v1_entities_company_spec.rb +3 -1
  62. data/spec/models/v1_entities_countries_spec.rb +3 -1
  63. data/spec/models/v1_entities_country_spec.rb +3 -1
  64. data/spec/models/v1_entities_deal_enterprise_spec.rb +3 -1
  65. data/spec/models/v1_entities_deal_funding_metrics_spec.rb +3 -1
  66. data/spec/models/v1_entities_deal_investor_metrics_spec.rb +3 -1
  67. data/spec/models/v1_entities_deal_issuer_spec.rb +3 -1
  68. data/spec/models/v1_entities_deal_setup_spec.rb +3 -1
  69. data/spec/models/v1_entities_deal_setup_user_spec.rb +3 -1
  70. data/spec/models/v1_entities_deal_spec.rb +3 -1
  71. data/spec/models/v1_entities_deals_spec.rb +3 -1
  72. data/spec/models/v1_entities_dividend_spec.rb +54 -0
  73. data/spec/models/v1_entities_dividends_spec.rb +36 -0
  74. data/spec/models/v1_entities_express_wire_instruction_spec.rb +3 -1
  75. data/spec/models/v1_entities_express_wire_instructions_spec.rb +3 -1
  76. data/spec/models/v1_entities_generic_response_spec.rb +3 -1
  77. data/spec/models/v1_entities_investor_otp_access_link_spec.rb +3 -1
  78. data/spec/models/v1_entities_investor_profile_address_spec.rb +3 -1
  79. data/spec/models/v1_entities_investor_profile_corporation_spec.rb +3 -1
  80. data/spec/models/v1_entities_investor_profile_fields_account_holder_spec.rb +3 -1
  81. data/spec/models/v1_entities_investor_profile_fields_beneficial_owner_spec.rb +3 -1
  82. data/spec/models/v1_entities_investor_profile_fields_corporation_spec.rb +3 -1
  83. data/spec/models/v1_entities_investor_profile_fields_primary_holder_spec.rb +3 -1
  84. data/spec/models/v1_entities_investor_profile_fields_signing_officer_spec.rb +3 -1
  85. data/spec/models/v1_entities_investor_profile_fields_trust_spec.rb +3 -1
  86. data/spec/models/v1_entities_investor_profile_individual_spec.rb +3 -1
  87. data/spec/models/v1_entities_investor_profile_item_spec.rb +3 -1
  88. data/spec/models/v1_entities_investor_profile_joint_spec.rb +3 -1
  89. data/spec/models/v1_entities_investor_profile_owner_spec.rb +3 -1
  90. data/spec/models/v1_entities_investor_profile_trust_spec.rb +3 -1
  91. data/spec/models/v1_entities_investor_profiles_spec.rb +3 -1
  92. data/spec/models/v1_entities_investor_spec.rb +3 -1
  93. data/spec/models/v1_entities_investor_user_spec.rb +3 -1
  94. data/spec/models/v1_entities_investors_spec.rb +3 -1
  95. data/spec/models/v1_entities_presigned_url_result_spec.rb +3 -1
  96. data/spec/models/v1_entities_shareholder_spec.rb +3 -1
  97. data/spec/models/v1_entities_shareholders_spec.rb +3 -1
  98. data/spec/models/v1_entities_shareholders_tags_spec.rb +3 -1
  99. data/spec/models/v1_entities_state_spec.rb +3 -1
  100. data/spec/models/v1_entities_subscription_agreement_spec.rb +3 -1
  101. data/spec/models/v1_entities_webhooks_deal_spec.rb +3 -1
  102. data/spec/models/v1_entities_webhooks_security_token_spec.rb +3 -1
  103. data/spec/models/v1_entities_webhooks_subscription_deal_spec.rb +3 -1
  104. data/spec/models/v1_entities_webhooks_subscription_deals_spec.rb +3 -1
  105. data/spec/models/v1_entities_webhooks_subscription_spec.rb +3 -1
  106. metadata +87 -79
@@ -19,72 +19,6 @@ module DealMakerAPI
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Get Analytics Dashboard Info
23
- # Get Analytics Dashboard Info
24
- # @param id [Integer] The deal id.
25
- # @param [Hash] opts the optional parameters
26
- # @option opts [String] :dashboard_key The dashboard key.
27
- # @return [Object]
28
- def get_analytics_dashboard_info(id, opts = {})
29
- data, _status_code, _headers = get_analytics_dashboard_info_with_http_info(id, opts)
30
- data
31
- end
32
-
33
- # Get Analytics Dashboard Info
34
- # Get Analytics Dashboard Info
35
- # @param id [Integer] The deal id.
36
- # @param [Hash] opts the optional parameters
37
- # @option opts [String] :dashboard_key The dashboard key.
38
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
39
- def get_analytics_dashboard_info_with_http_info(id, opts = {})
40
- if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: DealApi.get_analytics_dashboard_info ...'
42
- end
43
- # verify the required parameter 'id' is set
44
- if @api_client.config.client_side_validation && id.nil?
45
- fail ArgumentError, "Missing the required parameter 'id' when calling DealApi.get_analytics_dashboard_info"
46
- end
47
- # resource path
48
- local_var_path = '/deals/{id}/analytics_dashboard_info'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
49
-
50
- # query parameters
51
- query_params = opts[:query_params] || {}
52
- query_params[:'dashboard_key'] = opts[:'dashboard_key'] if !opts[:'dashboard_key'].nil?
53
-
54
- # header parameters
55
- header_params = opts[:header_params] || {}
56
- # HTTP header 'Accept' (if needed)
57
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
-
59
- # form parameters
60
- form_params = opts[:form_params] || {}
61
-
62
- # http body (model)
63
- post_body = opts[:debug_body]
64
-
65
- # return_type
66
- return_type = opts[:debug_return_type] || 'Object'
67
-
68
- # auth_names
69
- auth_names = opts[:debug_auth_names] || []
70
-
71
- new_options = opts.merge(
72
- :operation => :"DealApi.get_analytics_dashboard_info",
73
- :header_params => header_params,
74
- :query_params => query_params,
75
- :form_params => form_params,
76
- :body => post_body,
77
- :auth_names => auth_names,
78
- :return_type => return_type
79
- )
80
-
81
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
82
- if @api_client.config.debugging
83
- @api_client.config.logger.debug "API called: DealApi#get_analytics_dashboard_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
- end
85
- return data, status_code, headers
86
- end
87
-
88
22
  # Get deal by Deal ID
89
23
  # Gets a single deal using the Deal ID
90
24
  # @param id [Integer] The deal id.
@@ -256,21 +256,21 @@ module DealMakerAPI
256
256
  # Create a deal investor
257
257
  # Create a single deal investor.
258
258
  # @param id [Integer] The deal id.
259
- # @param create_investor_request [CreateInvestorRequest]
259
+ # @param deals_id_investors [PostDealsIdInvestors]
260
260
  # @param [Hash] opts the optional parameters
261
261
  # @return [V1EntitiesInvestor]
262
- def create_investor(id, create_investor_request, opts = {})
263
- data, _status_code, _headers = create_investor_with_http_info(id, create_investor_request, opts)
262
+ def create_investor(id, deals_id_investors, opts = {})
263
+ data, _status_code, _headers = create_investor_with_http_info(id, deals_id_investors, opts)
264
264
  data
265
265
  end
266
266
 
267
267
  # Create a deal investor
268
268
  # Create a single deal investor.
269
269
  # @param id [Integer] The deal id.
270
- # @param create_investor_request [CreateInvestorRequest]
270
+ # @param deals_id_investors [PostDealsIdInvestors]
271
271
  # @param [Hash] opts the optional parameters
272
272
  # @return [Array<(V1EntitiesInvestor, Integer, Hash)>] V1EntitiesInvestor data, response status code and response headers
273
- def create_investor_with_http_info(id, create_investor_request, opts = {})
273
+ def create_investor_with_http_info(id, deals_id_investors, opts = {})
274
274
  if @api_client.config.debugging
275
275
  @api_client.config.logger.debug 'Calling API: InvestorApi.create_investor ...'
276
276
  end
@@ -278,9 +278,9 @@ module DealMakerAPI
278
278
  if @api_client.config.client_side_validation && id.nil?
279
279
  fail ArgumentError, "Missing the required parameter 'id' when calling InvestorApi.create_investor"
280
280
  end
281
- # verify the required parameter 'create_investor_request' is set
282
- if @api_client.config.client_side_validation && create_investor_request.nil?
283
- fail ArgumentError, "Missing the required parameter 'create_investor_request' when calling InvestorApi.create_investor"
281
+ # verify the required parameter 'deals_id_investors' is set
282
+ if @api_client.config.client_side_validation && deals_id_investors.nil?
283
+ fail ArgumentError, "Missing the required parameter 'deals_id_investors' when calling InvestorApi.create_investor"
284
284
  end
285
285
  # resource path
286
286
  local_var_path = '/deals/{id}/investors'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
@@ -302,7 +302,7 @@ module DealMakerAPI
302
302
  form_params = opts[:form_params] || {}
303
303
 
304
304
  # http body (model)
305
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_investor_request)
305
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(deals_id_investors)
306
306
 
307
307
  # return_type
308
308
  return_type = opts[:debug_return_type] || 'V1EntitiesInvestor'
@@ -547,6 +547,81 @@ module DealMakerAPI
547
547
  return data, status_code, headers
548
548
  end
549
549
 
550
+ # Get enforcements for a background search
551
+ # Get enforcements for a background search
552
+ # @param id [Integer]
553
+ # @param investor_id [Integer]
554
+ # @param search_entity_id [Integer]
555
+ # @param [Hash] opts the optional parameters
556
+ # @return [V1EntitiesInvestor]
557
+ def get_enforcements(id, investor_id, search_entity_id, opts = {})
558
+ data, _status_code, _headers = get_enforcements_with_http_info(id, investor_id, search_entity_id, opts)
559
+ data
560
+ end
561
+
562
+ # Get enforcements for a background search
563
+ # Get enforcements for a background search
564
+ # @param id [Integer]
565
+ # @param investor_id [Integer]
566
+ # @param search_entity_id [Integer]
567
+ # @param [Hash] opts the optional parameters
568
+ # @return [Array<(V1EntitiesInvestor, Integer, Hash)>] V1EntitiesInvestor data, response status code and response headers
569
+ def get_enforcements_with_http_info(id, investor_id, search_entity_id, opts = {})
570
+ if @api_client.config.debugging
571
+ @api_client.config.logger.debug 'Calling API: InvestorApi.get_enforcements ...'
572
+ end
573
+ # verify the required parameter 'id' is set
574
+ if @api_client.config.client_side_validation && id.nil?
575
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvestorApi.get_enforcements"
576
+ end
577
+ # verify the required parameter 'investor_id' is set
578
+ if @api_client.config.client_side_validation && investor_id.nil?
579
+ fail ArgumentError, "Missing the required parameter 'investor_id' when calling InvestorApi.get_enforcements"
580
+ end
581
+ # verify the required parameter 'search_entity_id' is set
582
+ if @api_client.config.client_side_validation && search_entity_id.nil?
583
+ fail ArgumentError, "Missing the required parameter 'search_entity_id' when calling InvestorApi.get_enforcements"
584
+ end
585
+ # resource path
586
+ local_var_path = '/deals/{id}/investors/{investor_id}/background_checks/{search_entity_id}/enforcements'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'investor_id' + '}', CGI.escape(investor_id.to_s)).sub('{' + 'search_entity_id' + '}', CGI.escape(search_entity_id.to_s))
587
+
588
+ # query parameters
589
+ query_params = opts[:query_params] || {}
590
+
591
+ # header parameters
592
+ header_params = opts[:header_params] || {}
593
+ # HTTP header 'Accept' (if needed)
594
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
595
+
596
+ # form parameters
597
+ form_params = opts[:form_params] || {}
598
+
599
+ # http body (model)
600
+ post_body = opts[:debug_body]
601
+
602
+ # return_type
603
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestor'
604
+
605
+ # auth_names
606
+ auth_names = opts[:debug_auth_names] || []
607
+
608
+ new_options = opts.merge(
609
+ :operation => :"InvestorApi.get_enforcements",
610
+ :header_params => header_params,
611
+ :query_params => query_params,
612
+ :form_params => form_params,
613
+ :body => post_body,
614
+ :auth_names => auth_names,
615
+ :return_type => return_type
616
+ )
617
+
618
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
619
+ if @api_client.config.debugging
620
+ @api_client.config.logger.debug "API called: InvestorApi#get_enforcements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
621
+ end
622
+ return data, status_code, headers
623
+ end
624
+
550
625
  # Get a deal investor by id
551
626
  # Gets a single investor by the id.
552
627
  # @param id [Integer] The deal id.
@@ -847,11 +922,11 @@ module DealMakerAPI
847
922
  # Update deal investor
848
923
  # @param id [Integer] The deal id.
849
924
  # @param investor_id [Integer] The investor id.
925
+ # @param deals_id_investors [PutDealsIdInvestors]
850
926
  # @param [Hash] opts the optional parameters
851
- # @option opts [UpdateInvestorRequest] :update_investor_request
852
927
  # @return [V1EntitiesInvestor]
853
- def update_investor(id, investor_id, opts = {})
854
- data, _status_code, _headers = update_investor_with_http_info(id, investor_id, opts)
928
+ def update_investor(id, investor_id, deals_id_investors, opts = {})
929
+ data, _status_code, _headers = update_investor_with_http_info(id, investor_id, deals_id_investors, opts)
855
930
  data
856
931
  end
857
932
 
@@ -859,10 +934,10 @@ module DealMakerAPI
859
934
  # Update deal investor
860
935
  # @param id [Integer] The deal id.
861
936
  # @param investor_id [Integer] The investor id.
937
+ # @param deals_id_investors [PutDealsIdInvestors]
862
938
  # @param [Hash] opts the optional parameters
863
- # @option opts [UpdateInvestorRequest] :update_investor_request
864
939
  # @return [Array<(V1EntitiesInvestor, Integer, Hash)>] V1EntitiesInvestor data, response status code and response headers
865
- def update_investor_with_http_info(id, investor_id, opts = {})
940
+ def update_investor_with_http_info(id, investor_id, deals_id_investors, opts = {})
866
941
  if @api_client.config.debugging
867
942
  @api_client.config.logger.debug 'Calling API: InvestorApi.update_investor ...'
868
943
  end
@@ -874,6 +949,10 @@ module DealMakerAPI
874
949
  if @api_client.config.client_side_validation && investor_id.nil?
875
950
  fail ArgumentError, "Missing the required parameter 'investor_id' when calling InvestorApi.update_investor"
876
951
  end
952
+ # verify the required parameter 'deals_id_investors' is set
953
+ if @api_client.config.client_side_validation && deals_id_investors.nil?
954
+ fail ArgumentError, "Missing the required parameter 'deals_id_investors' when calling InvestorApi.update_investor"
955
+ end
877
956
  # resource path
878
957
  local_var_path = '/deals/{id}/investors/{investor_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'investor_id' + '}', CGI.escape(investor_id.to_s))
879
958
 
@@ -894,7 +973,7 @@ module DealMakerAPI
894
973
  form_params = opts[:form_params] || {}
895
974
 
896
975
  # http body (model)
897
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_investor_request'])
976
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(deals_id_investors)
898
977
 
899
978
  # return_type
900
979
  return_type = opts[:debug_return_type] || 'V1EntitiesInvestor'
@@ -14,7 +14,8 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DealMakerAPI
17
- class CreateInvestorRequest
17
+ # Create deal investor
18
+ class PostDealsIdInvestors
18
19
  # The investor email address.
19
20
  attr_accessor :email
20
21
 
@@ -44,9 +45,6 @@ module DealMakerAPI
44
45
  # The allocation amount of the investor.
45
46
  attr_accessor :allocated_amount
46
47
 
47
- # The investment value of the investor.
48
- attr_accessor :investment_value
49
-
50
48
  # The allocation unit of the investor.
51
49
  attr_accessor :allocation_unit
52
50
 
@@ -88,7 +86,6 @@ module DealMakerAPI
88
86
  :'warrant_expiry_date' => :'warrant_expiry_date',
89
87
  :'warrant_certificate_number' => :'warrant_certificate_number',
90
88
  :'allocated_amount' => :'allocated_amount',
91
- :'investment_value' => :'investment_value',
92
89
  :'allocation_unit' => :'allocation_unit',
93
90
  :'state' => :'state'
94
91
  }
@@ -112,7 +109,6 @@ module DealMakerAPI
112
109
  :'warrant_expiry_date' => :'Date',
113
110
  :'warrant_certificate_number' => :'Integer',
114
111
  :'allocated_amount' => :'Float',
115
- :'investment_value' => :'Float',
116
112
  :'allocation_unit' => :'String',
117
113
  :'state' => :'String'
118
114
  }
@@ -128,13 +124,13 @@ module DealMakerAPI
128
124
  # @param [Hash] attributes Model attributes in the form of hash
129
125
  def initialize(attributes = {})
130
126
  if (!attributes.is_a?(Hash))
131
- fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::CreateInvestorRequest` initialize method"
127
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::PostDealsIdInvestors` initialize method"
132
128
  end
133
129
 
134
130
  # check to see if the attribute exists and convert string to symbol for hash key
135
131
  attributes = attributes.each_with_object({}) { |(k, v), h|
136
132
  if (!self.class.attribute_map.key?(k.to_sym))
137
- fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::CreateInvestorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
133
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::PostDealsIdInvestors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
138
134
  end
139
135
  h[k.to_sym] = v
140
136
  }
@@ -183,10 +179,6 @@ module DealMakerAPI
183
179
  self.allocated_amount = attributes[:'allocated_amount']
184
180
  end
185
181
 
186
- if attributes.key?(:'investment_value')
187
- self.investment_value = attributes[:'investment_value']
188
- end
189
-
190
182
  if attributes.key?(:'allocation_unit')
191
183
  self.allocation_unit = attributes[:'allocation_unit']
192
184
  else
@@ -259,7 +251,6 @@ module DealMakerAPI
259
251
  warrant_expiry_date == o.warrant_expiry_date &&
260
252
  warrant_certificate_number == o.warrant_certificate_number &&
261
253
  allocated_amount == o.allocated_amount &&
262
- investment_value == o.investment_value &&
263
254
  allocation_unit == o.allocation_unit &&
264
255
  state == o.state
265
256
  end
@@ -273,7 +264,7 @@ module DealMakerAPI
273
264
  # Calculates hash code according to all attributes.
274
265
  # @return [Integer] Hash code
275
266
  def hash
276
- [email, investor_profile_id, tags, first_name, last_name, phone_number, message, warrant_expiry_date, warrant_certificate_number, allocated_amount, investment_value, allocation_unit, state].hash
267
+ [email, investor_profile_id, tags, first_name, last_name, phone_number, message, warrant_expiry_date, warrant_certificate_number, allocated_amount, allocation_unit, state].hash
277
268
  end
278
269
 
279
270
  # Builds the object from hash
@@ -14,7 +14,8 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DealMakerAPI
17
- class UpdateInvestorRequest
17
+ # Update deal investor
18
+ class PutDealsIdInvestors
18
19
  # The warrant expiry date of the investor.
19
20
  attr_accessor :warrant_expiry_date
20
21
 
@@ -27,9 +28,6 @@ module DealMakerAPI
27
28
  # The allocation unit of the investor.
28
29
  attr_accessor :allocation_unit
29
30
 
30
- # The investment value of the investor.
31
- attr_accessor :investment_value
32
-
33
31
  # The notes of the investor.
34
32
  attr_accessor :notes
35
33
 
@@ -62,7 +60,6 @@ module DealMakerAPI
62
60
  :'warrant_certificate_number' => :'warrant_certificate_number',
63
61
  :'allocated_amount' => :'allocated_amount',
64
62
  :'allocation_unit' => :'allocation_unit',
65
- :'investment_value' => :'investment_value',
66
63
  :'notes' => :'notes'
67
64
  }
68
65
  end
@@ -79,7 +76,6 @@ module DealMakerAPI
79
76
  :'warrant_certificate_number' => :'Integer',
80
77
  :'allocated_amount' => :'Float',
81
78
  :'allocation_unit' => :'String',
82
- :'investment_value' => :'Float',
83
79
  :'notes' => :'String'
84
80
  }
85
81
  end
@@ -94,13 +90,13 @@ module DealMakerAPI
94
90
  # @param [Hash] attributes Model attributes in the form of hash
95
91
  def initialize(attributes = {})
96
92
  if (!attributes.is_a?(Hash))
97
- fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::UpdateInvestorRequest` initialize method"
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::PutDealsIdInvestors` initialize method"
98
94
  end
99
95
 
100
96
  # check to see if the attribute exists and convert string to symbol for hash key
101
97
  attributes = attributes.each_with_object({}) { |(k, v), h|
102
98
  if (!self.class.attribute_map.key?(k.to_sym))
103
- fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::UpdateInvestorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::PutDealsIdInvestors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
104
100
  end
105
101
  h[k.to_sym] = v
106
102
  }
@@ -123,10 +119,6 @@ module DealMakerAPI
123
119
  self.allocation_unit = 'securities'
124
120
  end
125
121
 
126
- if attributes.key?(:'investment_value')
127
- self.investment_value = attributes[:'investment_value']
128
- end
129
-
130
122
  if attributes.key?(:'notes')
131
123
  self.notes = attributes[:'notes']
132
124
  end
@@ -168,7 +160,6 @@ module DealMakerAPI
168
160
  warrant_certificate_number == o.warrant_certificate_number &&
169
161
  allocated_amount == o.allocated_amount &&
170
162
  allocation_unit == o.allocation_unit &&
171
- investment_value == o.investment_value &&
172
163
  notes == o.notes
173
164
  end
174
165
 
@@ -181,7 +172,7 @@ module DealMakerAPI
181
172
  # Calculates hash code according to all attributes.
182
173
  # @return [Integer] Hash code
183
174
  def hash
184
- [warrant_expiry_date, warrant_certificate_number, allocated_amount, allocation_unit, investment_value, notes].hash
175
+ [warrant_expiry_date, warrant_certificate_number, allocated_amount, allocation_unit, notes].hash
185
176
  end
186
177
 
187
178
  # Builds the object from hash
@@ -25,7 +25,7 @@ module DealMakerAPI
25
25
  # The file identifier [shareholder, investor]
26
26
  attr_accessor :file_identifier
27
27
 
28
- # The document type [drs_statement, shareholder_statement, book_entry_statement]
28
+ # The document type
29
29
  attr_accessor :document_type
30
30
 
31
31
  # The bulk upload name
@@ -49,6 +49,28 @@ module DealMakerAPI
49
49
  # The updated at timestamp
50
50
  attr_accessor :updated_at
51
51
 
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
52
74
  # Attribute mapping from ruby-style variable name to JSON key.
53
75
  def self.attribute_map
54
76
  {
@@ -166,9 +188,21 @@ module DealMakerAPI
166
188
  # @return true if the model is valid
167
189
  def valid?
168
190
  warn '[DEPRECATED] the `valid?` method is obsolete'
191
+ document_type_validator = EnumAttributeValidator.new('String', ["drs_statement", "shareholder_statement", "book_entry_statement", "dividend_statement"])
192
+ return false unless document_type_validator.valid?(@document_type)
169
193
  true
170
194
  end
171
195
 
196
+ # Custom attribute writer method checking allowed values (enum).
197
+ # @param [Object] document_type Object to be assigned
198
+ def document_type=(document_type)
199
+ validator = EnumAttributeValidator.new('String', ["drs_statement", "shareholder_statement", "book_entry_statement", "dividend_statement"])
200
+ unless validator.valid?(document_type)
201
+ fail ArgumentError, "invalid value for \"document_type\", must be one of #{validator.allowable_values}."
202
+ end
203
+ @document_type = document_type
204
+ end
205
+
172
206
  # Checks equality by comparing each attribute.
173
207
  # @param [Object] Object to be compared
174
208
  def ==(o)