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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/pingram/api/components_api.rb +2 -0
- data/lib/pingram/api/email_api.rb +88 -0
- data/lib/pingram/api/numbers_api.rb +4 -4
- data/lib/pingram/api/profile_api.rb +154 -0
- data/lib/pingram/api/push_settings_api.rb +4 -0
- data/lib/pingram/api/sms_api.rb +88 -0
- data/lib/pingram/api/templates_api.rb +2 -0
- data/lib/pingram/api/types_api.rb +2 -0
- data/lib/pingram/api/user_api.rb +4 -0
- data/lib/pingram/api/webhooks_api.rb +2 -0
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/api_error.rb +40 -4
- data/lib/pingram/client_wrapper.rb +32 -2
- data/lib/pingram/models/accept_invite_request.rb +164 -0
- data/lib/pingram/models/accept_invite_response.rb +225 -0
- data/lib/pingram/models/api_error_body.rb +223 -0
- data/lib/pingram/models/api_error_response.rb +192 -0
- data/lib/pingram/models/change_email_request.rb +164 -0
- data/lib/pingram/models/change_phone_request.rb +164 -0
- data/lib/pingram/models/get_logs_response_messages_inner.rb +13 -1
- data/lib/pingram/models/get_logs_response_messages_inner_media_inner.rb +173 -0
- data/lib/pingram/models/get_templates_list_response_inner.rb +2 -1
- data/lib/pingram/models/get_templates_list_response_inner_any_of2.rb +16 -4
- data/lib/pingram/models/get_templates_list_response_inner_any_of3.rb +16 -42
- data/lib/pingram/models/get_templates_list_response_inner_any_of4.rb +4 -22
- data/lib/pingram/models/get_templates_list_response_inner_any_of5.rb +42 -111
- data/lib/pingram/models/get_templates_list_response_inner_any_of6.rb +440 -0
- data/lib/pingram/models/{get_templates_list_response_inner_any_of5_metadata.rb → get_templates_list_response_inner_any_of6_metadata.rb} +4 -4
- 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
- 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
- data/lib/pingram/models/logs_get_response_logs_inner.rb +52 -21
- data/lib/pingram/models/send_email_api_response.rb +104 -0
- data/lib/pingram/models/send_email_api_response_any_of.rb +193 -0
- data/lib/pingram/models/send_email_api_response_any_of1.rb +191 -0
- data/lib/pingram/models/send_email_api_response_any_of1_error.rb +223 -0
- data/lib/pingram/models/send_email_request.rb +335 -0
- data/lib/pingram/models/{sender_post_body_options_email_attachments_inner_any_of1.rb → send_email_request_attachments_inner.rb} +19 -28
- data/lib/pingram/models/send_sms_request.rb +249 -0
- data/lib/pingram/models/send_sms_response.rb +104 -0
- data/lib/pingram/models/send_sms_response_any_of.rb +193 -0
- data/lib/pingram/models/send_sms_response_any_of1.rb +191 -0
- data/lib/pingram/models/send_sms_response_any_of1_error.rb +223 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner.rb +2 -2
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of.rb +25 -16
- data/lib/pingram/models/sender_post_body_slack.rb +1 -1
- data/lib/pingram/models/sender_post_body_sms.rb +16 -4
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +25 -4
- data/vendor/bundle/ruby/3.2.0/cache/psych-5.4.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- 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
- 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
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/README.md +2 -2
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_parser.c +14 -3
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/versions.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych.so +0 -0
- data/vendor/bundle/ruby/3.2.0/specifications/{psych-5.3.1.gemspec → psych-5.4.0.gemspec} +2 -2
- metadata +87 -66
- data/vendor/bundle/ruby/3.2.0/cache/psych-5.3.1.gem +0 -0
- /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
- /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
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/CONTRIBUTING.md +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/LICENSE +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/Makefile +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/depend +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/extconf.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych.c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_emitter.c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_emitter.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_parser.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_to_ruby.c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_to_ruby.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_yaml_tree.c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_yaml_tree.h +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/class_loader.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/coder.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/core_ext.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/exception.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/handler.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/handlers/document_stream.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/handlers/recorder.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/ruby_events.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/stream.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/tree_builder.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/yaml_events.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/alias.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/document.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/mapping.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/node.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/scalar.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/sequence.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/stream.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/omap.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/parser.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/scalar_scanner.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/set.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/stream.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/streaming.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/syntax_error.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/tree_builder.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/depth_first.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/emitter.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/json_tree.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/to_ruby.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/visitor.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/yaml_tree.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/y.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych.rb +0 -0
|
@@ -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 AcceptInviteRequest < ApiModelBase
|
|
18
|
+
attr_accessor :token
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'token' => :'token'
|
|
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
|
+
:'token' => :'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::AcceptInviteRequest` 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::AcceptInviteRequest`. 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?(:'token')
|
|
67
|
+
self.token = attributes[:'token']
|
|
68
|
+
else
|
|
69
|
+
self.token = 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 @token.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "token", token 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 @token.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] token Value to be assigned
|
|
95
|
+
def token=(token)
|
|
96
|
+
if token.nil?
|
|
97
|
+
fail ArgumentError, 'token cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@token = token
|
|
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
|
+
token == o.token
|
|
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
|
+
[token].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,225 @@
|
|
|
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 AcceptInviteResponse < ApiModelBase
|
|
18
|
+
attr_accessor :success
|
|
19
|
+
|
|
20
|
+
attr_accessor :account_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :user_exists
|
|
23
|
+
|
|
24
|
+
attr_accessor :invitee_email
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'success' => :'success',
|
|
30
|
+
:'account_id' => :'accountId',
|
|
31
|
+
:'user_exists' => :'userExists',
|
|
32
|
+
:'invitee_email' => :'inviteeEmail'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'success' => :'Boolean',
|
|
50
|
+
:'account_id' => :'String',
|
|
51
|
+
:'user_exists' => :'Boolean',
|
|
52
|
+
:'invitee_email' => :'String'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::AcceptInviteResponse` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::AcceptInviteResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'success')
|
|
79
|
+
self.success = attributes[:'success']
|
|
80
|
+
else
|
|
81
|
+
self.success = nil
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'account_id')
|
|
85
|
+
self.account_id = attributes[:'account_id']
|
|
86
|
+
else
|
|
87
|
+
self.account_id = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'user_exists')
|
|
91
|
+
self.user_exists = attributes[:'user_exists']
|
|
92
|
+
else
|
|
93
|
+
self.user_exists = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'invitee_email')
|
|
97
|
+
self.invitee_email = attributes[:'invitee_email']
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
if @success.nil?
|
|
107
|
+
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if @account_id.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @user_exists.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "user_exists", user_exists cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
invalid_properties
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Check to see if the all the properties in the model are valid
|
|
122
|
+
# @return true if the model is valid
|
|
123
|
+
def valid?
|
|
124
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
125
|
+
return false if @success.nil?
|
|
126
|
+
return false if @account_id.nil?
|
|
127
|
+
return false if @user_exists.nil?
|
|
128
|
+
true
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Custom attribute writer method with validation
|
|
132
|
+
# @param [Object] success Value to be assigned
|
|
133
|
+
def success=(success)
|
|
134
|
+
if success.nil?
|
|
135
|
+
fail ArgumentError, 'success cannot be nil'
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
@success = success
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Custom attribute writer method with validation
|
|
142
|
+
# @param [Object] account_id Value to be assigned
|
|
143
|
+
def account_id=(account_id)
|
|
144
|
+
if account_id.nil?
|
|
145
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@account_id = account_id
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] user_exists Value to be assigned
|
|
153
|
+
def user_exists=(user_exists)
|
|
154
|
+
if user_exists.nil?
|
|
155
|
+
fail ArgumentError, 'user_exists cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
@user_exists = user_exists
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Checks equality by comparing each attribute.
|
|
162
|
+
# @param [Object] Object to be compared
|
|
163
|
+
def ==(o)
|
|
164
|
+
return true if self.equal?(o)
|
|
165
|
+
self.class == o.class &&
|
|
166
|
+
success == o.success &&
|
|
167
|
+
account_id == o.account_id &&
|
|
168
|
+
user_exists == o.user_exists &&
|
|
169
|
+
invitee_email == o.invitee_email
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# @see the `==` method
|
|
173
|
+
# @param [Object] Object to be compared
|
|
174
|
+
def eql?(o)
|
|
175
|
+
self == o
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Calculates hash code according to all attributes.
|
|
179
|
+
# @return [Integer] Hash code
|
|
180
|
+
def hash
|
|
181
|
+
[success, account_id, user_exists, invitee_email].hash
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Builds the object from hash
|
|
185
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
186
|
+
# @return [Object] Returns the model itself
|
|
187
|
+
def self.build_from_hash(attributes)
|
|
188
|
+
return nil unless attributes.is_a?(Hash)
|
|
189
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
190
|
+
transformed_hash = {}
|
|
191
|
+
openapi_types.each_pair do |key, type|
|
|
192
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
193
|
+
transformed_hash["#{key}"] = nil
|
|
194
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
195
|
+
# check to ensure the input is an array given that the attribute
|
|
196
|
+
# is documented as an array but the input is not
|
|
197
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
198
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
199
|
+
end
|
|
200
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
201
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
new(transformed_hash)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Returns the object in the form of hash
|
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
|
209
|
+
def to_hash
|
|
210
|
+
hash = {}
|
|
211
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
212
|
+
value = self.send(attr)
|
|
213
|
+
if value.nil?
|
|
214
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
215
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
hash[param] = _to_hash(value)
|
|
219
|
+
end
|
|
220
|
+
hash
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
end
|
|
@@ -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
|
+
# Structured error details for API error responses.
|
|
18
|
+
class ApiErrorBody < ApiModelBase
|
|
19
|
+
# Machine-readable error code.
|
|
20
|
+
attr_accessor :code
|
|
21
|
+
|
|
22
|
+
# Human-readable error message.
|
|
23
|
+
attr_accessor :message
|
|
24
|
+
|
|
25
|
+
# Actionable hint for fixing the error.
|
|
26
|
+
attr_accessor :fix
|
|
27
|
+
|
|
28
|
+
# Provider that caused the error (e.g. telnyx, ses).
|
|
29
|
+
attr_accessor :provider
|
|
30
|
+
|
|
31
|
+
# Provider-specific error code.
|
|
32
|
+
attr_accessor :provider_code
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'code' => :'code',
|
|
38
|
+
:'message' => :'message',
|
|
39
|
+
:'fix' => :'fix',
|
|
40
|
+
:'provider' => :'provider',
|
|
41
|
+
:'provider_code' => :'providerCode'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'code' => :'String',
|
|
59
|
+
:'message' => :'String',
|
|
60
|
+
:'fix' => :'String',
|
|
61
|
+
:'provider' => :'String',
|
|
62
|
+
:'provider_code' => :'String'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ApiErrorBody` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ApiErrorBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'code')
|
|
89
|
+
self.code = attributes[:'code']
|
|
90
|
+
else
|
|
91
|
+
self.code = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'message')
|
|
95
|
+
self.message = attributes[:'message']
|
|
96
|
+
else
|
|
97
|
+
self.message = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'fix')
|
|
101
|
+
self.fix = attributes[:'fix']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'provider')
|
|
105
|
+
self.provider = attributes[:'provider']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'provider_code')
|
|
109
|
+
self.provider_code = attributes[:'provider_code']
|
|
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 @code.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @message.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "message", message 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 @code.nil?
|
|
134
|
+
return false if @message.nil?
|
|
135
|
+
true
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Custom attribute writer method with validation
|
|
139
|
+
# @param [Object] code Value to be assigned
|
|
140
|
+
def code=(code)
|
|
141
|
+
if code.nil?
|
|
142
|
+
fail ArgumentError, 'code cannot be nil'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
@code = code
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param [Object] message Value to be assigned
|
|
150
|
+
def message=(message)
|
|
151
|
+
if message.nil?
|
|
152
|
+
fail ArgumentError, 'message cannot be nil'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@message = message
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Checks equality by comparing each attribute.
|
|
159
|
+
# @param [Object] Object to be compared
|
|
160
|
+
def ==(o)
|
|
161
|
+
return true if self.equal?(o)
|
|
162
|
+
self.class == o.class &&
|
|
163
|
+
code == o.code &&
|
|
164
|
+
message == o.message &&
|
|
165
|
+
fix == o.fix &&
|
|
166
|
+
provider == o.provider &&
|
|
167
|
+
provider_code == o.provider_code
|
|
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
|
+
[code, message, fix, provider, provider_code].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
|