circuit-api 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/circuit_api/client.rb +4 -2
- data/lib/circuit_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d0a1d9d7920e82bead86ad8dd851d552181b260f64e9e84f2f21f6881d7108bb
|
|
4
|
+
data.tar.gz: 62927a14574f7a4d1513dc593ab2db77a86f19fe771fa16c952332f2f379f0ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e401cc39021d5c666fca89d52f11a7e81bd46f21123b0b21c7e4356366c743f190f1f7a7f6ff1529927e770ba9e334e3ed7c1b27242f101a40def03cd4759850
|
|
7
|
+
data.tar.gz: a4b1ef01a599759c819b84be953edde0389ec0a99c84e60cbe387b6d11a81052c901602b1d04fdb3a2a7e183df7a91f6e63e161abd35b831afaf4891f655b20e
|
data/lib/circuit_api/client.rb
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
module CircuitApi
|
|
2
2
|
class Client
|
|
3
|
-
attr_accessor :client_id, :client_secret, :sandbox, :token
|
|
3
|
+
attr_accessor :client_id, :client_secret, :sandbox, :instance_url, :token
|
|
4
4
|
|
|
5
|
-
def initialize(client_id: nil, client_secret: nil, sandbox: nil)
|
|
5
|
+
def initialize(client_id: nil, client_secret: nil, sandbox: nil, instance_url: nil)
|
|
6
6
|
@client_id = client_id
|
|
7
7
|
@client_secret = client_secret
|
|
8
8
|
@sandbox = sandbox
|
|
9
|
+
@instance_url = instance_url
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
def connect(token)
|
|
@@ -14,6 +15,7 @@ module CircuitApi
|
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
def base_url
|
|
18
|
+
return instance_url if instance_url
|
|
17
19
|
return CircuitApi::API_SANDBOX_BASE_URL if sandbox
|
|
18
20
|
|
|
19
21
|
CircuitApi::API_BASE_URL
|
data/lib/circuit_api/version.rb
CHANGED