class CzechPostB2bClient::Configuration

Attributes

b2b_api_base_uri[RW]
certificate_path[RW]
contract_id[RW]
custom_card_number[RW]
customer_id[RW]
language[RW]
log_messages_at_least_as[RW]
logger[RW]
namespaces[RW]
print_options[RW]
private_key_password[RW]
private_key_path[RW]
sending_post_office_code[RW]
sending_post_office_location_number[RW]

Public Class Methods

new() click to toggle source
# File lib/czech_post_b2b_client/configuration.rb, line 22
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

  # set this to :error in production for API debug logs in production.log
  @log_messages_at_least_as = :debug # so all logs keeps their level
end