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,223 @@
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 Mcp < ApiModelBase
18
+ attr_accessor :type
19
+
20
+ attr_accessor :url
21
+
22
+ attr_accessor :label
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'type' => :'type',
50
+ :'url' => :'url',
51
+ :'label' => :'label'
52
+ }
53
+ end
54
+
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ acceptable_attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'type' => :'String',
69
+ :'url' => :'String',
70
+ :'label' => :'String'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::Mcp` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ acceptable_attribute_map = self.class.acceptable_attribute_map
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!acceptable_attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::Mcp`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'type')
97
+ self.type = attributes[:'type']
98
+ else
99
+ self.type = nil
100
+ end
101
+
102
+ if attributes.key?(:'url')
103
+ self.url = attributes[:'url']
104
+ else
105
+ self.url = nil
106
+ end
107
+
108
+ if attributes.key?(:'label')
109
+ self.label = attributes[:'label']
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
+ invalid_properties = Array.new
118
+ if @type.nil?
119
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
120
+ end
121
+
122
+ if @url.nil?
123
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
124
+ end
125
+
126
+ invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ warn '[DEPRECATED] the `valid?` method is obsolete'
133
+ return false if @type.nil?
134
+ type_validator = EnumAttributeValidator.new('String', ["mcp"])
135
+ return false unless type_validator.valid?(@type)
136
+ return false if @url.nil?
137
+ true
138
+ end
139
+
140
+ # Custom attribute writer method checking allowed values (enum).
141
+ # @param [Object] type Object to be assigned
142
+ def type=(type)
143
+ validator = EnumAttributeValidator.new('String', ["mcp"])
144
+ unless validator.valid?(type)
145
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
146
+ end
147
+ @type = type
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] url Value to be assigned
152
+ def url=(url)
153
+ if url.nil?
154
+ fail ArgumentError, 'url cannot be nil'
155
+ end
156
+
157
+ @url = url
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param [Object] Object to be compared
162
+ def ==(o)
163
+ return true if self.equal?(o)
164
+ self.class == o.class &&
165
+ type == o.type &&
166
+ url == o.url &&
167
+ label == o.label
168
+ end
169
+
170
+ # @see the `==` method
171
+ # @param [Object] Object to be compared
172
+ def eql?(o)
173
+ self == o
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Integer] Hash code
178
+ def hash
179
+ [type, url, label].hash
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def self.build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+ attributes = attributes.transform_keys(&:to_sym)
188
+ transformed_hash = {}
189
+ openapi_types.each_pair do |key, type|
190
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
191
+ transformed_hash["#{key}"] = nil
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[attribute_map[key]].is_a?(Array)
196
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
197
+ end
198
+ elsif !attributes[attribute_map[key]].nil?
199
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
200
+ end
201
+ end
202
+ new(transformed_hash)
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ end
222
+
223
+ end
@@ -32,6 +32,8 @@ module Pingram
32
32
 
33
33
  attr_accessor :call_cap
34
34
 
35
+ attr_accessor :billing_version
36
+
35
37
  # ISO date (YYYY-MM-DD) when the billing cycle resets.
36
38
  attr_accessor :anniversary_date
37
39
 
@@ -74,6 +76,7 @@ module Pingram
74
76
  :'cost_cap' => :'costCap',
75
77
  :'sms_cap' => :'smsCap',
76
78
  :'call_cap' => :'callCap',
79
+ :'billing_version' => :'billingVersion',
77
80
  :'anniversary_date' => :'anniversaryDate',
78
81
  :'allow_overage' => :'allowOverage',
79
82
  :'created_at' => :'createdAt',
@@ -102,6 +105,7 @@ module Pingram
102
105
  :'cost_cap' => :'Float',
103
106
  :'sms_cap' => :'Float',
104
107
  :'call_cap' => :'Float',
108
+ :'billing_version' => :'Float',
105
109
  :'anniversary_date' => :'String',
106
110
  :'allow_overage' => :'Boolean',
107
111
  :'created_at' => :'String',
