alula-ruby 0.56.0 → 0.59.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/VERSION.md +3 -0
 - data/lib/alula/api_resource.rb +4 -0
 - data/lib/alula/procedures/feature_plan_clone_proc.rb +48 -0
 - data/lib/alula/resources/device.rb +7 -0
 - data/lib/alula/version.rb +1 -1
 - data/lib/alula.rb +1 -0
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: '0319d0525b473484d4edf6bd98d868e171849bf675aa2915c4bbdd1e9a4ae641'
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: bdaa5a675fd63d425efffb93a788401e857b649f92dac99677a38efe35eb183a
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: f31fca437531095c65a5961fc86439d081aca664737a17fdc93962941189dfe0d4461496bc4acd824ab015ccd98c62f7f19eea559caea9fe0d5c6965d4fe2c13
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 395260abac1f85c7237d1094f26b3fcf342f56e057f3cfed0879f4c308829b295a1d64278f4ad0653002d1849c2138580c5eb7ba5a2fca34eec3f8790997f60f
         
     | 
    
        data/VERSION.md
    CHANGED
    
    | 
         @@ -88,3 +88,6 @@ 
     | 
|
| 
       88 
88 
     | 
    
         
             
            | v0.54.0 | 2022-06-21  | Add support for devices from the video API |
         
     | 
| 
       89 
89 
     | 
    
         
             
            | v0.55.0 | 2022-06-25  | Add some devices helpers and improves specs |
         
     | 
| 
       90 
90 
     | 
    
         
             
            | v0.56.0 | 2022-07-08  | Add save! that raises an exception |
         
     | 
| 
      
 91 
     | 
    
         
            +
            | v0.57.0 | 2022-07-19  | Add Alula Messenger to device object |
         
     | 
| 
      
 92 
     | 
    
         
            +
            | v0.58.0 | 2022-07-21  | Add clone method, that creates a copy of a resource |
         
     | 
| 
      
 93 
     | 
    
         
            +
            | v0.59.0 | 2022-08-10  | Add clone RPC method for Feature Plans |
         
     | 
    
        data/lib/alula/api_resource.rb
    CHANGED
    
    
| 
         @@ -0,0 +1,48 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ##
         
     | 
| 
      
 2 
     | 
    
         
            +
            # source_gp_id   string  The source feature id
         
     | 
| 
      
 3 
     | 
    
         
            +
            # new_gp_id  string  New feature id
         
     | 
| 
      
 4 
     | 
    
         
            +
            # name   string  New Feature Plan name
         
     | 
| 
      
 5 
     | 
    
         
            +
            # description  boolean   New Feature Plan description
         
     | 
| 
      
 6 
     | 
    
         
            +
            # 
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            # Method: featurePlans.clone
         
     | 
| 
      
 9 
     | 
    
         
            +
            module Alula
         
     | 
| 
      
 10 
     | 
    
         
            +
              class FeaturePlanCloneProc < Alula::RpcResource
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                class Response < Alula::RpcResponse
         
     | 
| 
      
 13 
     | 
    
         
            +
                  def initialize(response)
         
     | 
| 
      
 14 
     | 
    
         
            +
                    super(response)
         
     | 
| 
      
 15 
     | 
    
         
            +
                    #
         
     | 
| 
      
 16 
     | 
    
         
            +
                    # This RPC response gives a new FeaturePlan item
         
     | 
| 
      
 17 
     | 
    
         
            +
                    data = response.data['result'][0]
         
     | 
| 
      
 18 
     | 
    
         
            +
                    attributes = {
         
     | 
| 
      
 19 
     | 
    
         
            +
                      id: data['id'],
         
     | 
| 
      
 20 
     | 
    
         
            +
                      gp_id: data['gp_id'],
         
     | 
| 
      
 21 
     | 
    
         
            +
                      name: data['name'],
         
     | 
| 
      
 22 
     | 
    
         
            +
                      description: data['description'],
         
     | 
| 
      
 23 
     | 
    
         
            +
                    }
         
     | 
| 
      
 24 
     | 
    
         
            +
                    @data = Alula::FeaturePlan.new(data['id'], attributes)
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                  def ok?
         
     | 
| 
      
 28 
     | 
    
         
            +
                    @result.is_a?(Array) || (@result['errors'].nil? && @result['error'].nil?)
         
     | 
| 
      
 29 
     | 
    
         
            +
                  end
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                def self.call(source_gp_id:, new_gp_id:, name:, description: "")
         
     | 
