pingram 1.0.6 → 1.0.9

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 (119) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/pingram/api/components_api.rb +2 -0
  4. data/lib/pingram/api/email_api.rb +88 -0
  5. data/lib/pingram/api/numbers_api.rb +4 -4
  6. data/lib/pingram/api/profile_api.rb +154 -0
  7. data/lib/pingram/api/push_settings_api.rb +4 -0
  8. data/lib/pingram/api/sms_api.rb +88 -0
  9. data/lib/pingram/api/templates_api.rb +2 -0
  10. data/lib/pingram/api/types_api.rb +2 -0
  11. data/lib/pingram/api/user_api.rb +4 -0
  12. data/lib/pingram/api/webhooks_api.rb +2 -0
  13. data/lib/pingram/api_client.rb +1 -1
  14. data/lib/pingram/api_error.rb +40 -4
  15. data/lib/pingram/client_wrapper.rb +32 -2
  16. data/lib/pingram/models/accept_invite_request.rb +164 -0
  17. data/lib/pingram/models/accept_invite_response.rb +225 -0
  18. data/lib/pingram/models/api_error_body.rb +223 -0
  19. data/lib/pingram/models/api_error_response.rb +192 -0
  20. data/lib/pingram/models/change_email_request.rb +164 -0
  21. data/lib/pingram/models/change_phone_request.rb +164 -0
  22. data/lib/pingram/models/get_logs_response_messages_inner.rb +13 -1
  23. data/lib/pingram/models/get_logs_response_messages_inner_media_inner.rb +173 -0
  24. data/lib/pingram/models/get_templates_list_response_inner.rb +2 -1
  25. data/lib/pingram/models/get_templates_list_response_inner_any_of2.rb +16 -4
  26. data/lib/pingram/models/get_templates_list_response_inner_any_of3.rb +16 -42
  27. data/lib/pingram/models/get_templates_list_response_inner_any_of4.rb +4 -22
  28. data/lib/pingram/models/get_templates_list_response_inner_any_of5.rb +42 -111
  29. data/lib/pingram/models/get_templates_list_response_inner_any_of6.rb +440 -0
  30. data/lib/pingram/models/{get_templates_list_response_inner_any_of5_metadata.rb → get_templates_list_response_inner_any_of6_metadata.rb} +4 -4
  31. data/lib/pingram/models/{get_templates_list_response_inner_any_of5_metadata_entities_inner.rb → get_templates_list_response_inner_any_of6_metadata_entities_inner.rb} +4 -4
  32. data/lib/pingram/models/{get_templates_list_response_inner_any_of5_metadata_entities_inner_external_ref.rb → get_templates_list_response_inner_any_of6_metadata_entities_inner_external_ref.rb} +3 -3
  33. data/lib/pingram/models/logs_get_response_logs_inner.rb +52 -21
  34. data/lib/pingram/models/send_email_api_response.rb +104 -0
  35. data/lib/pingram/models/send_email_api_response_any_of.rb +193 -0
  36. data/lib/pingram/models/send_email_api_response_any_of1.rb +191 -0
  37. data/lib/pingram/models/send_email_api_response_any_of1_error.rb +223 -0
  38. data/lib/pingram/models/send_email_request.rb +335 -0
  39. data/lib/pingram/models/{sender_post_body_options_email_attachments_inner_any_of1.rb → send_email_request_attachments_inner.rb} +19 -28
  40. data/lib/pingram/models/send_sms_request.rb +249 -0
  41. data/lib/pingram/models/send_sms_response.rb +104 -0
  42. data/lib/pingram/models/send_sms_response_any_of.rb +193 -0
  43. data/lib/pingram/models/send_sms_response_any_of1.rb +191 -0
  44. data/lib/pingram/models/send_sms_response_any_of1_error.rb +223 -0
  45. data/lib/pingram/models/sender_post_body_options_email_attachments_inner.rb +2 -2
  46. data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of.rb +25 -16
  47. data/lib/pingram/models/sender_post_body_slack.rb +1 -1
  48. data/lib/pingram/models/sender_post_body_sms.rb +16 -4
  49. data/lib/pingram/version.rb +1 -1
  50. data/lib/pingram.rb +25 -4
  51. data/vendor/bundle/ruby/3.2.0/cache/psych-5.4.0.gem +0 -0
  52. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  53. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  54. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
  55. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
  56. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  57. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.3.1 → psych-5.4.0}/gem_make.out +10 -10
  58. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.3.1 → psych-5.4.0}/psych.so +0 -0
  59. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  60. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  61. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/README.md +2 -2
  62. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_parser.c +14 -3
  63. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/versions.rb +1 -1
  64. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych.so +0 -0
  65. data/vendor/bundle/ruby/3.2.0/specifications/{psych-5.3.1.gemspec → psych-5.4.0.gemspec} +2 -2
  66. metadata +87 -66
  67. data/vendor/bundle/ruby/3.2.0/cache/psych-5.3.1.gem +0 -0
  68. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.3.1 → psych-5.4.0}/gem.build_complete +0 -0
  69. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.3.1 → psych-5.4.0}/mkmf.log +0 -0
  70. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/CONTRIBUTING.md +0 -0
  71. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/LICENSE +0 -0
  72. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/Makefile +0 -0
  73. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/depend +0 -0
  74. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/extconf.rb +0 -0
  75. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych.c +0 -0
  76. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych.h +0 -0
  77. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_emitter.c +0 -0
  78. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_emitter.h +0 -0
  79. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_parser.h +0 -0
  80. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_to_ruby.c +0 -0
  81. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_to_ruby.h +0 -0
  82. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_yaml_tree.c +0 -0
  83. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_yaml_tree.h +0 -0
  84. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/class_loader.rb +0 -0
  85. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/coder.rb +0 -0
  86. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/core_ext.rb +0 -0
  87. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/exception.rb +0 -0
  88. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/handler.rb +0 -0
  89. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/handlers/document_stream.rb +0 -0
  90. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/handlers/recorder.rb +0 -0
  91. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/ruby_events.rb +0 -0
  92. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/stream.rb +0 -0
  93. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/tree_builder.rb +0 -0
  94. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/yaml_events.rb +0 -0
  95. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/alias.rb +0 -0
  96. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/document.rb +0 -0
  97. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/mapping.rb +0 -0
  98. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/node.rb +0 -0
  99. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/scalar.rb +0 -0
  100. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/sequence.rb +0 -0
  101. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/stream.rb +0 -0
  102. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes.rb +0 -0
  103. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/omap.rb +0 -0
  104. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/parser.rb +0 -0
  105. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/scalar_scanner.rb +0 -0
  106. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/set.rb +0 -0
  107. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/stream.rb +0 -0
  108. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/streaming.rb +0 -0
  109. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/syntax_error.rb +0 -0
  110. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/tree_builder.rb +0 -0
  111. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/depth_first.rb +0 -0
  112. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/emitter.rb +0 -0
  113. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/json_tree.rb +0 -0
  114. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/to_ruby.rb +0 -0
  115. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/visitor.rb +0 -0
  116. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/yaml_tree.rb +0 -0
  117. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors.rb +0 -0
  118. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/y.rb +0 -0
  119. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych.rb +0 -0
