Module: AppleID::API::UserMigration

Included in:
AppleID::AccessToken
Defined in:
lib/apple_id/api/user_migration.rb

Instance Method Summary collapse

Instance Method Details

#transfer_from!(transfer_sub:) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/apple_id/api/user_migration.rb', line 4

def transfer_from!(transfer_sub:)
  resource_request do
    post(
      user_migration_endpoint,
      transfer_sub:  transfer_sub,
      client_id:     client.identifier,
      client_secret: client.secret
    )
  end
end

#transfer_to!(sub:, target:) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/apple_id/api/user_migration.rb', line 15

def transfer_to!(sub:, target:)
  resource_request do
    post(
      user_migration_endpoint,
      sub:           sub,
      target:        client.team_id,
      client_id:     client.identifier,
      client_secret: client.secret
    )
  end
end