stytch 0.1.21 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f7f81b30c19471d94ea6c9c3dac52b2e50485bedd40429b66e395dd272aa2ee
4
- data.tar.gz: 49ea0b78ec5b829011f2d3b2519b5d8abb1327d913ec7eb9bc678edd7bbe1976
3
+ metadata.gz: d64be302698661b1c67aa6bc25276bf60e3963f686eb8f82788652ab765c62c8
4
+ data.tar.gz: 1073eeb1593ed3289cbb86105f44785eb35f803c36a0f89a7882bdef43161e0d
5
5
  SHA512:
6
- metadata.gz: 510b3a0466324f2349198f92ebb316e851d059f57f28ea2f349ac72d49b3ba01d721362cd613236b792472ade599bc6b2773d3f5c77f1e6844095a7d846bb3b8
7
- data.tar.gz: a260451b3ed384fcec781780bde436699ac4ebb2ea24d8bc55f594cf1bb8982583f22d58dc5fe4dcdf9de6da7adfbb333f4c989f4ed5d0b75dc6c1dca2486df7
6
+ metadata.gz: 20322948ece90536400226cf146b60695986217c9757b9cd6b786551d7d4c2d111740390a68dd447549463d55eaa46b39d1cd2f71d93b8f88784726b88193eb3
7
+ data.tar.gz: 1f736fbdd2c71ba191544e9d3ee18dc0b5468e7cd38f088a7979d5ee351fc31df32f2b366a7202f7a726900faa48036019b1deb8ad821ec69ad9b0faf2f39ec6
@@ -4,16 +4,16 @@ module Stytch
4
4
  PATH = "/v1/magic_links".freeze
5
5
 
6
6
  def send_magic(
7
- method_id:,
8
- user_id:,
9
- magic_link_url:,
10
- expiration_minutes: nil,
11
- attributes: {}
7
+ method_id:,
8
+ user_id:,
9
+ magic_link_url:,
10
+ expiration_minutes: nil,
11
+ attributes: {}
12
12
  )
13
13
  request = {
14
- method_id: method_id,
15
- user_id: user_id,
16
- magic_link_url: magic_link_url,
14
+ method_id: method_id,
15
+ user_id: user_id,
16
+ magic_link_url: magic_link_url,
17
17
  }
18
18
 
19
19
  request[:expiration_minutes] = expiration_minutes if expiration_minutes != nil
@@ -23,14 +23,14 @@ module Stytch
23
23
  end
24
24
 
25
25
  def send_magic_by_email(
26
- email:,
27
- magic_link_url:,
28
- expiration_minutes: nil,
29
- attributes: {}
26
+ email:,
27
+ magic_link_url:,
28
+ expiration_minutes: nil,
29
+ attributes: {}
30
30
  )
31
31
  request = {
32
- email: email,
33
- magic_link_url: magic_link_url,
32
+ email: email,
33
+ magic_link_url: magic_link_url,
34
34
  }
35
35
 
36
36
  request[:expiration_minutes] = expiration_minutes if expiration_minutes != nil
@@ -95,9 +95,9 @@ module Stytch
95
95
  end
96
96
 
97
97
  def authenticate_magic(
98
- token:,
99
- attributes: {},
100
- options: {}
98
+ token:,
99
+ attributes: {},
100
+ options: {}
101
101
  )
102
102
  request = {}
103
103
 
@@ -4,13 +4,13 @@ module Stytch
4
4
  PATH = "/v1/otp".freeze
5
5
 
6
6
  def send_otp_by_sms(
7
- phone_number:,
8
- expiration_minutes: nil,
9
- attributes: {}
7
+ phone_number:,
8
+ expiration_minutes: nil,
9
+ attributes: {}
10
10
  )
11
11
  request = {
12
- phone_number: phone_number,
13
- expiration_minutes: expiration_minutes,
12
+ phone_number: phone_number,
13
+ expiration_minutes: expiration_minutes,
14
14
  }
15
15
 
16
16
  request[:attributes] = attributes if attributes != {}
@@ -19,15 +19,15 @@ module Stytch
19
19
  end
20
20
 
21
21
  def login_or_create_user_by_sms(
22
- phone_number:,
23
- expiration_minutes: nil,
24
- attributes: {},
25
- create_user_as_pending: false
22
+ phone_number:,
23
+ expiration_minutes: nil,
24
+ attributes: {},
25
+ create_user_as_pending: false
26
26
  )
27
27
  request = {
28
- phone_number: phone_number,
29
- expiration_minutes: expiration_minutes,
30
- create_user_as_pending: create_user_as_pending
28
+ phone_number: phone_number,
29
+ expiration_minutes: expiration_minutes,
30
+ create_user_as_pending: create_user_as_pending
31
31
  }
32
32
 
33
33
  request[:attributes] = attributes if attributes != {}
@@ -36,14 +36,14 @@ module Stytch
36
36
  end
37
37
 
38
38
  def authenticate_otp(
39
- method_id:,
40
- code:,
41
- attributes: {},
42
- options: {}
39
+ method_id:,
40
+ code:,
41
+ attributes: {},
42
+ options: {}
43
43
  )
44
44
  request = {
45
- method_id: method_id,
46
- code: code,
45
+ method_id: method_id,
46
+ code: code,
47
47
  }
48
48
 
49
49
  request[:attributes] = attributes if attributes != {}
@@ -8,8 +8,8 @@ module Stytch
8
8
  end
9
9
 
10
10
  def get_pending_users(
11
- limit: nil,
12
- starting_after_id: nil
11
+ limit: nil,
12
+ starting_after_id: nil
13
13
  )
14
14
  query_params = {
15
15
  limit: limit,
@@ -22,10 +22,10 @@ module Stytch
22
22
  end
23
23
 
24
24
  def create_user(
25
- email:,
26
- phone_number: nil,
27
- name: {},
28
- attributes: {}
25
+ email:,
26
+ phone_number: nil,
27
+ name: {},
28
+ attributes: {}
29
29
  )
30
30
  request = {
31
31
  email: email,
@@ -46,8 +46,8 @@ module Stytch
46
46
  attributes: {}
47
47
  )
48
48
  request = {
49
- emails: format_emails(emails),
50
- phone_numbers: format_phone_numbers(phone_numbers),
49
+ emails: format_emails(emails),
50
+ phone_numbers: format_phone_numbers(phone_numbers),
51
51
  }
52
52
 
53
53
  request[:name] = name if name != {}
@@ -61,14 +61,13 @@ module Stytch
61
61
  end
62
62
 
63
63
  def delete_user_email(
64
- user_id:,
65
- email:
64
+ email_id:
66
65
  )
67
- delete("#{PATH}/#{user_id}/emails/#{email}")
66
+ delete("#{PATH}/emails/#{email_id}")
68
67
  end
69
68
 
70
69
  def delete_user_phone_number(
71
- phone_id:
70
+ phone_id:
72
71
  )
73
72
  delete("#{PATH}/phone_numbers/#{phone_id}")
74
73
  end
@@ -1,3 +1,3 @@
1
1
  module Stytch
2
- VERSION = "0.1.21"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stytch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - alex-stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-04 00:00:00.000000000 Z
11
+ date: 2021-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday