LitleOnline 8.12.4 → 8.13.0
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.
- data/CHANGELOG +4 -0
 - data/DESCRIPTION +1 -1
 - data/Rakefile +2 -2
 - data/SETUP.md +1 -1
 - data/bin/Setup.rb +1 -1
 - data/lib/LitleOnlineRequest.rb +3 -1
 - data/lib/XMLFields.rb +2 -0
 - data/test/unit/test_LitleOnlineRequest.rb +1 -1
 - data/test/unit/test_auth.rb +15 -0
 - data/test/unit/test_sale.rb +16 -0
 - metadata +10 -10
 
    
        data/CHANGELOG
    CHANGED
    
    | 
         @@ -1,5 +1,9 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            = LitleOnline CHANGELOG
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            == Version 8.13.0 (May 18, 2012)
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            * Feature: Authorizations and Sales can accept an optional fraudFilterOverride parameter
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
       3 
7 
     | 
    
         
             
            == Version 8.12.4 (May 17, 2012)
         
     | 
| 
       4 
8 
     | 
    
         | 
| 
       5 
9 
     | 
    
         
             
            * Bugfix: Use modules so that we are not polluting the global namespace
         
     | 
    
        data/DESCRIPTION
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            Litle Online Ruby SDK created for version 8. 
     | 
| 
      
 1 
     | 
    
         
            +
            Litle Online Ruby SDK created for version 8.13 of Litle XML online format, see the XSD schema for specific fields that are supported by this format.
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            This gem contains an application interface in the Ruby programming language created by Litle & Co.
         
     | 
| 
       4 
4 
     | 
    
         | 
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -30,11 +30,11 @@ require 'rake/clean' 
     | 
|
| 
       30 
30 
     | 
    
         
             
            spec = Gem::Specification.new do |s|
         
     | 
| 
       31 
31 
     | 
    
         
             
              FileUtils.rm_rf('pkg')
         
     | 
| 
       32 
32 
     | 
    
         
             
              s.name = "LitleOnline"
         
     | 
| 
       33 
     | 
    
         
            -
              s.summary = "Ruby SDK produced by Litle & Co. for online transaction processing using Litle XML format v8. 
     | 
| 
      
 33 
     | 
    
         
            +
              s.summary = "Ruby SDK produced by Litle & Co. for online transaction processing using Litle XML format v8.13"
         
     | 
| 
       34 
34 
     | 
    
         
             
              s.description = File.read(File.join(File.dirname(__FILE__), 'DESCRIPTION'))
         
     | 
| 
       35 
35 
     | 
    
         
             
              s.requirements =
         
     | 
| 
       36 
36 
     | 
    
         
             
              [ 'Contact sdksupport@litle.com for more information' ]
         
     | 
| 
       37 
     | 
    
         
            -
              s.version = "8. 
     | 
| 
      
 37 
     | 
    
         
            +
              s.version = "8.13.0"
         
     | 
| 
       38 
38 
     | 
    
         
             
              s.author = "Litle & Co"
         
     | 
| 
       39 
39 
     | 
    
         
             
              s.email = "sdksupport@litle.com"
         
     | 
| 
       40 
40 
     | 
    
         
             
              s.homepage = "http://www.litle.com/developers"
         
     | 
    
        data/SETUP.md
    CHANGED
    
    
    
        data/bin/Setup.rb
    CHANGED
    
    | 
         @@ -44,7 +44,7 @@ class Setup 
     | 
|
| 
       44 
44 
     | 
    
         
             
                  f.puts "currency_merchant_map:"
         
     | 
| 
       45 
45 
     | 
    
         
             
                  f.puts "  DEFAULT: " + gets
         
     | 
| 
       46 
46 
     | 
    
         
             
                  f.puts "default_report_group: 'Default Report Group'"
         
     | 
| 
       47 
     | 
    
         
            -
                  f.puts	"version: '8. 
     | 
| 
      
 47 
     | 
    
         
            +
                  f.puts	"version: '8.13'"
         
     | 
| 
       48 
48 
     | 
    
         
             
                  puts "Please choose Litle url from the following list (example: 'cert') or directly input another URL: \nsandbox => https://www.testlitle.com/sandbox/communicator/online \ncert => https://cert.litle.com/vap/communicator/online \nprecert => https://precert.litle.com/vap/communicator/online \nproduction1 => https://payments.litle.com/vap/communicator/online \nproduction2 => https://payments2.litle.com/vap/communicator/online"
         
     | 
| 
       49 
