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.
- checksums.yaml +4 -4
- data/README.md +33 -11
- data/lib/wefunder/client.rb +127 -12
- data/lib/wefunder/version.rb +1 -1
- data/lib/wefunder/webhooks.rb +5 -2
- data/lib/wefunder_generated/api/activity_api.rb +0 -92
- data/lib/wefunder_generated/api/explore_api.rb +24 -6
- data/lib/wefunder_generated/api/intents_api.rb +2 -2
- data/lib/wefunder_generated/api/investment_delta_api.rb +4 -4
- data/lib/wefunder_generated/api/investments_api.rb +2 -2
- data/lib/wefunder_generated/api/member_links_api.rb +287 -0
- data/lib/wefunder_generated/api/partner_invites_sessions_api.rb +374 -0
- data/lib/wefunder_generated/api/portfolio_api.rb +2 -2
- data/lib/wefunder_generated/api/referral_codes_api.rb +374 -0
- data/lib/wefunder_generated/api/syndicate_deals_api.rb +2 -140
- data/lib/wefunder_generated/api/syndicate_members_api.rb +216 -0
- data/lib/wefunder_generated/api/syndicate_statistics_api.rb +2 -2
- data/lib/wefunder_generated/api/users_api.rb +4 -4
- data/lib/wefunder_generated/models/audit_event_attributes.rb +1 -0
- data/lib/wefunder_generated/models/campaign.rb +1 -1
- data/lib/wefunder_generated/models/company_attributes.rb +88 -1
- data/lib/wefunder_generated/models/company_disclosures_attributes_ratios.rb +13 -2
- data/lib/wefunder_generated/models/create_intent_request.rb +2 -2
- data/lib/wefunder_generated/models/{webhook_subscription_with_secret2_envelope.rb → create_offering_investment_session_request.rb} +17 -10
- data/lib/wefunder_generated/models/{attribution_stats_envelope.rb → create_offering_member_link_request.rb} +10 -10
- data/lib/wefunder_generated/models/{create_partner_invite_request.rb → create_referral_code_request.rb} +58 -63
- data/lib/wefunder_generated/models/{attribution_stats_period.rb → create_syndicate_join_session_request.rb} +17 -19
- data/lib/wefunder_generated/models/{anonymized_attribution.rb → create_syndicate_join_session_request_join_session.rb} +81 -53
- data/lib/wefunder_generated/models/create_webhook_endpoint_request.rb +11 -1
- data/lib/wefunder_generated/models/fiscal_year_financials.rb +25 -1
- data/lib/wefunder_generated/models/intent_attributes.rb +1 -0
- data/lib/wefunder_generated/models/investment_delta_record.rb +4 -4
- data/lib/wefunder_generated/models/investment_session_attributes.rb +1 -0
- data/lib/wefunder_generated/models/investment_session_create_input.rb +13 -2
- data/lib/wefunder_generated/models/investment_session_envelope.rb +1 -1
- data/lib/wefunder_generated/models/invite_link_attributes.rb +47 -4
- data/lib/wefunder_generated/models/invite_link_attributes_events_inner.rb +12 -1
- data/lib/wefunder_generated/models/invite_link_envelope.rb +1 -1
- data/lib/wefunder_generated/models/{full_attribution_status.rb → member_link.rb} +34 -24
- data/lib/wefunder_generated/models/{marketing_partner.rb → member_link_attributes.rb} +60 -44
- data/lib/wefunder_generated/models/{attribution_me_envelope.rb → member_link_create_input.rb} +40 -10
- data/lib/wefunder_generated/models/{spv_with_meta_envelope.rb → member_link_envelope.rb} +5 -5
- data/lib/wefunder_generated/models/{spv_list_envelope.rb → member_link_list_envelope.rb} +5 -5
- data/lib/wefunder_generated/models/{full_attribution_investor.rb → member_link_list_envelope_meta.rb} +28 -29
- data/lib/wefunder_generated/models/offering_attributes.rb +34 -1
- data/lib/wefunder_generated/models/offering_list_envelope_meta.rb +57 -3
- data/lib/wefunder_generated/models/portfolio_company_ref.rb +16 -5
- data/lib/wefunder_generated/models/portfolio_position_attributes.rb +13 -2
- data/lib/wefunder_generated/models/portfolio_security_terms.rb +15 -2
- data/lib/wefunder_generated/models/{spv_status.rb → referral_code.rb} +4 -4
- data/lib/wefunder_generated/models/{webhook_subscription.rb → referral_code_attributes.rb} +51 -63
- data/lib/wefunder_generated/models/{anonymized_attribution_status.rb → referral_code_attributes_target.rb} +36 -27
- data/lib/wefunder_generated/models/{spv_status_envelope.rb → referral_code_envelope.rb} +5 -5
- data/lib/wefunder_generated/models/{spv_with_meta_envelope_meta.rb → referral_code_envelope_meta.rb} +3 -3
- data/lib/wefunder_generated/models/{partner_investor_list_envelope.rb → referral_code_list_envelope.rb} +5 -5
- data/lib/wefunder_generated/models/{attribution_campaign_summary.rb → referral_code_list_envelope_meta.rb} +36 -35
- data/lib/wefunder_generated/models/{spv_status_attributes.rb → referral_code_stats_company.rb} +70 -47
- data/lib/wefunder_generated/models/referral_code_stats_envelope.rb +223 -0
- data/lib/wefunder_generated/models/{partner_investor.rb → referral_code_stats_envelope_data.rb} +4 -5
- data/lib/wefunder_generated/models/{syndicate_deal_finalize_intent_envelope_meta.rb → referral_code_stats_envelope_data_attributes.rb} +56 -10
- data/lib/wefunder_generated/models/{webhook_endpoint_envelope_meta.rb → referral_code_stats_envelope_meta.rb} +32 -4
- data/lib/wefunder_generated/models/{full_attribution.rb → referral_code_utm.rb} +130 -56
- data/lib/wefunder_generated/models/{attribution_me.rb → referral_code_visits.rb} +23 -25
- data/lib/wefunder_generated/models/{attribution_campaign_access.rb → referral_cohort.rb} +29 -28
- data/lib/wefunder_generated/models/referral_cohort_investors.rb +224 -0
- data/lib/wefunder_generated/models/syndicate_attributes.rb +11 -1
- data/lib/wefunder_generated/models/{syndicate_deal_close_intent_envelope.rb → syndicate_deal_created_envelope.rb} +5 -5
- data/lib/wefunder_generated/models/{attribution_campaign_summary_list_envelope.rb → syndicate_deal_created_envelope_meta.rb} +11 -12
- data/lib/wefunder_generated/models/{attribution_user.rb → syndicate_deal_created_envelope_meta_target_company.rb} +5 -14
- data/lib/wefunder_generated/models/{marketing_partner_envelope.rb → syndicate_deal_readiness_envelope.rb} +4 -4
- data/lib/wefunder_generated/models/syndicate_deal_readiness_envelope_data.rb +267 -0
- data/lib/wefunder_generated/models/{attribution_partner.rb → syndicate_deal_readiness_envelope_data_attributes.rb} +27 -33
- data/lib/wefunder_generated/models/{webhook_delivery.rb → syndicate_deal_readiness_item.rb} +55 -61
- data/lib/wefunder_generated/models/syndicate_statistics_attributes.rb +2 -2
- data/lib/wefunder_generated/models/test_webhook_endpoint_request.rb +2 -2
- data/lib/wefunder_generated/models/{webhook_test_result_envelope.rb → update_referral_code_request.rb} +47 -10
- data/lib/wefunder_generated/models/user_attributes.rb +1 -0
- data/lib/wefunder_generated/models/webhook_endpoint_attributes.rb +23 -1
- data/lib/wefunder_generated/models/webhook_endpoint_envelope.rb +1 -1
- data/lib/wefunder_generated/models/webhook_endpoint_test_result_envelope.rb +1 -1
- data/lib/wefunder_generated.rb +38 -63
- metadata +40 -65
- data/lib/wefunder_generated/api/attribution_api.rb +0 -182
- data/lib/wefunder_generated/api/attribution_partners_api.rb +0 -392
- data/lib/wefunder_generated/api/attribution_webhooks_api.rb +0 -504
- data/lib/wefunder_generated/models/anonymized_attribution_attribution.rb +0 -330
- data/lib/wefunder_generated/models/attributed_investment_list_envelope.rb +0 -226
- data/lib/wefunder_generated/models/attributed_investment_list_envelope_data_inner.rb +0 -105
- data/lib/wefunder_generated/models/attributed_investment_list_envelope_meta.rb +0 -295
- data/lib/wefunder_generated/models/attribution_stats.rb +0 -266
- data/lib/wefunder_generated/models/attribution_stats_by_campaign_inner.rb +0 -232
- data/lib/wefunder_generated/models/attribution_stats_by_source_inner.rb +0 -232
- data/lib/wefunder_generated/models/attribution_stats_quality_breakdown.rb +0 -236
- data/lib/wefunder_generated/models/attribution_stats_totals.rb +0 -245
- data/lib/wefunder_generated/models/create_webhook_subscription_request.rb +0 -263
- data/lib/wefunder_generated/models/full_attribution_attribution.rb +0 -326
- data/lib/wefunder_generated/models/partner_investment_list_envelope.rb +0 -225
- data/lib/wefunder_generated/models/partner_investor_attributes.rb +0 -264
- data/lib/wefunder_generated/models/partner_invite.rb +0 -360
- data/lib/wefunder_generated/models/partner_invite_envelope.rb +0 -214
- data/lib/wefunder_generated/models/partner_invite_list_envelope.rb +0 -216
- data/lib/wefunder_generated/models/register_as_partner_request.rb +0 -232
- data/lib/wefunder_generated/models/syndicate_deal_close_intent_envelope_meta.rb +0 -214
- data/lib/wefunder_generated/models/syndicate_deal_finalize_intent_envelope.rb +0 -224
- data/lib/wefunder_generated/models/webhook_subscription_envelope.rb +0 -214
- data/lib/wefunder_generated/models/webhook_subscription_list_envelope.rb +0 -225
- data/lib/wefunder_generated/models/webhook_subscription_list_envelope_meta.rb +0 -225
- data/lib/wefunder_generated/models/webhook_subscription_with_recent_deliveries_envelope.rb +0 -214
- data/lib/wefunder_generated/models/webhook_subscription_with_recent_deliveries_envelope_data.rb +0 -322
- data/lib/wefunder_generated/models/webhook_subscription_with_secret2_envelope_data.rb +0 -320
- data/lib/wefunder_generated/models/webhook_subscription_with_secret_envelope.rb +0 -214
- data/lib/wefunder_generated/models/webhook_subscription_with_secret_envelope_data.rb +0 -320
- data/lib/wefunder_generated/models/webhook_test_result.rb +0 -233
|
@@ -22,8 +22,16 @@ module WefunderGenerated
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :accounts_receivable
|
|
24
24
|
|
|
25
|
+
# Total current liabilities as filed on the Form C balance sheet — including SAFE and convertible-note liabilities, accrued expenses and deferred revenue, not only borrowed money. For borrowings see `outstanding_notes` and `outstanding_debts`, which itemize each instrument with its principal.
|
|
26
|
+
attr_accessor :current_liabilities
|
|
27
|
+
|
|
28
|
+
# Total non-current liabilities as filed on the Form C balance sheet. Same caveat as `current_liabilities`.
|
|
29
|
+
attr_accessor :non_current_liabilities
|
|
30
|
+
|
|
31
|
+
# Deprecated alias of `current_liabilities` (same value): the figure is total current liabilities, not short-term debt. Will be removed in a future dated version.
|
|
25
32
|
attr_accessor :short_term_debt
|
|
26
33
|
|
|
34
|
+
# Deprecated alias of `non_current_liabilities` (same value): the figure is total non-current liabilities, not long-term debt. Will be removed in a future dated version.
|
|
27
35
|
attr_accessor :long_term_debt
|
|
28
36
|
|
|
29
37
|
attr_accessor :revenue
|
|
@@ -40,6 +48,8 @@ module WefunderGenerated
|
|
|
40
48
|
:'total_assets' => :'total_assets',
|
|
41
49
|
:'cash_and_equivalents' => :'cash_and_equivalents',
|
|
42
50
|
:'accounts_receivable' => :'accounts_receivable',
|
|
51
|
+
:'current_liabilities' => :'current_liabilities',
|
|
52
|
+
:'non_current_liabilities' => :'non_current_liabilities',
|
|
43
53
|
:'short_term_debt' => :'short_term_debt',
|
|
44
54
|
:'long_term_debt' => :'long_term_debt',
|
|
45
55
|
:'revenue' => :'revenue',
|
|
@@ -60,6 +70,8 @@ module WefunderGenerated
|
|
|
60
70
|
:'total_assets' => :'String',
|
|
61
71
|
:'cash_and_equivalents' => :'String',
|
|
62
72
|
:'accounts_receivable' => :'String',
|
|
73
|
+
:'current_liabilities' => :'String',
|
|
74
|
+
:'non_current_liabilities' => :'String',
|
|
63
75
|
:'short_term_debt' => :'String',
|
|
64
76
|
:'long_term_debt' => :'String',
|
|
65
77
|
:'revenue' => :'String',
|
|
@@ -75,6 +87,8 @@ module WefunderGenerated
|
|
|
75
87
|
:'total_assets',
|
|
76
88
|
:'cash_and_equivalents',
|
|
77
89
|
:'accounts_receivable',
|
|
90
|
+
:'current_liabilities',
|
|
91
|
+
:'non_current_liabilities',
|
|
78
92
|
:'short_term_debt',
|
|
79
93
|
:'long_term_debt',
|
|
80
94
|
:'revenue',
|
|
@@ -111,6 +125,14 @@ module WefunderGenerated
|
|
|
111
125
|
self.accounts_receivable = attributes[:'accounts_receivable']
|
|
112
126
|
end
|
|
113
127
|
|
|
128
|
+
if attributes.key?(:'current_liabilities')
|
|
129
|
+
self.current_liabilities = attributes[:'current_liabilities']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'non_current_liabilities')
|
|
133
|
+
self.non_current_liabilities = attributes[:'non_current_liabilities']
|
|
134
|
+
end
|
|
135
|
+
|
|
114
136
|
if attributes.key?(:'short_term_debt')
|
|
115
137
|
self.short_term_debt = attributes[:'short_term_debt']
|
|
116
138
|
end
|
|
@@ -159,6 +181,8 @@ module WefunderGenerated
|
|
|
159
181
|
total_assets == o.total_assets &&
|
|
160
182
|
cash_and_equivalents == o.cash_and_equivalents &&
|
|
161
183
|
accounts_receivable == o.accounts_receivable &&
|
|
184
|
+
current_liabilities == o.current_liabilities &&
|
|
185
|
+
non_current_liabilities == o.non_current_liabilities &&
|
|
162
186
|
short_term_debt == o.short_term_debt &&
|
|
163
187
|
long_term_debt == o.long_term_debt &&
|
|
164
188
|
revenue == o.revenue &&
|
|
@@ -176,7 +200,7 @@ module WefunderGenerated
|
|
|
176
200
|
# Calculates hash code according to all attributes.
|
|
177
201
|
# @return [Integer] Hash code
|
|
178
202
|
def hash
|
|
179
|
-
[total_assets, cash_and_equivalents, accounts_receivable, short_term_debt, long_term_debt, revenue, cost_of_goods_sold, taxes_paid, net_income].hash
|
|
203
|
+
[total_assets, cash_and_equivalents, accounts_receivable, current_liabilities, non_current_liabilities, short_term_debt, long_term_debt, revenue, cost_of_goods_sold, taxes_paid, net_income].hash
|
|
180
204
|
end
|
|
181
205
|
|
|
182
206
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module WefunderGenerated
|
|
17
|
-
# The record of one investment, or a tombstone
|
|
17
|
+
# The record of one investment, or a tombstone. A tombstone is `visible: false` with `id` and the sync metadata (`observed_at`, `cursor`, `reason`) and no payload fields: no `status`, `amounts`, `investor`. `visible` is founder visibility: a user's own canceled investment is a full record with `visible: false` and `status: canceled`, so tell the two apart by the presence of `status`, not by `visible`. Investor PII keys are omitted without `read:investors:pii`, except on the user's own records.
|
|
18
18
|
class InvestmentDeltaRecord
|
|
19
19
|
# Investment external id (`inv_…`), stable for the life of the investment.
|
|
20
20
|
attr_accessor :id
|
|
@@ -71,7 +71,7 @@ module WefunderGenerated
|
|
|
71
71
|
# Ledger position of the change that listed this record (delta pages only).
|
|
72
72
|
attr_accessor :cursor
|
|
73
73
|
|
|
74
|
-
# Why the ledger row exists. `investor_deactivated` marks the first republish after the investor's account was deactivated (identity fields redacted).
|
|
74
|
+
# Why the ledger row exists. Delta pages only; `null` on list pages and on retrieve. Every value is a record to upsert. `changed`: a partner-visible field moved. `recomputed`: the investment's inputs did not change and the record moved only because Wefunder changed how it derives a field; sync it, but a notification rule may skip it. `reprojected`: the retired name for `recomputed`, still served on rows published before the rename for as long as they are retained (90 days); treat it exactly like `recomputed`. `investor_deactivated` marks the first republish after the investor's account was deactivated (identity fields redacted).
|
|
75
75
|
attr_accessor :reason
|
|
76
76
|
|
|
77
77
|
class EnumAttributeValidator
|
|
@@ -320,7 +320,7 @@ module WefunderGenerated
|
|
|
320
320
|
status_validator = EnumAttributeValidator.new('String', ["reserved", "active", "executed", "canceled", "converted"])
|
|
321
321
|
return false unless status_validator.valid?(@status)
|
|
322
322
|
return false if @observed_at.nil?
|
|
323
|
-
reason_validator = EnumAttributeValidator.new('String', ["changed", "reprojected", "investor_deactivated"])
|
|
323
|
+
reason_validator = EnumAttributeValidator.new('String', ["changed", "recomputed", "reprojected", "investor_deactivated"])
|
|
324
324
|
return false unless reason_validator.valid?(@reason)
|
|
325
325
|
true
|
|
326
326
|
end
|
|
@@ -338,7 +338,7 @@ module WefunderGenerated
|
|
|
338
338
|
# Custom attribute writer method checking allowed values (enum).
|
|
339
339
|
# @param [Object] reason Object to be assigned
|
|
340
340
|
def reason=(reason)
|
|
341
|
-
validator = EnumAttributeValidator.new('String', ["changed", "reprojected", "investor_deactivated"])
|
|
341
|
+
validator = EnumAttributeValidator.new('String', ["changed", "recomputed", "reprojected", "investor_deactivated"])
|
|
342
342
|
unless validator.valid?(reason)
|
|
343
343
|
fail ArgumentError, "invalid value for \"reason\", must be one of #{validator.allowable_values}."
|
|
344
344
|
end
|
|
@@ -22,6 +22,7 @@ module WefunderGenerated
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :spv_id
|
|
24
24
|
|
|
25
|
+
# The recipient email you supplied. `null` for a session addressed by `wefunder_user_id`, directly or through an invite link addressed that way, which never returns the account's email.
|
|
25
26
|
attr_accessor :email
|
|
26
27
|
|
|
27
28
|
# The fixed amount the session locks to, in cents; null when the recipient chooses their own amount.
|
|
@@ -26,9 +26,12 @@ module WefunderGenerated
|
|
|
26
26
|
# Fixed investment amount, in cents (whole dollars only). Locks the checkout to exactly this value, overriding the SPV's min/max purchase range. Omit to let the recipient choose an amount within that range.
|
|
27
27
|
attr_accessor :allocation_cents
|
|
28
28
|
|
|
29
|
-
# Where to send the recipient after they complete the session.
|
|
29
|
+
# Where to send the recipient after they complete the session. An absolute `https` URL on the origin (scheme, host and port) of one of your app's registered OAuth redirect URIs, such as an iOS universal link or Android app link, or a URL in a custom scheme one of those redirect URIs uses (`com.partner.app://checkout/done`). `http` is accepted only on a loopback host one of your redirect URIs uses. Anything else is a `422 validation_error`. See [Investment sessions on mobile](/guides/investment-sessions-mobile).
|
|
30
30
|
attr_accessor :success_url
|
|
31
31
|
|
|
32
|
+
# Where to send the recipient when they cancel the session on the hosted page, or open it after it was canceled or expired. Same rules as `success_url`: an `https` URL on a registered redirect URI's origin, or a URL in a registered custom scheme. Wefunder appends `session_id` (the session's `is_` id) and `reason` to the query string, keeping any parameters already on the URL. `reason` is `user_canceled` (the session is now canceled), `user_left` (the investor had already started checkout, so the session stays active until it completes or expires), `canceled` or `expired`.
|
|
33
|
+
attr_accessor :cancel_url
|
|
34
|
+
|
|
32
35
|
# Session lifetime in hours (default 720, i.e. 30 days).
|
|
33
36
|
attr_accessor :expires_in_hours
|
|
34
37
|
|
|
@@ -46,6 +49,7 @@ module WefunderGenerated
|
|
|
46
49
|
:'wefunder_user_id' => :'wefunder_user_id',
|
|
47
50
|
:'allocation_cents' => :'allocation_cents',
|
|
48
51
|
:'success_url' => :'success_url',
|
|
52
|
+
:'cancel_url' => :'cancel_url',
|
|
49
53
|
:'expires_in_hours' => :'expires_in_hours',
|
|
50
54
|
:'metadata' => :'metadata',
|
|
51
55
|
:'intent_id' => :'intent_id'
|
|
@@ -65,6 +69,7 @@ module WefunderGenerated
|
|
|
65
69
|
:'wefunder_user_id' => :'String',
|
|
66
70
|
:'allocation_cents' => :'Integer',
|
|
67
71
|
:'success_url' => :'String',
|
|
72
|
+
:'cancel_url' => :'String',
|
|
68
73
|
:'expires_in_hours' => :'Integer',
|
|
69
74
|
:'metadata' => :'Object',
|
|
70
75
|
:'intent_id' => :'String'
|
|
@@ -79,6 +84,7 @@ module WefunderGenerated
|
|
|
79
84
|
:'wefunder_user_id',
|
|
80
85
|
:'allocation_cents',
|
|
81
86
|
:'success_url',
|
|
87
|
+
:'cancel_url',
|
|
82
88
|
:'expires_in_hours',
|
|
83
89
|
:'metadata',
|
|
84
90
|
:'intent_id'
|
|
@@ -120,6 +126,10 @@ module WefunderGenerated
|
|
|
120
126
|
self.success_url = attributes[:'success_url']
|
|
121
127
|
end
|
|
122
128
|
|
|
129
|
+
if attributes.key?(:'cancel_url')
|
|
130
|
+
self.cancel_url = attributes[:'cancel_url']
|
|
131
|
+
end
|
|
132
|
+
|
|
123
133
|
if attributes.key?(:'expires_in_hours')
|
|
124
134
|
self.expires_in_hours = attributes[:'expires_in_hours']
|
|
125
135
|
end
|
|
@@ -197,6 +207,7 @@ module WefunderGenerated
|
|
|
197
207
|
wefunder_user_id == o.wefunder_user_id &&
|
|
198
208
|
allocation_cents == o.allocation_cents &&
|
|
199
209
|
success_url == o.success_url &&
|
|
210
|
+
cancel_url == o.cancel_url &&
|
|
200
211
|
expires_in_hours == o.expires_in_hours &&
|
|
201
212
|
metadata == o.metadata &&
|
|
202
213
|
intent_id == o.intent_id
|
|
@@ -211,7 +222,7 @@ module WefunderGenerated
|
|
|
211
222
|
# Calculates hash code according to all attributes.
|
|
212
223
|
# @return [Integer] Hash code
|
|
213
224
|
def hash
|
|
214
|
-
[spv_id, email, wefunder_user_id, allocation_cents, success_url, expires_in_hours, metadata, intent_id].hash
|
|
225
|
+
[spv_id, email, wefunder_user_id, allocation_cents, success_url, cancel_url, expires_in_hours, metadata, intent_id].hash
|
|
215
226
|
end
|
|
216
227
|
|
|
217
228
|
# Builds the object from hash
|
|
@@ -15,21 +15,33 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module WefunderGenerated
|
|
17
17
|
class InviteLinkAttributes
|
|
18
|
-
# Shareable invite URL. Carries the access token, not the id.
|
|
18
|
+
# Shareable invite URL. Carries the access token, not the id. A link made through the API opens the hosted investment flow (`/invest/link/...`); a link made on wefunder.com opens the deal page with its token (`/{company}?invite_token=...`), the URL wefunder.com sends. Null on a per-person invite whose recipient the caller may not see (see `email`): the URL carries the invite's access token and its page shows the recipient. Cancel, update and resend still work. An invite your app addressed by `wefunder_user_id` keeps its URL: its page names no address.
|
|
19
19
|
attr_accessor :url
|
|
20
20
|
|
|
21
|
+
# `true` for a reusable (shareable) link, `false` for a per-person invite. Fixed at creation. Use this, not the presence of `email`, to tell the two apart.
|
|
22
|
+
attr_accessor :reuse
|
|
23
|
+
|
|
21
24
|
attr_accessor :allocation_cents
|
|
22
25
|
|
|
23
26
|
attr_accessor :max_uses
|
|
24
27
|
|
|
25
28
|
attr_accessor :uses_count
|
|
26
29
|
|
|
30
|
+
# How many times the link was clicked through: a click is recorded when the recipient continues past the link's landing page into the investment flow (loading the page alone is not counted, since mail clients prefetch links). Visits that found the link canceled or the offering closed are not clicks, nor are sends. Recorded for per-person links only; a reusable link reports 0 (use `uses_count` for its claims).
|
|
31
|
+
attr_accessor :click_count
|
|
32
|
+
|
|
33
|
+
# When the link was first clicked; null if it never was. A click, not an email open.
|
|
34
|
+
attr_accessor :first_clicked_at
|
|
35
|
+
|
|
27
36
|
# False once the link is canceled (soft-deleted).
|
|
28
37
|
attr_accessor :active
|
|
29
38
|
|
|
39
|
+
# When the link was canceled; null while it is active.
|
|
40
|
+
attr_accessor :canceled_at
|
|
41
|
+
|
|
30
42
|
attr_accessor :created_at
|
|
31
43
|
|
|
32
|
-
# Per-person only — recipient email.
|
|
44
|
+
# Per-person only — recipient email. Always `null` for an invite addressed by `wefunder_user_id`, which never returns the account's email. Otherwise null unless the token holds `read:investors:pii` (on an install, the install must grant it too), except that the app which created the invite through the API with an `email` always sees the address it supplied. The invite still sends, resends and reports status when the email is null.
|
|
33
45
|
attr_accessor :email
|
|
34
46
|
|
|
35
47
|
# Per-person only — the recipient's id (`usr_...`), when they are an existing user.
|
|
@@ -38,7 +50,7 @@ module WefunderGenerated
|
|
|
38
50
|
# Per-person only — derived live, not stored. `pending` (sent, not yet opened), `opened` (link clicked), `invested` (a matching active investment exists), `revoked` (canceled).
|
|
39
51
|
attr_accessor :status
|
|
40
52
|
|
|
41
|
-
# Per-person only.
|
|
53
|
+
# Per-person only. The first click, not an email open (deprecated: use `first_clicked_at`, which has the same value).
|
|
42
54
|
attr_accessor :opened_at
|
|
43
55
|
|
|
44
56
|
# Per-person only.
|
|
@@ -76,10 +88,14 @@ module WefunderGenerated
|
|
|
76
88
|
def self.attribute_map
|
|
77
89
|
{
|
|
78
90
|
:'url' => :'url',
|
|
91
|
+
:'reuse' => :'reuse',
|
|
79
92
|
:'allocation_cents' => :'allocation_cents',
|
|
80
93
|
:'max_uses' => :'max_uses',
|
|
81
94
|
:'uses_count' => :'uses_count',
|
|
95
|
+
:'click_count' => :'click_count',
|
|
96
|
+
:'first_clicked_at' => :'first_clicked_at',
|
|
82
97
|
:'active' => :'active',
|
|
98
|
+
:'canceled_at' => :'canceled_at',
|
|
83
99
|
:'created_at' => :'created_at',
|
|
84
100
|
:'email' => :'email',
|
|
85
101
|
:'wefunder_user_id' => :'wefunder_user_id',
|
|
@@ -100,10 +116,14 @@ module WefunderGenerated
|
|
|
100
116
|
def self.openapi_types
|
|
101
117
|
{
|
|
102
118
|
:'url' => :'String',
|
|
119
|
+
:'reuse' => :'Boolean',
|
|
103
120
|
:'allocation_cents' => :'Integer',
|
|
104
121
|
:'max_uses' => :'Integer',
|
|
105
122
|
:'uses_count' => :'Integer',
|
|
123
|
+
:'click_count' => :'Integer',
|
|
124
|
+
:'first_clicked_at' => :'Time',
|
|
106
125
|
:'active' => :'Boolean',
|
|
126
|
+
:'canceled_at' => :'Time',
|
|
107
127
|
:'created_at' => :'Time',
|
|
108
128
|
:'email' => :'String',
|
|
109
129
|
:'wefunder_user_id' => :'String',
|
|
@@ -118,8 +138,11 @@ module WefunderGenerated
|
|
|
118
138
|
# List of attributes with nullable: true
|
|
119
139
|
def self.openapi_nullable
|
|
120
140
|
Set.new([
|
|
141
|
+
:'url',
|
|
121
142
|
:'allocation_cents',
|
|
122
143
|
:'max_uses',
|
|
144
|
+
:'first_clicked_at',
|
|
145
|
+
:'canceled_at',
|
|
123
146
|
:'email',
|
|
124
147
|
:'wefunder_user_id',
|
|
125
148
|
:'status',
|
|
@@ -148,6 +171,10 @@ module WefunderGenerated
|
|
|
148
171
|
self.url = attributes[:'url']
|
|
149
172
|
end
|
|
150
173
|
|
|
174
|
+
if attributes.key?(:'reuse')
|
|
175
|
+
self.reuse = attributes[:'reuse']
|
|
176
|
+
end
|
|
177
|
+
|
|
151
178
|
if attributes.key?(:'allocation_cents')
|
|
152
179
|
self.allocation_cents = attributes[:'allocation_cents']
|
|
153
180
|
end
|
|
@@ -160,10 +187,22 @@ module WefunderGenerated
|
|
|
160
187
|
self.uses_count = attributes[:'uses_count']
|
|
161
188
|
end
|
|
162
189
|
|
|
190
|
+
if attributes.key?(:'click_count')
|
|
191
|
+
self.click_count = attributes[:'click_count']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'first_clicked_at')
|
|
195
|
+
self.first_clicked_at = attributes[:'first_clicked_at']
|
|
196
|
+
end
|
|
197
|
+
|
|
163
198
|
if attributes.key?(:'active')
|
|
164
199
|
self.active = attributes[:'active']
|
|
165
200
|
end
|
|
166
201
|
|
|
202
|
+
if attributes.key?(:'canceled_at')
|
|
203
|
+
self.canceled_at = attributes[:'canceled_at']
|
|
204
|
+
end
|
|
205
|
+
|
|
167
206
|
if attributes.key?(:'created_at')
|
|
168
207
|
self.created_at = attributes[:'created_at']
|
|
169
208
|
end
|
|
@@ -232,10 +271,14 @@ module WefunderGenerated
|
|
|
232
271
|
return true if self.equal?(o)
|
|
233
272
|
self.class == o.class &&
|
|
234
273
|
url == o.url &&
|
|
274
|
+
reuse == o.reuse &&
|
|
235
275
|
allocation_cents == o.allocation_cents &&
|
|
236
276
|
max_uses == o.max_uses &&
|
|
237
277
|
uses_count == o.uses_count &&
|
|
278
|
+
click_count == o.click_count &&
|
|
279
|
+
first_clicked_at == o.first_clicked_at &&
|
|
238
280
|
active == o.active &&
|
|
281
|
+
canceled_at == o.canceled_at &&
|
|
239
282
|
created_at == o.created_at &&
|
|
240
283
|
email == o.email &&
|
|
241
284
|
wefunder_user_id == o.wefunder_user_id &&
|
|
@@ -255,7 +298,7 @@ module WefunderGenerated
|
|
|
255
298
|
# Calculates hash code according to all attributes.
|
|
256
299
|
# @return [Integer] Hash code
|
|
257
300
|
def hash
|
|
258
|
-
[url, allocation_cents, max_uses, uses_count, active, created_at, email, wefunder_user_id, status, opened_at, invested_at, investment_id, events].hash
|
|
301
|
+
[url, reuse, allocation_cents, max_uses, uses_count, click_count, first_clicked_at, active, canceled_at, created_at, email, wefunder_user_id, status, opened_at, invested_at, investment_id, events].hash
|
|
259
302
|
end
|
|
260
303
|
|
|
261
304
|
# Builds the object from hash
|
|
@@ -17,6 +17,9 @@ module WefunderGenerated
|
|
|
17
17
|
class InviteLinkAttributesEventsInner
|
|
18
18
|
attr_accessor :event
|
|
19
19
|
|
|
20
|
+
# The account that acted (`usr_...`): the sender of a `send` or `resend`, or a signed-in visitor's click. Null when anonymous. Never an email.
|
|
21
|
+
attr_accessor :wefunder_user_id
|
|
22
|
+
|
|
20
23
|
attr_accessor :city
|
|
21
24
|
|
|
22
25
|
attr_accessor :country_code
|
|
@@ -27,6 +30,7 @@ module WefunderGenerated
|
|
|
27
30
|
def self.attribute_map
|
|
28
31
|
{
|
|
29
32
|
:'event' => :'event',
|
|
33
|
+
:'wefunder_user_id' => :'wefunder_user_id',
|
|
30
34
|
:'city' => :'city',
|
|
31
35
|
:'country_code' => :'country_code',
|
|
32
36
|
:'created_at' => :'created_at'
|
|
@@ -42,6 +46,7 @@ module WefunderGenerated
|
|
|
42
46
|
def self.openapi_types
|
|
43
47
|
{
|
|
44
48
|
:'event' => :'String',
|
|
49
|
+
:'wefunder_user_id' => :'String',
|
|
45
50
|
:'city' => :'String',
|
|
46
51
|
:'country_code' => :'String',
|
|
47
52
|
:'created_at' => :'Time'
|
|
@@ -51,6 +56,7 @@ module WefunderGenerated
|
|
|
51
56
|
# List of attributes with nullable: true
|
|
52
57
|
def self.openapi_nullable
|
|
53
58
|
Set.new([
|
|
59
|
+
:'wefunder_user_id',
|
|
54
60
|
:'city',
|
|
55
61
|
:'country_code',
|
|
56
62
|
])
|
|
@@ -75,6 +81,10 @@ module WefunderGenerated
|
|
|
75
81
|
self.event = attributes[:'event']
|
|
76
82
|
end
|
|
77
83
|
|
|
84
|
+
if attributes.key?(:'wefunder_user_id')
|
|
85
|
+
self.wefunder_user_id = attributes[:'wefunder_user_id']
|
|
86
|
+
end
|
|
87
|
+
|
|
78
88
|
if attributes.key?(:'city')
|
|
79
89
|
self.city = attributes[:'city']
|
|
80
90
|
end
|
|
@@ -109,6 +119,7 @@ module WefunderGenerated
|
|
|
109
119
|
return true if self.equal?(o)
|
|
110
120
|
self.class == o.class &&
|
|
111
121
|
event == o.event &&
|
|
122
|
+
wefunder_user_id == o.wefunder_user_id &&
|
|
112
123
|
city == o.city &&
|
|
113
124
|
country_code == o.country_code &&
|
|
114
125
|
created_at == o.created_at
|
|
@@ -123,7 +134,7 @@ module WefunderGenerated
|
|
|
123
134
|
# Calculates hash code according to all attributes.
|
|
124
135
|
# @return [Integer] Hash code
|
|
125
136
|
def hash
|
|
126
|
-
[event, city, country_code, created_at].hash
|
|
137
|
+
[event, wefunder_user_id, city, country_code, created_at].hash
|
|
127
138
|
end
|
|
128
139
|
|
|
129
140
|
# Builds the object from hash
|
|
@@ -14,10 +14,13 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module WefunderGenerated
|
|
17
|
-
class
|
|
18
|
-
|
|
17
|
+
class MemberLink
|
|
18
|
+
# Opaque id (`il_` prefix today). Do not parse it.
|
|
19
|
+
attr_accessor :id
|
|
19
20
|
|
|
20
|
-
attr_accessor :
|
|
21
|
+
attr_accessor :type
|
|
22
|
+
|
|
23
|
+
attr_accessor :attributes
|
|
21
24
|
|
|
22
25
|
class EnumAttributeValidator
|
|
23
26
|
attr_reader :datatype
|
|
@@ -44,8 +47,9 @@ module WefunderGenerated
|
|
|
44
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
48
|
def self.attribute_map
|
|
46
49
|
{
|
|
47
|
-
:'
|
|
48
|
-
:'
|
|
50
|
+
:'id' => :'id',
|
|
51
|
+
:'type' => :'type',
|
|
52
|
+
:'attributes' => :'attributes'
|
|
49
53
|
}
|
|
50
54
|
end
|
|
51
55
|
|
|
@@ -57,8 +61,9 @@ module WefunderGenerated
|
|
|
57
61
|
# Attribute type mapping.
|
|
58
62
|
def self.openapi_types
|
|
59
63
|
{
|
|
60
|
-
:'
|
|
61
|
-
:'
|
|
64
|
+
:'id' => :'String',
|
|
65
|
+
:'type' => :'String',
|
|
66
|
+
:'attributes' => :'MemberLinkAttributes'
|
|
62
67
|
}
|
|
63
68
|
end
|
|
64
69
|
|
|
@@ -72,23 +77,27 @@ module WefunderGenerated
|
|
|
72
77
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
78
|
def initialize(attributes = {})
|
|
74
79
|
if (!attributes.is_a?(Hash))
|
|
75
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `WefunderGenerated::
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `WefunderGenerated::MemberLink` initialize method"
|
|
76
81
|
end
|
|
77
82
|
|
|
78
83
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
84
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
85
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
81
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `WefunderGenerated::
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `WefunderGenerated::MemberLink`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
82
87
|
end
|
|
83
88
|
h[k.to_sym] = v
|
|
84
89
|
}
|
|
85
90
|
|
|
86
|
-
if attributes.key?(:'
|
|
87
|
-
self.
|
|
91
|
+
if attributes.key?(:'id')
|
|
92
|
+
self.id = attributes[:'id']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'type')
|
|
96
|
+
self.type = attributes[:'type']
|
|
88
97
|
end
|
|
89
98
|
|
|
90
|
-
if attributes.key?(:'
|
|
91
|
-
self.
|
|
99
|
+
if attributes.key?(:'attributes')
|
|
100
|
+
self.attributes = attributes[:'attributes']
|
|
92
101
|
end
|
|
93
102
|
end
|
|
94
103
|
|
|
@@ -104,19 +113,19 @@ module WefunderGenerated
|
|
|
104
113
|
# @return true if the model is valid
|
|
105
114
|
def valid?
|
|
106
115
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
107
|
-
|
|
108
|
-
return false unless
|
|
116
|
+
type_validator = EnumAttributeValidator.new('String', ["member_link"])
|
|
117
|
+
return false unless type_validator.valid?(@type)
|
|
109
118
|
true
|
|
110
119
|
end
|
|
111
120
|
|
|
112
121
|
# Custom attribute writer method checking allowed values (enum).
|
|
113
|
-
# @param [Object]
|
|
114
|
-
def
|
|
115
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
116
|
-
unless validator.valid?(
|
|
117
|
-
fail ArgumentError, "invalid value for \"
|
|
122
|
+
# @param [Object] type Object to be assigned
|
|
123
|
+
def type=(type)
|
|
124
|
+
validator = EnumAttributeValidator.new('String', ["member_link"])
|
|
125
|
+
unless validator.valid?(type)
|
|
126
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
118
127
|
end
|
|
119
|
-
@
|
|
128
|
+
@type = type
|
|
120
129
|
end
|
|
121
130
|
|
|
122
131
|
# Checks equality by comparing each attribute.
|
|
@@ -124,8 +133,9 @@ module WefunderGenerated
|
|
|
124
133
|
def ==(o)
|
|
125
134
|
return true if self.equal?(o)
|
|
126
135
|
self.class == o.class &&
|
|
127
|
-
|
|
128
|
-
|
|
136
|
+
id == o.id &&
|
|
137
|
+
type == o.type &&
|
|
138
|
+
attributes == o.attributes
|
|
129
139
|
end
|
|
130
140
|
|
|
131
141
|
# @see the `==` method
|
|
@@ -137,7 +147,7 @@ module WefunderGenerated
|
|
|
137
147
|
# Calculates hash code according to all attributes.
|
|
138
148
|
# @return [Integer] Hash code
|
|
139
149
|
def hash
|
|
140
|
-
[
|
|
150
|
+
[id, type, attributes].hash
|
|
141
151
|
end
|
|
142
152
|
|
|
143
153
|
# Builds the object from hash
|