@@ -175,6 +179,10 @@ module Pingram
175
179
  self.call_cap = attributes[:'call_cap']
176
180
  end
177
181
 
182
+ if attributes.key?(:'billing_version')
183
+ self.billing_version = attributes[:'billing_version']
184
+ end
185
+
178
186
  if attributes.key?(:'anniversary_date')
179
187
  self.anniversary_date = attributes[:'anniversary_date']
180
188
  else
@@ -260,6 +268,8 @@ module Pingram
260
268
  return false if @name.nil?
261
269
  return false if @messages_cap.nil?
262
270
  return false if @cost_cap.nil?
271
+ billing_version_validator = EnumAttributeValidator.new('Float', [1, 3])
272
+ return false unless billing_version_validator.valid?(@billing_version)
263
273
  return false if @anniversary_date.nil?
264
274
  return false if @allow_overage.nil?
265
275
  return false if @created_at.nil?
@@ -327,6 +337,16 @@ module Pingram
327
337
  @cost_cap = cost_cap
328
338
  end
329
339
 
340
+ # Custom attribute writer method checking allowed values (enum).
341
+ # @param [Object] billing_version Object to be assigned
342
+ def billing_version=(billing_version)
343
+ validator = EnumAttributeValidator.new('Float', [1, 3])
344
+ unless validator.valid?(billing_version)
345
+ fail ArgumentError, "invalid value for \"billing_version\", must be one of #{validator.allowable_values}."
346
+ end
347
+ @billing_version = billing_version
348
+ end
349
+
330
350
  # Custom attribute writer method with validation
331
351
  # @param [Object] anniversary_date Value to be assigned
332
352
  def anniversary_date=(anniversary_date)
@@ -380,6 +400,7 @@ module Pingram
380
400
  cost_cap == o.cost_cap &&
381
401
  sms_cap == o.sms_cap &&
382
402
  call_cap == o.call_cap &&
403
+ billing_version == o.billing_version &&
383
404
  anniversary_date == o.anniversary_date &&
384
405
  allow_overage == o.allow_overage &&
385
406
  created_at == o.created_at &&
@@ -395,7 +416,7 @@ module Pingram
395
416
  # Calculates hash code according to all attributes.
396
417
  # @return [Integer] Hash code
397
418
  def hash
398
- [organization_id, organization_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, anniversary_date, allow_overage, created_at, updated_at].hash
419
+ [organization_id, organization_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, billing_version, anniversary_date, allow_overage, created_at, updated_at].hash
399
420
  end
400
421
 
401
422
  # Builds the object from hash
@@ -16,23 +16,9 @@ require 'time'
16
16
  module Pingram
17
17
  # Response for GET /account/organization/usage
18
18
  class OrganizationUsage < ApiModelBase
19
- # Total message usage (EMAIL + INAPP_WEB + WEB_PUSH + PUSH + SLACK)
20
- attr_accessor :message_usage
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' => :'OrganizationUsageCosts',
53
+ :'counts' => :'OrganizationUsageCounts',
76
54
  :'billing_cycle_start' => :'String',
77
55
  :'billing_cycle_end' => :'String'
78
56
  }
@@ -100,42 +78,12 @@ module Pingram
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
@@ -0,0 +1,148 @@
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
+ # Total costs for the billing cycle (all channel costs + number rent)
18
+ class OrganizationUsageCosts < ApiModelBase
19
+ attr_accessor :number
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'number' => :'NUMBER'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'number' => :'Float'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::OrganizationUsageCosts` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::OrganizationUsageCosts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'number')
68
+ self.number = attributes[:'number']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ number == o.number
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [number].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Returns the object in the form of hash
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_hash
133
+ hash = {}
134
+ self.class.attribute_map.each_pair do |attr, param|
135
+ value = self.send(attr)
136
+ if value.nil?
137
+ is_nullable = self.class.openapi_nullable.include?(attr)
138
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
139
+ end
140
+
141
+ hash[param] = _to_hash(value)
142
+ end
143
+ hash
144
+ end
145
+
146
+ end
147
+
148
+ end