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
@@ -0,0 +1,222 @@
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 PutDealsIdScriptTagEnvironmentRequest
18
+ # True if environment is production.
19
+ attr_accessor :is_production
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'is_production' => :'is_production'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'is_production' => :'Boolean'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::PutDealsIdScriptTagEnvironmentRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::PutDealsIdScriptTagEnvironmentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'is_production')
62
+ self.is_production = attributes[:'is_production']
63
+ else
64
+ self.is_production = nil
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
+ invalid_properties = Array.new
73
+ if @is_production.nil?
74
+ invalid_properties.push('invalid value for "is_production", is_production cannot be nil.')
75
+ end
76
+
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ return false if @is_production.nil?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ is_production == o.is_production
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [is_production].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def self._deserialize(type, value)
136
+ case type.to_sym
137
+ when :Time
138
+ Time.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :Boolean
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ # models (e.g. Pet) or oneOf
169
+ klass = DealMakerAPI.const_get(type)
170
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ if value.nil?
193
+ is_nullable = self.class.openapi_nullable.include?(attr)
194
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
+ end
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end
@@ -31,6 +31,15 @@ module DealMakerAPI
31
31
  # The bulk upload name
32
32
  attr_accessor :upload_name
33
33
 
34
+ # The number of files in the bulk upload
35
+ attr_accessor :files_count
36
+
37
+ # The number of errors in the bulk upload
38
+ attr_accessor :errors_count
39
+
40
+ # The number of succeeded files in the bulk upload
41
+ attr_accessor :success_count
42
+
34
43
  # The status [pending, processing, completed, failed]
35
44
  attr_accessor :status
36
45
 
@@ -48,6 +57,9 @@ module DealMakerAPI
48
57
  :'file_identifier' => :'file_identifier',
49
58
  :'document_type' => :'document_type',
50
59
  :'upload_name' => :'upload_name',
60
+ :'files_count' => :'files_count',
61
+ :'errors_count' => :'errors_count',
62
+ :'success_count' => :'success_count',
51
63
  :'status' => :'status',
52
64
  :'created_at' => :'created_at',
53
65
  :'updated_at' => :'updated_at'
@@ -67,6 +79,9 @@ module DealMakerAPI
67
79
  :'file_identifier' => :'String',
68
80
  :'document_type' => :'String',
69
81
  :'upload_name' => :'String',
82
+ :'files_count' => :'Integer',
83
+ :'errors_count' => :'Integer',
84
+ :'success_count' => :'Integer',
70
85
  :'status' => :'String',
71
86
  :'created_at' => :'String',
72
87
  :'updated_at' => :'String'
@@ -114,6 +129,18 @@ module DealMakerAPI
114
129
  self.upload_name = attributes[:'upload_name']
115
130
  end
116
131
 
132
+ if attributes.key?(:'files_count')
133
+ self.files_count = attributes[:'files_count']
134
+ end
135
+
136
+ if attributes.key?(:'errors_count')
137
+ self.errors_count = attributes[:'errors_count']
138
+ end
139
+
140
+ if attributes.key?(:'success_count')
141
+ self.success_count = attributes[:'success_count']
142
+ end
143
+
117
144
  if attributes.key?(:'status')
118
145
  self.status = attributes[:'status']
119
146
  end
@@ -152,6 +179,9 @@ module DealMakerAPI
152
179
  file_identifier == o.file_identifier &&
153
180
  document_type == o.document_type &&
154
181
  upload_name == o.upload_name &&
182
+ files_count == o.files_count &&
183
+ errors_count == o.errors_count &&
184
+ success_count == o.success_count &&
155
185
  status == o.status &&
156
186
  created_at == o.created_at &&
157
187
  updated_at == o.updated_at
@@ -166,7 +196,7 @@ module DealMakerAPI
166
196
  # Calculates hash code according to all attributes.
167
197
  # @return [Integer] Hash code
168
198
  def hash
169
- [id, company_id, file_identifier, document_type, upload_name, status, created_at, updated_at].hash
199
+ [id, company_id, file_identifier, document_type, upload_name, files_count, errors_count, success_count, status, created_at, updated_at].hash
170
200
  end
