reacon-sdk 0.1.0.beta.4 → 0.3.0.beta.1
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/README.md +6 -6
- data/lib/reacon-sdk/api/domains_api.rb +2 -2
- data/lib/reacon-sdk/http_policy.rb +15 -0
- data/lib/reacon-sdk/models/mail_get_portfolio_response200_portfolio.rb +103 -0
- data/lib/reacon-sdk/models/mail_post_analytics_export_response200.rb +1 -15
- data/lib/reacon-sdk/models/mail_post_analytics_export_response200_next_cursor.rb +160 -73
- data/lib/reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200_any_of.rb +1 -1
- data/lib/reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200_any_of1.rb +1 -1
- data/lib/reacon-sdk/models/{mail_post_campaigns_by_campaign_id_launch_response200_any_of_campaign.rb → mail_post_campaigns_by_campaign_id_launch_response200_campaign.rb} +1 -1
- data/lib/reacon-sdk/version.rb +1 -1
- data/lib/reacon-sdk.rb +2 -2
- metadata +3 -3
- data/lib/reacon-sdk/models/mail_post_analytics_export_response200_next_cursor_any_of.rb +0 -190
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 897408c4281525947833e2306d9e11a57df06022695b9ae9bd25216d08058b35
|
|
4
|
+
data.tar.gz: 5a8c2dc3483ddf117279d76ef61171d044f9f3ae233ce0fdcfaefd8603a8bdbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f51b94f9d6bb66223ba478926310c36a1193d302b345d124d4a5ac501706eaa0cd8b282d4bb86597c09352de81263aa88d7f4b38beafd6d6e47edb743b4241f
|
|
7
|
+
data.tar.gz: a2a2be562564e6aab734fa2e96ac2d2619f8ec7e8990b3ded67d32a3515fe213138121f7a98d6ede033396f136f276ac44aa3ea6eba7fccb989ff0d42be60718
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 0.1.0
|
|
10
|
-
- Package version: 0.
|
|
10
|
+
- Package version: 0.3.0.beta.1
|
|
11
11
|
- Generator version: 7.25.0
|
|
12
12
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
13
13
|
|
|
@@ -24,16 +24,16 @@ gem build reacon-sdk.gemspec
|
|
|
24
24
|
Then either install the gem locally:
|
|
25
25
|
|
|
26
26
|
```shell
|
|
27
|
-
gem install ./reacon-sdk-0.
|
|
27
|
+
gem install ./reacon-sdk-0.3.0.beta.1.gem
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
(for development, run `gem install --dev ./reacon-sdk-0.
|
|
30
|
+
(for development, run `gem install --dev ./reacon-sdk-0.3.0.beta.1.gem` to install the development dependencies)
|
|
31
31
|
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
33
33
|
|
|
34
34
|
Finally add this to the Gemfile:
|
|
35
35
|
|
|
36
|
-
gem 'reacon-sdk', '~> 0.
|
|
36
|
+
gem 'reacon-sdk', '~> 0.3.0.beta.1'
|
|
37
37
|
|
|
38
38
|
### Install from Git
|
|
39
39
|
|
|
@@ -513,6 +513,7 @@ Class | Method | HTTP request | Description
|
|
|
513
513
|
- [Reacon::MailGetPortfolioResponse200](docs/MailGetPortfolioResponse200.md)
|
|
514
514
|
- [Reacon::MailGetPortfolioResponse200AnyOf](docs/MailGetPortfolioResponse200AnyOf.md)
|
|
515
515
|
- [Reacon::MailGetPortfolioResponse200AnyOf1](docs/MailGetPortfolioResponse200AnyOf1.md)
|
|
516
|
+
- [Reacon::MailGetPortfolioResponse200Portfolio](docs/MailGetPortfolioResponse200Portfolio.md)
|
|
516
517
|
- [Reacon::MailGetQueueResponse200](docs/MailGetQueueResponse200.md)
|
|
517
518
|
- [Reacon::MailGetReplyAutomationsResponse200](docs/MailGetReplyAutomationsResponse200.md)
|
|
518
519
|
- [Reacon::MailGetSignaturesResponse200](docs/MailGetSignaturesResponse200.md)
|
|
@@ -559,7 +560,6 @@ Class | Method | HTTP request | Description
|
|
|
559
560
|
- [Reacon::MailPostAnalyticsExportRequestAfter](docs/MailPostAnalyticsExportRequestAfter.md)
|
|
560
561
|
- [Reacon::MailPostAnalyticsExportResponse200](docs/MailPostAnalyticsExportResponse200.md)
|
|
561
562
|
- [Reacon::MailPostAnalyticsExportResponse200NextCursor](docs/MailPostAnalyticsExportResponse200NextCursor.md)
|
|
562
|
-
- [Reacon::MailPostAnalyticsExportResponse200NextCursorAnyOf](docs/MailPostAnalyticsExportResponse200NextCursorAnyOf.md)
|
|
563
563
|
- [Reacon::MailPostCadenceCampaignsByCampaignIdStateRequest](docs/MailPostCadenceCampaignsByCampaignIdStateRequest.md)
|
|
564
564
|
- [Reacon::MailPostCadenceCampaignsByCampaignIdStateResponse200](docs/MailPostCadenceCampaignsByCampaignIdStateResponse200.md)
|
|
565
565
|
- [Reacon::MailPostCadenceCampaignsByCampaignIdStateResponse200AnyOf](docs/MailPostCadenceCampaignsByCampaignIdStateResponse200AnyOf.md)
|
|
@@ -595,7 +595,7 @@ Class | Method | HTTP request | Description
|
|
|
595
595
|
- [Reacon::MailPostCampaignsByCampaignIdLaunchResponse200](docs/MailPostCampaignsByCampaignIdLaunchResponse200.md)
|
|
596
596
|
- [Reacon::MailPostCampaignsByCampaignIdLaunchResponse200AnyOf](docs/MailPostCampaignsByCampaignIdLaunchResponse200AnyOf.md)
|
|
597
597
|
- [Reacon::MailPostCampaignsByCampaignIdLaunchResponse200AnyOf1](docs/MailPostCampaignsByCampaignIdLaunchResponse200AnyOf1.md)
|
|
598
|
-
- [Reacon::
|
|
598
|
+
- [Reacon::MailPostCampaignsByCampaignIdLaunchResponse200Campaign](docs/MailPostCampaignsByCampaignIdLaunchResponse200Campaign.md)
|
|
599
599
|
- [Reacon::MailPostCampaignsByCampaignIdStateRequest](docs/MailPostCampaignsByCampaignIdStateRequest.md)
|
|
600
600
|
- [Reacon::MailPostCampaignsByCampaignIdStateResponse200](docs/MailPostCampaignsByCampaignIdStateResponse200.md)
|
|
601
601
|
- [Reacon::MailPostCampaignsRequest](docs/MailPostCampaignsRequest.md)
|
|
@@ -146,7 +146,7 @@ module Reacon
|
|
|
146
146
|
end
|
|
147
147
|
|
|
148
148
|
# Count known emails for a domain
|
|
149
|
-
# Returns personal, generic and total email counts for the domain. Authenticate with X-API-Key.
|
|
149
|
+
# Returns personal, generic and total known email counts for the domain. Authenticate with X-API-Key. This endpoint reports counts only; it does not reveal email addresses. The recorded example uses a reserved example.invalid domain with zero known emails.
|
|
150
150
|
# @param domain [String]
|
|
151
151
|
# @param [Hash] opts the optional parameters
|
|
152
152
|
# @return [DomainCounts]
|
|
@@ -156,7 +156,7 @@ module Reacon
|
|
|
156
156
|
end
|
|
157
157
|
|
|
158
158
|
# Count known emails for a domain
|
|
159
|
-
# Returns personal, generic and total email counts for the domain. Authenticate with X-API-Key.
|
|
159
|
+
# Returns personal, generic and total known email counts for the domain. Authenticate with X-API-Key. This endpoint reports counts only; it does not reveal email addresses. The recorded example uses a reserved example.invalid domain with zero known emails.
|
|
160
160
|
# @param domain [String]
|
|
161
161
|
# @param [Hash] opts the optional parameters
|
|
162
162
|
# @return [Array<(DomainCounts, Integer, Hash)>] DomainCounts data, response status code and response headers
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
# Copyright Reacon contributors. Licensed under Apache-2.0.
|
|
3
3
|
require 'timeout'
|
|
4
|
+
require 'date'
|
|
5
|
+
require 'time'
|
|
4
6
|
|
|
5
7
|
module Reacon
|
|
6
8
|
class RequestTimeoutError < StandardError
|
|
@@ -112,6 +114,19 @@ module Reacon
|
|
|
112
114
|
end
|
|
113
115
|
|
|
114
116
|
module HttpClientPolicy
|
|
117
|
+
# JSON's default Time encoder emits a human-readable, non-RFC3339 string.
|
|
118
|
+
# Traverse nested generated models/maps so every date uses its wire format.
|
|
119
|
+
def object_to_hash(value)
|
|
120
|
+
case value
|
|
121
|
+
when Time then value.getutc.iso8601(9).sub(/\.0+Z$/, 'Z').sub(/(\.\d*?[1-9])0+Z$/, '\\1Z')
|
|
122
|
+
when DateTime then value.new_offset(0).iso8601(9).sub('+00:00', 'Z').sub(/\.0+Z$/, 'Z').sub(/(\.\d*?[1-9])0+Z$/, '\\1Z')
|
|
123
|
+
when Date then value.iso8601
|
|
124
|
+
when Array then value.map { |item| object_to_hash(item) }
|
|
125
|
+
when Hash then value.transform_values { |item| object_to_hash(item) }
|
|
126
|
+
else value.respond_to?(:to_hash) ? object_to_hash(value.to_hash) : value
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
115
130
|
def call_api(http_method, path, opts = {})
|
|
116
131
|
seconds = HttpPolicy.seconds(opts.fetch(:request_timeout, config.timeout))
|
|
117
132
|
stream = nil
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Reacon API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Reacon
|
|
17
|
+
module MailGetPortfolioResponse200Portfolio
|
|
18
|
+
class << self
|
|
19
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
20
|
+
def openapi_any_of
|
|
21
|
+
[
|
|
22
|
+
:'MailMailPortfolio',
|
|
23
|
+
:'Object'
|
|
24
|
+
]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Builds the object
|
|
28
|
+
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
29
|
+
# @return [Object] Returns the model or the data itself
|
|
30
|
+
def build(data)
|
|
31
|
+
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
32
|
+
# Note:
|
|
33
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
34
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
35
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
36
|
+
# - TODO: logging when debugging is set.
|
|
37
|
+
openapi_any_of.each do |klass|
|
|
38
|
+
begin
|
|
39
|
+
next if klass == :AnyType # "nullable: true"
|
|
40
|
+
return find_and_cast_into_type(klass, data)
|
|
41
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
openapi_any_of.include?(:AnyType) ? data : nil
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
51
|
+
|
|
52
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
53
|
+
def find_and_cast_into_type(klass, data)
|
|
54
|
+
return if data.nil?
|
|
55
|
+
|
|
56
|
+
case klass.to_s
|
|
57
|
+
when 'Boolean'
|
|
58
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
59
|
+
when 'Float'
|
|
60
|
+
return data if data.instance_of?(Float)
|
|
61
|
+
when 'Integer'
|
|
62
|
+
return data if data.instance_of?(Integer)
|
|
63
|
+
when 'Time'
|
|
64
|
+
return Time.parse(data)
|
|
65
|
+
when 'Date'
|
|
66
|
+
return Date.iso8601(data)
|
|
67
|
+
when 'String'
|
|
68
|
+
return data if data.instance_of?(String)
|
|
69
|
+
when 'Object' # "type: object"
|
|
70
|
+
return data if data.instance_of?(Hash)
|
|
71
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
72
|
+
if data.instance_of?(Array)
|
|
73
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
74
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
75
|
+
end
|
|
76
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
77
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
78
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
79
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
80
|
+
end
|
|
81
|
+
else # model
|
|
82
|
+
const = Reacon.const_get(klass)
|
|
83
|
+
if const
|
|
84
|
+
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
85
|
+
model = const.build(data)
|
|
86
|
+
return model if model
|
|
87
|
+
else
|
|
88
|
+
# raise if data contains keys that are not known to the model
|
|
89
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
90
|
+
model = const.build_from_hash(data)
|
|
91
|
+
return model if model
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
raise # if no match by now, raise
|
|
97
|
+
rescue
|
|
98
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
end
|
|
@@ -82,6 +82,7 @@ module Reacon
|
|
|
82
82
|
# List of attributes with nullable: true
|
|
83
83
|
def self.openapi_nullable
|
|
84
84
|
Set.new([
|
|
85
|
+
:'next_cursor',
|
|
85
86
|
])
|
|
86
87
|
end
|
|
87
88
|
|
|
@@ -149,10 +150,6 @@ module Reacon
|
|
|
149
150
|
invalid_properties.push('invalid value for "filename", filename cannot be nil.')
|
|
150
151
|
end
|
|
151
152
|
|
|
152
|
-
if @next_cursor.nil?
|
|
153
|
-
invalid_properties.push('invalid value for "next_cursor", next_cursor cannot be nil.')
|
|
154
|
-
end
|
|
155
|
-
|
|
156
153
|
if @row_count.nil?
|
|
157
154
|
invalid_properties.push('invalid value for "row_count", row_count cannot be nil.')
|
|
158
155
|
end
|
|
@@ -169,7 +166,6 @@ module Reacon
|
|
|
169
166
|
content_type_validator = EnumAttributeValidator.new('String', ["text/csv; charset=utf-8"])
|
|
170
167
|
return false unless content_type_validator.valid?(@content_type)
|
|
171
168
|
return false if @filename.nil?
|
|
172
|
-
return false if @next_cursor.nil?
|
|
173
169
|
return false if @row_count.nil?
|
|
174
170
|
true
|
|
175
171
|
end
|
|
@@ -204,16 +200,6 @@ module Reacon
|
|
|
204
200
|
@filename = filename
|
|
205
201
|
end
|
|
206
202
|
|
|
207
|
-
# Custom attribute writer method with validation
|
|
208
|
-
# @param [Object] next_cursor Value to be assigned
|
|
209
|
-
def next_cursor=(next_cursor)
|
|
210
|
-
if next_cursor.nil?
|
|
211
|
-
fail ArgumentError, 'next_cursor cannot be nil'
|
|
212
|
-
end
|
|
213
|
-
|
|
214
|
-
@next_cursor = next_cursor
|
|
215
|
-
end
|
|
216
|
-
|
|
217
203
|
# Custom attribute writer method with validation
|
|
218
204
|
# @param [Object] row_count Value to be assigned
|
|
219
205
|
def row_count=(row_count)
|
|
@@ -14,90 +14,177 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Reacon
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
class MailPostAnalyticsExportResponse200NextCursor < ApiModelBase
|
|
18
|
+
attr_accessor :created_at
|
|
19
|
+
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'created_at' => :'createdAt',
|
|
26
|
+
:'id' => :'id'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'created_at' => :'String',
|
|
44
|
+
:'id' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Reacon::MailPostAnalyticsExportResponse200NextCursor` initialize method"
|
|
25
59
|
end
|
|
26
60
|
|
|
27
|
-
#
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
# Note:
|
|
33
|
-
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
34
|
-
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
35
|
-
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
36
|
-
# - TODO: logging when debugging is set.
|
|
37
|
-
openapi_any_of.each do |klass|
|
|
38
|
-
begin
|
|
39
|
-
next if klass == :AnyType # "nullable: true"
|
|
40
|
-
return find_and_cast_into_type(klass, data)
|
|
41
|
-
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
42
|
-
end
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Reacon::MailPostAnalyticsExportResponse200NextCursor`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
43
66
|
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
44
69
|
|
|
45
|
-
|
|
70
|
+
if attributes.key?(:'created_at')
|
|
71
|
+
self.created_at = attributes[:'created_at']
|
|
72
|
+
else
|
|
73
|
+
self.created_at = nil
|
|
46
74
|
end
|
|
47
75
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
76
|
+
if attributes.key?(:'id')
|
|
77
|
+
self.id = attributes[:'id']
|
|
78
|
+
else
|
|
79
|
+
self.id = nil
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @created_at.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @id.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if @created_at.nil?
|
|
104
|
+
return false if @id.nil?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param [Object] created_at Value to be assigned
|
|
110
|
+
def created_at=(created_at)
|
|
111
|
+
if created_at.nil?
|
|
112
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
@created_at = created_at
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] id Value to be assigned
|
|
120
|
+
def id=(id)
|
|
121
|
+
if id.nil?
|
|
122
|
+
fail ArgumentError, 'id cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@id = id
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
created_at == o.created_at &&
|
|
134
|
+
id == o.id
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[created_at, id].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
93
164
|
end
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
94
167
|
end
|
|
168
|
+
end
|
|
169
|
+
new(transformed_hash)
|
|
170
|
+
end
|
|
95
171
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
99
184
|
end
|
|
185
|
+
hash
|
|
100
186
|
end
|
|
187
|
+
|
|
101
188
|
end
|
|
102
189
|
|
|
103
190
|
end
|
|
@@ -43,7 +43,7 @@ module Reacon
|
|
|
43
43
|
# Attribute type mapping.
|
|
44
44
|
def self.openapi_types
|
|
45
45
|
{
|
|
46
|
-
:'campaign' => :'
|
|
46
|
+
:'campaign' => :'MailPostCampaignsByCampaignIdLaunchResponse200Campaign',
|
|
47
47
|
:'draft' => :'MailCampaignDraftRecord',
|
|
48
48
|
:'sequences' => :'Array<Object>'
|
|
49
49
|
}
|
|
@@ -43,7 +43,7 @@ module Reacon
|
|
|
43
43
|
# Attribute type mapping.
|
|
44
44
|
def self.openapi_types
|
|
45
45
|
{
|
|
46
|
-
:'campaign' => :'
|
|
46
|
+
:'campaign' => :'MailPostCampaignsByCampaignIdLaunchResponse200Campaign',
|
|
47
47
|
:'draft' => :'MailCampaignDraftRecord',
|
|
48
48
|
:'sequences' => :'Array<MailSequenceRunRecord>'
|
|
49
49
|
}
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Reacon
|
|
17
|
-
module
|
|
17
|
+
module MailPostCampaignsByCampaignIdLaunchResponse200Campaign
|
|
18
18
|
class << self
|
|
19
19
|
# List of class defined in anyOf (OpenAPI v3)
|
|
20
20
|
def openapi_any_of
|
data/lib/reacon-sdk/version.rb
CHANGED
data/lib/reacon-sdk.rb
CHANGED
|
@@ -256,6 +256,7 @@ require 'reacon-sdk/models/mail_get_portfolio_overview_response200'
|
|
|
256
256
|
require 'reacon-sdk/models/mail_get_portfolio_response200'
|
|
257
257
|
require 'reacon-sdk/models/mail_get_portfolio_response200_any_of'
|
|
258
258
|
require 'reacon-sdk/models/mail_get_portfolio_response200_any_of1'
|
|
259
|
+
require 'reacon-sdk/models/mail_get_portfolio_response200_portfolio'
|
|
259
260
|
require 'reacon-sdk/models/mail_get_queue_response200'
|
|
260
261
|
require 'reacon-sdk/models/mail_get_reply_automations_response200'
|
|
261
262
|
require 'reacon-sdk/models/mail_get_signatures_response200'
|
|
@@ -302,7 +303,6 @@ require 'reacon-sdk/models/mail_post_analytics_export_request'
|
|
|
302
303
|
require 'reacon-sdk/models/mail_post_analytics_export_request_after'
|
|
303
304
|
require 'reacon-sdk/models/mail_post_analytics_export_response200'
|
|
304
305
|
require 'reacon-sdk/models/mail_post_analytics_export_response200_next_cursor'
|
|
305
|
-
require 'reacon-sdk/models/mail_post_analytics_export_response200_next_cursor_any_of'
|
|
306
306
|
require 'reacon-sdk/models/mail_post_cadence_campaigns_by_campaign_id_state_request'
|
|
307
307
|
require 'reacon-sdk/models/mail_post_cadence_campaigns_by_campaign_id_state_response200'
|
|
308
308
|
require 'reacon-sdk/models/mail_post_cadence_campaigns_by_campaign_id_state_response200_any_of'
|
|
@@ -338,7 +338,7 @@ require 'reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_request'
|
|
|
338
338
|
require 'reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200'
|
|
339
339
|
require 'reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200_any_of'
|
|
340
340
|
require 'reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200_any_of1'
|
|
341
|
-
require 'reacon-sdk/models/
|
|
341
|
+
require 'reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200_campaign'
|
|
342
342
|
require 'reacon-sdk/models/mail_post_campaigns_by_campaign_id_state_request'
|
|
343
343
|
require 'reacon-sdk/models/mail_post_campaigns_by_campaign_id_state_response200'
|
|
344
344
|
require 'reacon-sdk/models/mail_post_campaigns_request'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: reacon-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0.beta.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Reacon
|
|
@@ -400,6 +400,7 @@ files:
|
|
|
400
400
|
- lib/reacon-sdk/models/mail_get_portfolio_response200.rb
|
|
401
401
|
- lib/reacon-sdk/models/mail_get_portfolio_response200_any_of.rb
|
|
402
402
|
- lib/reacon-sdk/models/mail_get_portfolio_response200_any_of1.rb
|
|
403
|
+
- lib/reacon-sdk/models/mail_get_portfolio_response200_portfolio.rb
|
|
403
404
|
- lib/reacon-sdk/models/mail_get_queue_response200.rb
|
|
404
405
|
- lib/reacon-sdk/models/mail_get_reply_automations_response200.rb
|
|
405
406
|
- lib/reacon-sdk/models/mail_get_signatures_response200.rb
|
|
@@ -446,7 +447,6 @@ files:
|
|
|
446
447
|
- lib/reacon-sdk/models/mail_post_analytics_export_request_after.rb
|
|
447
448
|
- lib/reacon-sdk/models/mail_post_analytics_export_response200.rb
|
|
448
449
|
- lib/reacon-sdk/models/mail_post_analytics_export_response200_next_cursor.rb
|
|
449
|
-
- lib/reacon-sdk/models/mail_post_analytics_export_response200_next_cursor_any_of.rb
|
|
450
450
|
- lib/reacon-sdk/models/mail_post_cadence_campaigns_by_campaign_id_state_request.rb
|
|
451
451
|
- lib/reacon-sdk/models/mail_post_cadence_campaigns_by_campaign_id_state_response200.rb
|
|
452
452
|
- lib/reacon-sdk/models/mail_post_cadence_campaigns_by_campaign_id_state_response200_any_of.rb
|
|
@@ -482,7 +482,7 @@ files:
|
|
|
482
482
|
- lib/reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200.rb
|
|
483
483
|
- lib/reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200_any_of.rb
|
|
484
484
|
- lib/reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200_any_of1.rb
|
|
485
|
-
- lib/reacon-sdk/models/
|
|
485
|
+
- lib/reacon-sdk/models/mail_post_campaigns_by_campaign_id_launch_response200_campaign.rb
|
|
486
486
|
- lib/reacon-sdk/models/mail_post_campaigns_by_campaign_id_state_request.rb
|
|
487
487
|
- lib/reacon-sdk/models/mail_post_campaigns_by_campaign_id_state_response200.rb
|
|
488
488
|
- lib/reacon-sdk/models/mail_post_campaigns_request.rb
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Reacon API
|
|
3
|
-
|
|
4
|
-
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 0.1.0
|
|
7
|
-
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.25.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
require 'time'
|
|
15
|
-
|
|
16
|
-
module Reacon
|
|
17
|
-
class MailPostAnalyticsExportResponse200NextCursorAnyOf < ApiModelBase
|
|
18
|
-
attr_accessor :created_at
|
|
19
|
-
|
|
20
|
-
attr_accessor :id
|
|
21
|
-
|
|
22
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
-
def self.attribute_map
|
|
24
|
-
{
|
|
25
|
-
:'created_at' => :'createdAt',
|
|
26
|
-
:'id' => :'id'
|
|
27
|
-
}
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Returns attribute mapping this model knows about
|
|
31
|
-
def self.acceptable_attribute_map
|
|
32
|
-
attribute_map
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# Returns all the JSON keys this model knows about
|
|
36
|
-
def self.acceptable_attributes
|
|
37
|
-
acceptable_attribute_map.values
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# Attribute type mapping.
|
|
41
|
-
def self.openapi_types
|
|
42
|
-
{
|
|
43
|
-
:'created_at' => :'String',
|
|
44
|
-
:'id' => :'String'
|
|
45
|
-
}
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# List of attributes with nullable: true
|
|
49
|
-
def self.openapi_nullable
|
|
50
|
-
Set.new([
|
|
51
|
-
])
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# Initializes the object
|
|
55
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
-
def initialize(attributes = {})
|
|
57
|
-
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Reacon::MailPostAnalyticsExportResponse200NextCursorAnyOf` initialize method"
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Reacon::MailPostAnalyticsExportResponse200NextCursorAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
-
end
|
|
67
|
-
h[k.to_sym] = v
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if attributes.key?(:'created_at')
|
|
71
|
-
self.created_at = attributes[:'created_at']
|
|
72
|
-
else
|
|
73
|
-
self.created_at = nil
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
if attributes.key?(:'id')
|
|
77
|
-
self.id = attributes[:'id']
|
|
78
|
-
else
|
|
79
|
-
self.id = nil
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
-
# @return Array for valid properties with the reasons
|
|
85
|
-
def list_invalid_properties
|
|
86
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
-
invalid_properties = Array.new
|
|
88
|
-
if @created_at.nil?
|
|
89
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
if @id.nil?
|
|
93
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
invalid_properties
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
# Check to see if the all the properties in the model are valid
|
|
100
|
-
# @return true if the model is valid
|
|
101
|
-
def valid?
|
|
102
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
-
return false if @created_at.nil?
|
|
104
|
-
return false if @id.nil?
|
|
105
|
-
true
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
# Custom attribute writer method with validation
|
|
109
|
-
# @param [Object] created_at Value to be assigned
|
|
110
|
-
def created_at=(created_at)
|
|
111
|
-
if created_at.nil?
|
|
112
|
-
fail ArgumentError, 'created_at cannot be nil'
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
@created_at = created_at
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
# Custom attribute writer method with validation
|
|
119
|
-
# @param [Object] id Value to be assigned
|
|
120
|
-
def id=(id)
|
|
121
|
-
if id.nil?
|
|
122
|
-
fail ArgumentError, 'id cannot be nil'
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
@id = id
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
# Checks equality by comparing each attribute.
|
|
129
|
-
# @param [Object] Object to be compared
|
|
130
|
-
def ==(o)
|
|
131
|
-
return true if self.equal?(o)
|
|
132
|
-
self.class == o.class &&
|
|
133
|
-
created_at == o.created_at &&
|
|
134
|
-
id == o.id
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
# @see the `==` method
|
|
138
|
-
# @param [Object] Object to be compared
|
|
139
|
-
def eql?(o)
|
|
140
|
-
self == o
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
# Calculates hash code according to all attributes.
|
|
144
|
-
# @return [Integer] Hash code
|
|
145
|
-
def hash
|
|
146
|
-
[created_at, id].hash
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
# Builds the object from hash
|
|
150
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
-
# @return [Object] Returns the model itself
|
|
152
|
-
def self.build_from_hash(attributes)
|
|
153
|
-
return nil unless attributes.is_a?(Hash)
|
|
154
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
-
transformed_hash = {}
|
|
156
|
-
openapi_types.each_pair do |key, type|
|
|
157
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
-
transformed_hash["#{key}"] = nil
|
|
159
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
-
# check to ensure the input is an array given that the attribute
|
|
161
|
-
# is documented as an array but the input is not
|
|
162
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
164
|
-
end
|
|
165
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
167
|
-
end
|
|
168
|
-
end
|
|
169
|
-
new(transformed_hash)
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# Returns the object in the form of hash
|
|
173
|
-
# @return [Hash] Returns the object in the form of hash
|
|
174
|
-
def to_hash
|
|
175
|
-
hash = {}
|
|
176
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
-
value = self.send(attr)
|
|
178
|
-
if value.nil?
|
|
179
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
hash[param] = _to_hash(value)
|
|
184
|
-
end
|
|
185
|
-
hash
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
end
|