DealMakerAPI 0.84.1 → 0.85.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -6
  3. data/docs/BulkUploadInvestorsRequest.md +3 -1
  4. data/docs/CompanyApi.md +162 -14
  5. data/docs/CreateBulkUploadRequest.md +5 -1
  6. data/docs/CreateCorporationProfileRequest.md +2 -2
  7. data/docs/CreateShareholderActionRequest.md +20 -0
  8. data/docs/CreateTrustProfileRequest.md +2 -2
  9. data/docs/DealsApi.md +75 -0
  10. data/docs/InvestorProfileApi.md +6 -8
  11. data/docs/PatchCorporationProfileRequest.md +27 -1
  12. data/docs/PutDealsIdScriptTagEnvironmentRequest.md +18 -0
  13. data/docs/V1EntitiesBulkUpload.md +6 -0
  14. data/docs/V1EntitiesBulkUploadDetail.md +2 -0
  15. data/docs/V1EntitiesDealIssuer.md +3 -1
  16. data/docs/V1EntitiesGenericResponse.md +20 -0
  17. data/docs/V1EntitiesInvestor.md +1 -1
  18. data/lib/DealMakerAPI/api/company_api.rb +171 -13
  19. data/lib/DealMakerAPI/api/deals_api.rb +94 -0
  20. data/lib/DealMakerAPI/api/investor_profile_api.rb +10 -6
  21. data/lib/DealMakerAPI/models/bulk_upload_investors_request.rb +14 -4
  22. data/lib/DealMakerAPI/models/create_bulk_upload_request.rb +38 -4
  23. data/lib/DealMakerAPI/models/create_corporation_profile_request.rb +8 -8
  24. data/lib/DealMakerAPI/models/create_individual_profile_request.rb +2 -2
  25. data/lib/DealMakerAPI/models/create_joint_profile_request.rb +2 -2
  26. data/lib/DealMakerAPI/models/create_shareholder_action_request.rb +239 -0
  27. data/lib/DealMakerAPI/models/create_trust_profile_request.rb +8 -8
  28. data/lib/DealMakerAPI/models/patch_corporation_profile_request.rb +167 -4
  29. data/lib/DealMakerAPI/models/patch_individual_profile_request.rb +2 -2
  30. data/lib/DealMakerAPI/models/patch_joint_profile_request.rb +2 -2
  31. data/lib/DealMakerAPI/models/put_deals_id_script_tag_environment_request.rb +222 -0
  32. data/lib/DealMakerAPI/models/v1_entities_bulk_upload.rb +31 -1
  33. data/lib/DealMakerAPI/models/v1_entities_bulk_upload_detail.rb +11 -1
  34. data/lib/DealMakerAPI/models/v1_entities_deal_issuer.rb +14 -4
  35. data/lib/DealMakerAPI/models/v1_entities_generic_response.rb +226 -0
  36. data/lib/DealMakerAPI/models/v1_entities_investor.rb +1 -1
  37. data/lib/DealMakerAPI/version.rb +1 -1
  38. data/lib/DealMakerAPI.rb +4 -0
  39. data/spec/api/company_api_spec.rb +34 -4
  40. data/spec/api/deals_api_spec.rb +48 -0
  41. data/spec/api/investor_profile_api_spec.rb +1 -1
  42. data/spec/models/bulk_upload_investors_request_spec.rb +6 -0
  43. data/spec/models/create_bulk_upload_request_spec.rb +12 -0
  44. data/spec/models/create_corporation_profile_request_spec.rb +1 -1
  45. data/spec/models/create_individual_profile_request_spec.rb +1 -1
  46. data/spec/models/create_joint_profile_request_spec.rb +1 -1
  47. data/spec/models/create_shareholder_action_request_spec.rb +40 -0
  48. data/spec/models/create_trust_profile_request_spec.rb +1 -1
  49. data/spec/models/patch_corporation_profile_request_spec.rb +78 -0
  50. data/spec/models/patch_individual_profile_request_spec.rb +1 -1
  51. data/spec/models/patch_joint_profile_request_spec.rb +1 -1
  52. data/spec/models/put_deals_id_script_tag_environment_request_spec.rb +34 -0
  53. data/spec/models/v1_entities_bulk_upload_detail_spec.rb +6 -0
  54. data/spec/models/v1_entities_bulk_upload_spec.rb +18 -0
  55. data/spec/models/v1_entities_deal_issuer_spec.rb +6 -0
  56. data/spec/models/v1_entities_generic_response_spec.rb +40 -0
  57. metadata +80 -64
@@ -259,7 +259,7 @@ module DealMakerAPI
259
259
  return false if @email.nil?
260
260
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
261
261
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
262
- ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
262
+ ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
263
263
  return false unless ca_accredited_investor_validator.valid?(@ca_accredited_investor)
264
264
  true
265
265
  end
@@ -277,7 +277,7 @@ module DealMakerAPI
277
277
  # Custom attribute writer method checking allowed values (enum).
