Class: OpenSRS::Client
- Inherits:
-
Object
- Object
- OpenSRS::Client
- Defined in:
- lib/opensrs/client.rb
Constant Summary collapse
- LIVE_URL =
"https://rr-n1-tor.opensrs.net:55443"- TEST_URL =
"https://horizon.opensrs.net:55443"
Instance Attribute Summary collapse
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #call(action:, object:, attributes: {}, extra: {}) ⇒ Object
-
#initialize(username:, api_key:, test: false) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Attribute Details
#username ⇒ Object (readonly)
Returns the value of attribute username.
11 12 13 |
# File 'lib/opensrs/client.rb', line 11 def username @username end |
Instance Method Details
#call(action:, object:, attributes: {}, extra: {}) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/opensrs/client.rb', line 19 def call(action:, object:, attributes: {}, extra: {}) xml = build_xml(action, object, attributes, extra) response_body = post(xml) result = parse_response(response_body) check_for_errors!(result) result end |