Sha256: ada143abec3625f7aaf8bc843ef3a108a7b1fa2ffe3b1f12567210148e1d9c11
Contents?: true
Size: 849 Bytes
Versions: 2
Compression:
Stored size: 849 Bytes
Contents
# -*- encoding: utf-8 -*- module SendGrid4r::REST module Settings # # SendGrid Web API v3 Settings - EnforcedTls # module EnforcedTls include Request EnforcedTls = Struct.new(:require_tls, :require_valid_cert) def self.create_enforced_tls(resp) return resp if resp.nil? EnforcedTls.new(resp['require_tls'], resp['require_valid_cert']) end def self.url "#{BASE_URL}/user/settings/enforced_tls" end def get_enforced_tls(&block) resp = get(@auth, Settings::EnforcedTls.url, &block) Settings::EnforcedTls.create_enforced_tls(resp) end def patch_enforced_tls(params:, &block) resp = patch(@auth, Settings::EnforcedTls.url, params.to_h, &block) Settings::EnforcedTls.create_enforced_tls(resp) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sendgrid4r-1.11.0 | lib/sendgrid4r/rest/settings/enforced_tls.rb |
sendgrid4r-1.10.0 | lib/sendgrid4r/rest/settings/enforced_tls.rb |