278
278
  # @param [Object] ca_accredited_investor Object to be assigned
279
279
  def ca_accredited_investor=(ca_accredited_investor)
280
- validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
280
+ validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
281
281
  unless validator.valid?(ca_accredited_investor)
282
282
  fail ArgumentError, "invalid value for \"ca_accredited_investor\", must be one of #{validator.allowable_values}."
283
283
  end
@@ -367,7 +367,7 @@ module DealMakerAPI
367
367
  return false if @email.nil?
368
368
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
369
369
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
370
- ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
370
+ ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
371
371
  return false unless ca_accredited_investor_validator.valid?(@ca_accredited_investor)
372
372
  joint_type_validator = EnumAttributeValidator.new('String', ["joint_tenant", "tenants_in_common", "community_property"])
373
373
  return false unless joint_type_validator.valid?(@joint_type)
@@ -387,7 +387,7 @@ module DealMakerAPI
387
387
  # Custom attribute writer method checking allowed values (enum).
388
388
  # @param [Object] ca_accredited_investor Object to be assigned
389
389
  def ca_accredited_investor=(ca_accredited_investor)
390
- validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
390
+ validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
391
391
  unless validator.valid?(ca_accredited_investor)
392
392
  fail ArgumentError, "invalid value for \"ca_accredited_investor\", must be one of #{validator.allowable_values}."
393
393
  end
