Sha256: 7d245594ad9c752c97c432c42a3273bb7cf845fa67a4a0f6605706d121545434

Contents?: true

Size: 1.47 KB

Versions: 1

Compression:

Stored size: 1.47 KB

Contents

# frozen_string_literal: true

require 'logger'

module CzechPostB2bClient
  class Configuration
    attr_accessor :customer_id,
                  :contract_id,
                  :sending_post_office_code,
                  :sending_post_office_location_number,
                  :certificate_path,
                  :private_key_password,
                  :private_key_path,
                  :namespaces,
                  :language,
                  :logger,
                  :b2b_api_base_uri,
                  :print_options,
                  :custom_card_number

    def initialize
      # set defaults here

      # ours, accessible, but maybe out of date, for test usage
      @namespaces = {
        'xmlns' => 'https://b2b.postaonline.cz/schema/B2BCommon-v1',
        'xmlns:ns2' => 'https://b2b.postaonline.cz/schema/POLServices-v1',
        'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
        'xsi:noNamespaceSchemaLocation' => 'https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/latest_xsds/B2BCommon.xsd',
        'xsi:schemaLocation' => 'https://b2b.postaonline.cz/schema/POLServices-v1 https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/latest_xsds/B2BPOLServices.xsd'
      }

      @language = :cs
      @logger = defined?(Rails) ? ::Rails.logger : ::Logger.new(STDOUT)
      @b2b_api_base_uri = 'https://b2b.postaonline.cz/services/POLService/v1'
      @sending_post_office_location_number = 1
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
czech_post_b2b_client-1.2.3 lib/czech_post_b2b_client/configuration.rb