171
201
 
172
202
  # Builds the object from hash
@@ -31,6 +31,9 @@ module DealMakerAPI
31
31
  # The status of the bulk upload detail
32
32
  attr_accessor :status
33
33
 
34
+ # The readable status of the bulk upload detail
35
+ attr_accessor :readable_status
36
+
34
37
  # The created at date
35
38
  attr_accessor :created_at
36
39
 
@@ -45,6 +48,7 @@ module DealMakerAPI
45
48
  :'file_key' => :'file_key',
46
49
  :'file_name' => :'file_name',
47
50
  :'status' => :'status',
51
+ :'readable_status' => :'readable_status',
48
52
  :'created_at' => :'created_at',
49
53
  :'updated_at' => :'updated_at'
50
54
  }
@@ -63,6 +67,7 @@ module DealMakerAPI
63
67
  :'file_key' => :'String',
64
68
  :'file_name' => :'String',
65
69
  :'status' => :'Integer',
70
+ :'readable_status' => :'String',
66
71
  :'created_at' => :'String',
67
72
  :'updated_at' => :'String'
68
73
  }
@@ -109,6 +114,10 @@ module DealMakerAPI
109
114
  self.status = attributes[:'status']
110
115
  end
111
116
 
117
+ if attributes.key?(:'readable_status')
118
+ self.readable_status = attributes[:'readable_status']
119
+ end
120
+
112
121
  if attributes.key?(:'created_at')
113
122
  self.created_at = attributes[:'created_at']
114
123
  end
@@ -143,6 +152,7 @@ module DealMakerAPI
143
152
  file_key == o.file_key &&
144
153
  file_name == o.file_name &&
145
154
  status == o.status &&
155
+ readable_status == o.readable_status &&
146
156
  created_at == o.created_at &&
147
157
  updated_at == o.updated_at
148
158
  end
@@ -156,7 +166,7 @@ module DealMakerAPI
156
166
  # Calculates hash code according to all attributes.
157
167
  # @return [Integer] Hash code
158
168
  def hash
159
- [id, bulk_upload_id, file_key, file_name, status, created_at, updated_at].hash
169
+ [id, bulk_upload_id, file_key, file_name, status, readable_status, created_at, updated_at].hash
160
170
  end
161
171
 
162
172
  # Builds the object from hash
@@ -21,11 +21,15 @@ module DealMakerAPI
21
21
  # The issuer name.
22
22
  attr_accessor :name
23
23
 
24
+ # The issuer's logo.
25
+ attr_accessor :logo
26
+
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'id' => :'id',
28
- :'name' => :'name'
31
+ :'name' => :'name',
32
+ :'logo' => :'logo'
29
33
  }
30
34
  end
31
35
 
@@ -38,7 +42,8 @@ module DealMakerAPI
38
42
  def self.openapi_types
39
43
  {
40
44
  :'id' => :'Integer',
41
- :'name' => :'String'
45
+ :'name' => :'String',
46
+ :'logo' => :'String'
42
47
  }
43
48
  end
44
49
 
@@ -70,6 +75,10 @@ module DealMakerAPI
70
75
  if attributes.key?(:'name')
71
76
  self.name = attributes[:'name']
72
77
  end
78
+
79
+ if attributes.key?(:'logo')
80
+ self.logo = attributes[:'logo']
81
+ end
73
82
  end
74
83
 
75
84
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -93,7 +102,8 @@ module DealMakerAPI
93
102
  return true if self.equal?(o)
94
103
  self.class == o.class &&
95
104
  id == o.id &&
96
- name == o.name
105
+ name == o.name &&
106
+ logo == o.logo
97
107
  end
98
108
 
99
109
  # @see the `==` method
@@ -105,7 +115,7 @@ module DealMakerAPI
105
115
  # Calculates hash code according to all attributes.
106
116
  # @return [Integer] Hash code
107
117
  def hash
108
- [id, name].hash
118
+ [id, name, logo].hash
109
119
  end
110
120
 
111
121
  # Builds the object from hash