@@ -0,0 +1,239 @@
1
+ =begin
2
+ #DealMaker API
3
+
4
+ ## Introduction Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages. This is the technical documentation for our API. There are tutorials and examples of integrations with our API available on our [knowledge centre](https://help.dealmaker.tech/training-centre) as well. # Libraries - Javascript - Ruby # Authentication To authenticate, add an Authorization header to your API request that contains an access token. Before you [generate an access token](#how-to-generate-an-access-token) your must first [create an application](#create-an-application) on your portal and retrieve the your client ID and secret ## Create an Application DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://app.dealmaker.tech/developer/applications). To create an API Application, click on your user name in the top right corner to open a dropdown menu, and select \"Integrations\". Under the API settings tab, click the `Create New Application` button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-1.png) Name your application and assign the level of permissions for this application ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-2.png) Once your application is created, save in a secure space your client ID and secret. **WARNING**: The secret key will not be visible after you click the close button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-3.png) From the developer tab, you will be able to view and manage all the available applications ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-4.png) Each Application consists of a client id, secret and set of scopes. The scopes define what resources you want to have access to. The client ID and secret are used to generate an access token. You will need to create an application to use API endpoints. ## How to generate an access token After creating an application, you must make a call to obtain a bearer token using the Generate an OAuth token operation. This operation requires the following parameters: `token endpoint` - https://app.dealmaker.tech/oauth/token `grant_type` - must be set to `client_credentials` `client_id` - the Client ID displayed when you created the OAuth application in the previous step `client_secret` - the Client Secret displayed when you created the OAuth application in the previous step `scope` - the scope is established when you created the OAuth application in the previous step Note: The Generate an OAuth token response specifies how long the bearer token is valid for. You should reuse the bearer token until it is expired. When the token is expired, call Generate an OAuth token again to generate a new one. To use the access token, you must set a plain text header named `Authorization` with the contents of the header being “Bearer XXX” where XXX is your generated access token. ### Example #### Postman Here's an example on how to generate the access token with Postman, where `{{CLIENT_ID}}` and `{{CLIENT_SECRET}}` are the values generated after following the steps on [Create an Application](#create-an-application) ![Get access token postman example](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/token-postman.png) # Status Codes ## Content-Type Header All responses are returned in JSON format. We specify this by sending the Content-Type header. ## Status Codes Below is a table containing descriptions of the various status codes we currently support against various resources. Sometimes your API call will generate an error. Here you will find additional information about what to expect if you don’t format your request properly, or we fail to properly process your request. | Status Code | Description | | ----------- | ----------- | | `200` | Success | | `403` | Forbidden | | `404` | Not found | # Pagination Pagination is used to divide large responses is smaller portions (pages). By default, all endpoints return a maximum of 25 records per page. You can change the number of records on a per request basis by passing a `per_page` parameter in the request header parameters. The largest supported `per_page` parameter is 100. When the response exceeds the `per_page` parameter, you can paginate through the records by increasing the `offset` parameter. Example: `offset=25` will return 25 records starting from 26th record. You may also paginate using the `page` parameter to indicate the page number you would like to show on the response. Please review the table below for the input parameters ## Inputs | Parameter | Description | | ---------- | ------------------------------------------------------------------------------- | | `per_page` | Amount of records included on each page (Default is 25) | | `page` | Page number | | `offset` | Amount of records offset on the API request where 0 represents the first record | ## Response Headers | Response Header | Description | | --------------- | -------------------------------------------- | | `X-Total` | Total number of records of response | | `X-Total-Pages` | Total number of pages of response | | `X-Per-Page` | Total number of records per page of response | | `X-Page` | Number of current page | | `X-Next-Page` | Number of next page | | `X-Prev-Page` | Number of previous page | | `X-Offset` | Total number of records offset | # Search and Filtering (The q parameter) The q optional parameter accepts a string as input and allows you to filter the request based on that string. Please note that search strings must be encoded according to ASCII. For example, \"john+investor&#64;dealmaker.tech\" should be passed as “john%2Binvestor%40dealmaker.tech”. There are two main ways to filter with it. ## Keyword filtering Some keywords allow you to filter investors based on a specific “scope” of the investors, for example using the string “Invited” will filter all investors with the status invited, and the keyword “Has attachments” will filter investors with attachments. Here’s a list of possible keywords and the “scope” each one of the keywords filters by: | Keywords | Scope | Decoded Example | Encoded Example | | ---------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | Signed on \\(date range\\) | Investors who signed in the provided date range | Signed on (date range) [2020-07-01:2020-07-31] | `Signed%20on%20%28date%20range%29%20%5B2020-07-01%3A2020-07-31%5D` | | Enabled for countersignature on \\(date range\\) | Investors who were enabled for counter signature in the provided date range | Enabled for countersignature on (date range) [2022-05-24:2022-05-25] | `Enabled%20for%20countersignature%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Accepted on \\(date range\\) | Investors accepted in the provided date rage | Accepted on (date range) [2022-05-24:2022-05-25] | `Accepted%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Offline | Investors added to the deal offline | Offline | `Offline` | | Online | Investors added to the deal online | Online | `Online` | | Signed | Investors who signed their agreement | Signed | `Signed` | | Waiting for countersignature | Investors who have signed and are waiting for counter signature | Waiting for countersignature | `Waiting%20for%20countersignature` | | Invited | Investors on the Invited Status | Invited | `Invited` | | Accepted | Investors in the Accepted Status | Accepted | `Accepted` | | Questionnaire in progress | All Investors who have not finished completing the questionnaire | Questionnaire in progress | `Questionnaire%20in%20progress` | | Has attachments | All Investors with attachments | Has attachments | `Has%20attachments` | | Has notes | All Investors with notes | Has notes | `Has%20notes` | | Waiting for co-signature | Investors who have signed and are waiting for co-signature | Waiting for co-signature | `Waiting%20for%20co-signature` | | Background Check Approved | Investors with approved background check | Background Check Approved | `Background%20Check%20Approved` | | Document Review Pending | Investors with pending review | Document Review Pending | `Document%20Review%20Pending` | | Document Upload Pending | Investors with pending documents to upload | Document Upload Pending | `Document%20Upload%20Pending` | | Required adjudicator review | Investors who are required to be review by the adjudicator | Required adjudicator review | `Required%20adjudicator%20review` | --- **NOTE** Filtering keywords are case sensitive and need to be encoded --- ## Search String Any value for the parameter which does not match one of the keywords listed above, will use fields like `first name`, `last name`, `email`, `tags` to search for the investor. For example, if you search “Robert”, because this does not match one of the keywords listed above, it will then return any investors who have the string “Robert” in their name, email, or tags fields. # Versioning The latest version is v1. The version can be updated on the `Accept` header, just set the version as stated on the following example: ``` Accept:application/vnd.dealmaker-v1+json ``` | Version | Accept Header | | ------- | ----------------------------------- | | `v1` | application/vnd.dealmaker-`v1`+json | # SDK’s For instruction on installing SDKs, please view the following links - [Javascript](https://github.com/DealMakerTech/api/tree/main/v1/clients/javascript) - [Ruby](https://github.com/DealMakerTech/api/tree/main/v1/clients/ruby) # Webhooks Our webhooks functionality allows clients to automatically receive updates on a deal's investor data. Some of the data that the webhooks include: - Investor Name - Date created - Email - Phone - Allocation - Attachments - Accredited investor status - Accredited investor category - State (Draft, Invited, Signed, Accepted, Waiting, Inactive) Via webhooks clients can subscribe to the following events as they happen on Dealmaker: - Investor is created - Investor details are updated (any of the investor details above change or are updated) - Investor has signed their agreement - Invertor fully funded their investment - Investor has been accepted - Investor is deleted A URL supplied by the client will receive all the events with the information as part of the payload. Clients are able to add and update the URL within DealMaker. ## Configuration For a comprehensive guide on how to configure Webhooks please visit our support article: [Configuring Webhooks on DealMaker – DealMaker Support](https://help.dealmaker.tech/configuring-webhooks-on-dealmaker). As a developer user on DealMaker, you are able to configure webhooks by following the steps below: 1. Sign into Dealmaker 2. Go to **“Your profile”** in the top right corner 3. Access an **“Integrations”** configuration via the left menu 4. The developer configures webhooks by including: - The HTTPS URL where the request will be sent - Optionally, a security token that we would use to build a SHA1 hash that would be included in the request headers. The name of the header is `X-DealMaker-Signature`. If the secret is not specified, the hash won’t be included in the headers. - The Deal(s) to include in the webhook subscription - An email address that will be used to notify about errors. 5. The developers can disable webhooks temporarily if needed ## Specification ### Events The initial set of events will be related to the investor. The events are: 1. `investor.created` - Triggers every time a new investor is added to a deal 2. `investor.updated` - Triggers on updates to any of the following fields: - Status - Name - Email - (this is a user field so we trigger event for all investors with webhook subscription) - Allocated Amount - Investment Amount - Accredited investor fields - Adding or removing attachments - Tags - When the investor status is signed, the payload also includes a link to the signed document; the link expires after 30 minutes 3. `investor.signed` - Triggers when the investor signs their subscription agreement (terms and conditions) - When this happens the investor.state becomes `signed` - This event includes the same fields as the `investor.updated` event 4. `investor.funded` - Triggers when the investor becomes fully funded - This happens when the investor.funded_state becomes `funded` - This event includes the same fields as the `investor.updated` event 5. `investor.accepted` - Triggers when the investor is countersigned - When this happens the investor.state becomes `accepted` - This event includes the same fields as the `investor.updated` event 6. `investor.deleted` - Triggers when the investor is removed from the deal - The investor key of the payload only includes investor ID - The deal is not included in the payload. Due to our implementation it’s impossible to retrieve the deal the investor was part of ### Requests - The request is a `POST` - The payload’s `content-type` is `application/json` - Only `2XX` responses are considered successful. In the event of a different response, we consider it failed and queue the event for retry - We retry the request five times, after the initial attempt. Doubling the waiting time between intervals with each try. The first retry happens after 30 seconds, then 60 seconds, 2 mins, 4 minutes, and 8 minutes. This timing scheme gives the receiver about 1 hour if all the requests fail - If an event fails all the attempts to be delivered, we send an email to the address that the user configured ### Payload #### Common Properties There will be some properties that are common to all the events on the system. | Key | Type | Description | | ----------------- | ------ | -------------------------------------------------------------------------------------- | | event | String | The event that triggered the call | | event_id | String | A unique identifier for the event | | deal<sup>\\*</sup> | Object | The deal in which the event occurred. please see below for an example on the deal object<sup>\\*\\*</sup> | <sup>\\*</sup>This field is not included when deleting a resource <sup>\\*\\*</sup> Sample Deal Object in the webhook payload ```json \"deal\": { \"id\": 0, \"title\": \"string\", \"created_at\": \"2022-12-06T18:14:44.000Z\", \"updated_at\": \"2022-12-08T12:46:48.000Z\", \"state\": \"string\", \"currency\": \"string\", \"security_type\": \"string\", \"price_per_security\": 0.00, \"deal_type\": \"string\", \"minimum_investment\": 0, \"maximum_investment\": 0, \"issuer\": { \"id\": 0, \"name\": \"string\" }, \"enterprise\": { \"id\": 0, \"name\": \"string\" } } ``` #### Common Properties (investor scope) By design, we have incorporated on the webhooks payload the same investor-related fields included in the Investor model, for reference on the included fields, their types and values please click [here](https://docs.dealmaker.tech/#tag/investor_model). This will allow you to get all the necessary information you need about a particular investor without having to call the Get Investor by ID endpoint. | #### Investor State Here is a brief description of each investor state: - **Draft:** the investor is added to the platform but hasn't been invited yet and cannot access the portal - **Invited:** the investor was added to the platform but hasn’t completed the questionnaire - **Signed:** the investor signed the document (needs approval from Lawyer or Reviewer before countersignature) - **Waiting:** the investor was approved for countersignature by any of the Lawyers or Reviewers in the deal - **Accepted:** the investor's agreement was countersigned by the Signatory - **Inactive** the investor is no longer eligible to participate in the offering. This may be because their warrant expired, they requested a refund, or they opted out of the offering #### Update Delay Given the high number of updates our platform performs on any investor, we’ve added a cool down period on update events that allows us to “group” updates and trigger only one every minute. In consequence, update events will be delivered 1 minute after the initial request was made and will include the latest version of the investor data at delivery time.
5
+
6
+ The version of the OpenAPI document: 1.75.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DealMakerAPI
17
+ class CreateShareholderActionRequest
18
+ # The request type of the shareholder action
19
+ attr_accessor :request_type
20
+
21
+ # The description of the shareholder action
22
+ attr_accessor :description
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'request_type' => :'request_type',
28
+ :'description' => :'description'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'request_type' => :'String',
41
+ :'description' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::CreateShareholderActionRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::CreateShareholderActionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'request_type')
67
+ self.request_type = attributes[:'request_type']
68
+ else
69
+ self.request_type = nil
70
+ end
71
+
72
+ if attributes.key?(:'description')
73
+ self.description = attributes[:'description']
74
+ else
75
+ self.description = nil
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ if @request_type.nil?
85
+ invalid_properties.push('invalid value for "request_type", request_type cannot be nil.')
86
+ end
87
+
88
+ if @description.nil?
89
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ return false if @request_type.nil?
100
+ return false if @description.nil?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ request_type == o.request_type &&
110
+ description == o.description
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [request_type, description].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def self._deserialize(type, value)
153
+ case type.to_sym
154
+ when :Time
155
+ Time.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :Boolean
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
182
+ end
183
+ end
184
+ else # model
185
+ # models (e.g. Pet) or oneOf
186
+ klass = DealMakerAPI.const_get(type)
187
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ if value.nil?
210
+ is_nullable = self.class.openapi_nullable.include?(attr)
211
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
+ end
213
+
214
+ hash[param] = _to_hash(value)
215
+ end
216
+ hash
217
+ end
218
+
219
+ # Outputs non-array value in the form of hash
220
+ # For object, use to_hash. Otherwise, just return the value
221
+ # @param [Object] value Any valid value
222
+ # @return [Hash] Returns the value in the form of hash
223
+ def _to_hash(value)
224
+ if value.is_a?(Array)
225
+ value.compact.map { |v| _to_hash(v) }
226
+ elsif value.is_a?(Hash)
227
+ {}.tap do |hash|
228
+ value.each { |k, v| hash[k] = _to_hash(v) }
229
+ end
230
+ elsif value.respond_to? :to_hash
231
+ value.to_hash
232
+ else
233
+ value
234
+ end
235
+ end
236
+
237
+ end
238
+
239
+ end
@@ -76,7 +76,7 @@ module DealMakerAPI
76
76
  attr_accessor :trustees_street_address
