tenios-api 0.2.1 → 1.0.2
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 +5 -5
 - data/.circleci/config.yml +24 -42
 - data/.gitignore +1 -0
 - data/CHANGELOG.md +38 -0
 - data/Gemfile +1 -1
 - data/README.md +37 -1
 - data/Rakefile +4 -1
 - data/bin/console +7 -0
 - data/lib/tenios-api.rb +7 -1
 - data/lib/tenios/api/call_detail_records.rb +6 -7
 - data/lib/tenios/api/client.rb +32 -26
 - data/lib/tenios/api/number.rb +11 -9
 - data/lib/tenios/api/record_call.rb +21 -0
 - data/lib/tenios/api/verification.rb +4 -6
 - data/lib/tenios/api/version.rb +1 -1
 - data/tenios-api.gemspec +24 -28
 - metadata +50 -44
 - data/Gemfile.lock +0 -73
 - data/lib/tenios/api.rb +0 -9
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 355929e91b4ce16cc94d0bdc54c87b155f04c8a48d9c3ecc599eb8ff62d98c38
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 0f9a953d42796beb4d85ba29259665b868883c368de8a91c79e7dbf56d247faa
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c51c611dc912bfa859d03cc55a78217f6509c8fe8bf6da1a7d2ade5c6bb886e0cb4ed7a635a7f3e994f116ed4d743d4be85cea87f12f927c0b324866393a040c
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 47a989077a4f6987b6e073553e163b952998c40e880a31ac553f3c83f17a394e642e995bcee1fe2bd48192d1fc8dde405bcd9c5abbe1c0aae64583271e8d9ebd
         
     | 
    
        data/.circleci/config.yml
    CHANGED
    
    | 
         @@ -1,54 +1,36 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
       2 
     | 
    
         
            -
              image: carwow/ruby-ci:2.6
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            version: 2
         
     | 
| 
      
 1 
     | 
    
         
            +
            version: 2.1
         
     | 
| 
       5 
2 
     | 
    
         | 
| 
       6 
3 
     | 
    
         
             
            jobs:
         
     | 
| 
       7 
     | 
    
         
            -
               
     | 
| 
       8 
     | 
    
         
            -
                 
     | 
| 
      
 4 
     | 
    
         
            +
              test:
         
     | 
| 
      
 5 
     | 
    
         
            +
                parameters:
         
     | 
| 
      
 6 
     | 
    
         
            +
                  ruby_version:
         
     | 
| 
      
 7 
     | 
    
         
            +
                    type: string
         
     | 
| 
       9 
8 
     | 
    
         
             
                docker:
         
     | 
| 
       10 
     | 
    
         
            -
                  -  
     | 
| 
      
 9 
     | 
    
         
            +
                  - image: cimg/ruby:<< parameters.ruby_version >>
         
     | 
| 
       11 
10 
     | 
    
         
             
                steps:
         
     | 
| 
       12 
11 
     | 
    
         
             
                  - checkout
         
     | 
| 
       13 
12 
     | 
    
         
             
                  - restore_cache:
         
     | 
| 
       14 
13 
     | 
    
         
             
                      keys:
         
     | 