@@ -0,0 +1,192 @@
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
+ # Standard error response for API errors.
18
+ class ApiErrorResponse < ApiModelBase
19
+ # Unique tracking ID for the request.
20
+ attr_accessor :tracking_id
21
+
22
+ attr_accessor :error
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'tracking_id' => :'trackingId',
28
+ :'error' => :'error'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'tracking_id' => :'String',
46
+ :'error' => :'ApiErrorBody'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ApiErrorResponse` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ApiErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'tracking_id')
73
+ self.tracking_id = attributes[:'tracking_id']
74
+ else
75
+ self.tracking_id = nil
76
+ end
77
+
78
+ if attributes.key?(:'error')
79
+ self.error = attributes[:'error']
80
+ else
81
+ self.error = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @tracking_id.nil?
91
+ invalid_properties.push('invalid value for "tracking_id", tracking_id cannot be nil.')
92
+ end
93
+
94
+ if @error.nil?
95
+ invalid_properties.push('invalid value for "error", error cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @tracking_id.nil?
106
+ return false if @error.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param [Object] tracking_id Value to be assigned
112
+ def tracking_id=(tracking_id)
113
+ if tracking_id.nil?
114
+ fail ArgumentError, 'tracking_id cannot be nil'
115
+ end
116
+
117
+ @tracking_id = tracking_id
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] error Value to be assigned
122
+ def error=(error)
123
+ if error.nil?
124
+ fail ArgumentError, 'error cannot be nil'
125
+ end
126
+
127
+ @error = error
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ tracking_id == o.tracking_id &&
136
+ error == o.error
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [tracking_id, error].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ end
@@ -0,0 +1,164 @@
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 ChangeEmailRequest < ApiModelBase
18
+ attr_accessor :new_email
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'new_email' => :'newEmail'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'new_email' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ChangeEmailRequest` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ChangeEmailRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'new_email')
67
+ self.new_email = attributes[:'new_email']
68
+ else
69
+ self.new_email = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @new_email.nil?
79
+ invalid_properties.push('invalid value for "new_email", new_email cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @new_email.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] new_email Value to be assigned
95
+ def new_email=(new_email)
96
+ if new_email.nil?
97
+ fail ArgumentError, 'new_email cannot be nil'
98
+ end
99
+
100
+ @new_email = new_email
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ new_email == o.new_email
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [new_email].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -0,0 +1,164 @@
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 ChangePhoneRequest < ApiModelBase
18
+ attr_accessor :phone_number
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'phone_number' => :'phoneNumber'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'phone_number' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ChangePhoneRequest` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ChangePhoneRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'phone_number')
67
+ self.phone_number = attributes[:'phone_number']
68
+ else
69
+ self.phone_number = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @phone_number.nil?
79
+ invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @phone_number.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] phone_number Value to be assigned
95
+ def phone_number=(phone_number)
96
+ if phone_number.nil?
97
+ fail ArgumentError, 'phone_number cannot be nil'
98
+ end
99
+
100
+ @phone_number = phone_number
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ phone_number == o.phone_number
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [phone_number].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -45,6 +45,9 @@ module Pingram
45
45
 
46
46
  attr_accessor :attachments
47
47
 
48
+ # Inbound MMS attachments (includes contentType when available).
49
+ attr_accessor :media
50
+
48
51
  attr_accessor :message_id
49
52
 
50
53
  attr_accessor :in_reply_to
@@ -93,6 +96,7 @@ module Pingram
93
96
  :'body_text' => :'bodyText',
94
97
  :'body_html' => :'bodyHtml',
95
98
  :'attachments' => :'attachments',
99
+ :'media' => :'media',
96
100
  :'message_id' => :'messageId',
97
101
  :'in_reply_to' => :'inReplyTo',
98
102
  :'references' => :'references',
@@ -128,6 +132,7 @@ module Pingram
128
132
  :'body_text' => :'String',
129
133
  :'body_html' => :'String',
130
134
  :'attachments' => :'Array<GetLogsResponseMessagesInnerAttachmentsInner>',
135
+ :'media' => :'Array<GetLogsResponseMessagesInnerMediaInner>',
131
136
  :'message_id' => :'String',
132
137
  :'in_reply_to' => :'String',
133
138
  :'references' => :'String',
@@ -233,6 +238,12 @@ module Pingram
233
238
  end
234
239
  end
235
240
 
241
+ if attributes.key?(:'media')
242
+ if (value = attributes[:'media']).is_a?(Array)
243
+ self.media = value
244
+ end
245
+ end
246
+
236
247
  if attributes.key?(:'message_id')
237
248
  self.message_id = attributes[:'message_id']
238
249
  end
@@ -357,6 +368,7 @@ module Pingram
357
368
  body_text == o.body_text &&
358
369
  body_html == o.body_html &&
359
370
  attachments == o.attachments &&
371
+ media == o.media &&
360
372
  message_id == o.message_id &&
361
373
  in_reply_to == o.in_reply_to &&
362
374
  references == o.references &&
@@ -372,7 +384,7 @@ module Pingram
372
384
  # Calculates hash code according to all attributes.
373
385
  # @return [Integer] Hash code
374
386
  def hash
375
- [tracking_id, event_type, timestamp, epoch_ms, inbox, from, from_name, subject, to, cc, bcc, reply_to, body_text, body_html, attachments, message_id, in_reply_to, references, resolution_type].hash
387
+ [tracking_id, event_type, timestamp, epoch_ms, inbox, from, from_name, subject, to, cc, bcc, reply_to, body_text, body_html, attachments, media, message_id, in_reply_to, references, resolution_type].hash
376
388
  end
377
389
 
378
390
  # Builds the object from hash