77
77
 
78
78
  # The list of street address line 2 for the trustees.
79
- attr_accessor :trustees_unit_2
79
+ attr_accessor :trustees_unit2
80
80
 
81
81
  # The list of cities for the trustees (required for trustee 1).
82
82
  attr_accessor :trustees_city
@@ -138,7 +138,7 @@ module DealMakerAPI
138
138
  :'trustees_suffix' => :'trustees[suffix]',
139
139
  :'trustees_country' => :'trustees[country]',
140
140
  :'trustees_street_address' => :'trustees[street_address]',
141
- :'trustees_unit_2' => :'trustees[unit_2]',
141
+ :'trustees_unit2' => :'trustees[unit2]',
142
142
  :'trustees_city' => :'trustees[city]',
143
143
  :'trustees_region' => :'trustees[region]',
144
144
  :'trustees_postal_code' => :'trustees[postal_code]',
@@ -175,7 +175,7 @@ module DealMakerAPI
175
175
  :'trustees_suffix' => :'Array<String>',
176
176
  :'trustees_country' => :'Array<String>',
177
177
  :'trustees_street_address' => :'Array<String>',
178
- :'trustees_unit_2' => :'Array<String>',
178
+ :'trustees_unit2' => :'Array<String>',
179
179
  :'trustees_city' => :'Array<String>',