49 
     | 
    
         
             
                  f.puts "url: " + Setup.choice(gets)
         
     | 
| 
       50 
50 
     | 
    
         
             
                  puts "Please input the proxy address, if no proxy hit enter key: "
         
     | 
    
        data/lib/LitleOnlineRequest.rb
    CHANGED
    
    | 
         @@ -72,6 +72,7 @@ module LitleOnline 
     | 
|
| 
       72 
72 
     | 
    
         
             
                  authorization.filtering = Filtering.from_hash(hash_in)
         
     | 
| 
       73 
73 
     | 
    
         
             
                  authorization.merchantData = MerchantData.from_hash(hash_in)
         
     | 
| 
       74 
74 
     | 
    
         
             
                  authorization.recyclingRequest = RecyclingRequest.from_hash(hash_in)
         
     | 
| 
      
 75 
     | 
    
         
            +
                  authorization.fraudFilterOverride = hash_in['fraudFilterOverride']
         
     | 
| 
       75 
76 
     | 
    
         | 
| 
       76 
77 
     | 
    
         
             
                  request.authorization = authorization
         
     | 
| 
       77 
78 
     | 
    
         | 
| 
         @@ -127,6 +128,7 @@ module LitleOnline 
     | 
|
| 
       127 
128 
     | 
    
         
             
                  sale.filtering = Filtering.from_hash(hash_in)
         
     | 
| 
       128 
129 
     | 
    
         
             
                  sale.merchantData = MerchantData.from_hash(hash_in)
         
     | 
| 
       129 
130 
     | 
    
         
             
                  sale.recyclingRequest = RecyclingRequest.from_hash(hash_in)
         
     | 
| 
      
 131 
     | 
    
         
            +
                  sale.fraudFilterOverride = hash_in['fraudFilterOverride']
         
     | 
| 
       130 
132 
     | 
    
         | 
| 
       131 
133 
     | 
    
         
             
                  request.sale = sale
         
     | 
| 
       132 
134 
     | 
    
         | 
| 
         @@ -571,7 +573,7 @@ module LitleOnline 
     | 
|
| 
       571 
573 
     | 
    
         | 
| 
       572 
574 
     | 
    
         
             
                def get_merchant_sdk(hash_in)
         
     | 
| 
       573 
575 
     | 
    
         
             
                  if(!hash_in['merchantSdk'])
         
     | 
| 
       574 
     | 
    
         
            -
                    return 'Ruby;8. 
     | 
| 
      
 576 
     | 
    
         
            +
                    return 'Ruby;8.13.0'
         
     | 
| 
       575 
577 
     | 
    
         
             
                  else
         
     | 
| 
       576 
578 
     | 
    
         
             
                    return hash_in['merchantSdk']
         
     | 
| 
       577 
579 
     | 
    
         
             
                  end    
         
     | 
    
        data/lib/XMLFields.rb
    CHANGED
    
    | 
         @@ -717,6 +717,7 @@ module LitleOnline 
     | 
|
| 
       717 
717 
     | 
    
         
             
                object_node :filtering, "filtering", :class=>Filtering, :default_value=>nil
         
     | 
| 
       718 
718 
     | 
    
         
             
                object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
         
     | 
| 
       719 
719 
     | 
    
         
             
                object_node :recyclingRequest, "recyclingRequest", :class=>RecyclingRequest, :default_value=>nil
         
     | 
| 
      
 720 
     | 
    
         
            +
                text_node :fraudFilterOverride, "fraudFilterOverride", :default_value=>nil
         
     | 
| 
       720 
721 
     | 
    
         
             
              end
         
     | 
| 
       721 
722 
     | 
    
         | 
| 
       722 
723 
     | 
    
         
             
              class Sale
         
     | 
| 
         @@ -752,6 +753,7 @@ module LitleOnline 
     | 
|
| 
       752 
753 
     | 
    
         
             
                object_node :filtering, "filtering", :class=>Filtering, :default_value=>nil
         
     | 
| 
       753 
754 
     | 
    
         
             
                object_node :merchantData, "merchantData", :class=>MerchantData, :default_value=>nil
         
     | 
| 
       754 
755 
     | 
    
         
             
                object_node :recyclingRequest, "recyclingRequest", :class=>RecyclingRequest, :default_value=>nil
         
     | 
| 
      
 756 
     | 
    
         
            +
                text_node :fraudFilterOverride, "fraudFilterOverride", :default_value=>nil
         
     | 
| 
       755 
757 
     | 
    
         
             
              end
         
     | 
