wefunder 1.0.1 → 1.1.0

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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -11
  3. data/lib/wefunder/client.rb +127 -12
  4. data/lib/wefunder/version.rb +1 -1
  5. data/lib/wefunder/webhooks.rb +5 -2
  6. data/lib/wefunder_generated/api/activity_api.rb +0 -92
  7. data/lib/wefunder_generated/api/explore_api.rb +24 -6
  8. data/lib/wefunder_generated/api/intents_api.rb +2 -2
  9. data/lib/wefunder_generated/api/investment_delta_api.rb +4 -4
  10. data/lib/wefunder_generated/api/investments_api.rb +2 -2
  11. data/lib/wefunder_generated/api/member_links_api.rb +287 -0
  12. data/lib/wefunder_generated/api/partner_invites_sessions_api.rb +374 -0
  13. data/lib/wefunder_generated/api/portfolio_api.rb +2 -2
  14. data/lib/wefunder_generated/api/referral_codes_api.rb +374 -0
  15. data/lib/wefunder_generated/api/syndicate_deals_api.rb +2 -140
  16. data/lib/wefunder_generated/api/syndicate_members_api.rb +216 -0
  17. data/lib/wefunder_generated/api/syndicate_statistics_api.rb +2 -2
  18. data/lib/wefunder_generated/api/users_api.rb +4 -4
  19. data/lib/wefunder_generated/models/audit_event_attributes.rb +1 -0
  20. data/lib/wefunder_generated/models/campaign.rb +1 -1
  21. data/lib/wefunder_generated/models/company_attributes.rb +88 -1
  22. data/lib/wefunder_generated/models/company_disclosures_attributes_ratios.rb +13 -2
  23. data/lib/wefunder_generated/models/create_intent_request.rb +2 -2
  24. data/lib/wefunder_generated/models/{webhook_subscription_with_secret2_envelope.rb → create_offering_investment_session_request.rb} +17 -10
  25. data/lib/wefunder_generated/models/{attribution_stats_envelope.rb → create_offering_member_link_request.rb} +10 -10
  26. data/lib/wefunder_generated/models/{create_partner_invite_request.rb → create_referral_code_request.rb} +58 -63
  27. data/lib/wefunder_generated/models/{attribution_stats_period.rb → create_syndicate_join_session_request.rb} +17 -19
  28. data/lib/wefunder_generated/models/{anonymized_attribution.rb → create_syndicate_join_session_request_join_session.rb} +81 -53
  29. data/lib/wefunder_generated/models/create_webhook_endpoint_request.rb +11 -1
  30. data/lib/wefunder_generated/models/fiscal_year_financials.rb +25 -1
  31. data/lib/wefunder_generated/models/intent_attributes.rb +1 -0
  32. data/lib/wefunder_generated/models/investment_delta_record.rb +4 -4
  33. data/lib/wefunder_generated/models/investment_session_attributes.rb +1 -0
  34. data/lib/wefunder_generated/models/investment_session_create_input.rb +13 -2
  35. data/lib/wefunder_generated/models/investment_session_envelope.rb +1 -1
  36. data/lib/wefunder_generated/models/invite_link_attributes.rb +47 -4
  37. data/lib/wefunder_generated/models/invite_link_attributes_events_inner.rb +12 -1
  38. data/lib/wefunder_generated/models/invite_link_envelope.rb +1 -1
  39. data/lib/wefunder_generated/models/{full_attribution_status.rb → member_link.rb} +34 -24
  40. data/lib/wefunder_generated/models/{marketing_partner.rb → member_link_attributes.rb} +60 -44
  41. data/lib/wefunder_generated/models/{attribution_me_envelope.rb → member_link_create_input.rb} +40 -10
  42. data/lib/wefunder_generated/models/{spv_with_meta_envelope.rb → member_link_envelope.rb} +5 -5
  43. data/lib/wefunder_generated/models/{spv_list_envelope.rb → member_link_list_envelope.rb} +5 -5
  44. data/lib/wefunder_generated/models/{full_attribution_investor.rb → member_link_list_envelope_meta.rb} +28 -29
  45. data/lib/wefunder_generated/models/offering_attributes.rb +34 -1
  46. data/lib/wefunder_generated/models/offering_list_envelope_meta.rb +57 -3
  47. data/lib/wefunder_generated/models/portfolio_company_ref.rb +16 -5
  48. data/lib/wefunder_generated/models/portfolio_position_attributes.rb +13 -2
  49. data/lib/wefunder_generated/models/portfolio_security_terms.rb +15 -2
  50. data/lib/wefunder_generated/models/{spv_status.rb → referral_code.rb} +4 -4
  51. data/lib/wefunder_generated/models/{webhook_subscription.rb → referral_code_attributes.rb} +51 -63
  52. data/lib/wefunder_generated/models/{anonymized_attribution_status.rb → referral_code_attributes_target.rb} +36 -27
  53. data/lib/wefunder_generated/models/{spv_status_envelope.rb → referral_code_envelope.rb} +5 -5
  54. data/lib/wefunder_generated/models/{spv_with_meta_envelope_meta.rb → referral_code_envelope_meta.rb} +3 -3
  55. data/lib/wefunder_generated/models/{partner_investor_list_envelope.rb → referral_code_list_envelope.rb} +5 -5
  56. data/lib/wefunder_generated/models/{attribution_campaign_summary.rb → referral_code_list_envelope_meta.rb} +36 -35
  57. data/lib/wefunder_generated/models/{spv_status_attributes.rb → referral_code_stats_company.rb} +70 -47
  58. data/lib/wefunder_generated/models/referral_code_stats_envelope.rb +223 -0
  59. data/lib/wefunder_generated/models/{partner_investor.rb → referral_code_stats_envelope_data.rb} +4 -5
  60. data/lib/wefunder_generated/models/{syndicate_deal_finalize_intent_envelope_meta.rb → referral_code_stats_envelope_data_attributes.rb} +56 -10
  61. data/lib/wefunder_generated/models/{webhook_endpoint_envelope_meta.rb → referral_code_stats_envelope_meta.rb} +32 -4
  62. data/lib/wefunder_generated/models/{full_attribution.rb → referral_code_utm.rb} +130 -56
  63. data/lib/wefunder_generated/models/{attribution_me.rb → referral_code_visits.rb} +23 -25
  64. data/lib/wefunder_generated/models/{attribution_campaign_access.rb → referral_cohort.rb} +29 -28
  65. data/lib/wefunder_generated/models/referral_cohort_investors.rb +224 -0
  66. data/lib/wefunder_generated/models/syndicate_attributes.rb +11 -1
  67. data/lib/wefunder_generated/models/{syndicate_deal_close_intent_envelope.rb → syndicate_deal_created_envelope.rb} +5 -5
  68. data/lib/wefunder_generated/models/{attribution_campaign_summary_list_envelope.rb → syndicate_deal_created_envelope_meta.rb} +11 -12
  69. data/lib/wefunder_generated/models/{attribution_user.rb → syndicate_deal_created_envelope_meta_target_company.rb} +5 -14
  70. data/lib/wefunder_generated/models/{marketing_partner_envelope.rb → syndicate_deal_readiness_envelope.rb} +4 -4
  71. data/lib/wefunder_generated/models/syndicate_deal_readiness_envelope_data.rb +267 -0
  72. data/lib/wefunder_generated/models/{attribution_partner.rb → syndicate_deal_readiness_envelope_data_attributes.rb} +27 -33
  73. data/lib/wefunder_generated/models/{webhook_delivery.rb → syndicate_deal_readiness_item.rb} +55 -61
  74. data/lib/wefunder_generated/models/syndicate_statistics_attributes.rb +2 -2
  75. data/lib/wefunder_generated/models/test_webhook_endpoint_request.rb +2 -2
  76. data/lib/wefunder_generated/models/{webhook_test_result_envelope.rb → update_referral_code_request.rb} +47 -10
  77. data/lib/wefunder_generated/models/user_attributes.rb +1 -0
  78. data/lib/wefunder_generated/models/webhook_endpoint_attributes.rb +23 -1
  79. data/lib/wefunder_generated/models/webhook_endpoint_envelope.rb +1 -1
  80. data/lib/wefunder_generated/models/webhook_endpoint_test_result_envelope.rb +1 -1
  81. data/lib/wefunder_generated.rb +38 -63
  82. metadata +40 -65
  83. data/lib/wefunder_generated/api/attribution_api.rb +0 -182
  84. data/lib/wefunder_generated/api/attribution_partners_api.rb +0 -392
  85. data/lib/wefunder_generated/api/attribution_webhooks_api.rb +0 -504
  86. data/lib/wefunder_generated/models/anonymized_attribution_attribution.rb +0 -330
  87. data/lib/wefunder_generated/models/attributed_investment_list_envelope.rb +0 -226
  88. data/lib/wefunder_generated/models/attributed_investment_list_envelope_data_inner.rb +0 -105
  89. data/lib/wefunder_generated/models/attributed_investment_list_envelope_meta.rb +0 -295
  90. data/lib/wefunder_generated/models/attribution_stats.rb +0 -266
  91. data/lib/wefunder_generated/models/attribution_stats_by_campaign_inner.rb +0 -232
  92. data/lib/wefunder_generated/models/attribution_stats_by_source_inner.rb +0 -232
  93. data/lib/wefunder_generated/models/attribution_stats_quality_breakdown.rb +0 -236
  94. data/lib/wefunder_generated/models/attribution_stats_totals.rb +0 -245
  95. data/lib/wefunder_generated/models/create_webhook_subscription_request.rb +0 -263
  96. data/lib/wefunder_generated/models/full_attribution_attribution.rb +0 -326
  97. data/lib/wefunder_generated/models/partner_investment_list_envelope.rb +0 -225
  98. data/lib/wefunder_generated/models/partner_investor_attributes.rb +0 -264
  99. data/lib/wefunder_generated/models/partner_invite.rb +0 -360
  100. data/lib/wefunder_generated/models/partner_invite_envelope.rb +0 -214
  101. data/lib/wefunder_generated/models/partner_invite_list_envelope.rb +0 -216
  102. data/lib/wefunder_generated/models/register_as_partner_request.rb +0 -232
  103. data/lib/wefunder_generated/models/syndicate_deal_close_intent_envelope_meta.rb +0 -214
  104. data/lib/wefunder_generated/models/syndicate_deal_finalize_intent_envelope.rb +0 -224
  105. data/lib/wefunder_generated/models/webhook_subscription_envelope.rb +0 -214
  106. data/lib/wefunder_generated/models/webhook_subscription_list_envelope.rb +0 -225
  107. data/lib/wefunder_generated/models/webhook_subscription_list_envelope_meta.rb +0 -225
  108. data/lib/wefunder_generated/models/webhook_subscription_with_recent_deliveries_envelope.rb +0 -214
  109. data/lib/wefunder_generated/models/webhook_subscription_with_recent_deliveries_envelope_data.rb +0 -322
  110. data/lib/wefunder_generated/models/webhook_subscription_with_secret2_envelope_data.rb +0 -320
  111. data/lib/wefunder_generated/models/webhook_subscription_with_secret_envelope.rb +0 -214
  112. data/lib/wefunder_generated/models/webhook_subscription_with_secret_envelope_data.rb +0 -320
  113. data/lib/wefunder_generated/models/webhook_test_result.rb +0 -233
