pingram 1.0.38 → 1.0.39
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 +1 -1
- data/lib/pingram/api/logs_api.rb +63 -2
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/logs_delivery_status_response.rb +168 -0
- data/lib/pingram/models/logs_delivery_status_response_statuses_inner.rb +266 -0
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3521645359a81dc82e84e9f12ae5d019dce125e556cb5661cd04eb924cc7bc9a
|
|
4
|
+
data.tar.gz: 12080816cec42686dd955540577e9ba52b07b4f82cab9fcbc3cca78cd3c8e8c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8a97c832a2bd1a1d643f4730b1928cea3282c08c061d9d9d39c860202112576fd42c9ef10797064759d857f8403fa74df7b4de40a5e7a91e7f891df684e7e22
|
|
7
|
+
data.tar.gz: 8abc49f3658f4c83b5d046a3429eb03dbe0ed36c4b302c01a9cdaf70fb9b3e226de7c193da3ca674f5e64e4db9667279340cfbbf13b389fb4f217b158e44f8b6
|
data/Gemfile.lock
CHANGED
data/lib/pingram/api/logs_api.rb
CHANGED
|
@@ -19,6 +19,67 @@ module Pingram
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Look up email and SMS delivery status for up to 25 tracking IDs. Each entry is the tracking id, channel (EMAIL or SMS), status, and the time that status was recorded. The result does not include recipients, phone numbers, user ids, request bodies, IP addresses, account ids, or user-agent data. Unknown tracking ids are omitted. Other channels are not included.
|
|
23
|
+
# @param tracking_ids [String] Comma-separated tracking IDs (URL encoded, max 25)
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [LogsDeliveryStatusResponse]
|
|
26
|
+
def logs_get_delivery_status(tracking_ids, opts = {})
|
|
27
|
+
data, _status_code, _headers = logs_get_delivery_status_with_http_info(tracking_ids, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Look up email and SMS delivery status for up to 25 tracking IDs. Each entry is the tracking id, channel (EMAIL or SMS), status, and the time that status was recorded. The result does not include recipients, phone numbers, user ids, request bodies, IP addresses, account ids, or user-agent data. Unknown tracking ids are omitted. Other channels are not included.
|
|
32
|
+
# @param tracking_ids [String] Comma-separated tracking IDs (URL encoded, max 25)
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(LogsDeliveryStatusResponse, Integer, Hash)>] LogsDeliveryStatusResponse data, response status code and response headers
|
|
35
|
+
def logs_get_delivery_status_with_http_info(tracking_ids, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: LogsApi.logs_get_delivery_status ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'tracking_ids' is set
|
|
40
|
+
if @api_client.config.client_side_validation && tracking_ids.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'tracking_ids' when calling LogsApi.logs_get_delivery_status"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/logs/status/{trackingIds}'.sub('{' + 'trackingIds' + '}', CGI.escape(tracking_ids.to_s))
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = opts[:form_params] || {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = opts[:debug_body]
|
|
59
|
+
|
|
60
|
+
# return_type
|
|
61
|
+
return_type = opts[:debug_return_type] || 'LogsDeliveryStatusResponse'
|
|
62
|
+
|
|
63
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
64
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
65
|
+
|
|
66
|
+
new_options = opts.merge(
|
|
67
|
+
:operation => :"LogsApi.logs_get_delivery_status",
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: LogsApi#logs_get_delivery_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
return data, status_code, headers
|
|
81
|
+
end
|
|
82
|
+
|
|
22
83
|
# Get log retention period in days for the account
|
|
23
84
|
# @param [Hash] opts the optional parameters
|
|
24
85
|
# @return [LogsRetentionResponse]
|
|
@@ -135,7 +196,7 @@ module Pingram
|
|
|
135
196
|
return data, status_code, headers
|
|
136
197
|
end
|
|
137
198
|
|
|
138
|
-
# Get logs by tracking IDs (comma-separated, max 25 IDs).
|
|
199
|
+
# Get logs by tracking IDs (comma-separated, max 25 IDs). Returns full log objects with personally identifiable information (recipients, user ids, phone numbers, and request details). For a simple delivery check, use Get Delivery Status.
|
|
139
200
|
# @param tracking_ids [String] Comma-separated tracking IDs (URL encoded)
|
|
140
201
|
# @param [Hash] opts the optional parameters
|
|
141
202
|
# @return [LogsGetResponse]
|
|
@@ -144,7 +205,7 @@ module Pingram
|
|
|
144
205
|
data
|
|
145
206
|
end
|
|
146
207
|
|
|
147
|
-
# Get logs by tracking IDs (comma-separated, max 25 IDs).
|
|
208
|
+
# Get logs by tracking IDs (comma-separated, max 25 IDs). Returns full log objects with personally identifiable information (recipients, user ids, phone numbers, and request details). For a simple delivery check, use Get Delivery Status.
|
|
148
209
|
# @param tracking_ids [String] Comma-separated tracking IDs (URL encoded)
|
|
149
210
|
# @param [Hash] opts the optional parameters
|
|
150
211
|
# @return [Array<(LogsGetResponse, Integer, Hash)>] LogsGetResponse data, response status code and response headers
|
data/lib/pingram/api_client.rb
CHANGED
|
@@ -32,7 +32,7 @@ module Pingram
|
|
|
32
32
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
33
33
|
def initialize(config = Configuration.default)
|
|
34
34
|
@config = config
|
|
35
|
-
@user_agent = "pingram-ruby/1.0.
|
|
35
|
+
@user_agent = "pingram-ruby/1.0.39"
|
|
36
36
|
@default_headers = {
|
|
37
37
|
'Content-Type' => 'application/json',
|
|
38
38
|
'User-Agent' => @user_agent
|
|
@@ -0,0 +1,168 @@
|
|
|
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
|
+
# Response type for GET /logs/status/{trackingIds}. Unknown tracking ids are omitted. A log that is still ingesting is omitted until it can be read.
|
|
18
|
+
class LogsDeliveryStatusResponse < ApiModelBase
|
|
19
|
+
# Delivery outcomes for the requested tracking ids.
|
|
20
|
+
attr_accessor :statuses
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'statuses' => :'statuses'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Returns attribute mapping this model knows about
|
|
30
|
+
def self.acceptable_attribute_map
|
|
31
|
+
attribute_map
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns all the JSON keys this model knows about
|
|
35
|
+
def self.acceptable_attributes
|
|
36
|
+
acceptable_attribute_map.values
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.openapi_types
|
|
41
|
+
{
|
|
42
|
+
:'statuses' => :'Array<LogsDeliveryStatusResponseStatusesInner>'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::LogsDeliveryStatusResponse` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::LogsDeliveryStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'statuses')
|
|
69
|
+
if (value = attributes[:'statuses']).is_a?(Array)
|
|
70
|
+
self.statuses = value
|
|
71
|
+
end
|
|
72
|
+
else
|
|
73
|
+
self.statuses = nil
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
78
|
+
# @return Array for valid properties with the reasons
|
|
79
|
+
def list_invalid_properties
|
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
81
|
+
invalid_properties = Array.new
|
|
82
|
+
if @statuses.nil?
|
|
83
|
+
invalid_properties.push('invalid value for "statuses", statuses cannot be nil.')
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
|
+
return false if @statuses.nil?
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Custom attribute writer method with validation
|
|
98
|
+
# @param [Object] statuses Value to be assigned
|
|
99
|
+
def statuses=(statuses)
|
|
100
|
+
if statuses.nil?
|
|
101
|
+
fail ArgumentError, 'statuses cannot be nil'
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
@statuses = statuses
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Checks equality by comparing each attribute.
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def ==(o)
|
|
110
|
+
return true if self.equal?(o)
|
|
111
|
+
self.class == o.class &&
|
|
112
|
+
statuses == o.statuses
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @see the `==` method
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def eql?(o)
|
|
118
|
+
self == o
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Calculates hash code according to all attributes.
|
|
122
|
+
# @return [Integer] Hash code
|
|
123
|
+
def hash
|
|
124
|
+
[statuses].hash
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Builds the object from hash
|
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
129
|
+
# @return [Object] Returns the model itself
|
|
130
|
+
def self.build_from_hash(attributes)
|
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
133
|
+
transformed_hash = {}
|
|
134
|
+
openapi_types.each_pair do |key, type|
|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = nil
|
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
138
|
+
# check to ensure the input is an array given that the attribute
|
|
139
|
+
# is documented as an array but the input is not
|
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
142
|
+
end
|
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
new(transformed_hash)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Returns the object in the form of hash
|
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
|
152
|
+
def to_hash
|
|
153
|
+
hash = {}
|
|
154
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
155
|
+
value = self.send(attr)
|
|
156
|
+
if value.nil?
|
|
157
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
158
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
hash[param] = _to_hash(value)
|
|
162
|
+
end
|
|
163
|
+
hash
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
end
|
|
@@ -0,0 +1,266 @@
|
|
|
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
|
+
# One delivery outcome. Fields are limited to the tracking id, channel, status, and the time that status was recorded. `channel` is omitted when the outcome is for the whole request, before a channel was chosen.
|
|
18
|
+
class LogsDeliveryStatusResponseStatusesInner < ApiModelBase
|
|
19
|
+
# Opaque id returned when the notification was accepted.
|
|
20
|
+
attr_accessor :tracking_id
|
|
21
|
+
|
|
22
|
+
# Channel named on a delivery-status row. Email and SMS only. Coarse labels: no address or provider id.
|
|
23
|
+
attr_accessor :channel
|
|
24
|
+
|
|
25
|
+
# Delivery outcome for one request or one channel. These are the same states shown in the dashboard status column.
|
|
26
|
+
attr_accessor :status
|
|
27
|
+
|
|
28
|
+
# ISO 8601 time this outcome was recorded.
|
|
29
|
+
attr_accessor :updated_at
|
|
30
|
+
|
|
31
|
+
class EnumAttributeValidator
|
|
32
|
+
attr_reader :datatype
|
|
33
|
+
attr_reader :allowable_values
|
|
34
|
+
|
|
35
|
+
def initialize(datatype, allowable_values)
|
|
36
|
+
@allowable_values = allowable_values.map do |value|
|
|
37
|
+
case datatype.to_s
|
|
38
|
+
when /Integer/i
|
|
39
|
+
value.to_i
|
|
40
|
+
when /Float/i
|
|
41
|
+
value.to_f
|
|
42
|
+
else
|
|
43
|
+
value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def valid?(value)
|
|
49
|
+
!value || allowable_values.include?(value)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
|
+
def self.attribute_map
|
|
55
|
+
{
|
|
56
|
+
:'tracking_id' => :'trackingId',
|
|
57
|
+
:'channel' => :'channel',
|
|
58
|
+
:'status' => :'status',
|
|
59
|
+
:'updated_at' => :'updatedAt'
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns attribute mapping this model knows about
|
|
64
|
+
def self.acceptable_attribute_map
|
|
65
|
+
attribute_map
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns all the JSON keys this model knows about
|
|
69
|
+
def self.acceptable_attributes
|
|
70
|
+
acceptable_attribute_map.values
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute type mapping.
|
|
74
|
+
def self.openapi_types
|
|
75
|
+
{
|
|
76
|
+
:'tracking_id' => :'String',
|
|
77
|
+
:'channel' => :'String',
|
|
78
|
+
:'status' => :'String',
|
|
79
|
+
:'updated_at' => :'String'
|
|
80
|
+
}
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# List of attributes with nullable: true
|
|
84
|
+
def self.openapi_nullable
|
|
85
|
+
Set.new([
|
|
86
|
+
])
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Initializes the object
|
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
91
|
+
def initialize(attributes = {})
|
|
92
|
+
if (!attributes.is_a?(Hash))
|
|
93
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::LogsDeliveryStatusResponseStatusesInner` initialize method"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
97
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
98
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
99
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
100
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::LogsDeliveryStatusResponseStatusesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
101
|
+
end
|
|
102
|
+
h[k.to_sym] = v
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'tracking_id')
|
|
106
|
+
self.tracking_id = attributes[:'tracking_id']
|
|
107
|
+
else
|
|
108
|
+
self.tracking_id = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'channel')
|
|
112
|
+
self.channel = attributes[:'channel']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'status')
|
|
116
|
+
self.status = attributes[:'status']
|
|
117
|
+
else
|
|
118
|
+
self.status = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'updated_at')
|
|
122
|
+
self.updated_at = attributes[:'updated_at']
|
|
123
|
+
else
|
|
124
|
+
self.updated_at = nil
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
129
|
+
# @return Array for valid properties with the reasons
|
|
130
|
+
def list_invalid_properties
|
|
131
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
132
|
+
invalid_properties = Array.new
|
|
133
|
+
if @tracking_id.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "tracking_id", tracking_id cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if @status.nil?
|
|
138
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if @updated_at.nil?
|
|
142
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
invalid_properties
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Check to see if the all the properties in the model are valid
|
|
149
|
+
# @return true if the model is valid
|
|
150
|
+
def valid?
|
|
151
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
152
|
+
return false if @tracking_id.nil?
|
|
153
|
+
channel_validator = EnumAttributeValidator.new('String', ["EMAIL", "SMS"])
|
|
154
|
+
return false unless channel_validator.valid?(@channel)
|
|
155
|
+
return false if @status.nil?
|
|
156
|
+
status_validator = EnumAttributeValidator.new('String', ["PROCESSING", "FAILED", "IGNORED", "SCHEDULED", "UNSCHEDULED", "BATCHED", "SENT", "DELIVERED", "BOUNCED", "COMPLAINT", "THROTTLED", "DEDUPLICATED", "OPENED", "CLICKED", "INBOUND", "AUTO_REPLY"])
|
|
157
|
+
return false unless status_validator.valid?(@status)
|
|
158
|
+
return false if @updated_at.nil?
|
|
159
|
+
true
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Custom attribute writer method with validation
|
|
163
|
+
# @param [Object] tracking_id Value to be assigned
|
|
164
|
+
def tracking_id=(tracking_id)
|
|
165
|
+
if tracking_id.nil?
|
|
166
|
+
fail ArgumentError, 'tracking_id cannot be nil'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
@tracking_id = tracking_id
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
173
|
+
# @param [Object] channel Object to be assigned
|
|
174
|
+
def channel=(channel)
|
|
175
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL", "SMS"])
|
|
176
|
+
unless validator.valid?(channel)
|
|
177
|
+
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
|
178
|
+
end
|
|
179
|
+
@channel = channel
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
183
|
+
# @param [Object] status Object to be assigned
|
|
184
|
+
def status=(status)
|
|
185
|
+
validator = EnumAttributeValidator.new('String', ["PROCESSING", "FAILED", "IGNORED", "SCHEDULED", "UNSCHEDULED", "BATCHED", "SENT", "DELIVERED", "BOUNCED", "COMPLAINT", "THROTTLED", "DEDUPLICATED", "OPENED", "CLICKED", "INBOUND", "AUTO_REPLY"])
|
|
186
|
+
unless validator.valid?(status)
|
|
187
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
188
|
+
end
|
|
189
|
+
@status = status
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Custom attribute writer method with validation
|
|
193
|
+
# @param [Object] updated_at Value to be assigned
|
|
194
|
+
def updated_at=(updated_at)
|
|
195
|
+
if updated_at.nil?
|
|
196
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
@updated_at = updated_at
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Checks equality by comparing each attribute.
|
|
203
|
+
# @param [Object] Object to be compared
|
|
204
|
+
def ==(o)
|
|
205
|
+
return true if self.equal?(o)
|
|
206
|
+
self.class == o.class &&
|
|
207
|
+
tracking_id == o.tracking_id &&
|
|
208
|
+
channel == o.channel &&
|
|
209
|
+
status == o.status &&
|
|
210
|
+
updated_at == o.updated_at
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# @see the `==` method
|
|
214
|
+
# @param [Object] Object to be compared
|
|
215
|
+
def eql?(o)
|
|
216
|
+
self == o
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Calculates hash code according to all attributes.
|
|
220
|
+
# @return [Integer] Hash code
|
|
221
|
+
def hash
|
|
222
|
+
[tracking_id, channel, status, updated_at].hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Builds the object from hash
|
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
227
|
+
# @return [Object] Returns the model itself
|
|
228
|
+
def self.build_from_hash(attributes)
|
|
229
|
+
return nil unless attributes.is_a?(Hash)
|
|
230
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
231
|
+
transformed_hash = {}
|
|
232
|
+
openapi_types.each_pair do |key, type|
|
|
233
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
234
|
+
transformed_hash["#{key}"] = nil
|
|
235
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
236
|
+
# check to ensure the input is an array given that the attribute
|
|
237
|
+
# is documented as an array but the input is not
|
|
238
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
239
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
240
|
+
end
|
|
241
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
242
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
new(transformed_hash)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Returns the object in the form of hash
|
|
249
|
+
# @return [Hash] Returns the object in the form of hash
|
|
250
|
+
def to_hash
|
|
251
|
+
hash = {}
|
|
252
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
253
|
+
value = self.send(attr)
|
|
254
|
+
if value.nil?
|
|
255
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
256
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
hash[param] = _to_hash(value)
|
|
260
|
+
end
|
|
261
|
+
hash
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
data/lib/pingram/version.rb
CHANGED
data/lib/pingram.rb
CHANGED
|
@@ -205,6 +205,8 @@ require 'pingram/models/list_voice_calls_response'
|
|
|
205
205
|
require 'pingram/models/list_voice_calls_response_calls_inner'
|
|
206
206
|
require 'pingram/models/log_query_post_body'
|
|
207
207
|
require 'pingram/models/logs_bulk_request'
|
|
208
|
+
require 'pingram/models/logs_delivery_status_response'
|
|
209
|
+
require 'pingram/models/logs_delivery_status_response_statuses_inner'
|
|
208
210
|
require 'pingram/models/logs_get_response'
|
|
209
211
|
require 'pingram/models/logs_get_response_logs_inner'
|
|
210
212
|
require 'pingram/models/logs_query_response'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pingram
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.39
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pingram
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -281,6 +281,8 @@ files:
|
|
|
281
281
|
- lib/pingram/models/list_voice_calls_response_calls_inner.rb
|
|
282
282
|
- lib/pingram/models/log_query_post_body.rb
|
|
283
283
|
- lib/pingram/models/logs_bulk_request.rb
|
|
284
|
+
- lib/pingram/models/logs_delivery_status_response.rb
|
|
285
|
+
- lib/pingram/models/logs_delivery_status_response_statuses_inner.rb
|
|
284
286
|
- lib/pingram/models/logs_get_response.rb
|
|
285
287
|
- lib/pingram/models/logs_get_response_logs_inner.rb
|
|
286
288
|
- lib/pingram/models/logs_query_response.rb
|