Sha256: 471beed831cc7d6b0026b07531c7b5999b43303c99e87a8e8f2d4dd792212218
Contents?: true
Size: 1.51 KB
Versions: 2
Compression:
Stored size: 1.51 KB
Contents
require 'base64' require 'json' require 'tempfile' require 'openssl' require 'time' require 'faraday' require 'active_support/core_ext/hash/indifferent_access' require 'mime/types/full' require 'phaxio/version' require 'phaxio/config' require 'phaxio/client' require 'phaxio/error' require 'phaxio/resource' require 'phaxio/resources' Dir[File.expand_path(File.join('..', 'phaxio', 'helpers', '*.rb'), __FILE__)].each do |file| require file end %w[ fax_recipient fax account callback webhook phax_code phone_number public ata port_number_note port_number port_order ].each do |filename| require File.expand_path(File.join('..', 'phaxio', 'resources', filename), __FILE__) end module Phaxio include Resources class << self # @!attribute api_key # @see Config.api_key # @!attribute api_secret # @see Config.api_secret # @!attribute webhook_token # @see Config.webhook_token # @!attribute callback_token # @see Config.webhook_token # @!attribute api_endpoint # @see Config.api_endpoint %w(api_key api_secret webhook_token callback_token api_endpoint).each do |config_attribute| # Define getters define_method(config_attribute) do Config.public_send config_attribute end # Define setters setter = "#{config_attribute}=" define_method(setter) do |value| Config.public_send setter, value end end # for backwards compatibility alias callback_token webhook_token alias callback_token= webhook_token= end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
phaxio-2.1.1 | lib/phaxio.rb |
phaxio-2.1.0 | lib/phaxio.rb |