pingram 1.0.16 → 1.0.18

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.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/pingram/api/account_api.rb +95 -26
  4. data/lib/pingram/api/members_api.rb +10 -10
  5. data/lib/pingram/api/numbers_api.rb +2 -2
  6. data/lib/pingram/api/profile_api.rb +66 -0
  7. data/lib/pingram/api/voice_api.rb +733 -0
  8. data/lib/pingram/api_client.rb +1 -1
  9. data/lib/pingram/client_wrapper.rb +10 -10
  10. data/lib/pingram/models/account_get_response.rb +216 -29
  11. data/lib/pingram/models/api_error_body.rb +4 -24
  12. data/lib/pingram/models/auto_join_get_response.rb +16 -16
  13. data/lib/pingram/models/auto_join_post_response.rb +16 -16
  14. data/lib/pingram/models/billing_post_request_body.rb +2 -12
  15. data/lib/pingram/models/billing_post_response_body.rb +56 -68
  16. data/lib/pingram/models/bind_number_request.rb +164 -0
  17. data/lib/pingram/models/bind_number_response.rb +164 -0
  18. data/lib/pingram/models/bind_number_response_agent.rb +342 -0
  19. data/lib/pingram/models/bind_number_response_agent_spec.rb +376 -0
  20. data/lib/pingram/models/bind_number_response_agent_spec_compliance.rb +164 -0
  21. data/lib/pingram/models/bind_number_response_agent_spec_conversation.rb +328 -0
  22. data/lib/pingram/models/bind_number_response_agent_spec_inbound.rb +214 -0
  23. data/lib/pingram/models/bind_number_response_agent_spec_model.rb +105 -0
  24. data/lib/pingram/models/bind_number_response_agent_spec_outbound.rb +251 -0
  25. data/lib/pingram/models/bind_number_response_agent_spec_tools_inner.rb +107 -0
  26. data/lib/pingram/models/bind_number_response_agent_spec_variables_inner.rb +182 -0
  27. data/lib/pingram/models/brand_webhook_response.rb +165 -0
  28. data/lib/pingram/models/chained.rb +401 -0
  29. data/lib/pingram/models/channels_enum.rb +2 -1
  30. data/lib/pingram/models/create_voice_agent_request.rb +164 -0
  31. data/lib/pingram/models/create_voice_agent_response.rb +164 -0
  32. data/lib/pingram/models/custom.rb +278 -0
  33. data/lib/pingram/models/delete_account_request.rb +147 -0
  34. data/lib/pingram/models/delete_voice_agent_response.rb +164 -0
  35. data/lib/pingram/models/dtmf.rb +188 -0
  36. data/lib/pingram/models/get_members_response_inner.rb +1 -27
  37. data/lib/pingram/models/get_notifications_response_inner_options.rb +10 -1
  38. data/lib/pingram/models/get_senders_response_inner.rb +13 -4
  39. data/lib/pingram/models/get_senders_response_inner_verification_records.rb +184 -0
  40. data/lib/pingram/models/get_senders_response_inner_verification_records_dkim.rb +287 -0
  41. data/lib/pingram/models/get_usage_history_query.rb +1 -1
  42. data/lib/pingram/models/{organization_usage_history.rb → get_usage_history_response.rb} +5 -5
  43. data/lib/pingram/models/get_usage_history_response_items_inner.rb +192 -0
  44. data/lib/pingram/models/get_usage_history_response_items_inner_counts.rb +346 -0
  45. data/lib/pingram/models/{organization_usage.rb → get_usage_response.rb} +17 -163
  46. data/lib/pingram/models/get_usage_response_costs.rb +148 -0
  47. data/lib/pingram/models/get_usage_response_counts.rb +347 -0
  48. data/lib/pingram/models/get_voice_agent_response.rb +164 -0
  49. data/lib/pingram/models/get_voice_call_response.rb +164 -0
  50. data/lib/pingram/models/get_voice_call_response_call.rb +521 -0
  51. data/lib/pingram/models/{a2p_registration_update_request.rb → get_voice_call_response_call_cost.rb} +53 -80
  52. data/lib/pingram/models/get_voice_call_response_call_cost_lines_inner.rb +245 -0
  53. data/lib/pingram/models/get_voice_call_response_call_timeline_inner.rb +247 -0
  54. data/lib/pingram/models/get_voice_call_response_call_timeline_inner_latency.rb +191 -0
  55. data/lib/pingram/models/inbound_response_body_results_inner.rb +4 -4
  56. data/lib/pingram/models/knowledge.rb +216 -0
  57. data/lib/pingram/models/{create_organization_response.rb → knowledge_documents_inner.rb} +50 -49
  58. data/lib/pingram/models/list_phone_numbers_response_numbers_inner.rb +14 -4
  59. data/lib/pingram/models/list_voice_agents_response.rb +166 -0
  60. data/lib/pingram/models/list_voice_calls_response.rb +176 -0
  61. data/lib/pingram/models/list_voice_calls_response_calls_inner.rb +463 -0
  62. data/lib/pingram/models/logs_get_response_logs_inner.rb +4 -4
  63. data/lib/pingram/models/mcp.rb +223 -0
  64. data/lib/pingram/models/phone_verify_confirm_request.rb +16 -4
  65. data/lib/pingram/models/s2s.rb +295 -0
  66. data/lib/pingram/models/send_email_api_response_any_of1_error.rb +4 -24
  67. data/lib/pingram/models/send_email_request.rb +1 -1
  68. data/lib/pingram/models/send_sms_response_any_of1_error.rb +4 -24
  69. data/lib/pingram/models/sender_post_body_options_email.rb +5 -15
  70. data/lib/pingram/models/{a2p_registration_create_request.rb → ten_dlc_brand_create_request.rb} +56 -28
  71. data/lib/pingram/models/{a2p_registration.rb → ten_dlc_brand_registration.rb} +72 -22
  72. data/lib/pingram/models/ten_dlc_brand_registration_details.rb +599 -0
  73. data/lib/pingram/models/ten_dlc_brand_update_request.rb +338 -0
  74. data/lib/pingram/models/transfer.rb +251 -0
  75. data/lib/pingram/models/unbind_number_response.rb +164 -0
  76. data/lib/pingram/models/update_voice_agent_request.rb +164 -0
  77. data/lib/pingram/models/update_voice_agent_response.rb +164 -0
  78. data/lib/pingram/models/voice_browser_call_request.rb +186 -0
  79. data/lib/pingram/models/voice_browser_call_response.rb +216 -0
  80. data/lib/pingram/models/voice_call_request.rb +212 -0
  81. data/lib/pingram/models/voice_call_response.rb +217 -0
  82. data/lib/pingram/models/webhook_event.rb +2 -2
  83. data/lib/pingram/version.rb +1 -1
  84. data/lib/pingram.rb +54 -9
  85. data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.12.0.gem +0 -0
  86. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  87. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  88. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
  89. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
  90. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  91. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
  92. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  93. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  94. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/current.rb +1 -1
  95. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/version.rb +1 -1
  96. data/vendor/bundle/ruby/3.2.0/specifications/{parser-3.3.11.1.gemspec → parser-3.3.12.0.gemspec} +4 -4
  97. metadata +138 -93
  98. data/lib/pingram/api/organization_api.rb +0 -201
  99. data/lib/pingram/models/organization.rb +0 -442
  100. data/lib/pingram/models/organization_usage_history_items_inner.rb +0 -330
  101. data/vendor/bundle/ruby/3.2.0/cache/parser-3.3.11.1.gem +0 -0
  102. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/LICENSE.txt +0 -0
  103. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-parse +0 -0
  104. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/bin/ruby-rewrite +0 -0
  105. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/gauntlet_parser.rb +0 -0
  106. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/all.rb +0 -0
  107. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ast/node.rb +0 -0
  108. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ast/processor.rb +0 -0
  109. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/base.rb +0 -0
  110. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/builders/default.rb +0 -0
  111. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/clobbering_error.rb +0 -0
  112. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/color.rb +0 -0
  113. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/context.rb +0 -0
  114. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/current_arg_stack.rb +0 -0
  115. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/deprecation.rb +0 -0
  116. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/diagnostic/engine.rb +0 -0
  117. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/diagnostic.rb +0 -0
  118. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/dedenter.rb +0 -0
  119. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/explanation.rb +0 -0
  120. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/literal.rb +0 -0
  121. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer/stack_state.rb +0 -0
  122. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer-F0.rb +0 -0
  123. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer-F1.rb +0 -0
  124. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/lexer-strings.rb +0 -0
  125. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/macruby.rb +0 -0
  126. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/max_numparam_stack.rb +0 -0
  127. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/messages.rb +0 -0
  128. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/meta.rb +0 -0
  129. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rewriter.rb +0 -0
  130. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby18.rb +0 -0
  131. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby19.rb +0 -0
  132. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby20.rb +0 -0
  133. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby21.rb +0 -0
  134. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby22.rb +0 -0
  135. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby23.rb +0 -0
  136. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby24.rb +0 -0
  137. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby25.rb +0 -0
  138. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby26.rb +0 -0
  139. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby27.rb +0 -0
  140. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby30.rb +0 -0
  141. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby31.rb +0 -0
  142. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby32.rb +0 -0
  143. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby33.rb +0 -0
  144. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/ruby34.rb +0 -0
  145. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/rubymotion.rb +0 -0
  146. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner/ruby_parse.rb +0 -0
  147. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner/ruby_rewrite.rb +0 -0
  148. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/runner.rb +0 -0
  149. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/buffer.rb +0 -0
  150. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/comment/associator.rb +0 -0
  151. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/comment.rb +0 -0
  152. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/collection.rb +0 -0
  153. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/condition.rb +0 -0
  154. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/constant.rb +0 -0
  155. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/definition.rb +0 -0
  156. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/for.rb +0 -0
  157. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/heredoc.rb +0 -0
  158. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/index.rb +0 -0
  159. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/keyword.rb +0 -0
  160. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/method_definition.rb +0 -0
  161. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/objc_kwarg.rb +0 -0
  162. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/operator.rb +0 -0
  163. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/rescue_body.rb +0 -0
  164. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/send.rb +0 -0
  165. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/ternary.rb +0 -0
  166. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map/variable.rb +0 -0
  167. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/map.rb +0 -0
  168. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/range.rb +0 -0
  169. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/rewriter/action.rb +0 -0
  170. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/rewriter.rb +0 -0
  171. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/tree_rewriter/action.rb +0 -0
  172. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/source/tree_rewriter.rb +0 -0
  173. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/static_environment.rb +0 -0
  174. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/syntax_error.rb +0 -0
  175. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/tree_rewriter.rb +0 -0
  176. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/unknown_encoding_in_magic_comment_error.rb +0 -0
  177. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser/variables_stack.rb +0 -0
  178. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/lib/parser.rb +0 -0
  179. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.3.11.1 → parser-3.3.12.0}/parser.gemspec +0 -0