| 
       756 
758 
     | 
    
         | 
| 
       757 
759 
     | 
    
         
             
              class Credit
         
     | 
| 
         @@ -244,7 +244,7 @@ module LitleOnline 
     | 
|
| 
       244 
244 
     | 
    
         
             
                  #Explicit - used for integrations
         
     | 
| 
       245 
245 
     | 
    
         
             
                  assert_equal 'ActiveMerchant;3.2', litle.send(:get_merchant_sdk, {'merchantSdk'=>'ActiveMerchant;3.2'})
         
     | 
| 
       246 
246 
     | 
    
         
             
                  #Implicit - used raw when nothing is specified
         
     | 
| 
       247 
     | 
    
         
            -
                  assert_equal 'Ruby;8. 
     | 
| 
      
 247 
     | 
    
         
            +
                  assert_equal 'Ruby;8.13.0', litle.send(:get_merchant_sdk, {'NotMerchantSdk'=>'ActiveMerchant;3.2'})
         
     | 
| 
       248 
248 
     | 
    
         
             
                end
         
     | 
| 
       249 
249 
     | 
    
         | 
| 
       250 
250 
     | 
    
         | 
    
        data/test/unit/test_auth.rb
    CHANGED
    
    | 
         @@ -147,6 +147,21 @@ module LitleOnline 
     | 
|
| 
       147 
147 
     | 
    
         
             
                  LitleOnlineRequest.new.authorization(hash)
         
     | 
| 
       148 
148 
     | 
    
         
             
                end
         
     | 
| 
       149 
149 
     | 
    
         | 
| 
      
 150 
     | 
    
         
            +
                def test_fraud_filter_override
         
     | 
| 
      
 151 
     | 
    
         
            +
                  hash = {
         
     | 
| 
      
 152 
     | 
    
         
            +
                    'merchantId' => '101',
         
     | 
| 
      
 153 
     | 
    
         
            +
                    'version'=>'8.12',
         
     | 
| 
      
 154 
     | 
    
         
            +
                    'orderId'=>'1',
         
     | 
| 
      
 155 
     | 
    
         
            +
                    'amount'=>'0',
         
     | 
| 
      
 156 
     | 
    
         
            +
                    'orderSource'=>'ecommerce',
         
     | 
| 
      
 157 
     | 
    
         
            +
                    'reportGroup'=>'Planets',
         
     | 
| 
      
 158 
     | 
    
         
            +
                    'fraudFilterOverride'=> 'true'
         
     | 
| 
      
 159 
     | 
    
         
            +
                  }
         
     | 
| 
      
 160 
     | 
    
         
            +
                
         
     | 
| 
      
 161 
     | 
    
         
            +
                  XMLObject.expects(:new)
         
     | 
| 
      
 162 
     | 
    
         
            +
                  Communications.expects(:http_post).with(regexp_matches(/.*<authorization.*?<fraudFilterOverride>true<\/fraudFilterOverride>.*?<\/authorization>.*/m),kind_of(Hash))
         
     | 
| 
      
 163 
     | 
    
         
            +
                  LitleOnlineRequest.new.authorization(hash)
         
     | 
| 
      
 164 
     | 
    
         
            +
                end          
         
     | 
| 
       150 
165 
     | 
    
         
             
              end
         
     | 
| 
       151 
166 
     | 
    
         | 
| 
       152 
167 
     | 
    
         
             
            end
         
     | 
    
        data/test/unit/test_sale.rb
    CHANGED
    
    | 
         @@ -233,5 +233,21 @@ module LitleOnline 
     | 
|
| 
       233 
233 
     | 
    
         
             
                  exception = assert_raise(RuntimeError){LitleOnlineRequest.new.sale(hash)}
         
     | 
| 
       234 
234 
     | 
    
         
             
                  assert_match /Entered an Invalid Amount of Choices for a Field, please only fill out one Choice!!!!/, exception.message
         
     | 
| 
       235 
235 
     | 
    
         
             
                end
         
     | 
| 
      
 236 
     | 
    
         
            +
                
         
     | 
| 
      
 237 
     | 
    
         
            +
                def test_fraud_filter_override
         
     | 
