Sha256: db5cc4cb4f625a517674dfed2271f3c586712c1c91d858dbdf050ae2cb378863

Contents?: true

Size: 752 Bytes

Versions: 14

Compression:

Stored size: 752 Bytes

Contents

module Desk
  class Client
    module Mailbox

      def mailbox_list_inbound(*args)
        options = args.last.is_a?(Hash) ? args.pop : {}
        get("mailboxes/inbound", options)
      end
      alias_method :inbound_mailboxes, :mailbox_list_inbound
      alias_method :list_inbound_mailboxes, :mailbox_list_inbound

      def mailbox_show_inbound(mailbox_id)
        get("mailboxes/inbound/#{mailbox_id}")
      end
      alias_method :inbound_mailbox, :mailbox_show_inbound
      alias_method :show_inbound_mailbox, :mailbox_show_inbound

      def mailbox_id_inbound(href, parent_id = false)
        return nil if parent_id
        href.split("/")[5].to_i
      end
      alias_method :inbound_mailbox_id, :mailbox_id_inbound

    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
desk-1.2.0 lib/desk/client/mailbox.rb
desk-1.1.1 lib/desk/client/mailbox.rb
desk-1.1.0 lib/desk/client/mailbox.rb
desk-1.0.10 lib/desk/client/mailbox.rb
desk-1.0.9 lib/desk/client/mailbox.rb
desk-1.0.8 lib/desk/client/mailbox.rb
desk-1.0.7 lib/desk/client/mailbox.rb
desk-1.0.6 lib/desk/client/mailbox.rb
desk-1.0.5 lib/desk/client/mailbox.rb
desk-1.0.4 lib/desk/client/mailbox.rb
desk-1.0.3 lib/desk/client/mailbox.rb
desk-1.0.2 lib/desk/client/mailbox.rb
desk-1.0.1 lib/desk/client/mailbox.rb
desk-1.0.0 lib/desk/client/mailbox.rb