gds-api-adapters 59.2.1 → 59.3.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.
- checksums.yaml +4 -4
- data/lib/gds_api/email_alert_api.rb +19 -2
- data/lib/gds_api/version.rb +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: 91b42cd68029cf84c51c7e36ba664641b7281c0b82b97bd7391721b732c22259
         | 
| 4 | 
            +
              data.tar.gz: 2245749af0e696496f34121bb239a7b1708d5aea4e171acdab957e12f5be8f1b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a863fb18d176c903318166d7c0f92c059168326f3100adbbbcafa5050d8041998fc5341184936518149cb7bb0e4e3632bc053a8e59951ba3ffdd1f494d1e0d62
         | 
| 7 | 
            +
              data.tar.gz: 2189e1437e57133d4c3578bc426be5e35d320d31db462030a51aecf3d59708afa89967a55b92eb886283bdf271e90fcd8d0ee07fc0c416887652fa2584a5d90a
         | 
| @@ -25,7 +25,6 @@ class GdsApi::EmailAlertApi < GdsApi::Base | |
| 25 25 | 
             
                email_document_supertype = attributes["email_document_supertype"]
         | 
| 26 26 | 
             
                government_document_supertype = attributes["government_document_supertype"]
         | 
| 27 27 | 
             
                gov_delivery_id = attributes["gov_delivery_id"]
         | 
| 28 | 
            -
                content_purpose_supergroup = attributes["content_purpose_supergroup"]
         | 
| 29 28 |  | 
| 30 29 | 
             
                if tags && links
         | 
| 31 30 | 
             
                  message = "please provide either tags or links (or neither), but not both"
         | 
| @@ -39,7 +38,6 @@ class GdsApi::EmailAlertApi < GdsApi::Base | |
| 39 38 | 
             
                params[:email_document_supertype] = email_document_supertype if email_document_supertype
         | 
| 40 39 | 
             
                params[:government_document_supertype] = government_document_supertype if government_document_supertype
         | 
| 41 40 | 
             
                params[:gov_delivery_id] = gov_delivery_id if gov_delivery_id
         | 
| 42 | 
            -
                params[:content_purpose_supergroup] = content_purpose_supergroup if content_purpose_supergroup
         | 
| 43 41 |  | 
| 44 42 | 
             
                query_string = nested_query_string(params)
         | 
| 45 43 | 
             
                get_json("#{endpoint}/subscriber-lists?" + query_string)
         | 
| @@ -147,6 +145,25 @@ class GdsApi::EmailAlertApi < GdsApi::Base | |
| 147 145 | 
             
                get_json("#{endpoint}/subscriptions/#{id}")
         | 
| 148 146 | 
             
              end
         | 
| 149 147 |  | 
| 148 | 
            +
              # Get the latest Subscription that has the same subscriber_list
         | 
| 149 | 
            +
              # and email as the Subscription associated with the `id` passed.
         | 
| 150 | 
            +
              # This may or may not be the same Subscription.
         | 
| 151 | 
            +
              #
         | 
| 152 | 
            +
              # @return [Hash] subscription: {
         | 
| 153 | 
            +
              #  id
         | 
| 154 | 
            +
              #  subscriber_list
         | 
| 155 | 
            +
              #  subscriber
         | 
| 156 | 
            +
              #  created_at
         | 
| 157 | 
            +
              #  updated_at
         | 
| 158 | 
            +
              #  ended_at
         | 
| 159 | 
            +
              #  ended_reason
         | 
| 160 | 
            +
              #  frequency
         | 
| 161 | 
            +
              #  source
         | 
| 162 | 
            +
              # }
         | 
| 163 | 
            +
              def get_latest_matching_subscription(id)
         | 
| 164 | 
            +
                get_json("#{endpoint}/subscriptions/#{id}/latest")
         | 
| 165 | 
            +
              end
         | 
| 166 | 
            +
             | 
| 150 167 | 
             
              # Get Subscriptions for a Subscriber
         | 
| 151 168 | 
             
              #
         | 
| 152 169 | 
             
              # @param [integer] Subscriber id
         | 
    
        data/lib/gds_api/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: gds-api-adapters
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 59. | 
| 4 | 
            +
              version: 59.3.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - GOV.UK Dev
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2019-05- | 
| 11 | 
            +
            date: 2019-05-20 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: addressable
         |