Class: Rubykassa::XmlInterface
- Inherits:
-
Object
- Object
- Rubykassa::XmlInterface
- Defined in:
- lib/rubykassa/xml_interface.rb
Instance Attribute Summary collapse
-
#invoice_id ⇒ Object
Returns the value of attribute invoice_id.
-
#language ⇒ Object
Returns the value of attribute language.
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
- #base_url ⇒ Object
- #get_currencies ⇒ Object
- #get_payment_methods ⇒ Object
- #get_rates ⇒ Object
-
#initialize(&block) ⇒ XmlInterface
constructor
A new instance of XmlInterface.
- #op_state ⇒ Object
Constructor Details
#initialize(&block) ⇒ XmlInterface
Returns a new instance of XmlInterface.
12 13 14 |
# File 'lib/rubykassa/xml_interface.rb', line 12 def initialize &block instance_eval &block if block_given? end |
Instance Attribute Details
#invoice_id ⇒ Object
Returns the value of attribute invoice_id.
10 11 12 |
# File 'lib/rubykassa/xml_interface.rb', line 10 def invoice_id @invoice_id end |
#language ⇒ Object
Returns the value of attribute language.
10 11 12 |
# File 'lib/rubykassa/xml_interface.rb', line 10 def language @language end |
#total ⇒ Object
Returns the value of attribute total.
10 11 12 |
# File 'lib/rubykassa/xml_interface.rb', line 10 def total @total end |
Instance Method Details
#base_url ⇒ Object
32 33 34 |
# File 'lib/rubykassa/xml_interface.rb', line 32 def base_url "https://merchant.roboxchange.com/WebService/Service.asmx/" end |
#get_currencies ⇒ Object
16 17 18 |
# File 'lib/rubykassa/xml_interface.rb', line 16 def get_currencies request(base_url + transform_method_name(__method__), Hash["MerchantLogin", Rubykassa.login, "Language", @language]) end |
#get_payment_methods ⇒ Object
20 21 22 |
# File 'lib/rubykassa/xml_interface.rb', line 20 def get_payment_methods request(base_url + transform_method_name(__method__), Hash["MerchantLogin", Rubykassa.login, "Language", @language]) end |
#get_rates ⇒ Object
24 25 26 |
# File 'lib/rubykassa/xml_interface.rb', line 24 def get_rates request(base_url + transform_method_name(__method__), Hash["MerchantLogin", Rubykassa.login, "IncCurrLabel", "", "OutSum", @total.to_s, "Language", @language]) end |
#op_state ⇒ Object
28 29 30 |
# File 'lib/rubykassa/xml_interface.rb', line 28 def op_state request(base_url + transform_method_name(__method__), Hash["MerchantLogin", Rubykassa.login, "InvoiceID", @invoice_id.to_s, "Signature", generate_signature]) end |