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
|
@@ -18,27 +18,57 @@ module WefunderGenerated
|
|
|
18
18
|
# Total number of offerings across all pages.
|
|
19
19
|
attr_accessor :total_count
|
|
20
20
|
|
|
21
|
-
# Number of offerings on this page (at most
|
|
21
|
+
# Number of offerings on this page (at most `per_page`).
|
|
22
22
|
attr_accessor :page_count
|
|
23
23
|
|
|
24
24
|
attr_accessor :has_more
|
|
25
25
|
|
|
26
|
-
# The
|
|
26
|
+
# The `status` applied to this response.
|
|
27
|
+
attr_accessor :status
|
|
28
|
+
|
|
29
|
+
# The sort applied to this response. `recently_closed` for `status=closed`, which has a fixed order.
|
|
27
30
|
attr_accessor :sort
|
|
28
31
|
|
|
32
|
+
# True when the response is the logged-in (`read:explore`) view.
|
|
33
|
+
attr_accessor :personalized
|
|
34
|
+
|
|
29
35
|
# The filters applied to this response (validated values), empty when none.
|
|
30
36
|
attr_accessor :filters
|
|
31
37
|
|
|
32
38
|
# Opaque pagination cursor — pass as `cursor` to fetch the next page. Present only when `has_more` is true.
|
|
33
39
|
attr_accessor :next_cursor
|
|
34
40
|
|
|
41
|
+
class EnumAttributeValidator
|
|
42
|
+
attr_reader :datatype
|
|
43
|
+
attr_reader :allowable_values
|
|
44
|
+
|
|
45
|
+
def initialize(datatype, allowable_values)
|
|
46
|
+
@allowable_values = allowable_values.map do |value|
|
|
47
|
+
case datatype.to_s
|
|
48
|
+
when /Integer/i
|
|
49
|
+
value.to_i
|
|
50
|
+
when /Float/i
|
|
51
|
+
value.to_f
|
|
52
|
+
else
|
|
53
|
+
value
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def valid?(value)
|
|
59
|
+
!value || allowable_values.include?(value)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
35
63
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
64
|
def self.attribute_map
|
|
37
65
|
{
|
|
38
66
|
:'total_count' => :'total_count',
|
|
39
67
|
:'page_count' => :'page_count',
|
|
40
68
|
:'has_more' => :'has_more',
|
|
69
|
+
:'status' => :'status',
|
|
41
70
|
:'sort' => :'sort',
|
|
71
|
+
:'personalized' => :'personalized',
|
|
42
72
|
:'filters' => :'filters',
|
|
43
73
|
:'next_cursor' => :'next_cursor'
|
|
44
74
|
}
|
|
@@ -55,7 +85,9 @@ module WefunderGenerated
|
|
|
55
85
|
:'total_count' => :'Integer',
|
|
56
86
|
:'page_count' => :'Integer',
|
|
57
87
|
:'has_more' => :'Boolean',
|
|
88
|
+
:'status' => :'String',
|
|
58
89
|
:'sort' => :'String',
|
|
90
|
+
:'personalized' => :'Boolean',
|
|
59
91
|
:'filters' => :'Object',
|
|
60
92
|
:'next_cursor' => :'Integer'
|
|
61
93
|
}
|
|
@@ -95,10 +127,18 @@ module WefunderGenerated
|
|
|
95
127
|
self.has_more = attributes[:'has_more']
|
|
96
128
|
end
|
|
97
129
|
|
|
130
|
+
if attributes.key?(:'status')
|
|
131
|
+
self.status = attributes[:'status']
|
|
132
|
+
end
|
|
133
|
+
|
|
98
134
|
if attributes.key?(:'sort')
|
|
99
135
|
self.sort = attributes[:'sort']
|
|
100
136
|
end
|
|
101
137
|
|
|
138
|
+
if attributes.key?(:'personalized')
|
|
139
|
+
self.personalized = attributes[:'personalized']
|
|
140
|
+
end
|
|
141
|
+
|
|
102
142
|
if attributes.key?(:'filters')
|
|
103
143
|
self.filters = attributes[:'filters']
|
|
104
144
|
end
|
|
@@ -120,9 +160,21 @@ module WefunderGenerated
|
|
|
120
160
|
# @return true if the model is valid
|
|
121
161
|
def valid?
|
|
122
162
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
163
|
+
status_validator = EnumAttributeValidator.new('String', ["live", "closed", "all"])
|
|
164
|
+
return false unless status_validator.valid?(@status)
|
|
123
165
|
true
|
|
124
166
|
end
|
|
125
167
|
|
|
168
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
169
|
+
# @param [Object] status Object to be assigned
|
|
170
|
+
def status=(status)
|
|
171
|
+
validator = EnumAttributeValidator.new('String', ["live", "closed", "all"])
|
|
172
|
+
unless validator.valid?(status)
|
|
173
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
174
|
+
end
|
|
175
|
+
@status = status
|
|
176
|
+
end
|
|
177
|
+
|
|
126
178
|
# Checks equality by comparing each attribute.
|
|
127
179
|
# @param [Object] Object to be compared
|
|
128
180
|
def ==(o)
|
|
@@ -131,7 +183,9 @@ module WefunderGenerated
|
|
|
131
183
|
total_count == o.total_count &&
|
|
132
184
|
page_count == o.page_count &&
|
|
133
185
|
has_more == o.has_more &&
|
|
186
|
+
status == o.status &&
|
|
134
187
|
sort == o.sort &&
|
|
188
|
+
personalized == o.personalized &&
|
|
135
189
|
filters == o.filters &&
|
|
136
190
|
next_cursor == o.next_cursor
|
|
137
191
|
end
|
|
@@ -145,7 +199,7 @@ module WefunderGenerated
|
|
|
145
199
|
# Calculates hash code according to all attributes.
|
|
146
200
|
# @return [Integer] Hash code
|
|
147
201
|
def hash
|
|
148
|
-
[total_count, page_count, has_more, sort, filters, next_cursor].hash
|
|
202
|
+
[total_count, page_count, has_more, status, sort, personalized, filters, next_cursor].hash
|
|
149
203
|
end
|
|
150
204
|
|
|
151
205
|
# Builds the object from hash
|
|
@@ -23,12 +23,16 @@ module WefunderGenerated
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :slug
|
|
25
25
|
|
|
26
|
+
# The company's page on wefunder.com, absolute. This is the link target the [attribution rule](/resources/acceptable-use#attribution) asks for wherever you show the position; do not link to the investor's Wefunder portfolio instead. Null when the company no longer has a public page.
|
|
27
|
+
attr_accessor :url
|
|
28
|
+
|
|
26
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
30
|
def self.attribute_map
|
|
28
31
|
{
|
|
29
32
|
:'id' => :'id',
|
|
30
33
|
:'name' => :'name',
|
|
31
|
-
:'slug' => :'slug'
|
|
34
|
+
:'slug' => :'slug',
|
|
35
|
+
:'url' => :'url'
|
|
32
36
|
}
|
|
33
37
|
end
|
|
34
38
|
|
|
@@ -42,14 +46,16 @@ module WefunderGenerated
|
|
|
42
46
|
{
|
|
43
47
|
:'id' => :'String',
|
|
44
48
|
:'name' => :'String',
|
|
45
|
-
:'slug' => :'String'
|
|
49
|
+
:'slug' => :'String',
|
|
50
|
+
:'url' => :'String'
|
|
46
51
|
}
|
|
47
52
|
end
|
|
48
53
|
|
|
49
54
|
# List of attributes with nullable: true
|
|
50
55
|
def self.openapi_nullable
|
|
51
56
|
Set.new([
|
|
52
|
-
:'slug'
|
|
57
|
+
:'slug',
|
|
58
|
+
:'url'
|
|
53
59
|
])
|
|
54
60
|
end
|
|
55
61
|
|
|
@@ -79,6 +85,10 @@ module WefunderGenerated
|
|
|
79
85
|
if attributes.key?(:'slug')
|
|
80
86
|
self.slug = attributes[:'slug']
|
|
81
87
|
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'url')
|
|
90
|
+
self.url = attributes[:'url']
|
|
91
|
+
end
|
|
82
92
|
end
|
|
83
93
|
|
|
84
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -103,7 +113,8 @@ module WefunderGenerated
|
|
|
103
113
|
self.class == o.class &&
|
|
104
114
|
id == o.id &&
|
|
105
115
|
name == o.name &&
|
|
106
|
-
slug == o.slug
|
|
116
|
+
slug == o.slug &&
|
|
117
|
+
url == o.url
|
|
107
118
|
end
|
|
108
119
|
|
|
109
120
|
# @see the `==` method
|
|
@@ -115,7 +126,7 @@ module WefunderGenerated
|
|
|
115
126
|
# Calculates hash code according to all attributes.
|
|
116
127
|
# @return [Integer] Hash code
|
|
117
128
|
def hash
|
|
118
|
-
[id, name, slug].hash
|
|
129
|
+
[id, name, slug, url].hash
|
|
119
130
|
end
|
|
120
131
|
|
|
121
132
|
# Builds the object from hash
|
|
@@ -31,6 +31,9 @@ module WefunderGenerated
|
|
|
31
31
|
# Why the position ended. Set only for `exited` and `failed` positions — a `sold` position ended with the transfer itself, and some older positions have no recorded ending. `ipo` means the company went public; distributions, if any, appear in `realized_gain_cents`.
|
|
32
32
|
attr_accessor :exit_reason
|
|
33
33
|
|
|
34
|
+
# The date the position ended (`YYYY-MM-DD`): the effective date of the company's recorded exit. Set only for `exited` and `failed` positions, and null for older exits recorded before Wefunder kept exit dates, even when `exit_reason` is present.
|
|
35
|
+
attr_accessor :exited_on
|
|
36
|
+
|
|
34
37
|
attr_accessor :invested_at
|
|
35
38
|
|
|
36
39
|
# ISO 4217 code, lower-case, of the investment amounts on this position and its `securities` (cost basis, values, gains, share price) — the offering's currency: `usd`, or `eur` for an ECSP round. A security's note cap and pre-money valuation carry their own `terms.currency`, which can differ.
|
|
@@ -38,7 +41,7 @@ module WefunderGenerated
|
|
|
38
41
|
|
|
39
42
|
attr_accessor :cost_basis_cents
|
|
40
43
|
|
|
41
|
-
# Estimated current value
|
|
44
|
+
# Estimated current value. It equals `cost_basis_cents` until a later priced round, a recorded valuation mark, or an exit marks the position, so an active position reading at cost is expected, not missing data.
|
|
42
45
|
attr_accessor :current_value_cents
|
|
43
46
|
|
|
44
47
|
# Can be negative.
|
|
@@ -96,6 +99,7 @@ module WefunderGenerated
|
|
|
96
99
|
:'security' => :'security',
|
|
97
100
|
:'status' => :'status',
|
|
98
101
|
:'exit_reason' => :'exit_reason',
|
|
102
|
+
:'exited_on' => :'exited_on',
|
|
99
103
|
:'invested_at' => :'invested_at',
|
|
100
104
|
:'currency' => :'currency',
|
|
101
105
|
:'cost_basis_cents' => :'cost_basis_cents',
|
|
@@ -126,6 +130,7 @@ module WefunderGenerated
|
|
|
126
130
|
:'security' => :'SecuritySummary',
|
|
127
131
|
:'status' => :'String',
|
|
128
132
|
:'exit_reason' => :'String',
|
|
133
|
+
:'exited_on' => :'Date',
|
|
129
134
|
:'invested_at' => :'Time',
|
|
130
135
|
:'currency' => :'String',
|
|
131
136
|
:'cost_basis_cents' => :'Integer',
|
|
@@ -147,6 +152,7 @@ module WefunderGenerated
|
|
|
147
152
|
Set.new([
|
|
148
153
|
:'security',
|
|
149
154
|
:'exit_reason',
|
|
155
|
+
:'exited_on',
|
|
150
156
|
:'invested_at',
|
|
151
157
|
:'return_multiple',
|
|
152
158
|
:'shares_held',
|
|
@@ -193,6 +199,10 @@ module WefunderGenerated
|
|
|
193
199
|
self.exit_reason = attributes[:'exit_reason']
|
|
194
200
|
end
|
|
195
201
|
|
|
202
|
+
if attributes.key?(:'exited_on')
|
|
203
|
+
self.exited_on = attributes[:'exited_on']
|
|
204
|
+
end
|
|
205
|
+
|
|
196
206
|
if attributes.key?(:'invested_at')
|
|
197
207
|
self.invested_at = attributes[:'invested_at']
|
|
198
208
|
end
|
|
@@ -312,6 +322,7 @@ module WefunderGenerated
|
|
|
312
322
|
security == o.security &&
|
|
313
323
|
status == o.status &&
|
|
314
324
|
exit_reason == o.exit_reason &&
|
|
325
|
+
exited_on == o.exited_on &&
|
|
315
326
|
invested_at == o.invested_at &&
|
|
316
327
|
currency == o.currency &&
|
|
317
328
|
cost_basis_cents == o.cost_basis_cents &&
|
|
@@ -336,7 +347,7 @@ module WefunderGenerated
|
|
|
336
347
|
# Calculates hash code according to all attributes.
|
|
337
348
|
# @return [Integer] Hash code
|
|
338
349
|
def hash
|
|
339
|
-
[offering_id, company, asset_type, security, status, exit_reason, invested_at, currency, cost_basis_cents, current_value_cents, unrealized_gain_cents, realized_gain_cents, return_multiple, shares_held, current_share_price, securities, holdings, investor_count, as_of].hash
|
|
350
|
+
[offering_id, company, asset_type, security, status, exit_reason, exited_on, invested_at, currency, cost_basis_cents, current_value_cents, unrealized_gain_cents, realized_gain_cents, return_multiple, shares_held, current_share_price, securities, holdings, investor_count, as_of].hash
|
|
340
351
|
end
|
|
341
352
|
|
|
342
353
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module WefunderGenerated
|
|
17
|
-
# The offering's issue terms.
|
|
17
|
+
# The offering's issue terms. A field is null when the term does not apply to the security type, and also when the security has none: an uncapped SAFE or note has a null `note_cap_cents` (with `uncapped: true`), and a security with no discount, including one recorded as zero, has a null `note_discount`.
|
|
18
18
|
class PortfolioSecurityTerms
|
|
19
19
|
# Issue price per share as a decimal string
|
|
20
20
|
attr_accessor :share_price
|
|
@@ -22,8 +22,13 @@ module WefunderGenerated
|
|
|
22
22
|
# Lower-case ISO 4217 code of `note_cap_cents` and `premoney_valuation_cents`, the currency the founder entered them in. USD when the round's terms are explicitly USD-denominated (checkout prices them in USD then); otherwise a SAFE's cap is in the round's declared financials currency (falling back to the round's), while equity pre-money and a convertible note's valuation are in the round currency. A EUR-funded SAFE can therefore carry a `usd` or `dkk` cap. `share_price` and every other `_cents` field on the position stay in the position's top-level `currency`.
|
|
23
23
|
attr_accessor :currency
|
|
24
24
|
|
|
25
|
+
# The valuation cap of a SAFE or convertible note, in cents of `terms.currency`. Null when the security is uncapped (see `uncapped`) or has no cap.
|
|
25
26
|
attr_accessor :note_cap_cents
|
|
26
27
|
|
|
28
|
+
# `true` when a SAFE or convertible note has no valuation cap, `false` when it has one. Null for securities that never carry a cap (equity, revenue share, debt, fund, other). Same rule as `uncapped` in an offering's `security.terms`.
|
|
29
|
+
attr_accessor :uncapped
|
|
30
|
+
|
|
31
|
+
# Conversion discount as a decimal string percentage (`\"20.0\"` is 20%). Null when there is no discount, including a discount recorded as zero, the same as `discount_percent` in an offering's `security.terms`.
|
|
27
32
|
attr_accessor :note_discount
|
|
28
33
|
|
|
29
34
|
attr_accessor :premoney_valuation_cents
|
|
@@ -34,6 +39,7 @@ module WefunderGenerated
|
|
|
34
39
|
:'share_price' => :'share_price',
|
|
35
40
|
:'currency' => :'currency',
|
|
36
41
|
:'note_cap_cents' => :'note_cap_cents',
|
|
42
|
+
:'uncapped' => :'uncapped',
|
|
37
43
|
:'note_discount' => :'note_discount',
|
|
38
44
|
:'premoney_valuation_cents' => :'premoney_valuation_cents'
|
|
39
45
|
}
|
|
@@ -50,6 +56,7 @@ module WefunderGenerated
|
|
|
50
56
|
:'share_price' => :'String',
|
|
51
57
|
:'currency' => :'String',
|
|
52
58
|
:'note_cap_cents' => :'Integer',
|
|
59
|
+
:'uncapped' => :'Boolean',
|
|
53
60
|
:'note_discount' => :'String',
|
|
54
61
|
:'premoney_valuation_cents' => :'Integer'
|
|
55
62
|
}
|
|
@@ -60,6 +67,7 @@ module WefunderGenerated
|
|
|
60
67
|
Set.new([
|
|
61
68
|
:'share_price',
|
|
62
69
|
:'note_cap_cents',
|
|
70
|
+
:'uncapped',
|
|
63
71
|
:'note_discount',
|
|
64
72
|
:'premoney_valuation_cents'
|
|
65
73
|
])
|
|
@@ -92,6 +100,10 @@ module WefunderGenerated
|
|
|
92
100
|
self.note_cap_cents = attributes[:'note_cap_cents']
|
|
93
101
|
end
|
|
94
102
|
|
|
103
|
+
if attributes.key?(:'uncapped')
|
|
104
|
+
self.uncapped = attributes[:'uncapped']
|
|
105
|
+
end
|
|
106
|
+
|
|
95
107
|
if attributes.key?(:'note_discount')
|
|
96
108
|
self.note_discount = attributes[:'note_discount']
|
|
97
109
|
end
|
|
@@ -124,6 +136,7 @@ module WefunderGenerated
|
|
|
124
136
|
share_price == o.share_price &&
|
|
125
137
|
currency == o.currency &&
|
|
126
138
|
note_cap_cents == o.note_cap_cents &&
|
|
139
|
+
uncapped == o.uncapped &&
|
|
127
140
|
note_discount == o.note_discount &&
|
|
128
141
|
premoney_valuation_cents == o.premoney_valuation_cents
|
|
129
142
|
end
|
|
@@ -137,7 +150,7 @@ module WefunderGenerated
|
|
|
137
150
|
# Calculates hash code according to all attributes.
|
|
138
151
|
# @return [Integer] Hash code
|
|
139
152
|
def hash
|
|
140
|
-
[share_price, currency, note_cap_cents, note_discount, premoney_valuation_cents].hash
|
|
153
|
+
[share_price, currency, note_cap_cents, uncapped, note_discount, premoney_valuation_cents].hash
|
|
141
154
|
end
|
|
142
155
|
|
|
143
156
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module WefunderGenerated
|
|
17
|
-
class
|
|
17
|
+
class ReferralCode
|
|
18
18
|
attr_accessor :id
|
|
19
19
|
|
|
20
20
|
attr_accessor :type
|
|
@@ -40,7 +40,7 @@ module WefunderGenerated
|
|
|
40
40
|
{
|
|
41
41
|
:'id' => :'String',
|
|
42
42
|
:'type' => :'String',
|
|
43
|
-
:'attributes' => :'
|
|
43
|
+
:'attributes' => :'ReferralCodeAttributes'
|
|
44
44
|
}
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -54,13 +54,13 @@ module WefunderGenerated
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `WefunderGenerated::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `WefunderGenerated::ReferralCode` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `WefunderGenerated::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `WefunderGenerated::ReferralCode`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
|
@@ -14,57 +14,38 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module WefunderGenerated
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
attr_accessor :id
|
|
17
|
+
class ReferralCodeAttributes
|
|
18
|
+
attr_accessor :label
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
# A paused code is ignored on arrival; it still credits cookies set while it was active.
|
|
21
|
+
attr_accessor :active
|
|
22
22
|
|
|
23
|
-
attr_accessor :
|
|
23
|
+
attr_accessor :target
|
|
24
24
|
|
|
25
|
-
attr_accessor :
|
|
25
|
+
attr_accessor :utm
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
attr_accessor :active
|
|
27
|
+
attr_accessor :metadata
|
|
29
28
|
|
|
30
|
-
#
|
|
31
|
-
attr_accessor :
|
|
29
|
+
# The query parameter to append to any wefunder.com link.
|
|
30
|
+
attr_accessor :link_parameter
|
|
31
|
+
|
|
32
|
+
# On list and retrieve only: the daily visit snapshot. Investor ranges are per company and per week, on `GET /referral_codes/{id}/stats`.
|
|
33
|
+
attr_accessor :stats
|
|
32
34
|
|
|
33
35
|
attr_accessor :created_at
|
|
34
36
|
|
|
35
37
|
attr_accessor :updated_at
|
|
36
38
|
|
|
37
|
-
class EnumAttributeValidator
|
|
38
|
-
attr_reader :datatype
|
|
39
|
-
attr_reader :allowable_values
|
|
40
|
-
|
|
41
|
-
def initialize(datatype, allowable_values)
|
|
42
|
-
@allowable_values = allowable_values.map do |value|
|
|
43
|
-
case datatype.to_s
|
|
44
|
-
when /Integer/i
|
|
45
|
-
value.to_i
|
|
46
|
-
when /Float/i
|
|
47
|
-
value.to_f
|
|
48
|
-
else
|
|
49
|
-
value
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def valid?(value)
|
|
55
|
-
!value || allowable_values.include?(value)
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
60
40
|
def self.attribute_map
|
|
61
41
|
{
|
|
62
|
-
:'
|
|
63
|
-
:'campaign_id' => :'campaign_id',
|
|
64
|
-
:'target_url' => :'target_url',
|
|
65
|
-
:'events' => :'events',
|
|
42
|
+
:'label' => :'label',
|
|
66
43
|
:'active' => :'active',
|
|
67
|
-
:'
|
|
44
|
+
:'target' => :'target',
|
|
45
|
+
:'utm' => :'utm',
|
|
46
|
+
:'metadata' => :'metadata',
|
|
47
|
+
:'link_parameter' => :'link_parameter',
|
|
48
|
+
:'stats' => :'stats',
|
|
68
49
|
:'created_at' => :'created_at',
|
|
69
50
|
:'updated_at' => :'updated_at'
|
|
70
51
|
}
|
|
@@ -78,12 +59,13 @@ module WefunderGenerated
|
|
|
78
59
|
# Attribute type mapping.
|
|
79
60
|
def self.openapi_types
|
|
80
61
|
{
|
|
81
|
-
:'
|
|
82
|
-
:'campaign_id' => :'Integer',
|
|
83
|
-
:'target_url' => :'String',
|
|
84
|
-
:'events' => :'Array<String>',
|
|
62
|
+
:'label' => :'String',
|
|
85
63
|
:'active' => :'Boolean',
|
|
86
|
-
:'
|
|
64
|
+
:'target' => :'ReferralCodeAttributesTarget',
|
|
65
|
+
:'utm' => :'ReferralCodeUtm',
|
|
66
|
+
:'metadata' => :'Hash<String, Object>',
|
|
67
|
+
:'link_parameter' => :'String',
|
|
68
|
+
:'stats' => :'ReferralCodeVisits',
|
|
87
69
|
:'created_at' => :'Time',
|
|
88
70
|
:'updated_at' => :'Time'
|
|
89
71
|
}
|
|
@@ -92,6 +74,7 @@ module WefunderGenerated
|
|
|
92
74
|
# List of attributes with nullable: true
|
|
93
75
|
def self.openapi_nullable
|
|
94
76
|
Set.new([
|
|
77
|
+
:'target',
|
|
95
78
|
])
|
|
96
79
|
end
|
|
97
80
|
|
|
@@ -99,41 +82,45 @@ module WefunderGenerated
|
|
|
99
82
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
100
83
|
def initialize(attributes = {})
|
|
101
84
|
if (!attributes.is_a?(Hash))
|
|
102
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `WefunderGenerated::
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `WefunderGenerated::ReferralCodeAttributes` initialize method"
|
|
103
86
|
end
|
|
104
87
|
|
|
105
88
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
106
89
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
90
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
108
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `WefunderGenerated::
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `WefunderGenerated::ReferralCodeAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
109
92
|
end
|
|
110
93
|
h[k.to_sym] = v
|
|
111
94
|
}
|
|
112
95
|
|
|
113
|
-
if attributes.key?(:'
|
|
114
|
-
self.
|
|
96
|
+
if attributes.key?(:'label')
|
|
97
|
+
self.label = attributes[:'label']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'active')
|
|
101
|
+
self.active = attributes[:'active']
|
|
115
102
|
end
|
|
116
103
|
|
|
117
|
-
if attributes.key?(:'
|
|
118
|
-
self.
|
|
104
|
+
if attributes.key?(:'target')
|
|
105
|
+
self.target = attributes[:'target']
|
|
119
106
|
end
|
|
120
107
|
|
|
121
|
-
if attributes.key?(:'
|
|
122
|
-
self.
|
|
108
|
+
if attributes.key?(:'utm')
|
|
109
|
+
self.utm = attributes[:'utm']
|
|
123
110
|
end
|
|
124
111
|
|
|
125
|
-
if attributes.key?(:'
|
|
126
|
-
if (value = attributes[:'
|
|
127
|
-
self.
|
|
112
|
+
if attributes.key?(:'metadata')
|
|
113
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
|
114
|
+
self.metadata = value
|
|
128
115
|
end
|
|
129
116
|
end
|
|
130
117
|
|
|
131
|
-
if attributes.key?(:'
|
|
132
|
-
self.
|
|
118
|
+
if attributes.key?(:'link_parameter')
|
|
119
|
+
self.link_parameter = attributes[:'link_parameter']
|
|
133
120
|
end
|
|
134
121
|
|
|
135
|
-
if attributes.key?(:'
|
|
136
|
-
self.
|
|
122
|
+
if attributes.key?(:'stats')
|
|
123
|
+
self.stats = attributes[:'stats']
|
|
137
124
|
end
|
|
138
125
|
|
|
139
126
|
if attributes.key?(:'created_at')
|
|
@@ -165,12 +152,13 @@ module WefunderGenerated
|
|
|
165
152
|
def ==(o)
|
|
166
153
|
return true if self.equal?(o)
|
|
167
154
|
self.class == o.class &&
|
|
168
|
-
|
|
169
|
-
campaign_id == o.campaign_id &&
|
|
170
|
-
target_url == o.target_url &&
|
|
171
|
-
events == o.events &&
|
|
155
|
+
label == o.label &&
|
|
172
156
|
active == o.active &&
|
|
173
|
-
|
|
157
|
+
target == o.target &&
|
|
158
|
+
utm == o.utm &&
|
|
159
|
+
metadata == o.metadata &&
|
|
160
|
+
link_parameter == o.link_parameter &&
|
|
161
|
+
stats == o.stats &&
|
|
174
162
|
created_at == o.created_at &&
|
|
175
163
|
updated_at == o.updated_at
|
|
176
164
|
end
|
|
@@ -184,7 +172,7 @@ module WefunderGenerated
|
|
|
184
172
|
# Calculates hash code according to all attributes.
|
|
185
173
|
# @return [Integer] Hash code
|
|
186
174
|
def hash
|
|
187
|
-
[
|
|
175
|
+
[label, active, target, utm, metadata, link_parameter, stats, created_at, updated_at].hash
|
|
188
176
|
end
|
|
189
177
|
|
|
190
178
|
# Builds the object from hash
|