Class: CzechPostB2bClient::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/czech_post_b2b_client/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/czech_post_b2b_client/configuration.rb', line 19

def initialize
  # set defaults here

  # ours, accessible, but maybe out of date, for test usage
  @namespaces = {
    'xmlns' => 'https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/B2B_CP_POL_2020-05-21/B2BCommon-v1.1.xsd',
    'xmlns:ns2' => 'https://raw.githubusercontent.com/foton/czech_post_b2b_client/master/documents/B2B_CP_POL_2020-05-21/B2B-POLServices-v1.8.xsd'
  }
  # original, accessible only with setup certificates
  @namespaces = {
    'xmlns' => 'https://b2b.postaonline.cz/schema/B2BCommon-v1',
    'xmlns:ns2' => 'https://b2b.postaonline.cz/schema/POLServices-v1'
  }
  @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

Instance Attribute Details

#b2b_api_base_uriObject

Returns the value of attribute b2b_api_base_uri.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def b2b_api_base_uri
  @b2b_api_base_uri
end

#certificate_pathObject

Returns the value of attribute certificate_path.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def certificate_path
  @certificate_path
end

#contract_idObject

Returns the value of attribute contract_id.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def contract_id
  @contract_id
end

#customer_idObject

Returns the value of attribute customer_id.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def customer_id
  @customer_id
end

#languageObject

Returns the value of attribute language.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def language
  @language
end

#loggerObject

Returns the value of attribute logger.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def logger
  @logger
end

#namespacesObject

Returns the value of attribute namespaces.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def namespaces
  @namespaces
end

#private_key_passwordObject

Returns the value of attribute private_key_password.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def private_key_password
  @private_key_password
end

#private_key_pathObject

Returns the value of attribute private_key_path.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def private_key_path
  @private_key_path
end

#sending_post_office_codeObject

Returns the value of attribute sending_post_office_code.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def sending_post_office_code
  @sending_post_office_code
end

#sending_post_office_location_numberObject

Returns the value of attribute sending_post_office_location_number.



7
8
9
# File 'lib/czech_post_b2b_client/configuration.rb', line 7

def sending_post_office_location_number
  @sending_post_office_location_number
end