trycourier 1.10.0 → 2.0.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/Gemfile.lock +1 -1
 - data/lib/trycourier/{accounts.rb → tenants.rb} +10 -10
 - data/lib/trycourier/version.rb +1 -1
 - data/lib/trycourier.rb +3 -3
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: ed06b560fed0c9881240f285a4d5cbcb173a0f4e39bf1c7f02d6a21f0a49e063
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4a1ff4327690053cbe006031adddcab34c35dd2fe793c377199cd2f28e779ba7
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 017c2f33d4f3157e9caaa5f05005ee69f7a5f4c5f6742e79c366a2075a343233dcb5483b2882748585a1738ca60c22bd79b6ff2f064e9280981e5e5bb2cbaaa9
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ac4c4ffa940d694f87806ba01d59d1c5dfa4097e6e17a02250469735609fb0eda54558bc864d19d22d793b1331e7d7a1314a301d6717ff564f5e0a65a4323d9c
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
| 
         @@ -1,18 +1,18 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Courier
         
     | 
| 
       2 
     | 
    
         
            -
              class  
     | 
| 
       3 
     | 
    
         
            -
                KEY = "/ 
     | 
| 
      
 2 
     | 
    
         
            +
              class Tenants
         
     | 
| 
      
 3 
     | 
    
         
            +
                KEY = "/tenants"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
                def initialize(session)
         
     | 
| 
       6 
6 
     | 
    
         
             
                  @session = session
         
     | 
| 
       7 
7 
     | 
    
         
             
                end
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
                def  
     | 
| 
       10 
     | 
    
         
            -
                  path = "#{KEY}/#{ 
     | 
| 
      
 9 
     | 
    
         
            +
                def get_tenant(tenant_id:)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  path = "#{KEY}/#{tenant_id}"
         
     | 
| 
       11 
11 
     | 
    
         
             
                  res = @session.send(path, "GET")
         
     | 
| 
       12 
12 
     | 
    
         
             
                  ErrorHandler.check_err(res)
         
     | 
| 
       13 
13 
     | 
    
         
             
                end
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
                def  
     | 
| 
      
 15 
     | 
    
         
            +
                def get_tenants(limit: nil, cursor: nil)
         
     | 
| 
       16 
16 
     | 
    
         
             
                  params = {}
         
     | 
| 
       17 
17 
     | 
    
         
             
                  if limit
         
     | 
| 
       18 
18 
     | 
    
         
             
                    params["limit"] = limit
         
     | 
| 
         @@ -26,15 +26,15 @@ module Courier 
     | 
|
| 
       26 
26 
     | 
    
         
             
                  ErrorHandler.check_err(res)
         
     | 
| 
       27 
27 
     | 
    
         
             
                end
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
                def  
     | 
| 
       30 
     | 
    
         
            -
                  path = "#{KEY}/#{ 
     | 
| 
      
 29 
     | 
    
         
            +
                def put_tenant(tenant_id:, tenant:)
         
     | 
