Class: StytchB2B::MagicLinks::Email::InviteRequestOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/stytch/b2b_magic_links.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorization: nil) ⇒ InviteRequestOptions

Returns a new instance of InviteRequestOptions.



159
160
161
162
163
# File 'lib/stytch/b2b_magic_links.rb', line 159

def initialize(
  authorization: nil
)
  @authorization = authorization
end

Instance Attribute Details

#authorizationObject

Optional authorization object. Pass in an active Stytch Member session token or session JWT and the request will be run using that member’s permissions.



157
158
159
# File 'lib/stytch/b2b_magic_links.rb', line 157

def authorization
  @authorization
end

Instance Method Details

#to_headersObject



165
166
167
168
169
# File 'lib/stytch/b2b_magic_links.rb', line 165

def to_headers
  headers = {}
  headers.merge!(@authorization.to_headers) if authorization
  headers
end