tessitura_rest 0.1.4 → 0.1.5
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/lib/tessitura_rest/version.rb +1 -1
- data/lib/tessitura_rest/web/session.rb +28 -0
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: b86d082b3709916579c931b5329ac2bcc84acbc0
         | 
| 4 | 
            +
              data.tar.gz: 8bf244efe935ec5cb11e4d686f556c2aea256d5b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: da28bd3277036d09432bff028736240129d0ef4b76dd00bdf2ea7feae9b5cd30bad9ba18f20a4ea44aeffdf97f831dae06d10183b8af4d06146425e4e536ecc1
         | 
| 7 | 
            +
              data.tar.gz: c3e594822c723e6329e028ad21787f7ccf4f092d5f8cecd1d2c12eec9e5286e088374bc7a653c8c23832ecf728e197144d7312e476cba2310933df21765d512a
         | 
| @@ -6,6 +6,34 @@ module Session | |
| 6 6 | 
             
                JSON.parse(response.body)
         | 
| 7 7 | 
             
              end
         | 
| 8 8 |  | 
| 9 | 
            +
              def create_session(ip, options={})
         | 
| 10 | 
            +
                parameters =
         | 
| 11 | 
            +
                  {
         | 
| 12 | 
            +
                      'IpAddress': ip
         | 
| 13 | 
            +
                  }
         | 
| 14 | 
            +
                options.merge!({:basic_auth => @auth})
         | 
| 15 | 
            +
                options.merge!(:body => parameters)
         | 
| 16 | 
            +
                response = self.class.post(base_api_endpoint('Web/Session'), options)
         | 
| 17 | 
            +
                JSON.parse(response.body)
         | 
| 18 | 
            +
              end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
              def get_expiration(key, options={})
         | 
| 21 | 
            +
                options.merge!({:basic_auth => @auth})
         | 
| 22 | 
            +
                response = self.class.get(base_api_endpoint("Web/Session/#{key}/Expiration"), options)
         | 
| 23 | 
            +
                JSON.parse(response.body)
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
              def set_expiration(key, expiration, options={})
         | 
| 27 | 
            +
                parameters =
         | 
| 28 | 
            +
                {
         | 
| 29 | 
            +
                      'Expiration': expiration
         | 
| 30 | 
            +
                }
         | 
| 31 | 
            +
                options.merge!({:basic_auth => @auth})
         | 
| 32 | 
            +
                options.merge!(:body => parameters)
         | 
| 33 | 
            +
                response = self.class.put(base_api_endpoint("Web/Session/#{key}/Expiration"), options)
         | 
| 34 | 
            +
                JSON.parse(response.body)
         | 
| 35 | 
            +
              end
         | 
| 36 | 
            +
             | 
| 9 37 | 
             
              def get_promotion(key, code, options={})
         | 
| 10 38 | 
             
                parameters =
         | 
| 11 39 | 
             
                  {
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: tessitura_rest
         | 
| 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 | 
             
            - Brittany Martin
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2018-01- | 
| 11 | 
            +
            date: 2018-01-12 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         |