widgit_accounts_sdk 0.0.7 → 0.0.9
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/widgit_accounts_sdk/client.rb +17 -14
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 02f0c0fb936f113d9379f36ff88ac51ba25820270698290aed62a2705e2a1242
|
|
4
|
+
data.tar.gz: 95fd39a61dcee7413594bd6805ea7238305588261281ebb3cda2003fbf479d38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c145bb37a9dfa3ca9cf4d4413f86ea855a1645a17b805e7134399fc3a23bc2896324fb6b35454334f2e03ed6bad4e4f36756d7c0f24cf003524ea5457a90d64
|
|
7
|
+
data.tar.gz: 808949d3120fe509121861a5cb05c292fbe61da77213f0fe0d5029ec4c555827a38395e6ddd08b90229ca9936b47b12db830a550d18de10aea448c63950b9ced
|
|
@@ -30,11 +30,10 @@ module WidgitAccountsSdk
|
|
|
30
30
|
return success.merge('exists' => response['exists'])
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def invite(email,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
request_url
|
|
37
|
-
request_url += "&#{last_name.to_query(:last_name)}" if last_name
|
|
33
|
+
def invite(email, **options)
|
|
34
|
+
params = { email: email }.merge(options.compact)
|
|
35
|
+
query = params.to_query
|
|
36
|
+
request_url = "/api/v1/accounts/invite?#{query}"
|
|
38
37
|
response = request(request_url, :post)
|
|
39
38
|
return failed(response['error']) if response['status'] == 'failed'
|
|
40
39
|
return response
|
|
@@ -131,15 +130,19 @@ module WidgitAccountsSdk
|
|
|
131
130
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
|
132
131
|
http.open_timeout = 30
|
|
133
132
|
http.read_timeout = 30
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
133
|
+
|
|
134
|
+
req =
|
|
135
|
+
case method
|
|
136
|
+
when :get
|
|
137
|
+
Net::HTTP::Get.new(uri.request_uri)
|
|
138
|
+
when :post
|
|
139
|
+
Net::HTTP::Post.new(uri.request_uri)
|
|
140
|
+
when :patch
|
|
141
|
+
Net::HTTP::Patch.new(uri.request_uri)
|
|
142
|
+
end
|
|
143
|
+
if [:post, :patch].include?(method)
|
|
144
|
+
req.body = params.to_json
|
|
145
|
+
req["Content-Type"] = "application/json"
|
|
143
146
|
end
|
|
144
147
|
req["Authorization"] = WidgitAccountsSdk.configuration.api_key
|
|
145
148
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: widgit_accounts_sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stu Wright
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-03-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: jwt
|
|
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
53
|
version: '0'
|
|
54
54
|
requirements: []
|
|
55
|
-
rubygems_version: 3.
|
|
55
|
+
rubygems_version: 3.5.22
|
|
56
56
|
signing_key:
|
|
57
57
|
specification_version: 4
|
|
58
58
|
summary: Widgit Accounts API Client Ruby Gem
|