Skip to content

Commit f0f50eb

Browse files
authored
create_initial_subscription removed (#1155)
create_initial_subscription removed
1 parent f425b9e commit f0f50eb

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

lib/travis/api/app/endpoint/authorization.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ class Authorization < Endpoint
106106
get '/handshake/?:provider?' do
107107
method = org? ? :handshake : :vcs_handshake
108108
params[:provider] ||= 'github'
109-
110109
send(method) do |user, token, redirect_uri|
111110
if target_ok? redirect_uri
112111
content_type :html
@@ -178,7 +177,6 @@ def handshake
178177
token = generate_token(user: user, app_id: 0)
179178
payload = params[:state].split(":::", 2)[1]
180179
update_first_login(user)
181-
user.create_initial_subscription
182180
yield serialize_user(user), token, payload
183181
else
184182
values[:state] = create_state
@@ -213,7 +211,6 @@ def vcs_handshake
213211

214212
user = User.find(vcs_data['user']['id'])
215213
update_first_login(user)
216-
user.create_initial_subscription
217214
yield serialize_user(user), vcs_data['token'], payload(params[:provider])
218215
else
219216
state = vcs_create_state(params[:origin] || params[:redirect_uri])

lib/travis/api/v3/billing_client.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,6 @@ def create_subscription(subscription_data)
100100
handle_subscription_response(response)
101101
end
102102

103-
def create_initial_v2_subscription
104-
response = connection.post('/v2/initial_subscription')
105-
handle_v2_subscription_response(response)
106-
end
107-
108103
def create_v2_subscription(subscription_data)
109104
response = connection.post('/v2/subscriptions', subscription_data)
110105
handle_v2_subscription_response(response)

lib/travis/api/v3/models/user.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,5 @@ def installation
8282
def github?
8383
vcs_type == 'GithubUser'
8484
end
85-
86-
def create_initial_subscription
87-
return if Travis.config.org?
88-
89-
client = BillingClient.new(id)
90-
client.create_initial_v2_subscription
91-
end
9285
end
9386
end

lib/travis/model/user.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,6 @@ def github?
170170
vcs_type == 'GithubUser'
171171
end
172172

173-
def create_initial_subscription
174-
return if Travis.config.org?
175-
176-
client = Travis::API::V3::BillingClient.new(id)
177-
client.create_initial_v2_subscription
178-
end
179-
180173
protected
181174

182175
def track_previous_changes

0 commit comments

Comments
 (0)