files.com 1.0.314 → 1.0.315
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/_VERSION +1 -1
 - data/docs/bundle_notification.md +42 -0
 - data/lib/files.com/models/bundle_notification.rb +37 -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: 3e57fafa3fb08c3d5836b0fe7995b6d9e0092067aadc5a13abef94c7e94314ed
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 2164c89175e797ef8c11397e68b7774a8a3294fd7c8fa5b332561052b806459b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c0a8cb3788c3ea9a3b99930acc711fc886103f9fbc30ecd729f0921219266ae872eca40d7bb7dfc6a17cb20c7b2020bec185f438514438a880e2b0306d866a72
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: f3f25a2873b204f9524a0851f745cfce737ccfecc8996af2467b5a2c0cffad1e13e453a06e9564c0a0e901d5493f907a03f17d461e5d95147f6666a0dd496b86
         
     | 
    
        data/_VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            1.0. 
     | 
| 
      
 1 
     | 
    
         
            +
            1.0.315
         
     | 
    
        data/docs/bundle_notification.md
    CHANGED
    
    | 
         @@ -7,6 +7,7 @@ 
     | 
|
| 
       7 
7 
     | 
    
         
             
              "bundle_id": 1,
         
     | 
| 
       8 
8 
     | 
    
         
             
              "id": 1,
         
     | 
| 
       9 
9 
     | 
    
         
             
              "notify_on_registration": true,
         
     | 
| 
      
 10 
     | 
    
         
            +
              "notify_on_upload": true,
         
     | 
| 
       10 
11 
     | 
    
         
             
              "user_id": 1
         
     | 
| 
       11 
12 
     | 
    
         
             
            }
         
     | 
| 
       12 
13 
     | 
    
         
             
            ```
         
     | 
| 
         @@ -14,6 +15,7 @@ 
     | 
|
| 
       14 
15 
     | 
    
         
             
            * `bundle_id` (int64): Bundle ID to notify on
         
     | 
| 
       15 
16 
     | 
    
         
             
            * `id` (int64): Bundle Notification ID
         
     | 
| 
       16 
17 
     | 
    
         
             
            * `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
         
     | 
| 
      
 18 
     | 
    
         
            +
            * `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
         
     | 
| 
       17 
19 
     | 
    
         
             
            * `user_id` (int64): The id of the user to notify.
         
     | 
| 
       18 
20 
     | 
    
         | 
| 
       19 
21 
     | 
    
         | 
| 
         @@ -58,6 +60,7 @@ Files::BundleNotification.find(id) 
     | 
|
| 
       58 
60 
     | 
    
         
             
            Files::BundleNotification.create(
         
     | 
| 
       59 
61 
     | 
    
         
             
              user_id: 1, 
         
     | 
| 
       60 
62 
     | 
    
         
             
              notify_on_registration: true, 
         
     | 
| 
      
 63 
     | 
    
         
            +
              notify_on_upload: true, 
         
     | 
| 
       61 
64 
     | 
    
         
             
              bundle_id: 1
         
     | 
| 
       62 
65 
     | 
    
         
             
            )
         
     | 
| 
       63 
66 
     | 
    
         
             
            ```
         
     | 