@@ -0,0 +1,346 @@
1
+ =begin
2
+ #Pingram
3
+
4
+ #Internal API for notification delivery and management
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pingram
17
+ class GetUsageHistoryResponseItemsInnerCounts < ApiModelBase
18
+ attr_accessor :email
19
+
20
+ attr_accessor :inapp_web
21
+
22
+ attr_accessor :sms
23
+
24
+ attr_accessor :call
25
+
26
+ attr_accessor :voice
27
+
28
+ attr_accessor :push
29
+
30
+ attr_accessor :web_push
31
+
32
+ attr_accessor :slack
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'email' => :'EMAIL',
38
+ :'inapp_web' => :'INAPP_WEB',
39
+ :'sms' => :'SMS',
40
+ :'call' => :'CALL',
41
+ :'voice' => :'VOICE',
42
+ :'push' => :'PUSH',
43
+ :'web_push' => :'WEB_PUSH',
44
+ :'slack' => :'SLACK'
45
+ }
46
+ end
47
+
48
+ # Returns attribute mapping this model knows about
49
+ def self.acceptable_attribute_map
50
+ attribute_map
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ acceptable_attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'email' => :'Float',
62
+ :'inapp_web' => :'Float',
63
+ :'sms' => :'Float',
64
+ :'call' => :'Float',
65
+ :'voice' => :'Float',
66
+ :'push' => :'Float',
67
+ :'web_push' => :'Float',
68
+ :'slack' => :'Float'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetUsageHistoryResponseItemsInnerCounts` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ acceptable_attribute_map = self.class.acceptable_attribute_map
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!acceptable_attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetUsageHistoryResponseItemsInnerCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'email')
95
+ self.email = attributes[:'email']
96
+ else
97
+ self.email = nil
98
+ end
99
+
100
+ if attributes.key?(:'inapp_web')
101
+ self.inapp_web = attributes[:'inapp_web']
102
+ else
103
+ self.inapp_web = nil
104
+ end
105
+
106
+ if attributes.key?(:'sms')
107
+ self.sms = attributes[:'sms']
108
+ else
109
+ self.sms = nil
110
+ end
111
+
112
+ if attributes.key?(:'call')
113
+ self.call = attributes[:'call']
114
+ else
115
+ self.call = nil
116
+ end
117
+
118
+ if attributes.key?(:'voice')
119
+ self.voice = attributes[:'voice']
120
+ else
121
+ self.voice = nil
122
+ end
123
+
124
+ if attributes.key?(:'push')
125
+ self.push = attributes[:'push']
126
+ else
127
+ self.push = nil
128
+ end
129
+
130
+ if attributes.key?(:'web_push')
131
+ self.web_push = attributes[:'web_push']
132
+ else
133
+ self.web_push = nil
134
+ end
135
+
136
+ if attributes.key?(:'slack')
137
+ self.slack = attributes[:'slack']
138
+ else
139
+ self.slack = nil
140
+ end
141
+ end
142
+
143
+ # Show invalid properties with the reasons. Usually used together with valid?
144
+ # @return Array for valid properties with the reasons
145
+ def list_invalid_properties
146
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
147
+ invalid_properties = Array.new
148
+ if @email.nil?
149
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
150
+ end
151
+
152
+ if @inapp_web.nil?
153
+ invalid_properties.push('invalid value for "inapp_web", inapp_web cannot be nil.')
154
+ end
155
+
156
+ if @sms.nil?
157
+ invalid_properties.push('invalid value for "sms", sms cannot be nil.')
158
+ end
159
+
160
+ if @call.nil?
161
+ invalid_properties.push('invalid value for "call", call cannot be nil.')
162
+ end
163
+
164
+ if @voice.nil?
165
+ invalid_properties.push('invalid value for "voice", voice cannot be nil.')
166
+ end
167
+
168
+ if @push.nil?
169
+ invalid_properties.push('invalid value for "push", push cannot be nil.')
170
+ end
171
+
172
+ if @web_push.nil?
173
+ invalid_properties.push('invalid value for "web_push", web_push cannot be nil.')
174
+ end
175
+
176
+ if @slack.nil?
177
+ invalid_properties.push('invalid value for "slack", slack cannot be nil.')
178
+ end
179
+
180
+ invalid_properties
181
+ end
182
+
183
+ # Check to see if the all the properties in the model are valid
184
+ # @return true if the model is valid
185
+ def valid?
186
+ warn '[DEPRECATED] the `valid?` method is obsolete'
187
+ return false if @email.nil?
188
+ return false if @inapp_web.nil?
189
+ return false if @sms.nil?
190
+ return false if @call.nil?
191
+ return false if @voice.nil?
192
+ return false if @push.nil?
193
+ return false if @web_push.nil?
194
+ return false if @slack.nil?
195
+ true
196
+ end
197
+
198
+ # Custom attribute writer method with validation
199
+ # @param [Object] email Value to be assigned
200
+ def email=(email)
201
+ if email.nil?
202
+ fail ArgumentError, 'email cannot be nil'
203
+ end
204
+
205
+ @email = email
206
+ end
207
+
208
+ # Custom attribute writer method with validation
209
+ # @param [Object] inapp_web Value to be assigned
210
+ def inapp_web=(inapp_web)
211
+ if inapp_web.nil?
212
+ fail ArgumentError, 'inapp_web cannot be nil'
213
+ end
214
+
215
+ @inapp_web = inapp_web
216
+ end
217
+
218
+ # Custom attribute writer method with validation
219
+ # @param [Object] sms Value to be assigned
220
+ def sms=(sms)
221
+ if sms.nil?
222
+ fail ArgumentError, 'sms cannot be nil'
223
+ end
224
+
225
+ @sms = sms
226
+ end
227
+
228
+ # Custom attribute writer method with validation
229
+ # @param [Object] call Value to be assigned
230
+ def call=(call)
231
+ if call.nil?
232
+ fail ArgumentError, 'call cannot be nil'
233
+ end
234
+
235
+ @call = call
236
+ end
237
+
238
+ # Custom attribute writer method with validation
239
+ # @param [Object] voice Value to be assigned
240
+ def voice=(voice)
241
+ if voice.nil?
242
+ fail ArgumentError, 'voice cannot be nil'
243
+ end
244
+
245
+ @voice = voice
246
+ end
247
+
248
+ # Custom attribute writer method with validation
249
+ # @param [Object] push Value to be assigned
250
+ def push=(push)
251
+ if push.nil?
252
+ fail ArgumentError, 'push cannot be nil'
253
+ end
254
+
255
+ @push = push
256
+ end
257
+
258
+ # Custom attribute writer method with validation
259
+ # @param [Object] web_push Value to be assigned
260
+ def web_push=(web_push)
261
+ if web_push.nil?
262
+ fail ArgumentError, 'web_push cannot be nil'
263
+ end
264
+
265
+ @web_push = web_push
266
+ end
267
+
268
+ # Custom attribute writer method with validation
269
+ # @param [Object] slack Value to be assigned
270
+ def slack=(slack)
271
+ if slack.nil?
272
+ fail ArgumentError, 'slack cannot be nil'
273
+ end
274
+
275
+ @slack = slack
276
+ end
277
+
278
+ # Checks equality by comparing each attribute.
279
+ # @param [Object] Object to be compared
280
+ def ==(o)
281
+ return true if self.equal?(o)
282
+ self.class == o.class &&
283
+ email == o.email &&
284
+ inapp_web == o.inapp_web &&
285
+ sms == o.sms &&
286
+ call == o.call &&
287
+ voice == o.voice &&
288
+ push == o.push &&
289
+ web_push == o.web_push &&
290
+ slack == o.slack
291
+ end
292
+
293
+ # @see the `==` method
294
+ # @param [Object] Object to be compared
295
+ def eql?(o)
296
+ self == o
297
+ end
298
+
299
+ # Calculates hash code according to all attributes.
300
+ # @return [Integer] Hash code
301
+ def hash
302
+ [email, inapp_web, sms, call, voice, push, web_push, slack].hash
303
+ end
304
+
305
+ # Builds the object from hash
306
+ # @param [Hash] attributes Model attributes in the form of hash
307
+ # @return [Object] Returns the model itself
308
+ def self.build_from_hash(attributes)
309
+ return nil unless attributes.is_a?(Hash)
310
+ attributes = attributes.transform_keys(&:to_sym)
311
+ transformed_hash = {}
312
+ openapi_types.each_pair do |key, type|
313
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
314
+ transformed_hash["#{key}"] = nil
315
+ elsif type =~ /\AArray<(.*)>/i
316
+ # check to ensure the input is an array given that the attribute
317
+ # is documented as an array but the input is not
318
+ if attributes[attribute_map[key]].is_a?(Array)
319
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
320
+ end
321
+ elsif !attributes[attribute_map[key]].nil?
322
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
323
+ end
324
+ end
325
+ new(transformed_hash)
326
+ end
327
+
328
+ # Returns the object in the form of hash
329
+ # @return [Hash] Returns the object in the form of hash
330
+ def to_hash
331
+ hash = {}
332
+ self.class.attribute_map.each_pair do |attr, param|
333
+ value = self.send(attr)
334
+ if value.nil?
335
+ is_nullable = self.class.openapi_nullable.include?(attr)
336
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
337
+ end
338
+
339
+ hash[param] = _to_hash(value)
340
+ end
341
+ hash
342
+ end
343
+
344
+ end
345
+
346
+ end
@@ -14,25 +14,11 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
- # Response for GET /account/organization/usage
18
- class OrganizationUsage < ApiModelBase
19
- # Total message usage (EMAIL + INAPP_WEB + WEB_PUSH + PUSH + SLACK)
20
- attr_accessor :message_usage
17
+ # Response for GET /account/usage
18
+ class GetUsageResponse < ApiModelBase
19
+ attr_accessor :costs
21
20
 
22
- # Total budget usage in USD (cost_SMS + cost_CALL + cost_NUMBER)
23
- attr_accessor :budget_usage
24
-
25
- # SMS cost in USD
26
- attr_accessor :cost_sms
27
-
28
- # Call cost in USD
29
- attr_accessor :cost_call
30
-
31
- # Phone number rent in USD
32
- attr_accessor :cost_number
33
-
34
- # Per-channel usage breakdown
35
- attr_accessor :channel_usages
21
+ attr_accessor :counts
36
22
 
37
23
  # Billing cycle start date (ISO string)
38
24
  attr_accessor :billing_cycle_start
@@ -43,12 +29,8 @@ module Pingram
43
29
  # Attribute mapping from ruby-style variable name to JSON key.
44
30
  def self.attribute_map
45
31
  {
46
- :'message_usage' => :'messageUsage',
47
- :'budget_usage' => :'budgetUsage',
48
- :'cost_sms' => :'costSms',
49
- :'cost_call' => :'costCall',
50
- :'cost_number' => :'costNumber',
51
- :'channel_usages' => :'channelUsages',
32
+ :'costs' => :'costs',
33
+ :'counts' => :'counts',
52
34
  :'billing_cycle_start' => :'billingCycleStart',
53
35
  :'billing_cycle_end' => :'billingCycleEnd'
54
36
  }
@@ -67,12 +49,8 @@ module Pingram
67
49
  # Attribute type mapping.
68
50
  def self.openapi_types
69
51
  {
70
- :'message_usage' => :'Float',
71
- :'budget_usage' => :'Float',
72
- :'cost_sms' => :'Float',
73
- :'cost_call' => :'Float',
74
- :'cost_number' => :'Float',
75
- :'channel_usages' => :'Hash<String, Float>',
52
+ :'costs' => :'GetUsageResponseCosts',
53
+ :'counts' => :'GetUsageResponseCounts',
76
54
  :'billing_cycle_start' => :'String',
77
55
  :'billing_cycle_end' => :'String'
78
56
  }
@@ -88,54 +66,24 @@ module Pingram
88
66
  # @param [Hash] attributes Model attributes in the form of hash
89
67
  def initialize(attributes = {})
90
68
  if (!attributes.is_a?(Hash))
91
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::OrganizationUsage` initialize method"
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetUsageResponse` initialize method"
92
70
  end
93
71
 
94
72
  # check to see if the attribute exists and convert string to symbol for hash key
95
73
  acceptable_attribute_map = self.class.acceptable_attribute_map
96
74
  attributes = attributes.each_with_object({}) { |(k, v), h|
97
75
  if (!acceptable_attribute_map.key?(k.to_sym))
98
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::OrganizationUsage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetUsageResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
99
77
  end
100
78
  h[k.to_sym] = v
101
79
  }
102
80
 
103
- if attributes.key?(:'message_usage')
104
- self.message_usage = attributes[:'message_usage']
105
- else
106
- self.message_usage = nil
107
- end
108
-
109
- if attributes.key?(:'budget_usage')
110
- self.budget_usage = attributes[:'budget_usage']
111
- else
112
- self.budget_usage = nil
113
- end
114
-
115
- if attributes.key?(:'cost_sms')
116
- self.cost_sms = attributes[:'cost_sms']
117
- else
118
- self.cost_sms = nil
119
- end
120
-
121
- if attributes.key?(:'cost_call')
122
- self.cost_call = attributes[:'cost_call']
123
- else
124
- self.cost_call = nil
81
+ if attributes.key?(:'costs')
82
+ self.costs = attributes[:'costs']
125
83
  end
126
84
 
127
- if attributes.key?(:'cost_number')
128
- self.cost_number = attributes[:'cost_number']
129
- else
130
- self.cost_number = nil
131
- end
132
-
133
- if attributes.key?(:'channel_usages')
134
- if (value = attributes[:'channel_usages']).is_a?(Hash)
135
- self.channel_usages = value
136
- end
137
- else
138
- self.channel_usages = nil
85
+ if attributes.key?(:'counts')
86
+ self.counts = attributes[:'counts']
139
87
  end
140
88
 
141
89
  if attributes.key?(:'billing_cycle_start')
@@ -156,30 +104,6 @@ module Pingram
156
104
  def list_invalid_properties
157
105
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
158
106
  invalid_properties = Array.new
159
- if @message_usage.nil?
160
- invalid_properties.push('invalid value for "message_usage", message_usage cannot be nil.')
161
- end
162
-
163
- if @budget_usage.nil?
164
- invalid_properties.push('invalid value for "budget_usage", budget_usage cannot be nil.')
165
- end
166
-
167
- if @cost_sms.nil?
168
- invalid_properties.push('invalid value for "cost_sms", cost_sms cannot be nil.')
169
- end
170
-
171
- if @cost_call.nil?
172
- invalid_properties.push('invalid value for "cost_call", cost_call cannot be nil.')
173
- end
174
-
175
- if @cost_number.nil?
176
- invalid_properties.push('invalid value for "cost_number", cost_number cannot be nil.')
177
- end
178
-
179
- if @channel_usages.nil?
180
- invalid_properties.push('invalid value for "channel_usages", channel_usages cannot be nil.')
181
- end
182
-
183
107
  if @billing_cycle_start.nil?
184
108
  invalid_properties.push('invalid value for "billing_cycle_start", billing_cycle_start cannot be nil.')
185
109
  end
@@ -195,77 +119,11 @@ module Pingram
195
119
  # @return true if the model is valid
196
120
  def valid?
197
121
  warn '[DEPRECATED] the `valid?` method is obsolete'
198
- return false if @message_usage.nil?
199
- return false if @budget_usage.nil?
200
- return false if @cost_sms.nil?
201
- return false if @cost_call.nil?
202
- return false if @cost_number.nil?
203
- return false if @channel_usages.nil?
204
122
  return false if @billing_cycle_start.nil?
205
123
  return false if @billing_cycle_end.nil?
206
124
  true
207
125
  end
208
126
 
209
- # Custom attribute writer method with validation
210
- # @param [Object] message_usage Value to be assigned
211
- def message_usage=(message_usage)
212
- if message_usage.nil?
213
- fail ArgumentError, 'message_usage cannot be nil'
214
- end
215
-
216
- @message_usage = message_usage
217
- end
218
-
219
- # Custom attribute writer method with validation
220
- # @param [Object] budget_usage Value to be assigned
221
- def budget_usage=(budget_usage)
222
- if budget_usage.nil?
223
- fail ArgumentError, 'budget_usage cannot be nil'
224
- end
225
-
226
- @budget_usage = budget_usage
227
- end
228
-
229
- # Custom attribute writer method with validation
230
- # @param [Object] cost_sms Value to be assigned
231
- def cost_sms=(cost_sms)
232
- if cost_sms.nil?
233
- fail ArgumentError, 'cost_sms cannot be nil'
234
- end
235
-
236
- @cost_sms = cost_sms
237
- end
238
-
239
- # Custom attribute writer method with validation
240
- # @param [Object] cost_call Value to be assigned
241
- def cost_call=(cost_call)
242
- if cost_call.nil?
243
- fail ArgumentError, 'cost_call cannot be nil'
244
- end
245
-
246
- @cost_call = cost_call
247
- end
248
-
249
- # Custom attribute writer method with validation
250
- # @param [Object] cost_number Value to be assigned
251
- def cost_number=(cost_number)
252
- if cost_number.nil?
253
- fail ArgumentError, 'cost_number cannot be nil'
254
- end
255
-
256
- @cost_number = cost_number
257
- end
258
-
259
- # Custom attribute writer method with validation
260
- # @param [Object] channel_usages Value to be assigned
261
- def channel_usages=(channel_usages)
262
- if channel_usages.nil?
263
- fail ArgumentError, 'channel_usages cannot be nil'
264
- end
265
-
266
- @channel_usages = channel_usages
267
- end
268
-
269
127
  # Custom attribute writer method with validation
270
128
  # @param [Object] billing_cycle_start Value to be assigned
271
129
  def billing_cycle_start=(billing_cycle_start)
@@ -291,12 +149,8 @@ module Pingram
291
149
  def ==(o)
292
150
  return true if self.equal?(o)
293
151
  self.class == o.class &&
294
- message_usage == o.message_usage &&
295
- budget_usage == o.budget_usage &&
296
- cost_sms == o.cost_sms &&
297
- cost_call == o.cost_call &&
298
- cost_number == o.cost_number &&
299
- channel_usages == o.channel_usages &&
152
+ costs == o.costs &&
153
+ counts == o.counts &&
300
154
  billing_cycle_start == o.billing_cycle_start &&
301
155
  billing_cycle_end == o.billing_cycle_end
302
156
  end
@@ -310,7 +164,7 @@ module Pingram
310
164
  # Calculates hash code according to all attributes.
311
165
  # @return [Integer] Hash code
312
166
  def hash
313
- [message_usage, budget_usage, cost_sms, cost_call, cost_number, channel_usages, billing_cycle_start, billing_cycle_end].hash
167
+ [costs, counts, billing_cycle_start, billing_cycle_end].hash
314
168
  end
315
169
 
316
170
  # Builds the object from hash