pingram 1.0.16 → 1.0.17

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