| 
         @@ -66,9 +69,28 @@ Files::BundleNotification.create( 
     | 
|
| 
       66 
69 
     | 
    
         | 
| 
       67 
70 
     | 
    
         
             
            * `user_id` (int64): Required - The id of the user to notify.
         
     | 
| 
       68 
71 
     | 
    
         
             
            * `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
         
     | 
| 
      
 72 
     | 
    
         
            +
            * `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
         
     | 
| 
       69 
73 
     | 
    
         
             
            * `bundle_id` (int64): Required - Bundle ID to notify on
         
     | 
| 
       70 
74 
     | 
    
         | 
| 
       71 
75 
     | 
    
         | 
| 
      
 76 
     | 
    
         
            +
            ---
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
            ## Update Bundle Notification
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
            ```
         
     | 
| 
      
 81 
     | 
    
         
            +
            Files::BundleNotification.update(id, 
         
     | 
| 
      
 82 
     | 
    
         
            +
              notify_on_registration: true, 
         
     | 
| 
      
 83 
     | 
    
         
            +
              notify_on_upload: true
         
     | 
| 
      
 84 
     | 
    
         
            +
            )
         
     | 
| 
      
 85 
     | 
    
         
            +
            ```
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
            ### Parameters
         
     | 
| 
      
 88 
     | 
    
         
            +
             
     | 
| 
      
 89 
     | 
    
         
            +
            * `id` (int64): Required - Bundle Notification ID.
         
     | 
| 
      
 90 
     | 
    
         
            +
            * `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
         
     | 
| 
      
 91 
     | 
    
         
            +
            * `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
         
     | 
| 
      
 92 
     | 
    
         
            +
             
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
       72 
94 
     | 
    
         
             
            ---
         
     | 
| 
       73 
95 
     | 
    
         | 
| 
       74 
96 
     | 
    
         
             
            ## Delete Bundle Notification
         
     | 
| 
         @@ -82,6 +104,26 @@ Files::BundleNotification.delete(id) 
     | 
|
| 
       82 
104 
     | 
    
         
             
            * `id` (int64): Required - Bundle Notification ID.
         
     | 
| 
       83 
105 
     | 
    
         | 
| 
       84 
106 
     | 
    
         | 
| 
      
 107 
     | 
    
         
            +
            ---
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
            ## Update Bundle Notification
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
            ```
         
     | 
| 
      
 112 
     | 
    
         
            +
            bundle_notification = Files::BundleNotification.list.first
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
            bundle_notification.update(
         
     | 
| 
      
 115 
     | 
    
         
            +
              notify_on_registration: true,
         
     | 
| 
      
 116 
     | 
    
         
            +
              notify_on_upload: true
         
     | 
| 
      
 117 
     | 
    
         
            +
            )
         
     | 
| 
      
 118 
     | 
    
         
            +
            ```
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
            ### Parameters
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
      
 122 
     | 
    
         
            +
            * `id` (int64): Required - Bundle Notification ID.
         
     | 
| 
      
 123 
     | 
    
         
            +
            * `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
         
     | 
| 
      
 124 
     | 
    
         
            +
            * `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
         
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
       85 
127 
     | 
    
         
             
            ---
         
     | 
| 
       86 
128 
     | 
    
         | 
| 
       87 
129 
     | 
    
         
             
            ## Delete Bundle Notification
         
     | 
| 
         @@ -36,6 +36,15 @@ module Files 
     | 
|
| 
       36 
36 
     | 
    
         
             
                  @attributes[:notify_on_registration] = value
         
     | 
| 
       37 
37 
     | 
    
         
             
                end
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
      
 39 
     | 
    
         
            +
                # boolean - Triggers bundle notification when a upload action occurs for it.
         
     | 
| 
      
 40 
     | 
    
         
            +
                def notify_on_upload
         
     | 
| 
      
 41 
     | 
    
         
            +
                  @attributes[:notify_on_upload]
         
     | 
| 
      
 42 
     | 
    
         
            +
                end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                def notify_on_upload=(value)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  @attributes[:notify_on_upload] = value
         
     | 
| 
      
 46 
     | 
    
         
            +
                end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
       39 
48 
     | 
    
         
             
                # int64 - The id of the user to notify.
         
     | 
| 
       40 
49 
     | 
    
         
             
                def user_id
         
     | 
| 
       41 
50 
     | 
    
         
             
                  @attributes[:user_id]
         
     | 
| 
         @@ -45,6 +54,19 @@ module Files 
     | 
|
| 
       45 
54 
     | 
    
         
             
                  @attributes[:user_id] = value
         
     | 
| 
       46 
55 
     | 
    
         
             
                end
         
     | 
| 
       47 
56 
     | 
    
         | 
| 
      
 57 
     | 
    
         
            +
                # Parameters:
         
     | 
| 
      
 58 
     | 
    
         
            +
                #   notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
         
     | 
| 
      
 59 
     | 
    
         
            +
                #   notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
         
     | 
| 
      
 60 
     | 
    
         
            +
                def update(params = {})
         
     | 
| 
      
 61 
     | 
    
         
            +
                  params ||= {}
         
     | 
| 
      
 62 
     | 
    
         
            +
                  params[:id] = @attributes[:id]
         
     | 
| 
      
 63 
     | 
    
         
            +
                  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
         
     | 
| 
      
 64 
     | 
    
         
            +
                  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
         
     | 
| 
      
 65 
     | 
    
         
            +
                  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
                  Api.send_request("/bundle_notifications/#{@attributes[:id]}", :patch, params, @options)
         
     | 
| 
      
 68 
     | 
    
         
            +
                end
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
       48 
70 
     | 
    
         
             
                def delete(params = {})
         
     | 
| 
       49 
71 
     | 
    
         
             
                  params ||= {}
         
     | 
| 
       50 
72 
     | 
    
         
             
                  params[:id] = @attributes[:id]
         
     | 
| 
         @@ -61,7 +83,7 @@ module Files 
     | 
|
| 
       61 
83 
     | 
    
         | 
| 
       62 
84 
     | 
    
         
             
                def save
         
     | 
| 
       63 
85 
     | 
    
         
             
                  if @attributes[:id]
         
     | 
| 
       64 
     | 
    
         
            -
                     
     | 
| 
      
 86 
     | 
    
         
            +
                    update(@attributes)
         
     | 
| 
       65 
87 
     | 
    
         
             
                  else
         
     | 
| 
       66 
88 
     | 
    
         
             
                    new_obj = BundleNotification.create(@attributes, @options)
         
     | 
| 
       67 
89 
     | 
    
         
             
                    @attributes = new_obj.attributes
         
     | 
| 
         @@ -107,6 +129,7 @@ module Files 
     | 
|
| 
       107 
129 
     | 
    
         
             
                # Parameters:
         
     | 
| 
       108 
130 
     | 
    
         
             
                #   user_id (required) - int64 - The id of the user to notify.
         
     | 
| 
       109 
131 
     | 
    
         
             
                #   notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
         
     | 
| 
      
 132 
     | 
    
         
            +
                #   notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
         
     | 
| 
       110 
133 
     | 
    
         
             
                #   bundle_id (required) - int64 - Bundle ID to notify on
         
     | 
| 
       111 
134 
     | 
    
         
             
                def self.create(params = {}, options = {})
         
     | 
| 
       112 
135 
     | 
    
         
             
                  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
         
     | 
| 
         @@ -118,6 +141,19 @@ module Files 
     | 
|
| 
       118 
141 
     | 
    
         
             
                  BundleNotification.new(response.data, options)
         
     | 
| 
       119 
142 
     | 
    
         
             
                end
         
     | 
| 
       120 
143 
     | 
    
         | 
| 
      
 144 
     | 
    
         
            +
                # Parameters:
         
     | 
| 
      
 145 
     | 
    
         
            +
                #   notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
         
     | 
| 
      
 146 
     | 
    
         
            +
                #   notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
         
     | 
| 
      
 147 
     | 
    
         
            +
                def self.update(id, params = {}, options = {})
         
     | 
| 
      
 148 
     | 
    
         
            +
                  params ||= {}
         
     | 
| 
      
 149 
     | 
    
         
            +
                  params[:id] = id
         
     | 
| 
      
 150 
     | 
    
         
            +
                  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
         
     | 
| 
      
 151 
     | 
    
         
            +
                  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
                  response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :patch, params, options)
         
     | 
| 
      
 154 
     | 
    
         
            +
                  BundleNotification.new(response.data, options)
         
     | 
| 
      
 155 
     | 
    
         
            +
                end
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
       121 
157 
     | 
    
         
             
                def self.delete(id, params = {}, options = {})
         
     | 
| 
       122 
158 
     | 
    
         
             
                  params ||= {}
         
     | 
| 
       123 
159 
     | 
    
         
             
                  params[:id] = id
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: files.com
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.315
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - files.com
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022-12- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-12-22 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: addressable
         
     |