diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e40bf9..4b8f93ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,28 @@ # Change Log +## [4.39.1](https://github.com/plivo/plivo-ruby/tree/v4.39.1) (2023-04-04) +**Feature - Recording API changes** +- Added `monthly_recording_storage_amount`, `recording_storage_rate`, `rounded_recording_duration`, and `recording_storage_duration` parameters to the response for [get single recording API](https://www.plivo.com/docs/voice/api/recording#retrieve-a-recording) and [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) +- Added `recording_storage_duration` parameter as a filter option for [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) + +## [4.39.0](https://github.com/plivo/plivo-ruby/tree/v4.39.0) (2023-03-17) +**Adding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs** +- dding new attribute - 'created_at' in List Profiles, Get Profile, List Brands, Get Brand, List Campaigns and Get Campaign APIs + +## [4.38.1](https://github.com/plivo/plivo-ruby/tree/v4.38.1) (2023-03-06) +**Bug fix on create message** +- Bulk send message fix + +## [4.38.0](https://github.com/plivo/plivo-ruby/tree/v4.38.0) (2023-03-03) +**Adding new attribute - 'is_domestic' in Get Message and List Message APIs** +- Add `is_domestic` to the response for the [list all messages API](https://www.plivo.com/docs/sms/api/message/list-all-messages/) and the [get message details API](https://www.plivo.com/docs/sms/api/message#retrieve-a-message) + +## [4.37.1](https://github.com/plivo/plivo-ruby/tree/v4.37.1) (2023-02-23) +**Bug fix on Messaging object ** +- +## [4.37.0](https://github.com/plivo/plivo-ruby/tree/v4.37.0) (2023-02-23) +**Feature - Enhance MDR filtering capabilities ** +- Added new fields on MDR object response + ## [4.36.0](https://github.com/plivo/plivo-ruby/tree/v4.36.0) (2022-01-25) **Adding new attribute - 'requester_ip' in Get Message and List Mssage APIs** @@ -8,6 +32,7 @@ **Adding new attribute - 'message_expiry' in Send Message API** - Added new attribute - message_expiry in Send Message API + ## [4.34.0](https://github.com/plivo/plivo-ruby/tree/v4.34.0) (2022-12-16) **10DLC: Update Campaign API** - Added Update Campaign API diff --git a/Makefile b/Makefile index 66d0759f..e31e4f09 100644 --- a/Makefile +++ b/Makefile @@ -4,4 +4,11 @@ build: docker-compose up --build --remove-orphans test: - docker exec -it $$CONTAINER /bin/bash -c "bundle exec rake" \ No newline at end of file + @[ "${CONTAINER}" ] && \ + docker exec -it $$CONTAINER /bin/bash -c "bundle exec rake" || \ + bundle exec rake + +run: + @[ "${CONTAINER}" ] && \ + (docker exec -it $$CONTAINER /bin/bash -c 'cd /usr/src/app/ruby-sdk-test/ && ruby test.rb') || \ + (cd /usr/src/app/ruby-sdk-test/ && ruby test.rb) \ No newline at end of file diff --git a/README.md b/README.md index a39f9894..7bee4ba9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a Add this line to your application's Gemfile: ```ruby -gem 'plivo', '>= 4.36.0' +gem 'plivo', '>= 4.39.1' ``` And then execute: @@ -191,5 +191,10 @@ export PLIVO_API_PROD_HOST= 5. The sdk directory will be mounted as a volume in the container. So any changes in the sdk code will also be reflected inside the container. > To use the local code in the test file, import the sdk in test file using: `require "/usr/src/app/lib/plivo.rb"` -6. To run unit tests, run `make test CONTAINER=` in host, where `` is the docker container id created in 2. -(The docker container should be running) \ No newline at end of file +6. To run test code, run `make run CONTAINER=` in host. +7. To run unit tests, run `make test CONTAINER=` in host. +> `` is the docker container id created in 2. +(The docker container should be running) + +> Test code and unit tests can also be run within the container using +`make run` and `make test` respectively. (`CONTAINER` argument should be omitted when running from the container) \ No newline at end of file diff --git a/lib/plivo/resources/messages.rb b/lib/plivo/resources/messages.rb index e25f94b2..5955e55f 100644 --- a/lib/plivo/resources/messages.rb +++ b/lib/plivo/resources/messages.rb @@ -31,7 +31,11 @@ def to_s total_rate: @total_rate, powerpack_id: @powerpack_id, units: @units, - requester_ip: @requester_ip + tendlc_campaign_id: @tendlc_campaign_id, + destination_country_iso2: @destination_country_iso2, + tendlc_registration_status: @tendlc_registration_status, + requester_ip: @requester_ip, + is_domestic: @is_domestic }.to_s end end @@ -101,10 +105,17 @@ def create(src = nil, dst = nil, text = nil, options = nil, powerpack_uuid = nil params = { src: value[:src], - dst: value[:dst], text: value[:text], powerpack_uuid: value[:powerpack_uuid] } + if (value[:dst].is_a?(Array)) + value[:dst].each do |dst_num| + valid_param?(:dst_num, dst_num, [Integer, String, Symbol], true) + params[:dst] = value[:dst].join('<') + end + else + params[:dst] = value[:dst] + end #Handling optional params in One HASH if value.key?(:type) && valid_param?(:type, value[:type],String, true, %w[sms mms]) @@ -256,6 +267,9 @@ def create(src = nil, dst = nil, text = nil, options = nil, powerpack_uuid = nil # @option options[List]: media_urls Minimum one media url should be present in Media urls list to send mms. Maximum allowd 10 media urls inside the list (e.g, media_urls : ['https//example.com/test.jpg', 'https://example.com/abcd.gif']) # @option options[List]: media_ids Minimum one media ids should be present in Media ids list to send mms. Maximum allowd 10 media ids inside the list (e.g, media_ids : ['1fs211ba-355b-11ea-bbc9-02121c1190q7']) # @option options [String] :powerpack_id Filter the results by powerpack id + # @option options [string]: tendlc_campaign_id - exact tendlc campaign id search + # @option options [string]:destination_country_iso2 - valid 2 character country_iso2 + # @option options [string] : tendlc_registration_status - registered or unregistered enum allowed def list(options = nil) return perform_list if options.nil? valid_param?(:options, options, Hash, true) @@ -263,7 +277,7 @@ def list(options = nil) params = {} params_expected = %i[ subaccount message_time message_time__gt message_time__gte - message_time__lt message_time__lte error_code powerpack_id + message_time__lt message_time__lte error_code powerpack_id tendlc_campaign_id tendlc_registration_status destination_country_iso2 ] params_expected.each do |param| if options.key?(param) && diff --git a/lib/plivo/resources/recordings.rb b/lib/plivo/resources/recordings.rb index 15ff76e3..90167b06 100644 --- a/lib/plivo/resources/recordings.rb +++ b/lib/plivo/resources/recordings.rb @@ -19,6 +19,8 @@ def to_s api_id: @api_id, call_uuid: @call_uuid, conference_name: @conference_name, + cost: @cost, + days_of_storage: @days_of_storage, recording_duration_ms: @recording_duration_ms, recording_end_ms: @recording_end_ms, recording_format: @recording_format, @@ -27,6 +29,7 @@ def to_s recording_type: @recording_type, recording_url: @recording_url, resource_uri: @resource_uri, + rounded_duration: @rounded_duration, from_number: @from_number, to_number: @to_number, mpc_name: @mpc_name, @@ -72,6 +75,7 @@ def list(options = nil) add_time__lt add_time__lte from_number to_number conference_uuid conference_name mpc_name mpc_uuid + rounded_duration ] params_expected.each do |param| diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index bbbb0bf1..ce37ecc1 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.36.0".freeze + VERSION = "4.39.1".freeze end diff --git a/setup_sdk.sh b/setup_sdk.sh index 045ef9cd..9094d81a 100755 --- a/setup_sdk.sh +++ b/setup_sdk.sh @@ -32,14 +32,16 @@ if [ ! -f $testDir/test.rb ]; then cd - fi -echo -e "\n\nSDK setup complete!" -echo "To test your changes:" -echo -e "\t1. Add your test code in /$testDir/test.rb on host (or /usr/src/app/$testDir/test.rb in the container)" -echo -e "\t\tNote: To use sdk in test file, import using $GREEN require \"/usr/src/app/lib/plivo.rb\"$NC" -echo -e "\t2. Run a terminal in the container using: $GREEN docker exec -it $HOSTNAME /bin/bash$NC" -echo -e "\t3. Navigate to the test directory: $GREEN cd /usr/src/app/$testDir$NC" -echo -e "\t4. Run your test file: $GREEN ruby test.rb$NC" -echo -e "\t5. For running unit tests, run on host: $GREEN make test CONTAINER=$HOSTNAME$NC" - +echo -e "\n\nSDK setup complete! You can test changes either on host or inside the docker container:" +echo -e "\ta. To test your changes ON HOST:" +echo -e "\t\t1. Add your test code in /$testDir/test.rb" +echo -e "\t\t2. Run your test file using: $GREEN make run CONTAINER=$HOSTNAME$NC" +echo -e "\t\t3. Run unit tests using: $GREEN make test CONTAINER=$HOSTNAME$NC" +echo +echo -e "\tb. To test your changes INSIDE CONTAINER:" +echo -e "\t\t1. Run a terminal in the container using: $GREEN docker exec -it $HOSTNAME /bin/bash$NC" +echo -e "\t\t2. Add your test code in /usr/src/app/$testDir/test.rb" +echo -e "\t\t3. Run your test file using: $GREEN make run$NC" +echo -e "\t\t4. Run unit tests using: $GREEN make test$NC" # To keep the container running post setup /bin/bash \ No newline at end of file diff --git a/spec/mocks/brandGetResponse.json b/spec/mocks/brandGetResponse.json index e4901079..8804a20d 100644 --- a/spec/mocks/brandGetResponse.json +++ b/spec/mocks/brandGetResponse.json @@ -12,6 +12,7 @@ "brand_id": "BPL3KN9", "brand_type": "STARTER", "ein_issuing_country": "US", - "registration_status": "COMPLETED" + "registration_status": "COMPLETED", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/mocks/brandListResponse.json b/spec/mocks/brandListResponse.json index 3fe8a5a2..07b37385 100644 --- a/spec/mocks/brandListResponse.json +++ b/spec/mocks/brandListResponse.json @@ -14,7 +14,8 @@ "brand_id": "BPL3KN9", "brand_type": "STARTER", "ein_issuing_country": "US", - "registration_status": "COMPLETED" + "registration_status": "COMPLETED", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -39,7 +40,8 @@ "entity_type": "INDIVIDUAL", "profile_uuid": "55515d72-2852-4016-9ed9-c64bd1c0c055", "registration_status": "COMPLETED", - "vertical": "ENERGY" + "vertical": "ENERGY", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -64,7 +66,8 @@ "entity_type": "INDIVIDUAL", "profile_uuid": "71a18795-77fa-4623-9735-44bbd08d86c4", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -81,7 +84,8 @@ "ein_issuing_country": "IN", "profile_uuid": "d3d85b2d-a4c2-4f7b-a66f-83002a5fd5e8", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -100,7 +104,8 @@ "ein_issuing_country": "US", "profile_uuid": "709a4b1c-bbde-40e6-be36-164b1dc8f718", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -127,7 +132,8 @@ "entity_type": "PRIVATE", "profile_uuid": "a28b5892-4d8b-4098-9fe7-6f786fb0be1f", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -152,7 +158,8 @@ "entity_type": "GOVERNMENT", "profile_uuid": "ca01734d-a86a-4ed4-aa5a-8723cbb595b3", "registration_status": "COMPLETED", - "vertical": "ENERGY" + "vertical": "ENERGY", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -178,7 +185,8 @@ "profile_uuid": "c1a1c66a-2bc4-4150-a3f3-033ec41efc5d", "registration_status": "COMPLETED", "vertical": "ENTERTAINMENT", - "website": "hibye.com" + "website": "hibye.com", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -207,7 +215,8 @@ "registration_status": "COMPLETED", "vertical": "PROFESSIONAL", "vetting_score": 80, - "vetting_status": "ACTIVE" + "vetting_status": "ACTIVE", + "created_at": "2023-01-16T06:22:35.195487Z" } ] } \ No newline at end of file diff --git a/spec/mocks/campaignGetResponse.json b/spec/mocks/campaignGetResponse.json index e19478bb..9ee3e283 100644 --- a/spec/mocks/campaignGetResponse.json +++ b/spec/mocks/campaignGetResponse.json @@ -20,6 +20,7 @@ "registration_status": "ACTIVE", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/mocks/campaignListResponse.json b/spec/mocks/campaignListResponse.json index d0c68101..f4d79370 100644 --- a/spec/mocks/campaignListResponse.json +++ b/spec/mocks/campaignListResponse.json @@ -21,7 +21,8 @@ "registration_status": "ACTIVE", "reseller_id": "RFWG6CB", "sub_usecase": "CUSTOMER_CARE", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BNOOLMO", @@ -43,7 +44,8 @@ "registration_status": "FAILED", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BWDWMAC", @@ -65,7 +67,8 @@ "registration_status": "ACTIVE", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BCKWPKX", @@ -87,7 +90,8 @@ "registration_status": "PROCESSING", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "MIXED" + "usecase": "MIXED", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "B2IYFNC", @@ -109,7 +113,8 @@ "registration_status": "PROCESSING", "reseller_id": "", "sub_usecase": "2FA", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BK98MJL", @@ -129,7 +134,8 @@ } }, "registration_status": "ACTIVE", - "reseller_id": "" + "reseller_id": "", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "B3WKVGC", @@ -151,7 +157,8 @@ "registration_status": "PROCESSING", "reseller_id": "RFWG6CB", "sub_usecase": "CUSTOMER_CARE", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BBYQU0Z", @@ -172,7 +179,8 @@ }, "registration_status": "PROCESSING", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BBYQU0Z", @@ -193,7 +201,8 @@ }, "registration_status": "ACTIVE", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "brand_id": "BBYQU0Z", @@ -214,7 +223,8 @@ }, "registration_status": "ACTIVE", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "created_at": "2023-01-16T06:22:35.195487Z" } ] } \ No newline at end of file diff --git a/spec/mocks/campaignUpdateResponse.json b/spec/mocks/campaignUpdateResponse.json index 6763b5d2..2156403e 100644 --- a/spec/mocks/campaignUpdateResponse.json +++ b/spec/mocks/campaignUpdateResponse.json @@ -20,6 +20,7 @@ "registration_status": "ACTIVE", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/mocks/messageGetResponse.json b/spec/mocks/messageGetResponse.json index ba8c2414..a1a83461 100644 --- a/spec/mocks/messageGetResponse.json +++ b/spec/mocks/messageGetResponse.json @@ -12,5 +12,6 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.1" + "requester_ip": "192.168.1.1", + "is_domestic": false } \ No newline at end of file diff --git a/spec/mocks/messageListResponse.json b/spec/mocks/messageListResponse.json index cd0814bf..b0edf244 100644 --- a/spec/mocks/messageListResponse.json +++ b/spec/mocks/messageListResponse.json @@ -20,7 +20,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.1" + "requester_ip": "192.168.1.1", + "is_domestic": false }, { "error_code": null, @@ -35,7 +36,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.2" + "requester_ip": "192.168.1.2", + "is_domestic": false }, { "error_code": null, @@ -50,7 +52,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.3" + "requester_ip": "192.168.1.3", + "is_domestic": false }, { "error_code": null, @@ -65,7 +68,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.4" + "requester_ip": "192.168.1.4", + "is_domestic": false }, { "error_code": null, @@ -80,7 +84,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.5" + "requester_ip": "192.168.1.5", + "is_domestic": false }, { "error_code": null, @@ -95,7 +100,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.6" + "requester_ip": "192.168.1.6", + "is_domestic": false }, { "error_code": null, @@ -110,7 +116,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.7" + "requester_ip": "192.168.1.7", + "is_domestic": false }, { "error_code": null, @@ -125,7 +132,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.8" + "requester_ip": "192.168.1.8", + "is_domestic": false }, { "error_code": "000", @@ -140,7 +148,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.9" + "requester_ip": "192.168.1.9", + "is_domestic": false }, { "error_code": null, @@ -155,7 +164,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.10" + "requester_ip": "192.168.1.10", + "is_domestic": false }, { "error_code": "000", @@ -170,7 +180,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.11" + "requester_ip": "192.168.1.11", + "is_domestic": false }, { "error_code": null, @@ -185,7 +196,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.12" + "requester_ip": "192.168.1.12", + "is_domestic": false }, { "error_code": "000", @@ -200,7 +212,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.13" + "requester_ip": "192.168.1.13", + "is_domestic": false }, { "error_code": null, @@ -215,7 +228,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.14" + "requester_ip": "192.168.1.14", + "is_domestic": false }, { "error_code": "000", @@ -230,7 +244,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.15" + "requester_ip": "192.168.1.15", + "is_domestic": false }, { "error_code": null, @@ -245,7 +260,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.16" + "requester_ip": "192.168.1.16", + "is_domestic": false }, { "error_code": "000", @@ -260,7 +276,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.17" + "requester_ip": "192.168.1.17", + "is_domestic": false }, { "error_code": "000", @@ -275,7 +292,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.18" + "requester_ip": "192.168.1.18", + "is_domestic": false }, { "error_code": "000", @@ -290,7 +308,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.19" + "requester_ip": "192.168.1.19", + "is_domestic": false }, { "error_code": "000", @@ -305,7 +324,8 @@ "total_amount": "0.00250", "total_rate": "0.00250", "units": 1, - "requester_ip": "192.168.1.20" + "requester_ip": "192.168.1.20", + "is_domestic": false } ] } \ No newline at end of file diff --git a/spec/mocks/profileGetResponse.json b/spec/mocks/profileGetResponse.json index a67d9417..a72a3b2d 100644 --- a/spec/mocks/profileGetResponse.json +++ b/spec/mocks/profileGetResponse.json @@ -29,6 +29,7 @@ "stock_exchange": "NASDAQ", "stock_symbol": "ABC", "vertical": "PROFESSIONAL", - "website": "google.com" + "website": "google.com", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/mocks/profileListResponse.json b/spec/mocks/profileListResponse.json index ada8d2f8..4154d0b4 100644 --- a/spec/mocks/profileListResponse.json +++ b/spec/mocks/profileListResponse.json @@ -31,7 +31,8 @@ "stock_exchange": "NYSE", "stock_symbol": "TESLA", "vertical": "ENTERTAINMENT", - "website": "hibye.com" + "website": "hibye.com", + "created_at": "2023-01-16T06:22:35.195487Z" }, { "address": { @@ -62,7 +63,8 @@ "stock_exchange": "NYSE", "stock_symbol": "TESLA", "vertical": "ENTERTAINMENT", - "website": "hibye.com" + "website": "hibye.com", + "created_at": "2023-01-16T06:22:35.195487Z" } ] } \ No newline at end of file diff --git a/spec/mocks/profileUpdateResponse.json b/spec/mocks/profileUpdateResponse.json index 0fff2ca4..980cdf73 100644 --- a/spec/mocks/profileUpdateResponse.json +++ b/spec/mocks/profileUpdateResponse.json @@ -27,6 +27,7 @@ "profile_type": "SECONDARY", "profile_uuid": "09322f43-fe16-4525-b8e4-4229c867795d", "vertical": "ENERGY", - "website": "www.google.com" + "website": "www.google.com", + "created_at": "2023-01-16T06:22:35.195487Z" } } \ No newline at end of file diff --git a/spec/mocks/recordingGetResponse.json b/spec/mocks/recordingGetResponse.json index 49f728d1..3826d21a 100644 --- a/spec/mocks/recordingGetResponse.json +++ b/spec/mocks/recordingGetResponse.json @@ -10,5 +10,8 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" } \ No newline at end of file diff --git a/spec/mocks/recordingListResponse.json b/spec/mocks/recordingListResponse.json index 8f843c33..5bae7ae4 100644 --- a/spec/mocks/recordingListResponse.json +++ b/spec/mocks/recordingListResponse.json @@ -19,7 +19,10 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-1124-a664-0026b945b522.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" }, { "add_time": "2014-08-05 16:05:21.993853+05:30", @@ -32,7 +35,10 @@ "recording_start_ms": "1407234829553.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/fc2716b0-1c8b-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" }, { "add_time": "2014-08-05 15:51:56.582492+05:30", @@ -45,7 +51,10 @@ "recording_start_ms": "1407234081443.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/3e701c9e-1c8a-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/", + "cost": "0.0024", + "rounded_duration": "360", + "days_of_storage": "2800" } ] } \ No newline at end of file diff --git a/spec/resource_brand_spec.rb b/spec/resource_brand_spec.rb index 7e554216..638dd794 100644 --- a/spec/resource_brand_spec.rb +++ b/spec/resource_brand_spec.rb @@ -24,7 +24,8 @@ def to_json_brand(obj) entity_type: obj['entity_type'], ein: obj['ein'], website: obj['website'], - company_name: obj['company_name'] + company_name: obj['company_name'], + created_at: obj['created_at'] }.reject { |_, v| v.nil? }.to_json end diff --git a/spec/resource_campaign_spec.rb b/spec/resource_campaign_spec.rb index d675eb04..ed1adc6d 100644 --- a/spec/resource_campaign_spec.rb +++ b/spec/resource_campaign_spec.rb @@ -16,7 +16,8 @@ def to_json_campaign(obj) reseller_id: obj['reseller_id'], usecase: obj['usecase'], registration_status: obj['registration_status'], - sub_usecase: obj['sub_usecase'] + sub_usecase: obj['sub_usecase'], + created_at: obj['created_at'] }.reject { |_, v| v.nil? }.to_json end def to_json_list(list_object) diff --git a/spec/resource_messages_spec.rb b/spec/resource_messages_spec.rb index 388a551f..d3324e15 100644 --- a/spec/resource_messages_spec.rb +++ b/spec/resource_messages_spec.rb @@ -16,7 +16,8 @@ def to_json(message) total_amount: message.total_amount, total_rate: message.total_rate, units: message.units, - requester_ip: message.requester_ip + requester_ip: message.requester_ip, + is_domestic: message.is_domestic }.to_json end diff --git a/spec/resource_profile_spec.rb b/spec/resource_profile_spec.rb index 23137061..f211a800 100644 --- a/spec/resource_profile_spec.rb +++ b/spec/resource_profile_spec.rb @@ -27,7 +27,8 @@ def to_json_profile(obj) alt_business_id_type: obj['alt_business_id_type'], alt_business_id: obj['alt_business_id'], address: obj['address'], - authorized_contact: obj['authorized_contact'] + authorized_contact: obj['authorized_contact'], + created_at: obj['created_at'] }.reject { |_, v| v.nil? }.to_json end def to_json_list(list_object) diff --git a/spec/resource_recordings_spec.rb b/spec/resource_recordings_spec.rb index 53bc51e3..145dd999 100644 --- a/spec/resource_recordings_spec.rb +++ b/spec/resource_recordings_spec.rb @@ -7,6 +7,8 @@ def to_json(recording) api_id: recording.api_id, call_uuid: recording.call_uuid, conference_name: recording.conference_name, + cost: recording.cost, + days_of_storage: recording.days_of_storage, recording_duration_ms: recording.recording_duration_ms, recording_end_ms: recording.recording_end_ms, recording_format: recording.recording_format, @@ -14,7 +16,8 @@ def to_json(recording) recording_start_ms: recording.recording_start_ms, recording_type: recording.recording_type, recording_url: recording.recording_url, - resource_uri: recording.resource_uri + resource_uri: recording.resource_uri, + rounded_duration: recording.rounded_duration }.to_json end