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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e76ceb653022cf925639251ccd30953f40ff1a4fe9cbaa2332264f399ad157e2
4
- data.tar.gz: 9640afd5fb6c83431574739bcb09e30af4def005a72e7b30c6c3b6b7fdb303ea
3
+ metadata.gz: 945ece0f84627850b3f6e835735255a844299842aac4d14f1f1d2af138c0e5d3
4
+ data.tar.gz: 15f2ed41e887acdb91df9fcc8d4caf863ed6cf0267107f2935d2c27cfea166a9
5
5
  SHA512:
6
- metadata.gz: 7a58b4da506b549ddea9ba1f74db54eebf2cdf2a51209986a2534e05ac6e7c37251f34817c49f772c5a50e6c0e2ce8cfd231b6e8a7245e823cdd9b65220d34d2
7
- data.tar.gz: 338f242e2d71098cf5eaad9c6888ffcd3d75377dca060b4b080fc1b8980a4cd0d01ad91856ae653e019a293628fcf57979acbf3dd07a064bf5029485769235b0
6
+ metadata.gz: 03f352c0c476f497853d19e01b29f5e8a53144bd948a348ec9114b0155e208f12c809943a7378bb3a4ed6d81e230a863202255f2a52c726fe87b0f37a04b429d
7
+ data.tar.gz: 42836bcb25892e4c15ebecae65b3db9b7e425c854afd01c82af0a22f99779163b2e4427903518f2be4855e41bb1956f81cf5eccfebf2ef8ae8d7fa3838380618
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- alphaSDK (1.0.0)
4
+ gameball (1.0.1)
5
5
  rake (>= 12.0)
6
6
  rspec (>= 3.0)
7
7
 
@@ -28,7 +28,7 @@ PLATFORMS
28
28
  x64-mingw32
29
29
 
30
30
  DEPENDENCIES
31
- alphaSDK!
31
+ gameball!
32
32
  rake (>= 12.0)
33
33
  rspec (>= 3.0)
34
34
 
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: null
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: null,
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"] = "http://mygemserver.com"
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.
@@ -0,0 +1,12 @@
1
+ module Gameball
2
+ module Lang
3
+ ENGLISH='en'
4
+ SPANISH='es'
5
+ PORTUGUESE='pt'
6
+ POLISH='pl'
7
+ ITALIAN='it'
8
+ GERMAN='de'
9
+ FRENCH='fr'
10
+ ARABIC='ar'
11
+ end
12
+ end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Gameball
2
- VERSION = "2.0.0" # Version of the SDK
2
+ VERSION = "2.1.4" # Version of the SDK
3
3
  end
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.0.0
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: http://mygemserver.com
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: []