| 
      
 238 
     | 
    
         
            +
                  hash = {
         
     | 
| 
      
 239 
     | 
    
         
            +
                    'merchantId' => '101',
         
     | 
| 
      
 240 
     | 
    
         
            +
                    'version'=>'8.12',
         
     | 
| 
      
 241 
     | 
    
         
            +
                    'orderId'=>'1',
         
     | 
| 
      
 242 
     | 
    
         
            +
                    'amount'=>'0',
         
     | 
| 
      
 243 
     | 
    
         
            +
                    'orderSource'=>'ecommerce',
         
     | 
| 
      
 244 
     | 
    
         
            +
                    'reportGroup'=>'Planets',
         
     | 
| 
      
 245 
     | 
    
         
            +
                    'fraudFilterOverride'=> 'false'
         
     | 
| 
      
 246 
     | 
    
         
            +
                  }
         
     | 
| 
      
 247 
     | 
    
         
            +
                
         
     | 
| 
      
 248 
     | 
    
         
            +
                  XMLObject.expects(:new)
         
     | 
| 
      
 249 
     | 
    
         
            +
                  Communications.expects(:http_post).with(regexp_matches(/.*<sale.*?<fraudFilterOverride>false<\/fraudFilterOverride>.*?<\/sale>.*/m),kind_of(Hash))
         
     | 
| 
      
 250 
     | 
    
         
            +
                  LitleOnlineRequest.new.sale(hash)
         
     | 
| 
      
 251 
     | 
    
         
            +
                end          
         
     | 
| 
       236 
252 
     | 
    
         
             
              end
         
     | 
| 
       237 
253 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: LitleOnline
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 8. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 8.13.0
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -9,11 +9,11 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2012-05- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2012-05-18 00:00:00.000000000Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: xml-object
         
     | 
| 
       16 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 16 
     | 
    
         
            +
              requirement: &11290160 !ruby/object:Gem::Requirement
         
     | 
| 
       17 
17 
     | 
    
         
             
                none: false
         
     | 
| 
       18 
18 
     | 
    
         
             
                requirements:
         
     | 
| 
       19 
19 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -21,10 +21,10 @@ dependencies: 
     | 
|
| 
       21 
21 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       22 
22 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       23 
23 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       24 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 24 
     | 
    
         
            +
              version_requirements: *11290160
         
     | 
| 
       25 
25 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       26 
26 
     | 
    
         
             
              name: xml-mapping
         
     | 
| 
       27 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 27 
     | 
    
         
            +
              requirement: &11288320 !ruby/object:Gem::Requirement
         
     | 
| 
       28 
28 
     | 
    
         
             
                none: false
         
     | 
| 
       29 
29 
     | 
    
         
             
                requirements:
         
     | 
| 
       30 
30 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -32,10 +32,10 @@ dependencies: 
     | 
|
| 
       32 
32 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       33 
33 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       34 
34 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       35 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 35 
     | 
    
         
            +
              version_requirements: *11288320
         
     | 
| 
       36 
36 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       37 
37 
     | 
    
         
             
              name: mocha
         
     | 
| 
       38 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 38 
     | 
    
         
            +
              requirement: &11287580 !ruby/object:Gem::Requirement
         
     | 
| 
       39 
39 
     | 
    
         
             
                none: false
         
     | 
| 
       40 
40 
     | 
    
         
             
                requirements:
         
     | 
| 
       41 
41 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -43,8 +43,8 @@ dependencies: 
     | 
|
| 
       43 
43 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       44 
44 
     | 
    
         
             
              type: :development
         
     | 
| 
       45 
45 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       46 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
       47 
     | 
    
         
            -
            description: ! 'Litle Online Ruby SDK created for version 8. 
     | 
| 
      
 46 
     | 
    
         
            +
              version_requirements: *11287580
         
     | 
| 
      
 47 
     | 
    
         
            +
            description: ! 'Litle Online Ruby SDK created for version 8.13 of Litle XML online
         
     | 
| 
       48 
48 
     | 
    
         
             
              format, see the XSD schema for specific fields that are supported by this format.
         
     | 
| 
       49 
49 
     | 
    
         | 
| 
       50 
50 
     | 
    
         | 
| 
         @@ -136,6 +136,6 @@ rubygems_version: 1.8.17 
     | 
|
| 
       136 
136 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       137 
137 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       138 
138 
     | 
    
         
             
            summary: Ruby SDK produced by Litle & Co. for online transaction processing using
         
     | 
| 
       139 
     | 
    
         
            -
              Litle XML format v8. 
     | 
| 
      
 139 
     | 
    
         
            +
              Litle XML format v8.13
         
     | 
| 
       140 
140 
     | 
    
         
             
            test_files:
         
     | 
| 
       141 
141 
     | 
    
         
             
            - test/unit/ts_unit.rb
         
     |