stytch 0.2.1 → 1.0.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: e6c9a3df7973de6e5cca7aafee8cbbb439b6966de47f221fa3103971fa5a7191
4
- data.tar.gz: 423480baba3d5cc878a0ab2dbb203bd9f63f0a27bc68fef2724d21423755846e
3
+ metadata.gz: f31f4c1727653f8dbdd402bb9e97d31ed7893f537c7f98923b3abfa6d1bbcc14
4
+ data.tar.gz: a3cdadaa143fcfc4e0d72b1d0f0e35246a254ff8482c56627fa6d7cb6cb2e898
5
5
  SHA512:
6
- metadata.gz: f6195850d5e3aae1eb17da784ea57fc849eeeb01e2fe7681326010e6253187a0a2038cb947f4de726d45f83d6cdbec91f8a6bd8b9018f34a118a4ed909001b6a
7
- data.tar.gz: e6270719f8a97deb931efc6a080180d09c5ed7d4f1bb11b79681c96de4f028b4e6e83be2b28f02382e158b69129cdfbf8243acfe401fb5a9084b8e7c94d1a610
6
+ metadata.gz: 56aec4b2699da311092641a43150259a8315ff6c53a460377910dddebffb8c5f02986481a8ef9b8851bb40e25dfb46805b058055bef59b68d6a1d1b688c438fc
7
+ data.tar.gz: 07c8003263f90593c7c9e86920b8d866621e2890fb477e4d3b05eeb80c56b23c2cfab5913db80b76fe0b4be8d6260e26ce877f2000e8e3686515fce6a5867e5b
@@ -3,37 +3,22 @@ module Stytch
3
3
  module Magic
4
4
  PATH = "/v1/magic_links".freeze
5
5
 
6
- def send_magic(
7
- method_id:,
8
- user_id:,
9
- magic_link_url:,
10
- expiration_minutes: nil,
11
- attributes: {}
12
- )
13
- request = {
14
- method_id: method_id,
15
- user_id: user_id,
16
- magic_link_url: magic_link_url,
17
- }
18
-
19
- request[:expiration_minutes] = expiration_minutes if expiration_minutes != nil
20
- request[:attributes] = attributes if attributes != {}
21
-
22
- post("#{PATH}/send", request)
23
- end
24
-
25
6
  def send_magic_by_email(
26
7
  email:,
27
- magic_link_url:,
28
- expiration_minutes: nil,
8
+ login_magic_link_url:,
9
+ signup_magic_link_url:,
10
+ login_expiration_minutes: nil,
11
+ signup_expiration_minutes: nil,
29
12
  attributes: {}
30
13
  )
31
14
  request = {
32
15
  email: email,
33
- magic_link_url: magic_link_url,
16
+ login_magic_link_url: login_magic_link_url,
17
+ signup_magic_link_url: signup_magic_link_url,
34
18
  }
35
19
 
36
- request[:expiration_minutes] = expiration_minutes if expiration_minutes != nil
20
+ request[:login_expiration_minutes] = login_expiration_minutes if login_expiration_minutes != nil
21
+ request[:signup_expiration_minutes] = signup_expiration_minutes if signup_expiration_minutes != nil
37
22
  request[:attributes] = attributes if attributes != {}
38
23
 
39
24
  post("#{PATH}/send_by_email", request)
@@ -65,18 +50,18 @@ module Stytch
65
50
 
66
51
  def invite_by_email(
67
52
  email:,
68
- magic_link_url:,
69
- expiration_minutes: nil,
53
+ invite_magic_link_url:,
54
+ invite_expiration_minutes: nil,
70
55
  attributes: {},
71
56
  name: {}
72
57
  )
73
58
 
74
59
  request = {
75
60
  email: email,
76
- magic_link_url: magic_link_url,
61
+ invite_magic_link_url: invite_magic_link_url,
77
62
  }
78
63
 
79
- request[:expiration_minutes] = expiration_minutes if expiration_minutes != nil
64
+ request[:invite_expiration_minutes] = invite_expiration_minutes if invite_expiration_minutes != nil
80
65
  request[:attributes] = attributes if attributes != {}
81
66
  request[:name] = name if name != {}
82
67
 
@@ -25,11 +25,13 @@ module Stytch
25
25
  email: nil,
26
26
  phone_number: nil,
27
27
  name: {},
28
+ create_user_as_pending: false,
28
29
  attributes: {}
29
30
  )
30
31
  request = {
31
32
  email: email,
32
- phone_number: phone_number
33
+ phone_number: phone_number,
34
+ create_user_as_pending: create_user_as_pending
33
35
  }
34
36
 
35
37
  request[:name] = name if name != {}
@@ -1,3 +1,3 @@
1
1
  module Stytch
2
- VERSION = "0.2.1"
2
+ VERSION = "1.0.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.2.1
4
+ version: 1.0.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-12 00:00:00.000000000 Z
11
+ date: 2021-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday