Module: Synapsis
- Defined in:
- lib/synapsis_v3.rb,
lib/synapsis_v3.rb
Overview
Namespacing
Defined Under Namespace
Modules: APIOperations, V01 Classes: APIResource, Error, Node, Response, Subscription, Transaction, User
Class Attribute Summary collapse
-
.client_id ⇒ Object
Returns the value of attribute client_id.
-
.client_secret ⇒ Object
Returns the value of attribute client_secret.
-
.environment ⇒ Object
Returns the value of attribute environment.
-
.logging ⇒ Object
Returns the value of attribute logging.
Class Method Summary collapse
Class Attribute Details
.client_id ⇒ Object
Returns the value of attribute client_id.
27 28 29 |
# File 'lib/synapsis_v3.rb', line 27 def client_id @client_id end |
.client_secret ⇒ Object
Returns the value of attribute client_secret.
27 28 29 |
# File 'lib/synapsis_v3.rb', line 27 def client_secret @client_secret end |
.environment ⇒ Object
Returns the value of attribute environment.
27 28 29 |
# File 'lib/synapsis_v3.rb', line 27 def environment @environment end |
.logging ⇒ Object
Returns the value of attribute logging.
27 28 29 |
# File 'lib/synapsis_v3.rb', line 27 def logging @logging end |
Class Method Details
.configure {|_self| ... } ⇒ Object
51 52 53 |
# File 'lib/synapsis_v3.rb', line 51 def configure(¶ms) yield(self) end |
.connection ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/synapsis_v3.rb', line 29 def connection @connection ||= Faraday.new(url: synapse_url) do |faraday| faraday.request :multipart # form-encode POST params if Synapsis.logging faraday.response :detailed_logger # form-encode POST params end faraday.request :url_encoded # form-encode POST params faraday.response :logger # log requests to STDOUT faraday.adapter Faraday.default_adapter # make requests with Net::HTTP end end |
.synapse_url ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/synapsis_v3.rb', line 43 def synapse_url if environment == 'production' 'https://synapsepay.com/' else 'https://sandbox.synapsepay.com/' end end |