| 
      
 33 
     | 
    
         
            +
                  payload = {
         
     | 
| 
      
 34 
     | 
    
         
            +
                    sourceGpId: source_gp_id,
         
     | 
| 
      
 35 
     | 
    
         
            +
                    newGpId: new_gp_id,
         
     | 
| 
      
 36 
     | 
    
         
            +
                    name: name,
         
     | 
| 
      
 37 
     | 
    
         
            +
                    description: description
         
     | 
| 
      
 38 
     | 
    
         
            +
                  }
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                  request( 
         
     | 
| 
      
 41 
     | 
    
         
            +
                    http_method: :post,
         
     | 
| 
      
 42 
     | 
    
         
            +
                    path: '/rpc/v1/features/clone',
         
     | 
| 
      
 43 
     | 
    
         
            +
                    payload: payload,
         
     | 
| 
      
 44 
     | 
    
         
            +
                    handler: Response
         
     | 
| 
      
 45 
     | 
    
         
            +
                  )
         
     | 
| 
      
 46 
     | 
    
         
            +
                end
         
     | 
| 
      
 47 
     | 
    
         
            +
              end
         
     | 
| 
      
 48 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -712,5 +712,12 @@ module Alula 
     | 
|
| 
       712 
712 
     | 
    
         
             
                      filterable: true,
         
     | 
| 
       713 
713 
     | 
    
         
             
                      creatable_by: [],
         
     | 
| 
       714 
714 
     | 
    
         
             
                      patchable_by: []
         
     | 
| 
      
 715 
     | 
    
         
            +
             
     | 
| 
      
 716 
     | 
    
         
            +
                field 'features_selected.alula_messenger'.to_sym,
         
     | 
| 
      
 717 
     | 
    
         
            +
                      type: :boolean,
         
     | 
| 
      
 718 
     | 
    
         
            +
                      sortable: false,
         
     | 
| 
      
 719 
     | 
    
         
            +
                      filterable: true,
         
     | 
| 
      
 720 
     | 
    
         
            +
                      creatable_by: [],
         
     | 
| 
      
 721 
     | 
    
         
            +
                      patchable_by: []
         
     | 
| 
       715 
722 
     | 
    
         
             
              end
         
     | 
| 
       716 
723 
     | 
    
         
             
            end
         
     | 
    
        data/lib/alula/version.rb
    CHANGED
    
    
    
        data/lib/alula.rb
    CHANGED
    
    | 
         @@ -74,6 +74,7 @@ require_relative 'alula/procedures/device_unassign_proc' 
     | 
|
| 
       74 
74 
     | 
    
         
             
            require_relative 'alula/procedures/device_signal_add_proc'
         
     | 
| 
       75 
75 
     | 
    
         
             
            require_relative 'alula/procedures/device_signal_update_proc'
         
     | 
| 
       76 
76 
     | 
    
         
             
            require_relative 'alula/procedures/device_signal_delivered_proc'
         
     | 
| 
      
 77 
     | 
    
         
            +
            require_relative 'alula/procedures/feature_plan_clone_proc'
         
     | 
| 
       77 
78 
     | 
    
         
             
            require_relative 'alula/procedures/dealer_device_stats_proc'
         
     | 
| 
       78 
79 
     | 
    
         
             
            require_relative 'alula/procedures/dealer_suspend_proc'
         
     | 
| 
       79 
80 
     | 
    
         
             
            require_relative 'alula/procedures/dealer_restore_proc'
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: alula-ruby
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.59.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Titus Johnson
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-08-15 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: httparty
         
     | 
| 
         @@ -222,6 +222,7 @@ files: 
     | 
|
| 
       222 
222 
     | 
    
         
             
            - lib/alula/procedures/device_signal_update_proc.rb
         
     | 
| 
       223 
223 
     | 
    
         
             
            - lib/alula/procedures/device_unassign_proc.rb
         
     | 
| 
       224 
224 
     | 
    
         
             
            - lib/alula/procedures/device_unregister_proc.rb
         
     | 
| 
      
 225 
     | 
    
         
            +
            - lib/alula/procedures/feature_plan_clone_proc.rb
         
     | 
| 
       225 
226 
     | 
    
         
             
            - lib/alula/procedures/upload_touchpad_branding_proc.rb
         
     | 
| 
       226 
227 
     | 
    
         
             
            - lib/alula/procedures/user_plansvideo_price_get.rb
         
     | 
| 
       227 
228 
     | 
    
         
             
            - lib/alula/procedures/user_transfer_accept.rb
         
     |