Class: Pin::API::Client
- Inherits:
-
Object
- Object
- Pin::API::Client
- Defined in:
- lib/pin/api/client.rb
Constant Summary collapse
- BASE_URL =
"https://#{Pin.config.endpoint}/1"
Instance Attribute Summary collapse
-
#http ⇒ Object
Returns the value of attribute http.
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
Methods included from Tokens
Methods included from Refunds
Methods included from Charges
#capture_charge, #charge, #charge_search, #charges, #create_charge
Methods included from Customers
#create_customer, #customer, #customer_charges, #customers, #update_customer
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
24 25 26 27 28 29 |
# File 'lib/pin/api/client.rb', line 24 def initialize @url = URI.parse(BASE_URL) @http = Net::HTTP.new(@url.host, @url.port) @http.use_ssl = true @http.verify_mode = OpenSSL::SSL::VERIFY_PEER end |
Instance Attribute Details
#http ⇒ Object
Returns the value of attribute http.
15 16 17 |
# File 'lib/pin/api/client.rb', line 15 def http @http end |