wefunder 1.0.0 → 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 +35 -13
- 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
|
@@ -146,7 +146,7 @@ module WefunderGenerated
|
|
|
146
146
|
end
|
|
147
147
|
|
|
148
148
|
# List or sync investments
|
|
149
|
-
# The investment records the token may see, served from **published** state (docs: *Investments: list, sync, retrieve*). The audience is the union of the companies the token's user edits (their founder-visible records) and the user's own investments (every applied record of theirs, whatever its status). Filters narrow within that audience; they never widen it. Three ways to call it: - **List** (no `cursor`, no `updated_since`): the current records, tombstones excluded, ordered by investment. Page with `meta.next_cursor` while `meta.has_more`; the final page's cursor is a sync cursor positioned at the moment the listing started. - **Sync by cursor**: only the records whose published state changed since the cursor, one record per investment, tombstones (`visible: false
|
|
149
|
+
# The investment records the token may see, served from **published** state (docs: *Investments: list, sync, retrieve*). The audience is the union of the companies the token's user edits (their founder-visible records) and the user's own investments (every applied record of theirs, whatever its status). Filters narrow within that audience; they never widen it. Three ways to call it: - **List** (no `cursor`, no `updated_since`): the current records, tombstones excluded, ordered by investment. Page with `meta.next_cursor` while `meta.has_more`; the final page's cursor is a sync cursor positioned at the moment the listing started. - **Sync by cursor**: only the records whose published state changed since the cursor, one record per investment, tombstones included (`visible: false` with `id`, `observed_at`, `cursor` and `reason`, and no payload fields). Apply in `cursor` order; always store `meta.next_cursor`. Filters are not encoded in the cursor: repeat the same `company_id`, `offering_id` or `investor_id` on every sync request, or the sync widens to the whole audience. - **Sync by time**: `updated_since=<ISO 8601>` is sugar for a cursor at the ledger position just before that time (with a 60 s safety margin). The response is a normal sync page, so continue with its `meta.next_cursor`. Records are eventually consistent (about ten minutes on the common paths); each carries `observed_at`. `GET /investments/{id}` returns the same shape derived now. Investor identity fields on other investors' records require `read:investors:pii`; a user always sees their own. Money is integer minor units plus `amounts.currency`. **410 Gone** means the cursor or `updated_since` predates the 90-day retention window: list again and replace your dataset. `status` cannot be combined with sync (a record leaving the status would never be delivered).
|
|
150
150
|
# @param [Hash] opts the optional parameters
|
|
151
151
|
# @option opts [String] :company_id Company external id (`co_…`).
|
|
152
152
|
# @option opts [String] :offering_id Offering external id (`ofr_…`). In sync mode an investment that moved to another offering is delivered once more as a tombstone under this filter.
|
|
@@ -162,7 +162,7 @@ module WefunderGenerated
|
|
|
162
162
|
end
|
|
163
163
|
|
|
164
164
|
# List or sync investments
|
|
165
|
-
# The investment records the token may see, served from **published** state (docs: *Investments: list, sync, retrieve*). The audience is the union of the companies the token's user edits (their founder-visible records) and the user's own investments (every applied record of theirs, whatever its status). Filters narrow within that audience; they never widen it. Three ways to call it: - **List** (no `cursor`, no `updated_since`): the current records, tombstones excluded, ordered by investment. Page with `meta.next_cursor` while `meta.has_more`; the final page's cursor is a sync cursor positioned at the moment the listing started. - **Sync by cursor**: only the records whose published state changed since the cursor, one record per investment, tombstones (`visible: false`
|
|
165
|
+
# The investment records the token may see, served from **published** state (docs: *Investments: list, sync, retrieve*). The audience is the union of the companies the token's user edits (their founder-visible records) and the user's own investments (every applied record of theirs, whatever its status). Filters narrow within that audience; they never widen it. Three ways to call it: - **List** (no `cursor`, no `updated_since`): the current records, tombstones excluded, ordered by investment. Page with `meta.next_cursor` while `meta.has_more`; the final page's cursor is a sync cursor positioned at the moment the listing started. - **Sync by cursor**: only the records whose published state changed since the cursor, one record per investment, tombstones included (`visible: false` with `id`, `observed_at`, `cursor` and `reason`, and no payload fields). Apply in `cursor` order; always store `meta.next_cursor`. Filters are not encoded in the cursor: repeat the same `company_id`, `offering_id` or `investor_id` on every sync request, or the sync widens to the whole audience. - **Sync by time**: `updated_since=<ISO 8601>` is sugar for a cursor at the ledger position just before that time (with a 60 s safety margin). The response is a normal sync page, so continue with its `meta.next_cursor`. Records are eventually consistent (about ten minutes on the common paths); each carries `observed_at`. `GET /investments/{id}` returns the same shape derived now. Investor identity fields on other investors' records require `read:investors:pii`; a user always sees their own. Money is integer minor units plus `amounts.currency`. **410 Gone** means the cursor or `updated_since` predates the 90-day retention window: list again and replace your dataset. `status` cannot be combined with sync (a record leaving the status would never be delivered).
|
|
166
166
|
# @param [Hash] opts the optional parameters
|
|
167
167
|
# @option opts [String] :company_id Company external id (`co_…`).
|
|
168
168
|
# @option opts [String] :offering_id Offering external id (`ofr_…`). In sync mode an investment that moved to another offering is delivered once more as a tombstone under this filter.
|
|
@@ -0,0 +1,287 @@
|
|
|
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 MemberLinksApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Cancel a member link
|
|
23
|
+
# Retracts the invitation. Idempotent. The link grants nothing new afterwards: a checkout started after the cancel, including the same member's next investment, is priced at standard terms. Investments already made through the link keep the terms they were made at. A link nobody invested through is also released from the account you pre-bound it to. Revoking your install cancels every member link it minted that no investment went through (same release); links an investment went through stand.
|
|
24
|
+
# @param id [String] The member link ID (prefixed, e.g. `il_abc123`). Opaque; do not parse it.
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [MemberLinkEnvelope]
|
|
27
|
+
def cancel_member_link(id, opts = {})
|
|
28
|
+
data, _status_code, _headers = cancel_member_link_with_http_info(id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Cancel a member link
|
|
33
|
+
# Retracts the invitation. Idempotent. The link grants nothing new afterwards: a checkout started after the cancel, including the same member's next investment, is priced at standard terms. Investments already made through the link keep the terms they were made at. A link nobody invested through is also released from the account you pre-bound it to. Revoking your install cancels every member link it minted that no investment went through (same release); links an investment went through stand.
|
|
34
|
+
# @param id [String] The member link ID (prefixed, e.g. `il_abc123`). Opaque; do not parse it.
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(MemberLinkEnvelope, Integer, Hash)>] MemberLinkEnvelope data, response status code and response headers
|
|
37
|
+
def cancel_member_link_with_http_info(id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: MemberLinksApi.cancel_member_link ...'
|
|
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 MemberLinksApi.cancel_member_link"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/member_links/{id}/cancel'.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] || 'MemberLinkEnvelope'
|
|
64
|
+
|
|
65
|
+
# auth_names
|
|
66
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth', 'bearerAuth']
|
|
67
|
+
|
|
68
|
+
new_options = opts.merge(
|
|
69
|
+
:operation => :"MemberLinksApi.cancel_member_link",
|
|
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(:POST, local_var_path, new_options)
|
|
79
|
+
if @api_client.config.debugging
|
|
80
|
+
@api_client.config.logger.debug "API called: MemberLinksApi#cancel_member_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Create a member link
|
|
86
|
+
# Mints a link that sends one of your members to this offering's deal page. It carries no email: it binds to the first Wefunder account that invests through it, whatever address that account uses, or up front when you pass the `wefunder_user_id` of a member whose account you already know. A bound link answers only to its account: anyone else (logged out, or another account) gets no private access and no invited pricing, and is asked to sign in with the invited account. The member gets what an invitation from the offering's manager or founder gets: access to a private round and invited pricing. Pass `reference` (your member id) to make the create idempotent per offering: repeating it returns the live link with 200. The same reference on another offering mints that offering's own link, since a member gets one link per deal. Requires a syndicate- or company-owned token of an app installed on the offering's syndicate or company; user tokens get 404.
|
|
87
|
+
# @param id [String] The offering ID (prefixed, e.g. `ofr_abc123`), on the syndicate or company your app is installed on.
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @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 `POST` requests that create resources.
|
|
90
|
+
# @option opts [CreateOfferingMemberLinkRequest] :create_offering_member_link_request
|
|
91
|
+
# @return [MemberLinkEnvelope]
|
|
92
|
+
def create_offering_member_link(id, opts = {})
|
|
93
|
+
data, _status_code, _headers = create_offering_member_link_with_http_info(id, opts)
|
|
94
|
+
data
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Create a member link
|
|
98
|
+
# Mints a link that sends one of your members to this offering's deal page. It carries no email: it binds to the first Wefunder account that invests through it, whatever address that account uses, or up front when you pass the `wefunder_user_id` of a member whose account you already know. A bound link answers only to its account: anyone else (logged out, or another account) gets no private access and no invited pricing, and is asked to sign in with the invited account. The member gets what an invitation from the offering's manager or founder gets: access to a private round and invited pricing. Pass `reference` (your member id) to make the create idempotent per offering: repeating it returns the live link with 200. The same reference on another offering mints that offering's own link, since a member gets one link per deal. Requires a syndicate- or company-owned token of an app installed on the offering's syndicate or company; user tokens get 404.
|
|
99
|
+
# @param id [String] The offering ID (prefixed, e.g. `ofr_abc123`), on the syndicate or company your app is installed on.
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @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 `POST` requests that create resources.
|
|
102
|
+
# @option opts [CreateOfferingMemberLinkRequest] :create_offering_member_link_request
|
|
103
|
+
# @return [Array<(MemberLinkEnvelope, Integer, Hash)>] MemberLinkEnvelope data, response status code and response headers
|
|
104
|
+
def create_offering_member_link_with_http_info(id, opts = {})
|
|
105
|
+
if @api_client.config.debugging
|
|
106
|
+
@api_client.config.logger.debug 'Calling API: MemberLinksApi.create_offering_member_link ...'
|
|
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 MemberLinksApi.create_offering_member_link"
|
|
111
|
+
end
|
|
112
|
+
# resource path
|
|
113
|
+
local_var_path = '/offerings/{id}/member_links'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
114
|
+
|
|
115
|
+
# query parameters
|
|
116
|
+
query_params = opts[:query_params] || {}
|
|
117
|
+
|
|
118
|
+
# header parameters
|
|
119
|
+
header_params = opts[:header_params] || {}
|
|
120
|
+
# HTTP header 'Accept' (if needed)
|
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
122
|
+
# HTTP header 'Content-Type'
|
|
123
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
124
|
+
if !content_type.nil?
|
|
125
|
+
header_params['Content-Type'] = content_type
|
|
126
|
+
end
|
|
127
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
128
|
+
|
|
129
|
+
# form parameters
|
|
130
|
+
form_params = opts[:form_params] || {}
|
|
131
|
+
|
|
132
|
+
# http body (model)
|
|
133
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_offering_member_link_request'])
|
|
134
|
+
|
|
135
|
+
# return_type
|
|
136
|
+
return_type = opts[:debug_return_type] || 'MemberLinkEnvelope'
|
|
137
|
+
|
|
138
|
+
# auth_names
|
|
139
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth', 'bearerAuth']
|
|
140
|
+
|
|
141
|
+
new_options = opts.merge(
|
|
142
|
+
:operation => :"MemberLinksApi.create_offering_member_link",
|
|
143
|
+
:header_params => header_params,
|
|
144
|
+
:query_params => query_params,
|
|
145
|
+
:form_params => form_params,
|
|
146
|
+
:body => post_body,
|
|
147
|
+
:auth_names => auth_names,
|
|
148
|
+
:return_type => return_type
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: MemberLinksApi#create_offering_member_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Get a member link
|
|
159
|
+
# A member link your install minted, with its live `state`. Links minted by another app answer 404.
|
|
160
|
+
# @param id [String] The member link ID (prefixed, e.g. `il_abc123`). Opaque; do not parse it.
|
|
161
|
+
# @param [Hash] opts the optional parameters
|
|
162
|
+
# @return [MemberLinkEnvelope]
|
|
163
|
+
def get_member_link(id, opts = {})
|
|
164
|
+
data, _status_code, _headers = get_member_link_with_http_info(id, opts)
|
|
165
|
+
data
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Get a member link
|
|
169
|
+
# A member link your install minted, with its live `state`. Links minted by another app answer 404.
|
|
170
|
+
# @param id [String] The member link ID (prefixed, e.g. `il_abc123`). Opaque; do not parse it.
|
|
171
|
+
# @param [Hash] opts the optional parameters
|
|
172
|
+
# @return [Array<(MemberLinkEnvelope, Integer, Hash)>] MemberLinkEnvelope data, response status code and response headers
|
|
173
|
+
def get_member_link_with_http_info(id, opts = {})
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug 'Calling API: MemberLinksApi.get_member_link ...'
|
|
176
|
+
end
|
|
177
|
+
# verify the required parameter 'id' is set
|
|
178
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
179
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling MemberLinksApi.get_member_link"
|
|
180
|
+
end
|
|
181
|
+
# resource path
|
|
182
|
+
local_var_path = '/member_links/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
183
|
+
|
|
184
|
+
# query parameters
|
|
185
|
+
query_params = opts[:query_params] || {}
|
|
186
|
+
|
|
187
|
+
# header parameters
|
|
188
|
+
header_params = opts[:header_params] || {}
|
|
189
|
+
# HTTP header 'Accept' (if needed)
|
|
190
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
191
|
+
|
|
192
|
+
# form parameters
|
|
193
|
+
form_params = opts[:form_params] || {}
|
|
194
|
+
|
|
195
|
+
# http body (model)
|
|
196
|
+
post_body = opts[:debug_body]
|
|
197
|
+
|
|
198
|
+
# return_type
|
|
199
|
+
return_type = opts[:debug_return_type] || 'MemberLinkEnvelope'
|
|
200
|
+
|
|
201
|
+
# auth_names
|
|
202
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth', 'bearerAuth']
|
|
203
|
+
|
|
204
|
+
new_options = opts.merge(
|
|
205
|
+
:operation => :"MemberLinksApi.get_member_link",
|
|
206
|
+
:header_params => header_params,
|
|
207
|
+
:query_params => query_params,
|
|
208
|
+
:form_params => form_params,
|
|
209
|
+
:body => post_body,
|
|
210
|
+
:auth_names => auth_names,
|
|
211
|
+
:return_type => return_type
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
215
|
+
if @api_client.config.debugging
|
|
216
|
+
@api_client.config.logger.debug "API called: MemberLinksApi#get_member_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
217
|
+
end
|
|
218
|
+
return data, status_code, headers
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# List member links
|
|
222
|
+
# The member links **your install** minted on this offering, newest first. Another app installed on the same offering never sees them, and they never appear in `/invite_links`. Requires a syndicate- or company-owned token of an app installed on the offering's syndicate or company.
|
|
223
|
+
# @param id [String] The offering ID (prefixed, e.g. `ofr_abc123`), on the syndicate or company your app is installed on.
|
|
224
|
+
# @param [Hash] opts the optional parameters
|
|
225
|
+
# @option opts [Integer] :cursor Cursor-based pagination token. Use the `next_cursor` value from the previous response's `meta` object to retrieve the next page of results. Omit this parameter to retrieve the first page.
|
|
226
|
+
# @return [MemberLinkListEnvelope]
|
|
227
|
+
def list_offering_member_links(id, opts = {})
|
|
228
|
+
data, _status_code, _headers = list_offering_member_links_with_http_info(id, opts)
|
|
229
|
+
data
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# List member links
|
|
233
|
+
# The member links **your install** minted on this offering, newest first. Another app installed on the same offering never sees them, and they never appear in `/invite_links`. Requires a syndicate- or company-owned token of an app installed on the offering's syndicate or company.
|
|
234
|
+
# @param id [String] The offering ID (prefixed, e.g. `ofr_abc123`), on the syndicate or company your app is installed on.
|
|
235
|
+
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @option opts [Integer] :cursor Cursor-based pagination token. Use the `next_cursor` value from the previous response's `meta` object to retrieve the next page of results. Omit this parameter to retrieve the first page.
|
|
237
|
+
# @return [Array<(MemberLinkListEnvelope, Integer, Hash)>] MemberLinkListEnvelope data, response status code and response headers
|
|
238
|
+
def list_offering_member_links_with_http_info(id, opts = {})
|
|
239
|
+
if @api_client.config.debugging
|
|
240
|
+
@api_client.config.logger.debug 'Calling API: MemberLinksApi.list_offering_member_links ...'
|
|
241
|
+
end
|
|
242
|
+
# verify the required parameter 'id' is set
|
|
243
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
244
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling MemberLinksApi.list_offering_member_links"
|
|
245
|
+
end
|
|
246
|
+
# resource path
|
|
247
|
+
local_var_path = '/offerings/{id}/member_links'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
248
|
+
|
|
249
|
+
# query parameters
|
|
250
|
+
query_params = opts[:query_params] || {}
|
|
251
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
252
|
+
|
|
253
|
+
# header parameters
|
|
254
|
+
header_params = opts[:header_params] || {}
|
|
255
|
+
# HTTP header 'Accept' (if needed)
|
|
256
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
257
|
+
|
|
258
|
+
# form parameters
|
|
259
|
+
form_params = opts[:form_params] || {}
|
|
260
|
+
|
|
261
|
+
# http body (model)
|
|
262
|
+
post_body = opts[:debug_body]
|
|
263
|
+
|
|
264
|
+
# return_type
|
|
265
|
+
return_type = opts[:debug_return_type] || 'MemberLinkListEnvelope'
|
|
266
|
+
|
|
267
|
+
# auth_names
|
|
268
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth', 'bearerAuth']
|
|
269
|
+
|
|
270
|
+
new_options = opts.merge(
|
|
271
|
+
:operation => :"MemberLinksApi.list_offering_member_links",
|
|
272
|
+
:header_params => header_params,
|
|
273
|
+
:query_params => query_params,
|
|
274
|
+
:form_params => form_params,
|
|
275
|
+
:body => post_body,
|
|
276
|
+
:auth_names => auth_names,
|
|
277
|
+
:return_type => return_type
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
281
|
+
if @api_client.config.debugging
|
|
282
|
+
@api_client.config.logger.debug "API called: MemberLinksApi#list_offering_member_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
283
|
+
end
|
|
284
|
+
return data, status_code, headers
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
end
|