Class: Microbilt::Configuration
- Inherits:
-
Object
- Object
- Microbilt::Configuration
- Defined in:
- lib/microbilt/configuration.rb
Constant Summary collapse
- PROD_SERVER_URL =
'https://creditserver.microbilt.com'- TEST_SERVER_URL =
'https://sdkstage.microbilt.com'- CREATE_FORM_URI =
'/WebServices/IBV/Home/CreateForm'- GET_DATA_URI =
'/WebServices/IBV/Home/GetData'- GET_HTML_DATA_URI =
'/WebServices/gethtml/gethtml.aspx'- ADD_CUSTOMER_URI =
'/WebServices/IBV/Home/AddCustomer'- CONTENT_TYPE =
'application/x-www-form-urlencoded'
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_password ⇒ Object
Returns the value of attribute client_password.
-
#format ⇒ Object
Returns the value of attribute format.
-
#server ⇒ Object
Returns the value of attribute server.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #server_url ⇒ Object
- #to_params ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 |
# File 'lib/microbilt/configuration.rb', line 15 def initialize @format = :json @server = :test end |
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
13 14 15 |
# File 'lib/microbilt/configuration.rb', line 13 def client_id @client_id end |
#client_password ⇒ Object
Returns the value of attribute client_password.
13 14 15 |
# File 'lib/microbilt/configuration.rb', line 13 def client_password @client_password end |
#format ⇒ Object
Returns the value of attribute format.
13 14 15 |
# File 'lib/microbilt/configuration.rb', line 13 def format @format end |
#server ⇒ Object
Returns the value of attribute server.
13 14 15 |
# File 'lib/microbilt/configuration.rb', line 13 def server @server end |
Instance Method Details
#server_url ⇒ Object
29 30 31 |
# File 'lib/microbilt/configuration.rb', line 29 def server_url server == :production ? PROD_SERVER_URL : TEST_SERVER_URL end |
#to_params ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/microbilt/configuration.rb', line 20 def to_params validate_credentials! { 'MemberId' => client_id, 'MemberPwd' => client_password } end |