arux_app 3.0.2 → 3.0.3
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/{arux.app.gemspec → arux_app.gemspec} +1 -1
- data/lib/arux_app/api/auth.rb +2 -1
- data/lib/arux_app/api/config.rb +19 -2
- data/lib/arux_app.rb +4 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf9ace8f7b311960edb721dc4cbc9f0e00c8c844c9420ed91d96efe247c8536
|
4
|
+
data.tar.gz: edc123a35cd47d96a96c9aac4adba85f861a91f0167c0a755a801062d912273a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca0759a72bd036a16a1f26fb0e8983d3885e8f11301d4ea8b2683ce0b87df9f295b30287ffd7663c77c29a3eca8d06454613181ec4269ff8bed4ef8d1f35939a
|
7
|
+
data.tar.gz: 8cc563f83bdfe9d8be79088e71764f3075f37261ce89e7ae3b384303a584e8fe5bfa24a78432052c7f9db7c832403801e4c271ac275b6c6ca5d3d2baeca1831c
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "arux_app"
|
7
|
-
spec.version = "3.0.
|
7
|
+
spec.version = "3.0.3"
|
8
8
|
spec.authors = ["Arux Software"]
|
9
9
|
spec.email = ["sheuer@aruxsoftware.com"]
|
10
10
|
spec.summary = "Ruby gem for interacting with the Arux.app Switchboard APIs."
|
data/lib/arux_app/api/auth.rb
CHANGED
@@ -26,7 +26,7 @@ module AruxApp
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
attr_accessor :client_id, :client_secret, :redirect_uri, :js_callback, :district_subdomain, :current_user_uuid, :login_mechanism, :element
|
29
|
+
attr_accessor :client_id, :client_secret, :redirect_uri, :js_callback, :district_subdomain, :current_user_uuid, :login_mechanism, :element, :api_key
|
30
30
|
|
31
31
|
def initialize(options = {})
|
32
32
|
self.client_id = options[:client_id]
|
@@ -37,6 +37,7 @@ module AruxApp
|
|
37
37
|
self.element = options[:element]
|
38
38
|
self.district_subdomain = options[:district_subdomain]
|
39
39
|
self.current_user_uuid = options[:current_user_uuid]
|
40
|
+
self.api_key = options[:api_key]
|
40
41
|
|
41
42
|
raise API::InitializerError.new(:client_id, "can't be blank") if self.client_id.to_s.empty?
|
42
43
|
raise API::InitializerError.new(:client_secret, "can't be blank") if self.client_secret.to_s.empty?
|
data/lib/arux_app/api/config.rb
CHANGED
@@ -59,12 +59,29 @@ module AruxApp
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
def list(params = {})
|
63
|
+
request = HTTPI::Request.new
|
64
|
+
request.url = "#{api_uri}/v1/p/customers"
|
65
|
+
request.query = URI.encode_www_form(params)
|
66
|
+
request.headers = generate_headers
|
67
|
+
response = HTTPI.get(request)
|
68
|
+
if !response.error?
|
69
|
+
JSON.parse(response.body)
|
70
|
+
else
|
71
|
+
raise(API::Error.new(response.code, response.body))
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
62
75
|
protected
|
63
76
|
|
64
77
|
def generate_headers
|
65
|
-
{
|
78
|
+
{
|
79
|
+
'User-Agent' => USER_AGENT,
|
80
|
+
'Client-Secret' => self.auth.client_secret,
|
81
|
+
'Client-Id' => self.auth.client_id,
|
82
|
+
'Key' => self.auth.api_key
|
83
|
+
}
|
66
84
|
end
|
67
|
-
|
68
85
|
end
|
69
86
|
end
|
70
87
|
end
|
data/lib/arux_app.rb
CHANGED
@@ -6,9 +6,9 @@ HOSTNAME = if ENV.has_key?("DEV_HOST")
|
|
6
6
|
`hostname`.downcase.strip
|
7
7
|
end
|
8
8
|
|
9
|
-
require
|
10
|
-
require
|
11
|
-
require
|
9
|
+
require "rubygems"
|
10
|
+
require "httpi"
|
11
|
+
require "json"
|
12
12
|
require "arux_app/api"
|
13
13
|
require "arux_app/api/checkout"
|
14
14
|
require "arux_app/api/bank_info"
|
@@ -18,6 +18,6 @@ require "arux_app/api/account"
|
|
18
18
|
require "arux_app/api/cart"
|
19
19
|
|
20
20
|
module AruxApp
|
21
|
-
VERSION = "3.0.
|
21
|
+
VERSION = "3.0.3"
|
22
22
|
USER_AGENT = "Arux.app GEM #{VERSION}"
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arux_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arux Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpi
|
@@ -80,7 +80,7 @@ files:
|
|
80
80
|
- LICENSE.txt
|
81
81
|
- README.md
|
82
82
|
- Rakefile
|
83
|
-
-
|
83
|
+
- arux_app.gemspec
|
84
84
|
- lib/arux_app.rb
|
85
85
|
- lib/arux_app/api.rb
|
86
86
|
- lib/arux_app/api/account.rb
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.0.9
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Ruby gem for interacting with the Arux.app Switchboard APIs.
|