-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Beta Tester Invitation endpoints
- Loading branch information
Zoltan Ormandi
committed
Apr 29, 2023
1 parent
70d049b
commit 0e85181
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
lib/app_store_connect_api/client/beta_tester_invitations.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
module AppStoreConnectApi | ||
class Client | ||
module BetaTesterInvitations | ||
# @see https://developer.apple.com/documentation/appstoreconnectapi/send_an_invitation_to_a_beta_tester | ||
def create_beta_tester_invitation(relationships) | ||
create '/v1/betaTesterInvitations', data: { relationships: Utils::RelationshipMapper.expand(relationships), | ||
type: 'betaTesterInvitations' } | ||
end | ||
end | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
spec/app_store_connect_api/client/beta_tester_invitations_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe AppStoreConnectApi::Client::BetaTesterInvitations, :api do | ||
describe '#create_beta_tester_intivation' do | ||
subject { client.create_beta_tester_invitation app: 'app-id', beta_tester: 'beta-tester-id' } | ||
|
||
it_behaves_like 'a CREATE endpoint', url: 'https://api.appstoreconnect.apple.com/v1/betaTesterInvitations', | ||
body: { | ||
data: { relationships: { app: { data: { id: 'app-id', type: 'apps' } }, | ||
betaTester: { data: { id: 'beta-tester-id', type: 'betaTesters' } } }, | ||
type: 'betaTesterInvitations' } | ||
} | ||
end | ||
end |