Module: Synapsis
- Defined in:
- lib/synapsis_v3.rb,
lib/synapsis_v3.rb
Overview
Namespacing
Defined Under Namespace
Modules: APIOperations 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.
24 25 26 |
# File 'lib/synapsis_v3.rb', line 24 def client_id @client_id end |
.client_secret ⇒ Object
Returns the value of attribute client_secret.
24 25 26 |
# File 'lib/synapsis_v3.rb', line 24 def client_secret @client_secret end |
.environment ⇒ Object
Returns the value of attribute environment.
24 25 26 |
# File 'lib/synapsis_v3.rb', line 24 def environment @environment end |
.logging ⇒ Object
Returns the value of attribute logging.
24 25 26 |
# File 'lib/synapsis_v3.rb', line 24 def logging @logging end |
Class Method Details
.configure {|_self| ... } ⇒ Object
48 49 50 |
# File 'lib/synapsis_v3.rb', line 48 def configure(¶ms) yield(self) end |
.connection ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/synapsis_v3.rb', line 26 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
40 41 42 43 44 45 46 |
# File 'lib/synapsis_v3.rb', line 40 def synapse_url if environment == 'production' 'https://synapsepay.com/' else 'https://sandbox.synapsepay.com/' end end |