Class: Tenios::API::CallDetailRecords
- Inherits:
-
Object
- Object
- Tenios::API::CallDetailRecords
- Defined in:
- lib/tenios/api/call_detail_records.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client) ⇒ CallDetailRecords
constructor
A new instance of CallDetailRecords.
- #retrieve(date_range, page_size: 100) ⇒ Object
Constructor Details
#initialize(client) ⇒ CallDetailRecords
Returns a new instance of CallDetailRecords.
8 9 10 |
# File 'lib/tenios/api/call_detail_records.rb', line 8 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/tenios/api/call_detail_records.rb', line 6 def client @client end |
Instance Method Details
#retrieve(date_range, page_size: 100) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/tenios/api/call_detail_records.rb', line 12 def retrieve(date_range, page_size: 100) stream do |page| payload = build_payload(date_range, page: page, page_size: page_size) client.post("/cdrs/retrieve", **payload) end end |