180
180
  :'trustees_region' => :'Array<String>',
181
181
  :'trustees_postal_code' => :'Array<String>',
@@ -297,9 +297,9 @@ module DealMakerAPI
297
297
  end
298
298
  end
299
299
 
300
- if attributes.key?(:'trustees_unit_2')
301
- if (value = attributes[:'trustees_unit_2']).is_a?(Array)
302
- self.trustees_unit_2 = value
300
+ if attributes.key?(:'trustees_unit2')
301
+ if (value = attributes[:'trustees_unit2']).is_a?(Array)
302
+ self.trustees_unit2 = value
303
303
  end
304
304
  end
305
305
 
@@ -403,7 +403,7 @@ module DealMakerAPI
403
403
  trustees_suffix == o.trustees_suffix &&
404
404
  trustees_country == o.trustees_country &&
405
405
  trustees_street_address == o.trustees_street_address &&
406
- trustees_unit_2 == o.trustees_unit_2 &&
406
+ trustees_unit2 == o.trustees_unit2 &&
407
407
  trustees_city == o.trustees_city &&
408
408
  trustees_region == o.trustees_region &&
409
409
  trustees_postal_code == o.trustees_postal_code &&
@@ -420,7 +420,7 @@ module DealMakerAPI
420
420
  # Calculates hash code according to all attributes.
421
421
  # @return [Integer] Hash code
422
422
  def hash
423
- [email, us_accredited_category, ca_accredited_investor, name, date, country, street_address, unit2, city, region, postal_code, phone_number, income, net_worth, reg_cf_prior_offerings_amount, trustees_first_name, trustees_last_name, trustees_suffix, trustees_country, trustees_street_address, trustees_unit_2, trustees_city, trustees_region, trustees_postal_code, trustees_date_of_birth, trustees_taxpayer_id].hash
423
+ [email, us_accredited_category, ca_accredited_investor, name, date, country, street_address, unit2, city, region, postal_code, phone_number, income, net_worth, reg_cf_prior_offerings_amount, trustees_first_name, trustees_last_name, trustees_suffix, trustees_country, trustees_street_address, trustees_unit2, trustees_city, trustees_region, trustees_postal_code, trustees_date_of_birth, trustees_taxpayer_id].hash
424
424
  end
