Module: Notifications

Defined in:
lib/notifications/client/version.rb,
lib/notifications/client.rb,
lib/notifications/client/speaker.rb,
lib/notifications/client/notification.rb,
lib/notifications/client/received_text.rb,
lib/notifications/client/request_error.rb,
lib/notifications/client/helper_methods.rb,
lib/notifications/client/uuid_validator.rb,
lib/notifications/client/template_preview.rb,
lib/notifications/client/response_template.rb,
lib/notifications/client/template_collection.rb,
lib/notifications/client/response_notification.rb,
lib/notifications/client/notifications_collection.rb,
lib/notifications/client/received_text_collection.rb,
lib/notifications/client/response_precompiled_letter.rb

Overview

Version numbering follows Semantic Versionning:

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes,

  • MINOR version when you add functionality in a backwards-compatible manner, and

  • PATCH version when you make backwards-compatible bug fixes.

semver.org/

Defined Under Namespace

Classes: Client, UuidValidator

Class Method Summary collapse

Class Method Details

.prepare_upload(file) ⇒ Object

Raises:

  • (ArgumentError)


4
5
6
7
8
# File 'lib/notifications/client/helper_methods.rb', line 4

def self.prepare_upload(file)
  raise ArgumentError.new("Document is larger than 2MB") if file.size > Client::MAX_FILE_UPLOAD_SIZE

  { file: Base64.strict_encode64(file.read) }
end