| 
       15 
     | 
    
         
            -
                        - bundle-{{ checksum " 
     | 
| 
       16 
     | 
    
         
            -
                        - bundle-
         
     | 
| 
       17 
     | 
    
         
            -
                  - run: 
     | 
| 
       18 
     | 
    
         
            -
                       
     | 
| 
       19 
     | 
    
         
            -
                       
     | 
| 
      
 14 
     | 
    
         
            +
                        - bundle-ruby-<< parameters.ruby_version >>-{{ checksum "tenios-api.gemspec" }}
         
     | 
| 
      
 15 
     | 
    
         
            +
                        - bundle-ruby-<< parameters.ruby_version >>
         
     | 
| 
      
 16 
     | 
    
         
            +
                  - run:
         
     | 
| 
      
 17 
     | 
    
         
            +
                      name: bundle update
         
     | 
| 
      
 18 
     | 
    
         
            +
                      command: |
         
     | 
| 
      
 19 
     | 
    
         
            +
                        bundle config --local path vendor/bundle
         
     | 
| 
      
 20 
     | 
    
         
            +
                        bundle update --jobs=4 --retry=3
         
     | 
| 
      
 21 
     | 
    
         
            +
                        bundle clean --force
         
     | 
| 
       20 
22 
     | 
    
         
             
                  - save_cache:
         
     | 
| 
       21 
     | 
    
         
            -
                      key: bundle-{{ checksum " 
     | 
| 
       22 
     | 
    
         
            -
                      paths: [~/ 
     | 
| 
       23 
     | 
    
         
            -
                  -  
     | 
| 
       24 
     | 
    
         
            -
                      root: '~'
         
     | 
| 
       25 
     | 
    
         
            -
                      paths: [tenios-api]
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
              rubocop:
         
     | 
| 
       28 
     | 
    
         
            -
                working_directory: ~/tenios-api
         
     | 
| 
       29 
     | 
    
         
            -
                docker:
         
     | 
| 
       30 
     | 
    
         
            -
                  - *ruby
         
     | 
| 
       31 
     | 
    
         
            -
                steps:
         
     | 
| 
       32 
     | 
    
         
            -
                  - attach_workspace:
         
     | 
| 
       33 
     | 
    
         
            -
                      at: '~'
         
     | 
| 
       34 
     | 
    
         
            -
                  - run: bundle exec rubocop
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
              tests:
         
     | 
| 
       37 
     | 
    
         
            -
                working_directory: ~/tenios-api
         
     | 
| 
       38 
     | 
    
         
            -
                docker:
         
     | 
| 
       39 
     | 
    
         
            -
                  - *ruby
         
     | 
| 
       40 
     | 
    
         
            -
                steps:
         
     | 
| 
       41 
     | 
    
         
            -
                  - attach_workspace:
         
     | 
| 
       42 
     | 
    
         
            -
                      at: '~'
         
     | 
| 
       43 
     | 
    
         
            -
                  - run: |
         
     | 
| 
       44 
     | 
    
         
            -
                      bundle exec rspec
         
     | 
| 
      
 23 
     | 
    
         
            +
                      key: bundle-ruby-<< parameters.ruby_version >>-{{ checksum "tenios-api.gemspec" }}
         
     | 
| 
      
 24 
     | 
    
         
            +
                      paths: [~/project/vendor/bundle]
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - run: bundle exec rake
         
     | 
| 
       45 
26 
     | 
    
         | 
| 
       46 
27 
     | 
    
         
             
            workflows:
         
     | 
| 
       47 
28 
     | 
    
         
             
              version: 2
         
     | 
| 
       48 
     | 
    
         
            -
               
     | 
| 
      
 29 
     | 
    
         
            +
              test:
         
     | 
| 
       49 
30 
     | 
    
         
             
                jobs:
         
     | 
| 
       50 
     | 
    
         
            -
                  -  
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
      
 31 
     | 
    
         
            +
                  - test:
         
     | 
| 
      
 32 
     | 
    
         
            +
                      matrix:
         
     | 
| 
      
 33 
     | 
    
         
            +
                        parameters:
         
     | 
| 
      
 34 
     | 
    
         
            +
                          ruby_version:
         
     | 
| 
      
 35 
     | 
    
         
            +
                            - "2.7"
         
     | 
| 
      
 36 
     | 
    
         
            +
                            - "3.0"
         
     | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/CHANGELOG.md
    ADDED
    
    | 
         @@ -0,0 +1,38 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ## [Unreleased]
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ### Added
         
     | 
| 
      
 4 
     | 
    
         
            +
            ### Changed
         
     | 
| 
      
 5 
     | 
    
         
            +
            ### Deprecated
         
     | 
| 
      
 6 
     | 
    
         
            +
            ### Removed
         
     | 
| 
      
 7 
     | 
    
         
            +
            ### Fixed
         
     | 
| 
      
 8 
     | 
    
         
            +
            ### Security
         
     | 
| 
      
 9 
     | 
    
         
            +
            ### Misc
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ## [1.0.2] - 2020-02-13
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            ### Misc
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            * Fix gemspec links
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            [1.0.2]: https://github.com/carwow/deals_service_client/compare/v1.0.1...v1.0.2
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            ## [1.0.1] - 2020-02-13
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            ### Added
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            * Ruby 3.0 support
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            [1.0.1]: https://github.com/carwow/deals_service_client/compare/v1.0.0...v1.0.1
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            ## [1.0.0] - 2020-02-12
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            ### Changed
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            * Tenios API URL is now https://api.tenios.com
         
     | 
| 
      
 32 
     | 
    
         
            +
            * Ruby ~> 2.7 support
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
            ### Misc
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            * Internal refactoring (no breaking changes)
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            [1.0.0]: https://github.com/carwow/deals_service_client/compare/v0.4.0...v1.0.0
         
     | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -24,8 +24,10 @@ client = Tenios::API::Client.new(access_key: ENV['TENIOS_ACCESS_KEY']) 
     | 
|
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
            [Tenios documentation](https://www.tenios.de/en/doc/api-cdr-request)
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
      
 27 
     | 
    
         
            +
            #### Retrive
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
       27 
29 
     | 
    
         
             
            ```ruby
         
     | 
| 
       28 
     | 
    
         
            -
            client. 
     | 
| 
      
 30 
     | 
    
         
            +
            client.call_detail_records.retrieve(Time.utc(2019, 2, 1)..Time.utc(2019, 2, 2))
         
     | 
| 
       29 
31 
     | 
    
         
             
            # returns lazy Enumerator with the records
         
     | 
| 
       30 
32 
     | 
    
         
             
            ```
         
     | 
| 
       31 
33 
     | 
    
         | 
| 
         @@ -33,12 +35,46 @@ client.cdrs.retrieve(Time.utc(2019, 2, 1)..Time.utc(2019, 2, 2)) 
     | 
|
| 
       33 
35 
     | 
    
         | 
| 
       34 
36 
     | 
    
         
             
            [Tenios documentation](https://www.tenios.de/en/doc/api-number-order)
         
     | 
| 
       35 
37 
     | 
    
         | 
| 
      
 38 
     | 
    
         
            +
            #### Verification
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
       36 
40 
     | 
    
         
             
            ```ruby
         
     | 
| 
       37 
41 
     | 
    
         
             
            # check Tenios documentation for verification options
         
     | 
| 
       38 
42 
     | 
    
         
             
            verification_id = client.verification.create(options)['verification_id']
         
     | 
| 
      
 43 
     | 
    
         
            +
            ```
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
            #### Order
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            ```ruby
         
     | 
| 
       39 
48 
     | 
    
         
             
            order_id = client.number.order(verification_id: verification_id)['order_id']
         
     | 
| 
       40 
49 
     | 
    
         
             
            ```
         
     | 
| 
       41 
50 
     | 
    
         | 
| 
      
 51 
     | 
    
         
            +
            #### Cancel
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 54 
     | 
    
         
            +
            client.number.cancel(phone_number: '+49888888')
         
     | 
| 
      
 55 
     | 
    
         
            +
            ```
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
            ### Record Call
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            [Tenios documentation](https://www.tenios.de/en/doc/api-call-recording)
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            #### Start
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 64 
     | 
    
         
            +
            recording_uuid = client.record_call.start(
         
     | 
| 
      
 65 
     | 
    
         
            +
              call_uuid: '9315b018-86bd-424f-a086-7095ce427130'
         
     | 
| 
      
 66 
     | 
    
         
            +
            )['recording_uuid']
         
     | 
| 
      
 67 
     | 
    
         
            +
            ```
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            #### Stop
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 72 
     | 
    
         
            +
            client.record_call.stop(
         
     | 
| 
      
 73 
     | 
    
         
            +
              call_uuid: '9315b018-86bd-424f-a086-7095ce427130',
         
     | 
| 
      
 74 
     | 
    
         
            +
              recording_uuid: recording_uuid
         
     | 
| 
      
 75 
     | 
    
         
            +
            )
         
     | 
| 
      
 76 
     | 
    
         
            +
            ```
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
       42 
78 
     | 
    
         
             
            ## Contributing
         
     | 
| 
       43 
79 
     | 
    
         | 
| 
       44 
80 
     | 
    
         
             
            Bug reports and pull requests are welcome on GitHub at https://github.com/carwow/tenios-api-ruby.
         
     | 
    
        data/Rakefile
    CHANGED
    
    
    
        data/bin/console
    ADDED
    
    
    
        data/lib/tenios-api.rb
    CHANGED
    
    
| 
         @@ -12,7 +12,7 @@ module Tenios 
     | 
|
| 
       12 
12 
     | 
    
         
             
                  def retrieve(date_range, page_size: 100)
         
     | 
| 
       13 
13 
     | 
    
         
             
                    stream do |page|
         
     | 
| 
       14 
14 
     | 
    
         
             
                      payload = build_payload(date_range, page: page, page_size: page_size)
         
     | 
| 
       15 
     | 
    
         
            -
                      client. 
     | 
| 
      
 15 
     | 
    
         
            +
                      client.post("/cdrs/retrieve", payload)
         
     | 
| 
       16 
16 
     | 
    
         
             
                    end
         
     | 
| 
       17 
17 
     | 
    
         
             
                  end
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
         @@ -22,7 +22,6 @@ module Tenios 
     | 
|
| 
       22 
22 
     | 
    
         
             
                    expect_date_range! date_range
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
                    {
         
     | 
| 
       25 
     | 
    
         
            -
                      access_key: client.access_key,
         
     | 
| 
       26 
25 
     | 
    
         
             
                      start_date_from: format_datetime(date_range.begin),
         
     | 
| 
       27 
26 
     | 
    
         
             
                      start_date_to: format_datetime(date_range.end),
         
     | 
| 
       28 
27 
     | 
    
         
             
                      page: page,
         
     | 
| 
         @@ -39,17 +38,17 @@ module Tenios 
     | 
|
| 
       39 
38 
     | 
    
         
             
                  end
         
     | 
| 
       40 
39 
     | 
    
         | 
| 
       41 
40 
     | 
    
         
             
                  def format_datetime(time)
         
     | 
| 
       42 
     | 
    
         
            -
                    time.utc.strftime( 
     | 
| 
      
 41 
     | 
    
         
            +
                    time.utc.strftime("%FT%H:%M:%S.0Z")
         
     | 
| 
       43 
42 
     | 
    
         
             
                  end
         
     | 
| 
       44 
43 
     | 
    
         | 
| 
       45 
44 
     | 
    
         
             
                  def stream
         
     | 
| 
       46 
     | 
    
         
            -
                    Enumerator.new  
     | 
| 
      
 45 
     | 
    
         
            +
                    Enumerator.new { |records|
         
     | 
| 
       47 
46 
     | 
    
         
             
                      (1..Float::INFINITY).each do |page|
         
     | 
| 
       48 
47 
     | 
    
         
             
                        res = yield page
         
     | 
| 
       49 
     | 
    
         
            -
                        res[ 
     | 
| 
       50 
     | 
    
         
            -
                        break if res[ 
     | 
| 
      
 48 
     | 
    
         
            +
                        res["items"].each { |item| records << item }
         
     | 
| 
      
 49 
     | 
    
         
            +
                        break if res["total_items"] <= page * res["page_size"]
         
     | 
| 
       51 
50 
     | 
    
         
             
                      end
         
     | 
| 
       52 
     | 
    
         
            -
                     
     | 
| 
      
 51 
     | 
    
         
            +
                    }.lazy
         
     | 
| 
       53 
52 
     | 
    
         
             
                  end
         
     | 
| 
       54 
53 
     | 
    
         
             
                end
         
     | 
| 
       55 
54 
     | 
    
         
             
              end
         
     | 
    
        data/lib/tenios/api/client.rb
    CHANGED
    
    | 
         @@ -1,46 +1,52 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            require  
     | 
| 
       4 
     | 
    
         
            -
            require  
     | 
| 
       5 
     | 
    
         
            -
            require  
     | 
| 
      
 3 
     | 
    
         
            +
            require "json"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "faraday"
         
     | 
| 
      
 5 
     | 
    
         
            +
            require "faraday_middleware"
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            module Tenios
         
     | 
| 
       8 
8 
     | 
    
         
             
              module API
         
     | 
| 
       9 
9 
     | 
    
         
             
                class Client
         
     | 
| 
       10 
     | 
    
         
            -
                   
     | 
| 
      
 10 
     | 
    
         
            +
                  URL = "https://api.tenios.com"
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                  def initialize(access_key:)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  def initialize(access_key:, url: URL)
         
     | 
| 
       13 
13 
     | 
    
         
             
                    @access_key = access_key
         
     | 
| 
      
 14 
     | 
    
         
            +
                    @http_client = build_http_client(url)
         
     | 
| 
       14 
15 
     | 
    
         
             
                  end
         
     | 
| 
       15 
16 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
                  def  
     | 
| 
       17 
     | 
    
         
            -
                     
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
                      c.response :json
         
     | 
| 
       20 
     | 
    
         
            -
                      c.response :raise_error
         
     | 
| 
       21 
     | 
    
         
            -
                      c.use :gzip
         
     | 
| 
      
 17 
     | 
    
         
            +
                  def call_detail_records
         
     | 
| 
      
 18 
     | 
    
         
            +
                    CallDetailRecords.new(self)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
       22 
20 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
                     
     | 
| 
      
 21 
     | 
    
         
            +
                  def verification
         
     | 
| 
      
 22 
     | 
    
         
            +
                    Verification.new(self)
         
     | 
| 
       25 
23 
     | 
    
         
             
                  end
         
     | 
| 
       26 
24 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
                   
     | 
| 
       28 
     | 
    
         
            -
                     
     | 
| 
      
 25 
     | 
    
         
            +
                  def number
         
     | 
| 
      
 26 
     | 
    
         
            +
                    Number.new(self)
         
     | 
| 
      
 27 
     | 
    
         
            +
                  end
         
     | 
| 
       29 
28 
     | 
    
         | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
      
 29 
     | 
    
         
            +
                  def record_call
         
     | 
| 
      
 30 
     | 
    
         
            +
                    RecordCall.new(self)
         
     | 
| 
      
 31 
     | 
    
         
            +
                  end
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
                        end
         
     | 
| 
       37 
     | 
    
         
            -
                      RUBY
         
     | 
| 
       38 
     | 
    
         
            -
                    end
         
     | 
| 
      
 33 
     | 
    
         
            +
                  # @api private
         
     | 
| 
      
 34 
     | 
    
         
            +
                  def post(path, **payload)
         
     | 
| 
      
 35 
     | 
    
         
            +
                    @http_client.post(path, payload.merge(access_key: @access_key)).body
         
     | 
| 
       39 
36 
     | 
    
         
             
                  end
         
     | 
| 
       40 
37 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
                   
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                   
     | 
| 
      
 38 
     | 
    
         
            +
                  private
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
      
 40 
     | 
    
         
            +
                  def build_http_client(url)
         
     | 
| 
      
 41 
     | 
    
         
            +
                    Faraday.new(url: url) { |c|
         
     | 
| 
      
 42 
     | 
    
         
            +
                      c.request :json
         
     | 
| 
      
 43 
     | 
    
         
            +
                      c.response :json
         
     | 
| 
      
 44 
     | 
    
         
            +
                      c.response :raise_error
         
     | 
| 
      
 45 
     | 
    
         
            +
                      c.use :gzip
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                      c.adapter Faraday.default_adapter
         
     | 
| 
      
 48 
     | 
    
         
            +
                    }
         
     | 
| 
      
 49 
     | 
    
         
            +
                  end
         
     | 
| 
       44 
50 
     | 
    
         
             
                end
         
     | 
| 
       45 
51 
     | 
    
         
             
              end
         
     | 
| 
       46 
52 
     | 
    
         
             
            end
         
     | 
    
        data/lib/tenios/api/number.rb
    CHANGED
    
    | 
         @@ -10,29 +10,31 @@ module Tenios 
     | 
|
| 
       10 
10 
     | 
    
         
             
                  end
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
                  NUMBER_TYPES = [
         
     | 
| 
       13 
     | 
    
         
            -
                    GEOGRAPHICAL =  
     | 
| 
      
 13 
     | 
    
         
            +
                    GEOGRAPHICAL = "GEOGRAPHICAL"
         
     | 
| 
       14 
14 
     | 
    
         
             
                  ].freeze
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
                  def order(verification_id:, number_type: GEOGRAPHICAL, **options)
         
     | 
| 
       17 
     | 
    
         
            -
                    payload =  
     | 
| 
       18 
     | 
    
         
            -
                    client. 
     | 
| 
      
 17 
     | 
    
         
            +
                    payload = order_payload(verification_id: verification_id, number_type: number_type, **options)
         
     | 
| 
      
 18 
     | 
    
         
            +
                    client.post("/number/order", **payload)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                  def cancel(phone_number:)
         
     | 
| 
      
 22 
     | 
    
         
            +
                    client.post("/number/cancel", phone_number: phone_number)
         
     | 
| 
       19 
23 
     | 
    
         
             
                  end
         
     | 
| 
       20 
24 
     | 
    
         | 
| 
       21 
25 
     | 
    
         
             
                  private
         
     | 
| 
       22 
26 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
                   
     | 
| 
      
 27 
     | 
    
         
            +
                  ORDER_OPTIONS = %i[
         
     | 
| 
       24 
28 
     | 
    
         
             
                    link_to_number
         
     | 
| 
       25 
29 
     | 
    
         
             
                    number_type
         
     | 
| 
       26 
30 
     | 
    
         
             
                    push_secret
         
     | 
| 
       27 
31 
     | 
    
         
             
                    push_url
         
     | 
| 
       28 
32 
     | 
    
         
             
                    verification_id
         
     | 
| 
       29 
33 
     | 
    
         
             
                  ].freeze
         
     | 
| 
       30 
     | 
    
         
            -
                  private_constant : 
     | 
| 
      
 34 
     | 
    
         
            +
                  private_constant :ORDER_OPTIONS
         
     | 
| 
       31 
35 
     | 
    
         | 
| 
       32 
     | 
    
         
            -
                  def  
     | 
| 
       33 
     | 
    
         
            -
                    options
         
     | 
| 
       34 
     | 
    
         
            -
                      .slice(*OPTIONS)
         
     | 
| 
       35 
     | 
    
         
            -
                      .merge(access_key: client.access_key)
         
     | 
| 
      
 36 
     | 
    
         
            +
                  def order_payload(**options)
         
     | 
| 
      
 37 
     | 
    
         
            +
                    options.slice(*ORDER_OPTIONS)
         
     | 
| 
       36 
38 
     | 
    
         
             
                  end
         
     | 
| 
       37 
39 
     | 
    
         
             
                end
         
     | 
| 
       38 
40 
     | 
    
         
             
              end
         
     | 
| 
         @@ -0,0 +1,21 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Tenios
         
     | 
| 
      
 4 
     | 
    
         
            +
              module API
         
     | 
| 
      
 5 
     | 
    
         
            +
                class RecordCall
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attr_reader :client
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                  def initialize(client)
         
     | 
| 
      
 9 
     | 
    
         
            +
                    @client = client
         
     | 
| 
      
 10 
     | 
    
         
            +
                  end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                  def start(call_uuid:)
         
     | 
| 
      
 13 
     | 
    
         
            +
                    client.post("/record-call/start", call_uuid: call_uuid)
         
     | 
| 
      
 14 
     | 
    
         
            +
                  end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                  def stop(recording_uuid:, call_uuid:)
         
     | 
| 
      
 17 
     | 
    
         
            +
                    client.post("/record-call/stop", call_uuid: call_uuid, recording_uuid: recording_uuid)
         
     | 
| 
      
 18 
     | 
    
         
            +
                  end
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            require  
     | 
| 
      
 3 
     | 
    
         
            +
            require "base64"
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            module Tenios
         
     | 
| 
       6 
6 
     | 
    
         
             
              module API
         
     | 
| 
         @@ -22,7 +22,7 @@ module Tenios 
     | 
|
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
                  def create(options)
         
     | 
| 
       24 
24 
     | 
    
         
             
                    payload = build_payload(options)
         
     | 
| 
       25 
     | 
    
         
            -
                    client. 
     | 
| 
      
 25 
     | 
    
         
            +
                    client.post("/verification/create", **payload)
         
     | 
| 
       26 
26 
     | 
    
         
             
                  end
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
       28 
28 
     | 
    
         
             
                  private
         
     | 
| 
         @@ -41,9 +41,7 @@ module Tenios 
     | 
|
| 
       41 
41 
     | 
    
         | 
| 
       42 
42 
     | 
    
         
             
                  def build_payload(options)
         
     | 
| 
       43 
43 
     | 
    
         
             
                    to_option = build_option(options)
         
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
44 
     | 
    
         
             
                    OPTIONS.map(&to_option).to_h
         
     | 
| 
       46 
     | 
    
         
            -
                      .merge(access_key: client.access_key)
         
     | 
| 
       47 
45 
     | 
    
         
             
                  end
         
     | 
| 
       48 
46 
     | 
    
         | 
| 
       49 
47 
     | 
    
         
             
                  def build_option(options)
         
     | 
| 
         @@ -61,13 +59,13 @@ module Tenios 
     | 
|
| 
       61 
59 
     | 
    
         
             
                    raise ArgumentError, "invalid document_type: #{type}"
         
     | 
| 
       62 
60 
     | 
    
         
             
                  end
         
     | 
| 
       63 
61 
     | 
    
         | 
| 
       64 
     | 
    
         
            -
                  PDF_FILE_SIGNATURE = Base64.encode64( 
     | 
| 
      
 62 
     | 
    
         
            +
                  PDF_FILE_SIGNATURE = Base64.encode64("%PDF-")[0..6].freeze
         
     | 
| 
       65 
63 
     | 
    
         
             
                  private_constant :PDF_FILE_SIGNATURE
         
     | 
| 
       66 
64 
     | 
    
         | 
| 
       67 
65 
     | 
    
         
             
                  def validate_document_data!(data)
         
     | 
| 
       68 
66 
     | 
    
         
             
                    return if data.start_with? PDF_FILE_SIGNATURE
         
     | 
| 
       69 
67 
     | 
    
         | 
| 
       70 
     | 
    
         
            -
                    raise ArgumentError,  
     | 
| 
      
 68 
     | 
    
         
            +
                    raise ArgumentError, "invalid document_data: should be a base64 encoded pdf file"
         
     | 
| 
       71 
69 
     | 
    
         
             
                  end
         
     | 
| 
       72 
70 
     | 
    
         
             
                end
         
     | 
| 
       73 
71 
     | 
    
         
             
              end
         
     | 
    
        data/lib/tenios/api/version.rb
    CHANGED
    
    
    
        data/tenios-api.gemspec
    CHANGED
    
    | 
         @@ -1,37 +1,33 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         
     | 
| 
       5 
     | 
    
         
            -
            require 'tenios/api/version'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require_relative "lib/tenios/api/version"
         
     | 
| 
       6 
4 
     | 
    
         | 
| 
       7 
5 
     | 
    
         
             
            Gem::Specification.new do |spec|
         
     | 
| 
       8 
     | 
    
         
            -
              spec.name 
     | 
| 
       9 
     | 
    
         
            -
              spec.version 
     | 
| 
       10 
     | 
    
         
            -
              spec.authors 
     | 
| 
       11 
     | 
    
         
            -
              spec.email 
     | 
| 
       12 
     | 
    
         
            -
              spec.summary 
     | 
| 
       13 
     | 
    
         
            -
              spec.description 
     | 
| 
       14 
     | 
    
         
            -
              spec.homepage 
     | 
| 
       15 
     | 
    
         
            -
              spec.license 
     | 
| 
      
 6 
     | 
    
         
            +
              spec.name = "tenios-api"
         
     | 
| 
      
 7 
     | 
    
         
            +
              spec.version = Tenios::API::VERSION
         
     | 
| 
      
 8 
     | 
    
         
            +
              spec.authors = ["carwow Developers"]
         
     | 
| 
      
 9 
     | 
    
         
            +
              spec.email = ["developers@carwow.co.uk"]
         
     | 
| 
      
 10 
     | 
    
         
            +
              spec.summary = "Tenios API Client ☎️"
         
     | 
| 
      
 11 
     | 
    
         
            +
              spec.description = "Get Call Detail Records (CDRs) from Tenios API."
         
     | 
| 
      
 12 
     | 
    
         
            +
              spec.homepage = "https://github.com/carwow/tenios-api-ruby"
         
     | 
| 
      
 13 
     | 
    
         
            +
              spec.license = "MIT"
         
     | 
| 
       16 
14 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
               
     | 
| 
       18 
     | 
    
         
            -
                spec.metadata['allowed_push_host'] = 'https://rubygems.org'
         
     | 
| 
       19 
     | 
    
         
            -
              else
         
     | 
| 
       20 
     | 
    
         
            -
                raise 'RubyGems 2.0 or newer is required to protect against ' \
         
     | 
| 
       21 
     | 
    
         
            -
                  'public gem pushes.'
         
     | 
| 
       22 
     | 
    
         
            -
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
              spec.required_ruby_version = Gem::Requirement.new(">= 2.7", "< 3.1")
         
     | 
| 
       23 
16 
     | 
    
         | 
| 
       24 
     | 
    
         
            -
              spec. 
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
               
     | 
| 
       27 
     | 
    
         
            -
              spec. 
     | 
| 
      
 17 
     | 
    
         
            +
              spec.metadata["allowed_push_host"] = "https://rubygems.org"
         
     | 
| 
      
 18 
     | 
    
         
            +
              spec.metadata["source_code_uri"] = spec.homepage
         
     | 
| 
      
 19 
     | 
    
         
            +
              spec.metadata["homepage_uri"] = "#{spec.homepage}/blob/main/README.md"
         
     | 
| 
      
 20 
     | 
    
         
            +
              spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
         
     | 
| 
       28 
21 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
              spec. 
     | 
| 
       30 
     | 
    
         
            -
              spec. 
     | 
| 
      
 22 
     | 
    
         
            +
              spec.files = `git ls-files -z`.split("\x0").reject { |f| f.start_with? "spec" }
         
     | 
| 
      
 23 
     | 
    
         
            +
              spec.require_paths = ["lib"]
         
     | 
| 
       31 
24 
     | 
    
         | 
| 
       32 
     | 
    
         
            -
              spec. 
     | 
| 
       33 
     | 
    
         
            -
              spec. 
     | 
| 
       34 
     | 
    
         
            -
              spec. 
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
              spec.add_development_dependency  
     | 
| 
      
 25 
     | 
    
         
            +
              spec.add_dependency "faraday", "~> 1.3"
         
     | 
| 
      
 26 
     | 
    
         
            +
              spec.add_dependency "faraday_middleware", "~> 1.0"
         
     | 
| 
      
 27 
     | 
    
         
            +
              spec.add_dependency "zeitwerk", "~> 2.4"
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              spec.add_development_dependency "pry", "~> 0.14"
         
     | 
| 
      
 30 
     | 
    
         
            +
              spec.add_development_dependency "rake", "~> 13.0"
         
     | 
| 
      
 31 
     | 
    
         
            +
              spec.add_development_dependency "rspec", "~> 3.10"
         
     | 
| 
      
 32 
     | 
    
         
            +
              spec.add_development_dependency "standard", "~> 0.12"
         
     | 
| 
       37 
33 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,113 +1,113 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: tenios-api
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.2 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - carwow Developers
         
     | 
| 
       8 
     | 
    
         
            -
            autorequire: 
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-02-13 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: faraday
         
     | 
| 
       15 
15 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
     | 
    
         
            -
                - - " 
     | 
| 
      
 17 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '1.3'
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
     | 
    
         
            -
                - - " 
     | 
| 
      
 24 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '1.3'
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: faraday_middleware
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       30 
30 
     | 
    
         
             
                requirements:
         
     | 
| 
       31 
     | 
    
         
            -
                - - " 
     | 
| 
      
 31 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       32 
32 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '1.0'
         
     | 
| 
       34 
34 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       35 
35 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       36 
36 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       37 
37 
     | 
    
         
             
                requirements:
         
     | 
| 
       38 
     | 
    
         
            -
                - - " 
     | 
| 
      
 38 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '1.0'
         
     | 
| 
       41 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
     | 
    
         
            -
              name:  
     | 
| 
      
 42 
     | 
    
         
            +
              name: zeitwerk
         
     | 
| 
       43 
43 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       44 
44 
     | 
    
         
             
                requirements:
         
     | 
| 
       45 
     | 
    
         
            -
                - - " 
     | 
| 
      
 45 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       46 
46 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
     | 
    
         
            -
                    version: ' 
     | 
| 
       48 
     | 
    
         
            -
              type: : 
     | 
| 
      
 47 
     | 
    
         
            +
                    version: '2.4'
         
     | 
| 
      
 48 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       49 
49 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       50 
50 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       51 
51 
     | 
    
         
             
                requirements:
         
     | 
| 
       52 
     | 
    
         
            -
                - - " 
     | 
| 
      
 52 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       53 
53 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 54 
     | 
    
         
            +
                    version: '2.4'
         
     | 
| 
       55 
55 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       56 
     | 
    
         
            -
              name:  
     | 
| 
      
 56 
     | 
    
         
            +
              name: pry
         
     | 
| 
       57 
57 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       58 
58 
     | 
    
         
             
                requirements:
         
     | 
| 
       59 
     | 
    
         
            -
                - - " 
     | 
| 
      
 59 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       60 
60 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       61 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: '0.14'
         
     | 
| 
       62 
62 
     | 
    
         
             
              type: :development
         
     | 
| 
       63 
63 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       64 
64 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       65 
65 
     | 
    
         
             
                requirements:
         
     | 
| 
       66 
     | 
    
         
            -
                - - " 
     | 
| 
      
 66 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       67 
67 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       68 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 68 
     | 
    
         
            +
                    version: '0.14'
         
     | 
| 
       69 
69 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       70 
     | 
    
         
            -
              name:  
     | 
| 
      
 70 
     | 
    
         
            +
              name: rake
         
     | 
| 
       71 
71 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       72 
72 
     | 
    
         
             
                requirements:
         
     | 
| 
       73 
     | 
    
         
            -
                - - " 
     | 
| 
      
 73 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       74 
74 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       75 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 75 
     | 
    
         
            +
                    version: '13.0'
         
     | 
| 
       76 
76 
     | 
    
         
             
              type: :development
         
     | 
| 
       77 
77 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       78 
78 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       79 
79 
     | 
    
         
             
                requirements:
         
     | 
| 
       80 
     | 
    
         
            -
                - - " 
     | 
| 
      
 80 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       81 
81 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       82 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 82 
     | 
    
         
            +
                    version: '13.0'
         
     | 
| 
       83 
83 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       84 
     | 
    
         
            -
              name:  
     | 
| 
      
 84 
     | 
    
         
            +
              name: rspec
         
     | 
| 
       85 
85 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       86 
86 
     | 
    
         
             
                requirements:
         
     | 
| 
       87 
     | 
    
         
            -
                - - " 
     | 
| 
      
 87 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       88 
88 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       89 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 89 
     | 
    
         
            +
                    version: '3.10'
         
     | 
| 
       90 
90 
     | 
    
         
             
              type: :development
         
     | 
| 
       91 
91 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       92 
92 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       93 
93 
     | 
    
         
             
                requirements:
         
     | 
| 
       94 
     | 
    
         
            -
                - - " 
     | 
| 
      
 94 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       95 
95 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       96 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 96 
     | 
    
         
            +
                    version: '3.10'
         
     | 
| 
       97 
97 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       98 
     | 
    
         
            -
              name:  
     | 
| 
      
 98 
     | 
    
         
            +
              name: standard
         
     | 
| 
       99 
99 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       100 
100 
     | 
    
         
             
                requirements:
         
     | 
| 
       101 
     | 
    
         
            -
                - - " 
     | 
| 
      
 101 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       102 
102 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       103 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 103 
     | 
    
         
            +
                    version: '0.12'
         
     | 
| 
       104 
104 
     | 
    
         
             
              type: :development
         
     | 
| 
       105 
105 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       106 
106 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       107 
107 
     | 
    
         
             
                requirements:
         
     | 
| 
       108 
     | 
    
         
            -
                - - " 
     | 
| 
      
 108 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
       109 
109 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       110 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
      
 110 
     | 
    
         
            +
                    version: '0.12'
         
     | 
| 
       111 
111 
     | 
    
         
             
            description: Get Call Detail Records (CDRs) from Tenios API.
         
     | 
| 
       112 
112 
     | 
    
         
             
            email:
         
     | 
| 
       113 
113 
     | 
    
         
             
            - developers@carwow.co.uk
         
     | 
| 
         @@ -119,16 +119,17 @@ files: 
     | 
|
| 
       119 
119 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
       120 
120 
     | 
    
         
             
            - ".rspec"
         
     | 
| 
       121 
121 
     | 
    
         
             
            - ".rubocop.yml"
         
     | 
| 
      
 122 
     | 
    
         
            +
            - CHANGELOG.md
         
     | 
| 
       122 
123 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       123 
     | 
    
         
            -
            - Gemfile.lock
         
     | 
| 
       124 
124 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       125 
125 
     | 
    
         
             
            - README.md
         
     | 
| 
       126 
126 
     | 
    
         
             
            - Rakefile
         
     | 
| 
      
 127 
     | 
    
         
            +
            - bin/console
         
     | 
| 
       127 
128 
     | 
    
         
             
            - lib/tenios-api.rb
         
     | 
| 
       128 
     | 
    
         
            -
            - lib/tenios/api.rb
         
     | 
| 
       129 
129 
     | 
    
         
             
            - lib/tenios/api/call_detail_records.rb
         
     | 
| 
       130 
130 
     | 
    
         
             
            - lib/tenios/api/client.rb
         
     | 
| 
       131 
131 
     | 
    
         
             
            - lib/tenios/api/number.rb
         
     | 
| 
      
 132 
     | 
    
         
            +
            - lib/tenios/api/record_call.rb
         
     | 
| 
       132 
133 
     | 
    
         
             
            - lib/tenios/api/verification.rb
         
     | 
| 
       133 
134 
     | 
    
         
             
            - lib/tenios/api/version.rb
         
     | 
| 
       134 
135 
     | 
    
         
             
            - tenios-api.gemspec
         
     | 
| 
         @@ -137,7 +138,10 @@ licenses: 
     | 
|
| 
       137 
138 
     | 
    
         
             
            - MIT
         
     | 
| 
       138 
139 
     | 
    
         
             
            metadata:
         
     | 
| 
       139 
140 
     | 
    
         
             
              allowed_push_host: https://rubygems.org
         
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
      
 141 
     | 
    
         
            +
              source_code_uri: https://github.com/carwow/tenios-api-ruby
         
     | 
| 
      
 142 
     | 
    
         
            +
              homepage_uri: https://github.com/carwow/tenios-api-ruby/blob/main/README.md
         
     | 
| 
      
 143 
     | 
    
         
            +
              changelog_uri: https://github.com/carwow/tenios-api-ruby/blob/main/CHANGELOG.md
         
     | 
| 
      
 144 
     | 
    
         
            +
            post_install_message:
         
     | 
| 
       141 
145 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       142 
146 
     | 
    
         
             
            require_paths:
         
     | 
| 
       143 
147 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -145,16 +149,18 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       145 
149 
     | 
    
         
             
              requirements:
         
     | 
| 
       146 
150 
     | 
    
         
             
              - - ">="
         
     | 
| 
       147 
151 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       148 
     | 
    
         
            -
                  version: ' 
     | 
| 
      
 152 
     | 
    
         
            +
                  version: '2.7'
         
     | 
| 
      
 153 
     | 
    
         
            +
              - - "<"
         
     | 
| 
      
 154 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 155 
     | 
    
         
            +
                  version: '3.1'
         
     | 
| 
       149 
156 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       150 
157 
     | 
    
         
             
              requirements:
         
     | 
| 
       151 
158 
     | 
    
         
             
              - - ">="
         
     | 
| 
       152 
159 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       153 
160 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       154 
161 
     | 
    
         
             
            requirements: []
         
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
            signing_key: 
         
     | 
| 
      
 162 
     | 
    
         
            +
            rubygems_version: 3.2.3
         
     | 
| 
      
 163 
     | 
    
         
            +
            signing_key:
         
     | 
| 
       158 
164 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       159 
165 
     | 
    
         
             
            summary: Tenios API Client ☎️
         
     | 
| 
       160 
166 
     | 
    
         
             
            test_files: []
         
     | 
    
        data/Gemfile.lock
    DELETED
    
    | 
         @@ -1,73 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            PATH
         
     | 
| 
       2 
     | 
    
         
            -
              remote: .
         
     | 
| 
       3 
     | 
    
         
            -
              specs:
         
     | 
| 
       4 
     | 
    
         
            -
                tenios-api (0.2.1)
         
     | 
| 
       5 
     | 
    
         
            -
                  faraday
         
     | 
| 
       6 
     | 
    
         
            -
                  faraday_middleware
         
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
            GEM
         
     | 
| 
       9 
     | 
    
         
            -
              remote: https://rubygems.org/
         
     | 
| 
       10 
     | 
    
         
            -
              specs:
         
     | 
| 
       11 
     | 
    
         
            -
                ast (2.4.0)
         
     | 
| 
       12 
     | 
    
         
            -
                carwow_rubocop (2.1.1)
         
     | 
| 
       13 
     | 
    
         
            -
                  rubocop (~> 0.58)
         
     | 
| 
       14 
     | 
    
         
            -
                  rubocop-rspec (~> 1.28)
         
     | 
| 
       15 
     | 
    
         
            -
                coderay (1.1.2)
         
     | 
| 
       16 
     | 
    
         
            -
                diff-lcs (1.3)
         
     | 
| 
       17 
     | 
    
         
            -
                faraday (0.15.4)
         
     | 
| 
       18 
     | 
    
         
            -
                  multipart-post (>= 1.2, < 3)
         
     | 
| 
       19 
     | 
    
         
            -
                faraday_middleware (0.13.1)
         
     | 
| 
       20 
     | 
    
         
            -
                  faraday (>= 0.7.4, < 1.0)
         
     | 
| 
       21 
     | 
    
         
            -
                jaro_winkler (1.5.2)
         
     | 
| 
       22 
     | 
    
         
            -
                method_source (0.9.2)
         
     | 
| 
       23 
     | 
    
         
            -
                multipart-post (2.1.1)
         
     | 
| 
       24 
     | 
    
         
            -
                parallel (1.13.0)
         
     | 
| 
       25 
     | 
    
         
            -
                parser (2.6.0.0)
         
     | 
| 
       26 
     | 
    
         
            -
                  ast (~> 2.4.0)
         
     | 
| 
       27 
     | 
    
         
            -
                powerpack (0.1.2)
         
     | 
| 
       28 
     | 
    
         
            -
                pry (0.12.2)
         
     | 
| 
       29 
     | 
    
         
            -
                  coderay (~> 1.1.0)
         
     | 
| 
       30 
     | 
    
         
            -
                  method_source (~> 0.9.0)
         
     | 
| 
       31 
     | 
    
         
            -
                psych (3.1.0)
         
     | 
| 
       32 
     | 
    
         
            -
                rainbow (3.0.0)
         
     | 
| 
       33 
     | 
    
         
            -
                rake (12.3.2)
         
     | 
| 
       34 
     | 
    
         
            -
                rspec (3.8.0)
         
     | 
| 
       35 
     | 
    
         
            -
                  rspec-core (~> 3.8.0)
         
     | 
| 
       36 
     | 
    
         
            -
                  rspec-expectations (~> 3.8.0)
         
     | 
| 
       37 
     | 
    
         
            -
                  rspec-mocks (~> 3.8.0)
         
     | 
| 
       38 
     | 
    
         
            -
                rspec-core (3.8.0)
         
     | 
| 
       39 
     | 
    
         
            -
                  rspec-support (~> 3.8.0)
         
     | 
| 
       40 
     | 
    
         
            -
                rspec-expectations (3.8.2)
         
     | 
| 
       41 
     | 
    
         
            -
                  diff-lcs (>= 1.2.0, < 2.0)
         
     | 
| 
       42 
     | 
    
         
            -
                  rspec-support (~> 3.8.0)
         
     | 
| 
       43 
     | 
    
         
            -
                rspec-mocks (3.8.0)
         
     | 
| 
       44 
     | 
    
         
            -
                  diff-lcs (>= 1.2.0, < 2.0)
         
     | 
| 
       45 
     | 
    
         
            -
                  rspec-support (~> 3.8.0)
         
     | 
| 
       46 
     | 
    
         
            -
                rspec-support (3.8.0)
         
     | 
| 
       47 
     | 
    
         
            -
                rubocop (0.65.0)
         
     | 
| 
       48 
     | 
    
         
            -
                  jaro_winkler (~> 1.5.1)
         
     | 
| 
       49 
     | 
    
         
            -
                  parallel (~> 1.10)
         
     | 
| 
       50 
     | 
    
         
            -
                  parser (>= 2.5, != 2.5.1.1)
         
     | 
| 
       51 
     | 
    
         
            -
                  powerpack (~> 0.1)
         
     | 
| 
       52 
     | 
    
         
            -
                  psych (>= 3.1.0)
         
     | 
| 
       53 
     | 
    
         
            -
                  rainbow (>= 2.2.2, < 4.0)
         
     | 
| 
       54 
     | 
    
         
            -
                  ruby-progressbar (~> 1.7)
         
     | 
| 
       55 
     | 
    
         
            -
                  unicode-display_width (~> 1.4.0)
         
     | 
| 
       56 
     | 
    
         
            -
                rubocop-rspec (1.32.0)
         
     | 
| 
       57 
     | 
    
         
            -
                  rubocop (>= 0.60.0)
         
     | 
| 
       58 
     | 
    
         
            -
                ruby-progressbar (1.10.0)
         
     | 
| 
       59 
     | 
    
         
            -
                unicode-display_width (1.4.1)
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
            PLATFORMS
         
     | 
| 
       62 
     | 
    
         
            -
              ruby
         
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
            DEPENDENCIES
         
     | 
| 
       65 
     | 
    
         
            -
              bundler
         
     | 
| 
       66 
     | 
    
         
            -
              carwow_rubocop
         
     | 
| 
       67 
     | 
    
         
            -
              pry
         
     | 
| 
       68 
     | 
    
         
            -
              rake
         
     | 
| 
       69 
     | 
    
         
            -
              rspec
         
     | 
| 
       70 
     | 
    
         
            -
              tenios-api!
         
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
            BUNDLED WITH
         
     | 
| 
       73 
     | 
    
         
            -
               2.0.2
         
     |