gameball 2.0.0 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +3 -3
- data/gameball.gemspec +1 -1
- data/lib/gameball/lang.rb +12 -0
- data/lib/gameball/utils/request.rb +7 -4
- data/lib/gameball/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 945ece0f84627850b3f6e835735255a844299842aac4d14f1f1d2af138c0e5d3
|
4
|
+
data.tar.gz: 15f2ed41e887acdb91df9fcc8d4caf863ed6cf0267107f2935d2c27cfea166a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03f352c0c476f497853d19e01b29f5e8a53144bd948a348ec9114b0155e208f12c809943a7378bb3a4ed6d81e230a863202255f2a52c726fe87b0f37a04b429d
|
7
|
+
data.tar.gz: 42836bcb25892e4c15ebecae65b3db9b7e425c854afd01c82af0a22f99779163b2e4427903518f2be4855e41bb1956f81cf5eccfebf2ef8ae8d7fa3838380618
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -188,7 +188,7 @@ Gameball::Transaction.refund({
|
|
188
188
|
playerUniqueId:"player456",
|
189
189
|
transactionId:"1234567890",
|
190
190
|
reverseTransactionId:"234567891",
|
191
|
-
amount:
|
191
|
+
amount: nil
|
192
192
|
}
|
193
193
|
)
|
194
194
|
```
|
@@ -247,7 +247,7 @@ Gameball::Order.place_order({
|
|
247
247
|
productId:"875511",
|
248
248
|
title: "XPS-15s",
|
249
249
|
category: [
|
250
|
-
electronics
|
250
|
+
"electronics"
|
251
251
|
],
|
252
252
|
vendor: "Dell"
|
253
253
|
}
|
@@ -261,7 +261,7 @@ Gameball::Order.place_order({
|
|
261
261
|
billingAddress: "Alabama"
|
262
262
|
},
|
263
263
|
redeemedAmount: 20,
|
264
|
-
holdReference:
|
264
|
+
holdReference: nil,
|
265
265
|
guest: false
|
266
266
|
})
|
267
267
|
```
|
data/gameball.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
# spec.metadata["allowed_push_host"] = "https://github.com/Alsouidan/alphasdk"
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
-
spec.metadata["source_code_uri"] = "
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/gameballers/gameball-ruby"
|
19
19
|
spec.metadata["changelog_uri"] = "http://mygemserver.com"
|
20
20
|
|
21
21
|
# Specify which files should be added to the gem when it is released.
|
@@ -2,7 +2,8 @@ module Gameball
|
|
2
2
|
module Utils
|
3
3
|
extend self
|
4
4
|
|
5
|
-
def request(verb, path, body = {},params:{})
|
5
|
+
def request(verb, path, body = {},lang:"",params:{})
|
6
|
+
|
6
7
|
# check for api_version and key and throw error if not included
|
7
8
|
if !Gameball.api_key
|
8
9
|
raise Gameball::GameballError.new("Please provide the api_key before making a request, try Gameball::api_key='your_key'")
|
@@ -11,7 +12,6 @@ module Gameball
|
|
11
12
|
if params != {}
|
12
13
|
uri.query=URI.encode_www_form(params)
|
13
14
|
end
|
14
|
-
puts uri
|
15
15
|
https = Net::HTTP.new(uri.host, uri.port)
|
16
16
|
https.max_retries = Gameball.max_retries
|
17
17
|
https.read_timeout = Gameball.read_timeout
|
@@ -33,7 +33,9 @@ module Gameball
|
|
33
33
|
if body != {}
|
34
34
|
req.body = body.to_json
|
35
35
|
end
|
36
|
-
|
36
|
+
if lang!=""
|
37
|
+
req["lang"]=lang
|
38
|
+
end
|
37
39
|
req["APIKey"] = Gameball.api_key
|
38
40
|
req["secretKey"]=Gameball.transaction_key
|
39
41
|
res = https.request(req)
|
@@ -68,8 +70,9 @@ module Gameball
|
|
68
70
|
if body != {}
|
69
71
|
req.body = body.to_json
|
70
72
|
end
|
71
|
-
req["APIKey"] = Gameball.api_key
|
72
73
|
Thread.new do
|
74
|
+
req["APIKey"] = Gameball.api_key
|
75
|
+
req["secretKey"]=Gameball.transaction_key
|
73
76
|
res = https.request(req)
|
74
77
|
return res
|
75
78
|
end
|
data/lib/gameball/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gameball
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alsouidan
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- gameball.gemspec
|
62
62
|
- lib/gameball.rb
|
63
63
|
- lib/gameball/exceptions/gameballException.rb
|
64
|
+
- lib/gameball/lang.rb
|
64
65
|
- lib/gameball/models/action.rb
|
65
66
|
- lib/gameball/models/configurations.rb
|
66
67
|
- lib/gameball/models/coupon.rb
|
@@ -80,7 +81,7 @@ licenses:
|
|
80
81
|
- MIT
|
81
82
|
metadata:
|
82
83
|
homepage_uri: https://www.gameball.co/
|
83
|
-
source_code_uri:
|
84
|
+
source_code_uri: https://github.com/gameballers/gameball-ruby
|
84
85
|
changelog_uri: http://mygemserver.com
|
85
86
|
post_install_message:
|
86
87
|
rdoc_options: []
|