lmb-developers 1.2.1 → 1.2.2
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/README.md +1 -1
- data/lib/lmb/developers/loyalty.rb +20 -0
- data/lmb-developers.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b073408873bc6b6c4658a4c12cf4768fefcffb071df73c79c52c15b470ecb36d
|
4
|
+
data.tar.gz: c08861582c33ccce5b9cc84d0a1f1fd20fda172a7f2d020afe89f39eef85959f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cd18d9f922e35a7aaf2db10fa2d7f99515a0fce1fbab58d78b44a175a75238ad8babcd034a6fb6075230fcecd1362666264f79429dd39958c7b5dcb8ce2cbcf
|
7
|
+
data.tar.gz: f4cd08f716e24098dd4ba611dc87ab05b5b9e164d7baf726bd37777a9fc3cc027d72762c6fe799869cc94598f33f4b9dc81f88e33d6041039c420c4bf8504fb3
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ You will need an API KEY that can be obtained at [Leroy Merlin Brazil Developer'
|
|
42
42
|
```ruby
|
43
43
|
|
44
44
|
#config/initilizers/lmb_developers.rb
|
45
|
-
Lmb::Developers.configure('
|
45
|
+
Lmb::Developers.configure('DEV', ENV['LMB_API_KEY'])
|
46
46
|
|
47
47
|
#app/controller/login.rb
|
48
48
|
Lmb::Developers::Auth.login("ldap_username", "ldap_password")
|
@@ -7,6 +7,7 @@ module Lmb
|
|
7
7
|
VOUCHER_EXPIRED_PATH = '/v1/loyalty/voucher/expired'.freeze
|
8
8
|
VOUCHER_PROVISIONED_PATH = '/v1/loyalty/voucher/provisioned'.freeze
|
9
9
|
VOUCHER_ACTIVATED_PATH = '/v1/loyalty/voucher/activated'.freeze
|
10
|
+
# SCORING_REDEMPTION_PATH = '/v1/loyalty/redemption'.freeze
|
10
11
|
|
11
12
|
# Set Inhabitant's Expired Vouchers.
|
12
13
|
#
|
@@ -81,6 +82,25 @@ module Lmb
|
|
81
82
|
def self.configuration
|
82
83
|
@configuration = Lmb::Developers.configuration
|
83
84
|
end
|
85
|
+
|
86
|
+
# def self.redemption(redemptions)
|
87
|
+
# uri = URI.parse("#{configuration.url}#{SCORING_REDEMPTION_PATH}")
|
88
|
+
# request = Net::HTTP::Post.new(uri)
|
89
|
+
# request['Apikey'] = configuration.api_key.to_s
|
90
|
+
# request['Cache-Control'] = 'no-cache'
|
91
|
+
# request.body = JSON.dump(
|
92
|
+
# 'redemptions' => redemptions
|
93
|
+
# )
|
94
|
+
# req_options = {
|
95
|
+
# use_ssl: uri.scheme == 'https'
|
96
|
+
# }
|
97
|
+
# response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
|
98
|
+
# http.request(request)
|
99
|
+
# end
|
100
|
+
# response.code.to_i == 202
|
101
|
+
# rescue StandardError => exception
|
102
|
+
# exception
|
103
|
+
# end
|
84
104
|
end
|
85
105
|
end
|
86
106
|
end
|
data/lmb-developers.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'lmb-developers'
|
3
|
-
s.version = '1.2.
|
3
|
+
s.version = '1.2.2'
|
4
4
|
s.date = '2019-05-19'
|
5
5
|
s.summary = "Consume APIs at Leroy Merlin Brazil Developer's Portal"
|
6
6
|
s.description = "Gem to consume APIs available at Leroy Merlin Brazil Developer's Portal https://developers.leroymerlin.com.br"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lmb-developers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PRTE - Tecnologia e Soluções
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
requirements: []
|
49
|
-
rubygems_version: 3.
|
49
|
+
rubygems_version: 3.1.2
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: Consume APIs at Leroy Merlin Brazil Developer's Portal
|