kount-ris 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{app/models/kount/configuration.rb → lib/kount.rb} +3 -12
- data/lib/kount/configuration.rb +13 -0
- data/{app/models → lib}/kount/khash.rb +0 -2
- data/lib/kount/ris.rb +15 -0
- data/{app/models → lib}/kount/ris/address.rb +1 -1
- data/{app/models → lib}/kount/ris/base.rb +0 -0
- data/{app/models → lib}/kount/ris/device.rb +0 -0
- data/lib/kount/ris/engine.rb +1 -1
- data/{app/models → lib}/kount/ris/inquiry.rb +0 -0
- data/{app/models → lib}/kount/ris/location.rb +0 -0
- data/{app/models → lib}/kount/ris/persona.rb +0 -0
- data/{app/models → lib}/kount/ris/product.rb +0 -0
- data/{app/models → lib}/kount/ris/response.rb +1 -2
- data/{app/models → lib}/kount/ris/trigger/counter.rb +0 -0
- data/{app/models → lib}/kount/ris/trigger/error.rb +0 -0
- data/{app/models → lib}/kount/ris/trigger/rule.rb +0 -0
- data/{app/models → lib}/kount/ris/trigger/warning.rb +0 -0
- data/lib/kount/ris/version.rb +1 -1
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c70f3f6d9f7a8d8b8472f96ad7b57d00af3e8b1
|
4
|
+
data.tar.gz: '090ab49ded7736161547c5cf8463b06dd4fa7a00'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6fcfd60e4ec37028e981403a7d03ded5654cc86b2a6d3926c9777acb9f44091fa313b448eb2971346279ac8b42c5a77874abdae8f402d5fc462a78c43f0974e
|
7
|
+
data.tar.gz: 20c37fb59eed4457cb98d77c0d279aa167b05cf16bdd5e2e7032c6dcf136bab96ab3be8f50a01535d6e437946ace44cf1a9718fdd6d5bbc567a36d1d3ad1de44
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'kount/configuration'
|
2
|
+
require 'kount/khash'
|
3
|
+
|
1
4
|
module Kount
|
2
5
|
class << self
|
3
6
|
def configure(conf={})
|
@@ -25,16 +28,4 @@ module Kount
|
|
25
28
|
}.compact
|
26
29
|
end
|
27
30
|
end
|
28
|
-
|
29
|
-
class Configuration
|
30
|
-
class << self
|
31
|
-
attr_accessor :merchant_id, :company_server_url, :api_key, :gateway_id, :site_id, :salt, :api_host
|
32
|
-
attr_accessor :api_version, :response_format, :payment_type, :currency_code, :shipping_method
|
33
|
-
attr_accessor :logger, :simple_log_level, :simple_log_file, :simple_log_path
|
34
|
-
|
35
|
-
def set(conf = {})
|
36
|
-
conf.each { |setting, value| self.send("#{setting}=", value) }
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
31
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Kount
|
2
|
+
class Configuration
|
3
|
+
class << self
|
4
|
+
attr_accessor :merchant_id, :company_server_url, :api_key, :gateway_id, :site_id, :salt, :api_host
|
5
|
+
attr_accessor :api_version, :response_format, :payment_type, :currency_code, :shipping_method
|
6
|
+
attr_accessor :logger, :simple_log_level, :simple_log_file, :simple_log_path
|
7
|
+
|
8
|
+
def set(conf = {})
|
9
|
+
conf.each { |setting, value| self.send("#{setting}=", value) }
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/kount/ris.rb
CHANGED
@@ -1,4 +1,19 @@
|
|
1
|
+
require 'kount'
|
1
2
|
require 'kount/ris/engine'
|
3
|
+
require 'kount/ris/base'
|
4
|
+
|
5
|
+
require 'kount/ris/address'
|
6
|
+
require 'kount/ris/device'
|
7
|
+
require 'kount/ris/inquiry'
|
8
|
+
require 'kount/ris/location'
|
9
|
+
require 'kount/ris/persona'
|
10
|
+
require 'kount/ris/product'
|
11
|
+
require 'kount/ris/response'
|
12
|
+
|
13
|
+
require 'kount/ris/trigger/counter'
|
14
|
+
require 'kount/ris/trigger/error'
|
15
|
+
require 'kount/ris/trigger/rule'
|
16
|
+
require 'kount/ris/trigger/warning'
|
2
17
|
|
3
18
|
module Kount
|
4
19
|
module RIS
|
@@ -10,7 +10,7 @@ module Kount
|
|
10
10
|
validates :city, length: { maximum: 256 } # country code
|
11
11
|
validates :region, length: { maximum: 256 } # state / region / province
|
12
12
|
validates :postal_code, length: { maximum: 20 } # postal code
|
13
|
-
validates :country_code, length: 2 # country code
|
13
|
+
validates :country_code, length: { is: 2 }, allow_nil: true # country code
|
14
14
|
validates :phone, length: { maximum: 32 } # phone number
|
15
15
|
|
16
16
|
def to_h
|
File without changes
|
File without changes
|
data/lib/kount/ris/engine.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Kount
|
2
2
|
module RIS
|
3
3
|
class Engine < ::Rails::Engine
|
4
|
-
|
4
|
+
isolate_namespace Kount::RIS
|
5
5
|
# config.generators.api_only = true
|
6
6
|
# config.eager_load_paths.concat Dir["#{config.root}/doc/*"].select { |f| File.directory? f }
|
7
7
|
# config.autoload_paths.concat Dir["#{config.root}/app/models/**"]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -254,7 +254,7 @@ module Kount
|
|
254
254
|
mode: mode,
|
255
255
|
order_number: order_number,
|
256
256
|
session_id: session_id,
|
257
|
-
site_id: site_id
|
257
|
+
site_id: site_id,
|
258
258
|
api_version: api_version,
|
259
259
|
kount_id: kount_id,
|
260
260
|
counters: counters.collect(&:to_h),
|
@@ -386,4 +386,3 @@ module Kount
|
|
386
386
|
end
|
387
387
|
end
|
388
388
|
end
|
389
|
-
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/kount/ris/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kount-ris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- blaq reports
|
@@ -61,23 +61,24 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- README.md
|
63
63
|
- Rakefile
|
64
|
-
- app/models/kount/configuration.rb
|
65
|
-
- app/models/kount/khash.rb
|
66
|
-
- app/models/kount/ris/address.rb
|
67
|
-
- app/models/kount/ris/base.rb
|
68
|
-
- app/models/kount/ris/device.rb
|
69
|
-
- app/models/kount/ris/inquiry.rb
|
70
|
-
- app/models/kount/ris/location.rb
|
71
|
-
- app/models/kount/ris/persona.rb
|
72
|
-
- app/models/kount/ris/product.rb
|
73
|
-
- app/models/kount/ris/response.rb
|
74
|
-
- app/models/kount/ris/trigger/counter.rb
|
75
|
-
- app/models/kount/ris/trigger/error.rb
|
76
|
-
- app/models/kount/ris/trigger/rule.rb
|
77
|
-
- app/models/kount/ris/trigger/warning.rb
|
78
64
|
- config/initializers/configuration.rb
|
65
|
+
- lib/kount.rb
|
66
|
+
- lib/kount/configuration.rb
|
67
|
+
- lib/kount/khash.rb
|
79
68
|
- lib/kount/ris.rb
|
69
|
+
- lib/kount/ris/address.rb
|
70
|
+
- lib/kount/ris/base.rb
|
71
|
+
- lib/kount/ris/device.rb
|
80
72
|
- lib/kount/ris/engine.rb
|
73
|
+
- lib/kount/ris/inquiry.rb
|
74
|
+
- lib/kount/ris/location.rb
|
75
|
+
- lib/kount/ris/persona.rb
|
76
|
+
- lib/kount/ris/product.rb
|
77
|
+
- lib/kount/ris/response.rb
|
78
|
+
- lib/kount/ris/trigger/counter.rb
|
79
|
+
- lib/kount/ris/trigger/error.rb
|
80
|
+
- lib/kount/ris/trigger/rule.rb
|
81
|
+
- lib/kount/ris/trigger/warning.rb
|
81
82
|
- lib/kount/ris/version.rb
|
82
83
|
homepage:
|
83
84
|
licenses: []
|