425
425
 
426
426
  # Builds the object from hash
@@ -90,6 +90,45 @@ module DealMakerAPI
90
90
  # The taxpayer identification number of the investor profile.
91
91
  attr_accessor :signing_officer_taxpayer_id
92
92
 
93
+ # The index of the beneficial owner.
94
+ attr_accessor :beneficial_owners_index
95
+
96
+ # If true, this entry will be cleared.
97
+ attr_accessor :beneficial_owners__delete
98
+
99
+ # The list of first names for the beneficial owners (required for beneficial owner 1).
100
+ attr_accessor :beneficial_owners_first_name
101
+
102
+ # The list of last names for the beneficial owners (required for beneficial owner 1).
103
+ attr_accessor :beneficial_owners_last_name
104
+
105
+ # The list of suffixes for the beneficial owners.
106
+ attr_accessor :beneficial_owners_suffix
107
+
108
+ # The list of countries for the beneficial owners (required for beneficial owner 1).
109
+ attr_accessor :beneficial_owners_country
110
+
111
+ # The list of street addresses for the beneficial owners (required for beneficial owner 1).
112
+ attr_accessor :beneficial_owners_street_address
113
+
114
+ # The list of street address line 2 for the beneficial owners.
115
+ attr_accessor :beneficial_owners_unit2
116
+
117
+ # The list of cities for the beneficial owners (required for beneficial owner 1).
118
+ attr_accessor :beneficial_owners_city
119
+
120
+ # The list of region or states for the beneficial owners (required for beneficial owner 1).
121
+ attr_accessor :beneficial_owners_region
122
+
123
+ # The list of postal codes or zipcodes for the beneficial owners (required for beneficial owner 1).
124
+ attr_accessor :beneficial_owners_postal_code
125
+
126
+ # The list of dates of birth for the beneficial owners (required for beneficial owner 1).
127
+ attr_accessor :beneficial_owners_date_of_birth
128
+
129
+ # The list of taxpayer identification numbers for the beneficial owners (required for beneficial owner 1).
130
+ attr_accessor :beneficial_owners_taxpayer_id
131
+
93
132
  class EnumAttributeValidator
94
133
  attr_reader :datatype
95
134
  attr_reader :allowable_values
@@ -139,7 +178,20 @@ module DealMakerAPI
139
178
  :'signing_officer_region' => :'signing_officer_region',
140
179
  :'signing_officer_postal_code' => :'signing_officer_postal_code',
141
180
  :'signing_officer_date_of_birth' => :'signing_officer_date_of_birth',
142
- :'signing_officer_taxpayer_id' => :'signing_officer_taxpayer_id'
181
+ :'signing_officer_taxpayer_id' => :'signing_officer_taxpayer_id',
182
+ :'beneficial_owners_index' => :'beneficial_owners[index]',
183
+ :'beneficial_owners__delete' => :'beneficial_owners[_delete]',
184
+ :'beneficial_owners_first_name' => :'beneficial_owners[first_name]',
185
+ :'beneficial_owners_last_name' => :'beneficial_owners[last_name]',
186
+ :'beneficial_owners_suffix' => :'beneficial_owners[suffix]',
187
+ :'beneficial_owners_country' => :'beneficial_owners[country]',
188
+ :'beneficial_owners_street_address' => :'beneficial_owners[street_address]',
189
+ :'beneficial_owners_unit2' => :'beneficial_owners[unit2]',
190
+ :'beneficial_owners_city' => :'beneficial_owners[city]',
191
+ :'beneficial_owners_region' => :'beneficial_owners[region]',
192
+ :'beneficial_owners_postal_code' => :'beneficial_owners[postal_code]',
193
+ :'beneficial_owners_date_of_birth' => :'beneficial_owners[date_of_birth]',
194
+ :'beneficial_owners_taxpayer_id' => :'beneficial_owners[taxpayer_id]'
143
195
  }
144
196
  end
145
197
 
@@ -175,7 +227,20 @@ module DealMakerAPI
175
227
  :'signing_officer_region' => :'String',
176
228
  :'signing_officer_postal_code' => :'String',
177
229
  :'signing_officer_date_of_birth' => :'String',
178
- :'signing_officer_taxpayer_id' => :'String'
230
+ :'signing_officer_taxpayer_id' => :'String',
231
+ :'beneficial_owners_index' => :'Array<Integer>',
232
+ :'beneficial_owners__delete' => :'Array<Boolean>',
233
+ :'beneficial_owners_first_name' => :'Array<String>',
234
+ :'beneficial_owners_last_name' => :'Array<String>',
235
+ :'beneficial_owners_suffix' => :'Array<String>',
236
+ :'beneficial_owners_country' => :'Array<String>',
237
+ :'beneficial_owners_street_address' => :'Array<String>',
238
+ :'beneficial_owners_unit2' => :'Array<String>',
239
+ :'beneficial_owners_city' => :'Array<String>',
240
+ :'beneficial_owners_region' => :'Array<String>',
241
+ :'beneficial_owners_postal_code' => :'Array<String>',
242
+ :'beneficial_owners_date_of_birth' => :'Array<String>',
243
+ :'beneficial_owners_taxpayer_id' => :'Array<String>'
179
244
  }