| 
      
 30 
     | 
    
         
            +
                  path = "#{KEY}/#{tenant_id}"
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
     | 
    
         
            -
                  res = @session.send(path, "PUT", body:  
     | 
| 
      
 32 
     | 
    
         
            +
                  res = @session.send(path, "PUT", body: tenant, headers: {})
         
     | 
| 
       33 
33 
     | 
    
         
             
                  ErrorHandler.check_err(res)
         
     | 
| 
       34 
34 
     | 
    
         
             
                end
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
       36 
     | 
    
         
            -
                def  
     | 
| 
       37 
     | 
    
         
            -
                  path = "#{KEY}/#{ 
     | 
| 
      
 36 
     | 
    
         
            +
                def delete_tenant(tenant_id:)
         
     | 
| 
      
 37 
     | 
    
         
            +
                  path = "#{KEY}/#{tenant_id}"
         
     | 
| 
       38 
38 
     | 
    
         
             
                  res = @session.send(path, "DELETE")
         
     | 
| 
       39 
39 
     | 
    
         
             
                  ErrorHandler.check_err_non_json(res)
         
     | 
| 
       40 
40 
     | 
    
         
             
                end
         
     | 
    
        data/lib/trycourier/version.rb
    CHANGED
    
    
    
        data/lib/trycourier.rb
    CHANGED
    
    | 
         @@ -8,7 +8,7 @@ require "trycourier/automations" 
     | 
|
| 
       8 
8 
     | 
    
         
             
            require "trycourier/bulk"
         
     | 
| 
       9 
9 
     | 
    
         
             
            require "trycourier/audiences"
         
     | 
| 
       10 
10 
     | 
    
         
             
            require "trycourier/audit_events"
         
     | 
| 
       11 
     | 
    
         
            -
            require "trycourier/ 
     | 
| 
      
 11 
     | 
    
         
            +
            require "trycourier/tenants"
         
     | 
| 
       12 
12 
     | 
    
         
             
            require "trycourier/auth_tokens"
         
     | 
| 
       13 
13 
     | 
    
         
             
            require "trycourier/version"
         
     | 
| 
       14 
14 
     | 
    
         
             
            require "trycourier/exceptions"
         
     | 
| 
         @@ -69,7 +69,7 @@ module Courier 
     | 
|
| 
       69 
69 
     | 
    
         
             
                  @bulk = Courier::Bulk.new(@session)
         
     | 
| 
       70 
70 
     | 
    
         
             
                  @audiences = Courier::Audiences.new(@session)
         
     | 
| 
       71 
71 
     | 
    
         
             
                  @audit_events = Courier::AuditEvents.new(@session)
         
     | 
| 
       72 
     | 
    
         
            -
                  @ 
     | 
| 
      
 72 
     | 
    
         
            +
                  @tenants = Courier::Tenants.new(@session)
         
     | 
| 
       73 
73 
     | 
    
         
             
                  @auth_tokens = Courier::AuthTokens.new(@session)
         
     | 
| 
       74 
74 
     | 
    
         
             
                end
         
     | 
| 
       75 
75 
     | 
    
         | 
| 
         @@ -143,7 +143,7 @@ module Courier 
     | 
|
| 
       143 
143 
     | 
    
         | 
| 
       144 
144 
     | 
    
         
             
                attr_reader :audit_events
         
     | 
| 
       145 
145 
     | 
    
         | 
| 
       146 
     | 
    
         
            -
                attr_reader : 
     | 
| 
      
 146 
     | 
    
         
            +
                attr_reader :tenants
         
     | 
| 
       147 
147 
     | 
    
         | 
| 
       148 
148 
     | 
    
         
             
                attr_reader :auth_tokens
         
     | 
| 
       149 
149 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: trycourier
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.0.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Courier
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2023-08- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-08-09 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rspec
         
     | 
| 
         @@ -61,7 +61,6 @@ files: 
     | 
|
| 
       61 
61 
     | 
    
         
             
            - bin/console
         
     | 
| 
       62 
62 
     | 
    
         
             
            - bin/setup
         
     | 
| 
       63 
63 
     | 
    
         
             
            - lib/trycourier.rb
         
     | 
| 
       64 
     | 
    
         
            -
            - lib/trycourier/accounts.rb
         
     | 
| 
       65 
64 
     | 
    
         
             
            - lib/trycourier/audiences.rb
         
     | 
| 
       66 
65 
     | 
    
         
             
            - lib/trycourier/audit_events.rb
         
     | 
| 
       67 
66 
     | 
    
         
             
            - lib/trycourier/auth_tokens.rb
         
     | 
| 
         @@ -74,6 +73,7 @@ files: 
     | 
|
| 
       74 
73 
     | 
    
         
             
            - lib/trycourier/messages.rb
         
     | 
| 
       75 
74 
     | 
    
         
             
            - lib/trycourier/profiles.rb
         
     | 
| 
       76 
75 
     | 
    
         
             
            - lib/trycourier/session.rb
         
     | 
| 
      
 76 
     | 
    
         
            +
            - lib/trycourier/tenants.rb
         
     | 
| 
       77 
77 
     | 
    
         
             
            - lib/trycourier/version.rb
         
     | 
| 
       78 
78 
     | 
    
         
             
            - trycourier.gemspec
         
     | 
| 
       79 
79 
     | 
    
         
             
            homepage: https://github.com/trycourier/courier-ruby
         
     |