@@ -0,0 +1,374 @@
1
+ =begin
2
+ #Wefunder API v2
3
+
4
+ #OAuth 2.0 API for accessing Wefunder data programmatically. ## Authentication This API uses OAuth 2.0 for authentication. To get started: 1. Create an OAuth application at `/oauth/applications` 2. Get your Client ID and Client Secret 3. Implement the OAuth 2.0 Authorization Code flow 4. Use the access token to make API requests ## Versioning The API is versioned by the dated `Wefunder-Version` request header (`YYYY-MM-DD`), never by the URL. Resolution is header → your application's pinned version → latest; every response carries `Wefunder-Version` (the version that handled it) and `Wefunder-Version-Latest`. An unknown value returns `400 invalid_request` naming the valid versions. Current: `2026-10-01`. ## Rate Limits - Standard API: 1,000 requests/hour per token - Admin API: 10,000 requests/hour per token ## Base URL All API requests should be made to: `https://api.wefunder.com` (no version in the path).
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: api@wefunder.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module WefunderGenerated
16
+ class PartnerInvitesSessionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Cancel an investment session
23
+ # Alias of `/partner/investment_sessions` (#23636). Cancels a session so its link stops working. Valid while the session is `pending`, `in_progress`, or `abandoned`; repeating the call on an already-canceled session returns the same 200. A `completed` or `expired` session cannot be canceled (422 `session_not_cancelable`).
24
+ # @param id [String] The investment session ID (prefixed, e.g. `is_abc123`)
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [InvestmentSessionEnvelope]
27
+ def cancel_investment_session(id, opts = {})
28
+ data, _status_code, _headers = cancel_investment_session_with_http_info(id, opts)
29
+ data
30
+ end
31
+
32
+ # Cancel an investment session
33
+ # Alias of `/partner/investment_sessions` (#23636). Cancels a session so its link stops working. Valid while the session is `pending`, `in_progress`, or `abandoned`; repeating the call on an already-canceled session returns the same 200. A `completed` or `expired` session cannot be canceled (422 `session_not_cancelable`).
34
+ # @param id [String] The investment session ID (prefixed, e.g. `is_abc123`)
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(InvestmentSessionEnvelope, Integer, Hash)>] InvestmentSessionEnvelope data, response status code and response headers
37
+ def cancel_investment_session_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: PartnerInvitesSessionsApi.cancel_investment_session ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling PartnerInvitesSessionsApi.cancel_investment_session"
44
+ end
45
+ # resource path
46
+ local_var_path = '/investment_sessions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type] || 'InvestmentSessionEnvelope'
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || ['bearerAuth', 'bearerAuth']
67
+
68
+ new_options = opts.merge(
69
+ :operation => :"PartnerInvitesSessionsApi.cancel_investment_session",
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: PartnerInvitesSessionsApi#cancel_investment_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # Create an investment session
86
+ # Canonical path: the offering comes from the URL, so `spv_id` may be omitted from the body (if sent it must match, else 422 `offering_mismatch`). Authorized for any offering the caller may act on (an install on its syndicate or company, a role on it, or created by your app). Creates a single-use, recipient-specific hosted investment session (analogous to a Stripe Checkout Session) on the SPV named by `spv_id` in the body. The session walks one investor through accreditation, document signing, and payment, and produces a durable `Investment` on success. Returns a `url` the recipient opens to begin. If the recipient already has an active session on the SPV, that session is returned instead of creating a duplicate; if another app holds that recipient's active session there, the create is refused with 409 `session_conflict` (a recipient has one active session per offering).
87
+ # @param id [String] The SPV ID (prefixed, e.g. &#x60;spv_abc123&#x60;)
88
+ # @param create_offering_investment_session_request [CreateOfferingInvestmentSessionRequest]
89
+ # @param [Hash] opts the optional parameters
90
+ # @option opts [String] :idempotency_key A unique client-generated key that makes a write request safe to retry. If a request is retried within 24 hours with the same key and body, the original result is returned instead of performing the operation again. Strongly recommended on all &#x60;POST&#x60; requests that create resources.
91
+ # @return [InvestmentSessionEnvelope]
92
+ def create_offering_investment_session(id, create_offering_investment_session_request, opts = {})
93
+ data, _status_code, _headers = create_offering_investment_session_with_http_info(id, create_offering_investment_session_request, opts)
94
+ data
95
+ end
96
+
97
+ # Create an investment session
98
+ # Canonical path: the offering comes from the URL, so &#x60;spv_id&#x60; may be omitted from the body (if sent it must match, else 422 &#x60;offering_mismatch&#x60;). Authorized for any offering the caller may act on (an install on its syndicate or company, a role on it, or created by your app). Creates a single-use, recipient-specific hosted investment session (analogous to a Stripe Checkout Session) on the SPV named by &#x60;spv_id&#x60; in the body. The session walks one investor through accreditation, document signing, and payment, and produces a durable &#x60;Investment&#x60; on success. Returns a &#x60;url&#x60; the recipient opens to begin. If the recipient already has an active session on the SPV, that session is returned instead of creating a duplicate; if another app holds that recipient&#39;s active session there, the create is refused with 409 &#x60;session_conflict&#x60; (a recipient has one active session per offering).
99
+ # @param id [String] The SPV ID (prefixed, e.g. &#x60;spv_abc123&#x60;)
100
+ # @param create_offering_investment_session_request [CreateOfferingInvestmentSessionRequest]
101
+ # @param [Hash] opts the optional parameters
102
+ # @option opts [String] :idempotency_key A unique client-generated key that makes a write request safe to retry. If a request is retried within 24 hours with the same key and body, the original result is returned instead of performing the operation again. Strongly recommended on all &#x60;POST&#x60; requests that create resources.
103
+ # @return [Array<(InvestmentSessionEnvelope, Integer, Hash)>] InvestmentSessionEnvelope data, response status code and response headers
104
+ def create_offering_investment_session_with_http_info(id, create_offering_investment_session_request, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: PartnerInvitesSessionsApi.create_offering_investment_session ...'
107
+ end
108
+ # verify the required parameter 'id' is set
109
+ if @api_client.config.client_side_validation && id.nil?
110
+ fail ArgumentError, "Missing the required parameter 'id' when calling PartnerInvitesSessionsApi.create_offering_investment_session"
111
+ end
112
+ # verify the required parameter 'create_offering_investment_session_request' is set
113
+ if @api_client.config.client_side_validation && create_offering_investment_session_request.nil?
114
+ fail ArgumentError, "Missing the required parameter 'create_offering_investment_session_request' when calling PartnerInvitesSessionsApi.create_offering_investment_session"
115
+ end
116
+ # resource path
117
+ local_var_path = '/offerings/{id}/investment_sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
118
+
119
+ # query parameters
120
+ query_params = opts[:query_params] || {}
121
+
122
+ # header parameters
123
+ header_params = opts[:header_params] || {}
124
+ # HTTP header 'Accept' (if needed)
125
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
126
+ # HTTP header 'Content-Type'
127
+ content_type = @api_client.select_header_content_type(['application/json'])
128
+ if !content_type.nil?
129
+ header_params['Content-Type'] = content_type
130
+ end
131
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
132
+
133
+ # form parameters
134
+ form_params = opts[:form_params] || {}
135
+
136
+ # http body (model)
137
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_offering_investment_session_request)
138
+
139
+ # return_type
140
+ return_type = opts[:debug_return_type] || 'InvestmentSessionEnvelope'
141
+
142
+ # auth_names
143
+ auth_names = opts[:debug_auth_names] || ['bearerAuth', 'bearerAuth']
144
+
145
+ new_options = opts.merge(
146
+ :operation => :"PartnerInvitesSessionsApi.create_offering_investment_session",
147
+ :header_params => header_params,
148
+ :query_params => query_params,
149
+ :form_params => form_params,
150
+ :body => post_body,
151
+ :auth_names => auth_names,
152
+ :return_type => return_type
153
+ )
154
+
155
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
156
+ if @api_client.config.debugging
157
+ @api_client.config.logger.debug "API called: PartnerInvitesSessionsApi#create_offering_investment_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
158
+ end
159
+ return data, status_code, headers
160
+ end
161
+
162
+ # Get an investment session
163
+ # Alias of `/partner/investment_sessions` (#23636). Returns the full session including an `events` timeline of durable platform events recorded about it.
164
+ # @param id [String] The investment session ID (prefixed, e.g. &#x60;is_abc123&#x60;)
165
+ # @param [Hash] opts the optional parameters
166
+ # @return [InvestmentSessionEnvelope]
167
+ def get_investment_session(id, opts = {})
168
+ data, _status_code, _headers = get_investment_session_with_http_info(id, opts)
169
+ data
170
+ end
171
+
172
+ # Get an investment session
173
+ # Alias of &#x60;/partner/investment_sessions&#x60; (#23636). Returns the full session including an &#x60;events&#x60; timeline of durable platform events recorded about it.
174
+ # @param id [String] The investment session ID (prefixed, e.g. &#x60;is_abc123&#x60;)
175
+ # @param [Hash] opts the optional parameters
176
+ # @return [Array<(InvestmentSessionEnvelope, Integer, Hash)>] InvestmentSessionEnvelope data, response status code and response headers
177
+ def get_investment_session_with_http_info(id, opts = {})
178
+ if @api_client.config.debugging
179
+ @api_client.config.logger.debug 'Calling API: PartnerInvitesSessionsApi.get_investment_session ...'
180
+ end
181
+ # verify the required parameter 'id' is set
182
+ if @api_client.config.client_side_validation && id.nil?
183
+ fail ArgumentError, "Missing the required parameter 'id' when calling PartnerInvitesSessionsApi.get_investment_session"
184
+ end
185
+ # resource path
186
+ local_var_path = '/investment_sessions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+
191
+ # header parameters
192
+ header_params = opts[:header_params] || {}
193
+ # HTTP header 'Accept' (if needed)
194
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
195
+
196
+ # form parameters
197
+ form_params = opts[:form_params] || {}
198
+
199
+ # http body (model)
200
+ post_body = opts[:debug_body]
201
+
202
+ # return_type
203
+ return_type = opts[:debug_return_type] || 'InvestmentSessionEnvelope'
204
+
205
+ # auth_names
206
+ auth_names = opts[:debug_auth_names] || ['bearerAuth', 'bearerAuth']
207
+
208
+ new_options = opts.merge(
209
+ :operation => :"PartnerInvitesSessionsApi.get_investment_session",
210
+ :header_params => header_params,
211
+ :query_params => query_params,
212
+ :form_params => form_params,
213
+ :body => post_body,
214
+ :auth_names => auth_names,
215
+ :return_type => return_type
216
+ )
217
+
218
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: PartnerInvitesSessionsApi#get_investment_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ return data, status_code, headers
223
+ end
224
+
225
+ # List investment sessions
226
+ # Alias of `/partner/investment_sessions` (#23636). Lists the investment sessions your app created, newest first. A session belongs to the application that created it: no other app sees it, even one of your organization. A syndicate- or company-owned token sees only its own syndicate's or company's sessions. Creating a session needs authority on the offering; reading or canceling one you created does not. Filter by `spv_id` and/or `status`.
227
+ # @param [Hash] opts the optional parameters
228
+ # @option opts [String] :spv_id Only sessions on this SPV
229
+ # @option opts [String] :status Only sessions in this state
230
+ # @option opts [Integer] :per_page Page size (default 25, max 100)
231
+ # @option opts [Integer] :cursor Cursor-based pagination token. Use the &#x60;next_cursor&#x60; value from the previous response&#39;s &#x60;meta&#x60; object to retrieve the next page of results. Omit this parameter to retrieve the first page.
232
+ # @return [InvestmentSessionListEnvelope]
233
+ def list_investment_sessions(opts = {})
234
+ data, _status_code, _headers = list_investment_sessions_with_http_info(opts)
235
+ data
236
+ end
237
+
238
+ # List investment sessions
239
+ # Alias of &#x60;/partner/investment_sessions&#x60; (#23636). Lists the investment sessions your app created, newest first. A session belongs to the application that created it: no other app sees it, even one of your organization. A syndicate- or company-owned token sees only its own syndicate&#39;s or company&#39;s sessions. Creating a session needs authority on the offering; reading or canceling one you created does not. Filter by &#x60;spv_id&#x60; and/or &#x60;status&#x60;.
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [String] :spv_id Only sessions on this SPV
242
+ # @option opts [String] :status Only sessions in this state
243
+ # @option opts [Integer] :per_page Page size (default 25, max 100)
244
+ # @option opts [Integer] :cursor Cursor-based pagination token. Use the &#x60;next_cursor&#x60; value from the previous response&#39;s &#x60;meta&#x60; object to retrieve the next page of results. Omit this parameter to retrieve the first page.
245
+ # @return [Array<(InvestmentSessionListEnvelope, Integer, Hash)>] InvestmentSessionListEnvelope data, response status code and response headers
246
+ def list_investment_sessions_with_http_info(opts = {})
247
+ if @api_client.config.debugging
248
+ @api_client.config.logger.debug 'Calling API: PartnerInvitesSessionsApi.list_investment_sessions ...'
249
+ end
250
+ allowable_values = ["pending", "in_progress", "completed", "abandoned", "expired", "canceled"]
251
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
252
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
253
+ end
254
+ # resource path
255
+ local_var_path = '/investment_sessions'
256
+
257
+ # query parameters
258
+ query_params = opts[:query_params] || {}
259
+ query_params[:'spv_id'] = opts[:'spv_id'] if !opts[:'spv_id'].nil?
260
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
261
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
262
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
263
+
264
+ # header parameters
265
+ header_params = opts[:header_params] || {}
266
+ # HTTP header 'Accept' (if needed)
267
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
268
+
269
+ # form parameters
270
+ form_params = opts[:form_params] || {}
271
+
272
+ # http body (model)
273
+ post_body = opts[:debug_body]
274
+
275
+ # return_type
276
+ return_type = opts[:debug_return_type] || 'InvestmentSessionListEnvelope'
277
+
278
+ # auth_names
279
+ auth_names = opts[:debug_auth_names] || ['bearerAuth', 'bearerAuth']
280
+
281
+ new_options = opts.merge(
282
+ :operation => :"PartnerInvitesSessionsApi.list_investment_sessions",
283
+ :header_params => header_params,
284
+ :query_params => query_params,
285
+ :form_params => form_params,
286
+ :body => post_body,
287
+ :auth_names => auth_names,
288
+ :return_type => return_type
289
+ )
290
+
291
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug "API called: PartnerInvitesSessionsApi#list_investment_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
294
+ end
295
+ return data, status_code, headers
296
+ end
297
+
298
+ # List investment sessions
299
+ # Lists the investment sessions your app created on this offering, newest first; filter by `status`. A session belongs to the application that created it: no other app sees it, even one of your organization. A syndicate- or company-owned token sees only its own syndicate's or company's sessions. An offering with none of your app's sessions lists nothing, so the id reveals nothing about the offering.
300
+ # @param id [String] The SPV ID (prefixed, e.g. &#x60;spv_abc123&#x60;)
301
+ # @param [Hash] opts the optional parameters
302
+ # @option opts [String] :status Only sessions in this state
303
+ # @option opts [Integer] :per_page Page size (default 25, max 100)
304
+ # @option opts [Integer] :cursor Cursor-based pagination token. Use the &#x60;next_cursor&#x60; value from the previous response&#39;s &#x60;meta&#x60; object to retrieve the next page of results. Omit this parameter to retrieve the first page.
305
+ # @return [InvestmentSessionListEnvelope]
306
+ def list_offering_investment_sessions(id, opts = {})
307
+ data, _status_code, _headers = list_offering_investment_sessions_with_http_info(id, opts)
308
+ data
309
+ end
310
+
311
+ # List investment sessions
312
+ # Lists the investment sessions your app created on this offering, newest first; filter by &#x60;status&#x60;. A session belongs to the application that created it: no other app sees it, even one of your organization. A syndicate- or company-owned token sees only its own syndicate&#39;s or company&#39;s sessions. An offering with none of your app&#39;s sessions lists nothing, so the id reveals nothing about the offering.
313
+ # @param id [String] The SPV ID (prefixed, e.g. &#x60;spv_abc123&#x60;)
314
+ # @param [Hash] opts the optional parameters
315
+ # @option opts [String] :status Only sessions in this state
316
+ # @option opts [Integer] :per_page Page size (default 25, max 100)
317
+ # @option opts [Integer] :cursor Cursor-based pagination token. Use the &#x60;next_cursor&#x60; value from the previous response&#39;s &#x60;meta&#x60; object to retrieve the next page of results. Omit this parameter to retrieve the first page.
318
+ # @return [Array<(InvestmentSessionListEnvelope, Integer, Hash)>] InvestmentSessionListEnvelope data, response status code and response headers
319
+ def list_offering_investment_sessions_with_http_info(id, opts = {})
320
+ if @api_client.config.debugging
321
+ @api_client.config.logger.debug 'Calling API: PartnerInvitesSessionsApi.list_offering_investment_sessions ...'
322
+ end
323
+ # verify the required parameter 'id' is set
324
+ if @api_client.config.client_side_validation && id.nil?
325
+ fail ArgumentError, "Missing the required parameter 'id' when calling PartnerInvitesSessionsApi.list_offering_investment_sessions"
326
+ end
327
+ allowable_values = ["pending", "in_progress", "completed", "abandoned", "expired", "canceled"]
328
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
329
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
330
+ end
331
+ # resource path
332
+ local_var_path = '/offerings/{id}/investment_sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
333
+
334
+ # query parameters
335
+ query_params = opts[:query_params] || {}
336
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
337
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
338
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
339
+
340
+ # header parameters
341
+ header_params = opts[:header_params] || {}
342
+ # HTTP header 'Accept' (if needed)
343
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
344
+
345
+ # form parameters
346
+ form_params = opts[:form_params] || {}
347
+
348
+ # http body (model)
349
+ post_body = opts[:debug_body]
350
+
351
+ # return_type
352
+ return_type = opts[:debug_return_type] || 'InvestmentSessionListEnvelope'
353
+
354
+ # auth_names
355
+ auth_names = opts[:debug_auth_names] || ['bearerAuth', 'bearerAuth']
356
+
357
+ new_options = opts.merge(
358
+ :operation => :"PartnerInvitesSessionsApi.list_offering_investment_sessions",
359
+ :header_params => header_params,
360
+ :query_params => query_params,
361
+ :form_params => form_params,
362
+ :body => post_body,
363
+ :auth_names => auth_names,
364
+ :return_type => return_type
365
+ )
366
+
367
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug "API called: PartnerInvitesSessionsApi#list_offering_investment_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
+ end
371
+ return data, status_code, headers
372
+ end
373
+ end
374
+ end
@@ -87,7 +87,7 @@ module WefunderGenerated
87
87
  end
88
88
 
89
89
  # List portfolio positions
90
- # Returns the authenticated investor's positions, one per offering (fundraise), newest first. Position totals cover everything the investor holds in that offering; `securities` breaks the total down by security offering and legal owner, so early bird tiers and personally-held vs entity-held stakes each appear separately. Fund and SPV positions identify the companies the vehicle invested in under `holdings`. To compute an average cost per share, divide `cost_basis_cents` by `shares_held`. Requires a user-authorized token, like `GET /portfolio`.
90
+ # Returns the authenticated investor's positions, one per offering (fundraise), newest first. Position totals cover everything the investor holds in that offering; `securities` breaks the total down by security offering and legal owner, so early bird tiers and personally-held vs entity-held stakes each appear separately. Fund and SPV positions identify the companies the vehicle invested in under `holdings`. Mind the units when deriving an average cost per share: `cost_basis_cents` is integer cents, while `shares_held`, `current_share_price` and `terms.share_price` are decimal strings in major units of the position's `currency`. Use decimal arithmetic and divide the cents by 100 first: `cost_basis_cents / 100 / shares_held`. For example, `215000` cents over `\"200.0\"` shares is 1075 cents per share, or 10.75 USD per share, which is what to compare with a `current_share_price` of `\"14.4632\"`. Dividing `cost_basis_cents` by `shares_held` without the `/ 100` yields cents per share, 100 times the prices shown. When `shares_held` is `null` or zero (a non-share security, or a valuation that is not per-share) there is no average cost per share: report it as unavailable instead of treating the missing share count as a number. Requires a user-authorized token, like `GET /portfolio`.
91
91
  # @param [Hash] opts the optional parameters
92
92
  # @option opts [Integer] :cursor Cursor-based pagination token. Use the &#x60;next_cursor&#x60; value from the previous response&#39;s &#x60;meta&#x60; object to retrieve the next page of results. Omit this parameter to retrieve the first page.
93
93
  # @option opts [Integer] :per_page Page size, 1-100. Defaults to 25. (default to 25)
@@ -100,7 +100,7 @@ module WefunderGenerated
100
100
  end
101
101
 
102
102
  # List portfolio positions
103
- # Returns the authenticated investor&#39;s positions, one per offering (fundraise), newest first. Position totals cover everything the investor holds in that offering; &#x60;securities&#x60; breaks the total down by security offering and legal owner, so early bird tiers and personally-held vs entity-held stakes each appear separately. Fund and SPV positions identify the companies the vehicle invested in under &#x60;holdings&#x60;. To compute an average cost per share, divide &#x60;cost_basis_cents&#x60; by &#x60;shares_held&#x60;. Requires a user-authorized token, like &#x60;GET /portfolio&#x60;.
103
+ # Returns the authenticated investor&#39;s positions, one per offering (fundraise), newest first. Position totals cover everything the investor holds in that offering; &#x60;securities&#x60; breaks the total down by security offering and legal owner, so early bird tiers and personally-held vs entity-held stakes each appear separately. Fund and SPV positions identify the companies the vehicle invested in under &#x60;holdings&#x60;. Mind the units when deriving an average cost per share: &#x60;cost_basis_cents&#x60; is integer cents, while &#x60;shares_held&#x60;, &#x60;current_share_price&#x60; and &#x60;terms.share_price&#x60; are decimal strings in major units of the position&#39;s &#x60;currency&#x60;. Use decimal arithmetic and divide the cents by 100 first: &#x60;cost_basis_cents / 100 / shares_held&#x60;. For example, &#x60;215000&#x60; cents over &#x60;\&quot;200.0\&quot;&#x60; shares is 1075 cents per share, or 10.75 USD per share, which is what to compare with a &#x60;current_share_price&#x60; of &#x60;\&quot;14.4632\&quot;&#x60;. Dividing &#x60;cost_basis_cents&#x60; by &#x60;shares_held&#x60; without the &#x60;/ 100&#x60; yields cents per share, 100 times the prices shown. When &#x60;shares_held&#x60; is &#x60;null&#x60; or zero (a non-share security, or a valuation that is not per-share) there is no average cost per share: report it as unavailable instead of treating the missing share count as a number. Requires a user-authorized token, like &#x60;GET /portfolio&#x60;.
104
104
  # @param [Hash] opts the optional parameters
105
105
  # @option opts [Integer] :cursor Cursor-based pagination token. Use the &#x60;next_cursor&#x60; value from the previous response&#39;s &#x60;meta&#x60; object to retrieve the next page of results. Omit this parameter to retrieve the first page.
106
106
  # @option opts [Integer] :per_page Page size, 1-100. Defaults to 25. (default to 25)