180
245
  end
181
246
 
@@ -299,6 +364,86 @@ module DealMakerAPI
299
364
  if attributes.key?(:'signing_officer_taxpayer_id')
300
365
  self.signing_officer_taxpayer_id = attributes[:'signing_officer_taxpayer_id']
301
366
  end
367
+
368
+ if attributes.key?(:'beneficial_owners_index')
369
+ if (value = attributes[:'beneficial_owners_index']).is_a?(Array)
370
+ self.beneficial_owners_index = value
371
+ end
372
+ else
373
+ self.beneficial_owners_index = nil
374
+ end
375
+
376
+ if attributes.key?(:'beneficial_owners__delete')
377
+ if (value = attributes[:'beneficial_owners__delete']).is_a?(Array)
378
+ self.beneficial_owners__delete = value
379
+ end
380
+ end
381
+
382
+ if attributes.key?(:'beneficial_owners_first_name')
383
+ if (value = attributes[:'beneficial_owners_first_name']).is_a?(Array)
384
+ self.beneficial_owners_first_name = value
385
+ end
386
+ end
387
+
388
+ if attributes.key?(:'beneficial_owners_last_name')
389
+ if (value = attributes[:'beneficial_owners_last_name']).is_a?(Array)
390
+ self.beneficial_owners_last_name = value
391
+ end
392
+ end
393
+
394
+ if attributes.key?(:'beneficial_owners_suffix')
395
+ if (value = attributes[:'beneficial_owners_suffix']).is_a?(Array)
396
+ self.beneficial_owners_suffix = value
397
+ end
398
+ end
399
+
400
+ if attributes.key?(:'beneficial_owners_country')
401
+ if (value = attributes[:'beneficial_owners_country']).is_a?(Array)
402
+ self.beneficial_owners_country = value
403
+ end
404
+ end
405
+
406
+ if attributes.key?(:'beneficial_owners_street_address')
407
+ if (value = attributes[:'beneficial_owners_street_address']).is_a?(Array)
408
+ self.beneficial_owners_street_address = value
409
+ end
410
+ end
411
+
412
+ if attributes.key?(:'beneficial_owners_unit2')
413
+ if (value = attributes[:'beneficial_owners_unit2']).is_a?(Array)
414
+ self.beneficial_owners_unit2 = value
415
+ end
416
+ end
417
+
418
+ if attributes.key?(:'beneficial_owners_city')
419
+ if (value = attributes[:'beneficial_owners_city']).is_a?(Array)
420
+ self.beneficial_owners_city = value
421
+ end
422
+ end
423
+
424
+ if attributes.key?(:'beneficial_owners_region')
425
+ if (value = attributes[:'beneficial_owners_region']).is_a?(Array)
426
+ self.beneficial_owners_region = value
427
+ end
428
+ end
429
+
430
+ if attributes.key?(:'beneficial_owners_postal_code')
431
+ if (value = attributes[:'beneficial_owners_postal_code']).is_a?(Array)
432
+ self.beneficial_owners_postal_code = value
433
+ end
434
+ end
435
+
436
+ if attributes.key?(:'beneficial_owners_date_of_birth')
437
+ if (value = attributes[:'beneficial_owners_date_of_birth']).is_a?(Array)
438
+ self.beneficial_owners_date_of_birth = value
439
+ end
440
+ end
441
+
442
+ if attributes.key?(:'beneficial_owners_taxpayer_id')
443
+ if (value = attributes[:'beneficial_owners_taxpayer_id']).is_a?(Array)
444
+ self.beneficial_owners_taxpayer_id = value
445
+ end
446
+ end
302
447
  end
303
448
 
304
449
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -306,6 +451,10 @@ module DealMakerAPI
306
451
  def list_invalid_properties
307
452
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
308
453
  invalid_properties = Array.new
454
+ if @beneficial_owners_index.nil?
455
+ invalid_properties.push('invalid value for "beneficial_owners_index", beneficial_owners_index cannot be nil.')
456
+ end
457
+
309
458
  invalid_properties
310
459
  end
311
460
 
