Sha256: 50f3b72fa23d15642f7194b674262cf2d684d80f51ff156cab9e24b2a8c6f524
Contents?: true
Size: 1019 Bytes
Versions: 12
Compression:
Stored size: 1019 Bytes
Contents
# frozen_string_literal: true module Mailersend # Inbound routing endpoint from MailerSend API. class InboundRouting attr_accessor :client, :domain_id, :page, :limit, :inbound_id, :settings def initialize(client = Mailersend::Client.new) @client = client @domain_id = domain_id @page = page @limit = limit @inbound_id = inbound_id @settings = [] end def get_inbound_routes(*) client.http.get("#{API_URL}/inbound") end def get_single_route(inbound_id:) client.http.get("#{API_URL}/inbound/#{inbound_id}") end def add_inbound_route client.http.post("#{API_URL}/inbound", json: @settings) end def update_inbound_route(inbound_id:) client.http.put("#{API_URL}/inbound/#{inbound_id}", json: @settings) end def delete_route(inbound_id:) client.http.delete("#{API_URL}/inbound/#{inbound_id}") end end end
Version data entries
12 entries across 12 versions & 1 rubygems