centaman 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dump.rdb +0 -0
- data/lib/centaman/object/coupon_check.rb +1 -0
- data/lib/centaman/service/coupon_check.rb +8 -3
- data/lib/centaman/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cde2e6adc04f9973174dbba7176bd1a417f099e
|
4
|
+
data.tar.gz: a24565413fb3271ba07556192bb13e90fbe17347
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23c170fc6655fd2988eb32cb8fdbaa34dc4cf649b0863396a98037b23ec4094f8d34cde8933998b85b783efb40945bca2aa80d76f64c931c2a222de41afb65d9
|
7
|
+
data.tar.gz: 16451629d3b3fae84838810d795d0b9badab33071c147c8c0e80305bc3f56e73aa83f5bfcf70985f09d72835b7a0a93d2ef033ad424e98b4a04df74edea28dcd
|
data/dump.rdb
ADDED
Binary file
|
@@ -1,10 +1,11 @@
|
|
1
1
|
module Centaman
|
2
2
|
class Service::CouponCheck < Centaman::Service
|
3
3
|
include Centaman::JsonWrapper
|
4
|
-
attr_reader :coupon_code
|
4
|
+
attr_reader :coupon_code, :product_area
|
5
5
|
|
6
6
|
def after_init(args)
|
7
7
|
@coupon_code = args[:coupon_code]
|
8
|
+
@product_area = args[:product_area]
|
8
9
|
require_args
|
9
10
|
end
|
10
11
|
|
@@ -19,12 +20,16 @@ module Centaman
|
|
19
20
|
def options_hash
|
20
21
|
{
|
21
22
|
'CouponCode' => coupon_code,
|
22
|
-
'ProductArea' =>
|
23
|
+
'ProductArea' => product_area
|
23
24
|
}.to_json
|
24
25
|
end
|
25
26
|
|
27
|
+
def required_fields
|
28
|
+
[coupon_code, product_area]
|
29
|
+
end
|
30
|
+
|
26
31
|
def require_args
|
27
|
-
raise "coupon_code
|
32
|
+
raise "coupon_code and product_area required for #{self.class.name}" if required_fields.include?(nil)
|
28
33
|
end
|
29
34
|
end
|
30
35
|
end
|
data/lib/centaman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: centaman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- francirp
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- bin/console
|
86
86
|
- bin/setup
|
87
87
|
- centaman.gemspec
|
88
|
+
- dump.rdb
|
88
89
|
- lib/centaman.rb
|
89
90
|
- lib/centaman/attribute.rb
|
90
91
|
- lib/centaman/exceptions.rb
|