Sha256: 822890b574f62b86fd0eb0b22b031341d1a815e2099991c7c1bb8c71ee9b477e

Contents?: true

Size: 1.21 KB

Versions: 28

Compression:

Stored size: 1.21 KB

Contents

module AchClient
  class ICheckGateway
    # ICheckGateway credentials for your company
    class CompanyInfo < Abstract::CompanyInfo
      attr_reader :api_key,
                  :site_i_d,
                  :site_key,
                  :live

      ##
      # @param api_key [String] your ICheckGateway API key
      # @param site_i_d [String] your ICheckGateway SiteID
      # @param site_key [String] your ICheckGateway SiteKey
      # @param live [Boolean] "GatewayLiveMode" value
      def initialize(
        api_key:,
        site_i_d:,
        site_key:,
        live:
      )
        @api_key = api_key
        @site_i_d = site_i_d
        @site_key = site_key
        @live = live
      end

      ##
      # @return [CompanyInfo] instance built from configuration values
      def self.build
        build_from_config([
          :api_key,
          :live,
          :site_i_d,
          :site_key
        ])
      end

      ##
      # Build a hash to send to ICheckGateway
      # @return [Hash] hash to send to ICheckGateway
      def to_hash
        {
          SiteID: @site_i_d,
          SiteKey: @site_key,
          APIKey: @api_key,
          GatewayLiveMode: @live ? '1' : '0'
        }
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ach_client-5.3.2 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-5.3.1 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-5.3.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-5.2.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-5.1.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-5.0.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-4.0.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-3.1.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-3.0.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-2.1.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-2.0.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-1.1.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-1.0.3 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-1.0.2 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-1.0.1 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-1.0.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-0.7.0 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-0.6.8 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-0.6.7 lib/ach_client/providers/soap/i_check_gateway/company_info.rb
ach_client-0.6.6 lib/ach_client/providers/soap/i_check_gateway/company_info.rb