@@ -317,6 +466,7 @@ module DealMakerAPI
317
466
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
318
467
  ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["a", "b", "c", "d", "f", "g", "h", "i", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x"])
319
468
  return false unless ca_accredited_investor_validator.valid?(@ca_accredited_investor)
469
+ return false if @beneficial_owners_index.nil?
320
470
  true
321
471
  end
322
472
 
@@ -369,7 +519,20 @@ module DealMakerAPI
369
519
  signing_officer_region == o.signing_officer_region &&
370
520
  signing_officer_postal_code == o.signing_officer_postal_code &&
371
521
  signing_officer_date_of_birth == o.signing_officer_date_of_birth &&
372
- signing_officer_taxpayer_id == o.signing_officer_taxpayer_id
522
+ signing_officer_taxpayer_id == o.signing_officer_taxpayer_id &&
523
+ beneficial_owners_index == o.beneficial_owners_index &&
524
+ beneficial_owners__delete == o.beneficial_owners__delete &&
525
+ beneficial_owners_first_name == o.beneficial_owners_first_name &&
526
+ beneficial_owners_last_name == o.beneficial_owners_last_name &&
527
+ beneficial_owners_suffix == o.beneficial_owners_suffix &&
528
+ beneficial_owners_country == o.beneficial_owners_country &&
529
+ beneficial_owners_street_address == o.beneficial_owners_street_address &&
530
+ beneficial_owners_unit2 == o.beneficial_owners_unit2 &&
531
+ beneficial_owners_city == o.beneficial_owners_city &&
532
+ beneficial_owners_region == o.beneficial_owners_region &&
533
+ beneficial_owners_postal_code == o.beneficial_owners_postal_code &&
534
+ beneficial_owners_date_of_birth == o.beneficial_owners_date_of_birth &&
535
+ beneficial_owners_taxpayer_id == o.beneficial_owners_taxpayer_id
373
536
  end
374
537
 
375
538
  # @see the `==` method
@@ -381,7 +544,7 @@ module DealMakerAPI
381
544
  # Calculates hash code according to all attributes.
382
545
  # @return [Integer] Hash code
383
546
  def hash
384
- [us_accredited_category, ca_accredited_investor, name, country, street_address, unit2, city, region, postal_code, business_number, phone_number, income, net_worth, reg_cf_prior_offerings_amount, signing_officer_first_name, signing_officer_last_name, signing_officer_suffix, signing_officer_country, signing_officer_street_address, signing_officer_unit2, signing_officer_city, signing_officer_region, signing_officer_postal_code, signing_officer_date_of_birth, signing_officer_taxpayer_id].hash
547
+ [us_accredited_category, ca_accredited_investor, name, country, street_address, unit2, city, region, postal_code, business_number, phone_number, income, net_worth, reg_cf_prior_offerings_amount, signing_officer_first_name, signing_officer_last_name, signing_officer_suffix, signing_officer_country, signing_officer_street_address, signing_officer_unit2, signing_officer_city, signing_officer_region, signing_officer_postal_code, signing_officer_date_of_birth, signing_officer_taxpayer_id, beneficial_owners_index, beneficial_owners__delete, beneficial_owners_first_name, beneficial_owners_last_name, beneficial_owners_suffix, beneficial_owners_country, beneficial_owners_street_address, beneficial_owners_unit2, beneficial_owners_city, beneficial_owners_region, beneficial_owners_postal_code, beneficial_owners_date_of_birth, beneficial_owners_taxpayer_id].hash
385
548
  end
386
549
 
387
550
  # Builds the object from hash
@@ -243,7 +243,7 @@ module DealMakerAPI
243
243
  warn '[DEPRECATED] the `valid?` method is obsolete'
244
244
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
245
245
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
246
- ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
246
+ ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
247
247
  return false unless ca_accredited_investor_validator.valid?(@ca_accredited_investor)
248
248
  true
249
249
  end
@@ -261,7 +261,7 @@ module DealMakerAPI
261
261
  # Custom attribute writer method checking allowed values (enum).
262
262
  # @param [Object] ca_accredited_investor Object to be assigned
263
263
  def ca_accredited_investor=(ca_accredited_investor)
264
- validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
264
+ validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
265
265
  unless validator.valid?(ca_accredited_investor)
266
266
  fail ArgumentError, "invalid value for \"ca_accredited_investor\", must be one of #{validator.allowable_values}."
267
267
  end
@@ -351,7 +351,7 @@ module DealMakerAPI
351
351
  warn '[DEPRECATED] the `valid?` method is obsolete'
352
352
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
353
353
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
354
- ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
354
+ ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
355
355
  return false unless ca_accredited_investor_validator.valid?(@ca_accredited_investor)
356
356
  joint_type_validator = EnumAttributeValidator.new('String', ["joint_tenant", "tenants_in_common", "community_property"])
357
357
  return false unless joint_type_validator.valid?(@joint_type)
@@ -371,7 +371,7 @@ module DealMakerAPI
371
371
  # Custom attribute writer method checking allowed values (enum).
372
372
  # @param [Object] ca_accredited_investor Object to be assigned
373
373
  def ca_accredited_investor=(ca_accredited_investor)
374
- validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k", "l", "q", "v", "x"])
374
+ validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
375
375
  unless validator.valid?(ca_accredited_investor)
376
376
  fail ArgumentError, "invalid value for \"ca_accredited_investor\", must be one of #{validator.allowable_values}."
377
377
  end