docspring 4.3.0 → 4.4.0
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/.github/workflows/release.yml +80 -0
- data/.openapi-generator/FILES +84 -0
- data/CHANGELOG.md +55 -0
- data/Gemfile.lock +2 -2
- data/README.md +20 -1
- data/docs/AddTemplateFieldsRequest.md +1 -1
- data/docs/Client.md +2311 -766
- data/docs/CombinedPdfSource.md +1 -1
- data/docs/CreateAccountEmailActionRequest.md +54 -0
- data/docs/CreateEmailActionRequest.md +50 -0
- data/docs/CreateEmailDomainRequest.md +18 -0
- data/docs/CreateSubmissionBatchRequest.md +2 -2
- data/docs/CreateSubmissionRequest.md +22 -4
- data/docs/CreateTemplateRequest.md +22 -6
- data/docs/DnsRecordType.md +15 -0
- data/docs/EmailAction.md +76 -0
- data/docs/EmailActionConditions.md +20 -0
- data/docs/EmailActionConditionsInput.md +20 -0
- data/docs/EmailActionCustomization.md +36 -0
- data/docs/EmailActionDelivery.md +15 -0
- data/docs/EmailActionFileFormats.md +15 -0
- data/docs/EmailActionList.md +20 -0
- data/docs/EmailActionSetting.md +15 -0
- data/docs/EmailActionSubmissionType.md +15 -0
- data/docs/EmailActionTestEmail.md +18 -0
- data/docs/EmailDomain.md +38 -0
- data/docs/EmailDomainDnsRecord.md +24 -0
- data/docs/EmailDomainDnsRecordPurpose.md +15 -0
- data/docs/EmailDomainList.md +20 -0
- data/docs/EmailDomainRecordState.md +15 -0
- data/docs/EmailDomainState.md +15 -0
- data/docs/ErrorInfo.md +12 -6
- data/docs/Field.md +1 -1
- data/docs/FieldInput.md +1 -1
- data/docs/HtmlEngineOptions.md +1 -1
- data/docs/HtmlEngineOptionsInput.md +1 -1
- data/docs/SendAccountEmailActionTestEmailRequest.md +18 -0
- data/docs/SignatureRequest.md +9 -1
- data/docs/SignatureRequestEmailAttachments.md +15 -0
- data/docs/SignatureRequestEmailStatus.md +15 -0
- data/docs/SignatureRequestInput.md +7 -3
- data/docs/SignatureRequestReminders.md +20 -0
- data/docs/SigningOrder.md +15 -0
- data/docs/Submission.md +4 -2
- data/docs/SubmissionAction.md +5 -3
- data/docs/SubmissionInput.md +3 -3
- data/docs/SubmissionSummary.md +1 -1
- data/docs/Template.md +23 -7
- data/docs/TemplateSourcePdf.md +1 -1
- data/docs/TemplateSummary.md +4 -4
- data/docs/UpdateAccountEmailActionRequest.md +54 -0
- data/docs/UpdateEmailActionCustomizationRequest.md +46 -0
- data/docs/UpdateEmailActionRequest.md +50 -0
- data/docs/UpdateTemplateDocumentRequest.md +1 -1
- data/docs/UpdateTemplateRequest.md +21 -5
- data/docs/ValidateSubmissionRequest.md +22 -4
- data/lib/docspring/api/client.rb +1749 -314
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/models/add_template_fields_request.rb +1 -1
- data/lib/docspring/models/combined_pdf_source.rb +1 -1
- data/lib/docspring/models/create_account_email_action_request.rb +388 -0
- data/lib/docspring/models/create_email_action_request.rb +364 -0
- data/lib/docspring/models/create_email_domain_request.rb +185 -0
- data/lib/docspring/models/create_submission_batch_request.rb +2 -2
- data/lib/docspring/models/create_submission_request.rb +143 -7
- data/lib/docspring/models/create_template_request.rb +107 -7
- data/lib/docspring/models/dns_record_type.rb +42 -0
- data/lib/docspring/models/email_action.rb +790 -0
- data/lib/docspring/models/email_action_conditions.rb +219 -0
- data/lib/docspring/models/email_action_conditions_input.rb +219 -0
- data/lib/docspring/models/email_action_customization.rb +360 -0
- data/lib/docspring/models/email_action_delivery.rb +41 -0
- data/lib/docspring/models/email_action_file_formats.rb +43 -0
- data/lib/docspring/models/email_action_list.rb +200 -0
- data/lib/docspring/models/email_action_setting.rb +53 -0
- data/lib/docspring/models/email_action_submission_type.rb +42 -0
- data/lib/docspring/models/email_action_test_email.rb +185 -0
- data/lib/docspring/models/email_domain.rb +423 -0
- data/lib/docspring/models/email_domain_dns_record.rb +288 -0
- data/lib/docspring/models/email_domain_dns_record_purpose.rb +42 -0
- data/lib/docspring/models/email_domain_list.rb +200 -0
- data/lib/docspring/models/email_domain_record_state.rb +42 -0
- data/lib/docspring/models/email_domain_state.rb +42 -0
- data/lib/docspring/models/error_code.rb +3 -1
- data/lib/docspring/models/error_info.rb +39 -9
- data/lib/docspring/models/field.rb +1 -1
- data/lib/docspring/models/field_input.rb +1 -1
- data/lib/docspring/models/html_engine_options.rb +1 -1
- data/lib/docspring/models/html_engine_options_input.rb +1 -1
- data/lib/docspring/models/send_account_email_action_test_email_request.rb +168 -0
- data/lib/docspring/models/signature_request.rb +68 -2
- data/lib/docspring/models/signature_request_email_attachments.rb +41 -0
- data/lib/docspring/models/signature_request_email_status.rb +47 -0
- data/lib/docspring/models/signature_request_event_type.rb +3 -1
- data/lib/docspring/models/signature_request_input.rb +25 -22
- data/lib/docspring/models/signature_request_reminders.rb +212 -0
- data/lib/docspring/models/signing_order.rb +41 -0
- data/lib/docspring/models/string_condition_type.rb +8 -1
- data/lib/docspring/models/submission.rb +30 -3
- data/lib/docspring/models/submission_action.rb +18 -5
- data/lib/docspring/models/submission_input.rb +3 -3
- data/lib/docspring/models/submission_summary.rb +1 -1
- data/lib/docspring/models/template.rb +144 -8
- data/lib/docspring/models/template_source_pdf.rb +1 -1
- data/lib/docspring/models/template_summary.rb +4 -4
- data/lib/docspring/models/template_type.rb +2 -1
- data/lib/docspring/models/update_account_email_action_request.rb +388 -0
- data/lib/docspring/models/update_email_action_customization_request.rb +343 -0
- data/lib/docspring/models/update_email_action_request.rb +364 -0
- data/lib/docspring/models/update_template_document_request.rb +1 -1
- data/lib/docspring/models/update_template_request.rb +108 -8
- data/lib/docspring/models/validate_submission_request.rb +143 -7
- data/lib/docspring/models/webhook_event_type.rb +3 -1
- data/lib/docspring/request_schemas.json +1691 -145
- data/lib/docspring/request_validator.rb +4 -0
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +28 -0
- data/spec/api/client_spec.rb +306 -18
- data/spec/models/create_account_email_action_request_spec.rb +144 -0
- data/spec/models/create_email_action_request_spec.rb +132 -0
- data/spec/models/create_email_domain_request_spec.rb +36 -0
- data/spec/models/create_submission_request_spec.rb +54 -0
- data/spec/models/create_template_request_spec.rb +48 -0
- data/spec/models/dns_record_type_spec.rb +30 -0
- data/spec/models/email_action_conditions_input_spec.rb +42 -0
- data/spec/models/email_action_conditions_spec.rb +42 -0
- data/spec/models/email_action_customization_spec.rb +90 -0
- data/spec/models/email_action_delivery_spec.rb +30 -0
- data/spec/models/email_action_file_formats_spec.rb +30 -0
- data/spec/models/email_action_list_spec.rb +42 -0
- data/spec/models/email_action_setting_spec.rb +30 -0
- data/spec/models/email_action_spec.rb +210 -0
- data/spec/models/email_action_submission_type_spec.rb +30 -0
- data/spec/models/email_action_test_email_spec.rb +36 -0
- data/spec/models/email_domain_dns_record_purpose_spec.rb +30 -0
- data/spec/models/email_domain_dns_record_spec.rb +54 -0
- data/spec/models/email_domain_list_spec.rb +42 -0
- data/spec/models/email_domain_record_state_spec.rb +30 -0
- data/spec/models/email_domain_spec.rb +96 -0
- data/spec/models/email_domain_state_spec.rb +30 -0
- data/spec/models/error_info_spec.rb +18 -0
- data/spec/models/send_account_email_action_test_email_request_spec.rb +36 -0
- data/spec/models/signature_request_email_attachments_spec.rb +30 -0
- data/spec/models/signature_request_email_status_spec.rb +30 -0
- data/spec/models/signature_request_input_spec.rb +12 -0
- data/spec/models/signature_request_reminders_spec.rb +42 -0
- data/spec/models/signature_request_spec.rb +24 -0
- data/spec/models/signing_order_spec.rb +30 -0
- data/spec/models/submission_action_spec.rb +6 -0
- data/spec/models/submission_spec.rb +6 -0
- data/spec/models/template_spec.rb +48 -0
- data/spec/models/update_account_email_action_request_spec.rb +144 -0
- data/spec/models/update_email_action_customization_request_spec.rb +120 -0
- data/spec/models/update_email_action_request_spec.rb +132 -0
- data/spec/models/update_template_request_spec.rb +48 -0
- data/spec/models/validate_submission_request_spec.rb +54 -0
- metadata +115 -4
- data/.gitlab-ci.yml +0 -26
- data/.travis.yml +0 -11
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
class EmailActionSubmissionType
|
|
18
|
+
LIVE = "live".freeze
|
|
19
|
+
TEST = "test".freeze
|
|
20
|
+
ALL = "all".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [LIVE, TEST, ALL].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
new.build_from_hash(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
# Only responses are built from hashes, and a value added to the API after this client was released is kept as it
|
|
38
|
+
# is: the constants are the values this client knows
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
# A test email that was sent.
|
|
18
|
+
class EmailActionTestEmail < ApiModelBase
|
|
19
|
+
# The address the test email went to, the email address of the API token's user.
|
|
20
|
+
attr_accessor :sent_to
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'sent_to' => :'sent_to'
|
|
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
|
+
:'sent_to' => :'String'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute type mapping
|
|
53
|
+
def self.acceptable_openapi_types
|
|
54
|
+
openapi_types
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns the nullable attributes
|
|
58
|
+
def self.acceptable_openapi_nullable
|
|
59
|
+
openapi_nullable
|
|
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 `DocSpring::EmailActionTestEmail` 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 `DocSpring::EmailActionTestEmail`. 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?(:'sent_to')
|
|
79
|
+
self.sent_to = attributes[:'sent_to']
|
|
80
|
+
else
|
|
81
|
+
self.sent_to = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @sent_to.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "sent_to", sent_to cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
invalid_properties
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Check to see if the all the properties in the model are valid
|
|
98
|
+
# @return true if the model is valid
|
|
99
|
+
def valid?
|
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
101
|
+
return false if @sent_to.nil?
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Custom attribute writer method with validation
|
|
106
|
+
# @param [Object] sent_to Value to be assigned
|
|
107
|
+
def sent_to=(sent_to)
|
|
108
|
+
if sent_to.nil?
|
|
109
|
+
fail ArgumentError, 'sent_to cannot be nil'
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
@sent_to = sent_to
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def ==(o)
|
|
118
|
+
return true if self.equal?(o)
|
|
119
|
+
self.class == o.class &&
|
|
120
|
+
sent_to == o.sent_to
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
def hash
|
|
132
|
+
[sent_to].hash
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Builds the object from hash
|
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
+
# @return [Object] Returns the model itself
|
|
138
|
+
def self.build_from_hash(attributes)
|
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
|
140
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
141
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
142
|
+
map = acceptable_attribute_map
|
|
143
|
+
transformed_hash = {}
|
|
144
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
145
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
146
|
+
transformed_hash["#{key}"] = nil
|
|
147
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
148
|
+
# check to ensure the input is an array given that the attribute
|
|
149
|
+
# is documented as an array but the input is not
|
|
150
|
+
if attributes[map[key]].is_a?(Array)
|
|
151
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
152
|
+
end
|
|
153
|
+
elsif !attributes[map[key]].nil?
|
|
154
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
158
|
+
# accept any value while the model is built from a response
|
|
159
|
+
allocate.tap do |model|
|
|
160
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
161
|
+
model.send(:initialize, transformed_hash)
|
|
162
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Returns the object in the form of hash
|
|
167
|
+
# @return [Hash] Returns the object in the form of hash
|
|
168
|
+
def to_hash
|
|
169
|
+
hash = {}
|
|
170
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
171
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
172
|
+
value = self.send(attr)
|
|
173
|
+
if value.nil?
|
|
174
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
175
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
hash[param] = _to_hash(value)
|
|
179
|
+
end
|
|
180
|
+
hash
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
end
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#DocSpring API
|
|
3
|
+
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0-DOCSPRING
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DocSpring
|
|
17
|
+
# A domain your email actions can send from once it's verified. Add its DNS records where you manage the domain's DNS: DocSpring checks for them every few minutes, and the domain is verified once its DKIM and DMARC records are found.
|
|
18
|
+
class EmailDomain < ApiModelBase
|
|
19
|
+
# The email domain's ID.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# The domain name, such as `example.com` or `mail.example.com`. Email actions can send from any address at it.
|
|
23
|
+
attr_accessor :domain
|
|
24
|
+
|
|
25
|
+
# `pending` until its DNS records are found, then `verified`. `failed`: its records weren't found within 3 days, or were removed. Verify it again after fixing them.
|
|
26
|
+
attr_accessor :state
|
|
27
|
+
|
|
28
|
+
# Whether the DKIM records were found.
|
|
29
|
+
attr_accessor :dkim_state
|
|
30
|
+
|
|
31
|
+
# Whether the MAIL FROM records were found. They're optional: they let SPF pass for your domain too.
|
|
32
|
+
attr_accessor :mail_from_state
|
|
33
|
+
|
|
34
|
+
# The DNS records to add to the domain. Empty while DocSpring is still setting the domain up: verify it again in a few minutes to get them.
|
|
35
|
+
attr_accessor :dns_records
|
|
36
|
+
|
|
37
|
+
# The policy (`p=`) of the domain's DMARC record, once it has been found.
|
|
38
|
+
attr_accessor :dmarc_policy
|
|
39
|
+
|
|
40
|
+
# Why the domain isn't verified yet, or what to fix.
|
|
41
|
+
attr_accessor :last_error
|
|
42
|
+
|
|
43
|
+
# When the domain was verified.
|
|
44
|
+
attr_accessor :verified_at
|
|
45
|
+
|
|
46
|
+
# When DocSpring last checked the domain's DNS records.
|
|
47
|
+
attr_accessor :checked_at
|
|
48
|
+
|
|
49
|
+
# When the domain was added.
|
|
50
|
+
attr_accessor :created_at
|
|
51
|
+
|
|
52
|
+
class EnumAttributeValidator
|
|
53
|
+
attr_reader :datatype
|
|
54
|
+
attr_reader :allowable_values
|
|
55
|
+
|
|
56
|
+
def initialize(datatype, allowable_values)
|
|
57
|
+
@allowable_values = allowable_values.map do |value|
|
|
58
|
+
case datatype.to_s
|
|
59
|
+
when /Integer/i
|
|
60
|
+
value.to_i
|
|
61
|
+
when /Float/i
|
|
62
|
+
value.to_f
|
|
63
|
+
else
|
|
64
|
+
value
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def valid?(value)
|
|
70
|
+
!value || allowable_values.include?(value)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
75
|
+
def self.attribute_map
|
|
76
|
+
{
|
|
77
|
+
:'id' => :'id',
|
|
78
|
+
:'domain' => :'domain',
|
|
79
|
+
:'state' => :'state',
|
|
80
|
+
:'dkim_state' => :'dkim_state',
|
|
81
|
+
:'mail_from_state' => :'mail_from_state',
|
|
82
|
+
:'dns_records' => :'dns_records',
|
|
83
|
+
:'dmarc_policy' => :'dmarc_policy',
|
|
84
|
+
:'last_error' => :'last_error',
|
|
85
|
+
:'verified_at' => :'verified_at',
|
|
86
|
+
:'checked_at' => :'checked_at',
|
|
87
|
+
:'created_at' => :'created_at'
|
|
88
|
+
}
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Returns attribute mapping this model knows about
|
|
92
|
+
def self.acceptable_attribute_map
|
|
93
|
+
attribute_map
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Returns all the JSON keys this model knows about
|
|
97
|
+
def self.acceptable_attributes
|
|
98
|
+
acceptable_attribute_map.values
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Attribute type mapping.
|
|
102
|
+
def self.openapi_types
|
|
103
|
+
{
|
|
104
|
+
:'id' => :'String',
|
|
105
|
+
:'domain' => :'String',
|
|
106
|
+
:'state' => :'EmailDomainState',
|
|
107
|
+
:'dkim_state' => :'EmailDomainRecordState',
|
|
108
|
+
:'mail_from_state' => :'EmailDomainRecordState',
|
|
109
|
+
:'dns_records' => :'Array<EmailDomainDnsRecord>',
|
|
110
|
+
:'dmarc_policy' => :'String',
|
|
111
|
+
:'last_error' => :'String',
|
|
112
|
+
:'verified_at' => :'Time',
|
|
113
|
+
:'checked_at' => :'Time',
|
|
114
|
+
:'created_at' => :'Time'
|
|
115
|
+
}
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# List of attributes with nullable: true
|
|
119
|
+
def self.openapi_nullable
|
|
120
|
+
Set.new([
|
|
121
|
+
:'dmarc_policy',
|
|
122
|
+
:'last_error',
|
|
123
|
+
:'verified_at',
|
|
124
|
+
:'checked_at',
|
|
125
|
+
])
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Returns attribute type mapping
|
|
129
|
+
def self.acceptable_openapi_types
|
|
130
|
+
openapi_types
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Returns the nullable attributes
|
|
134
|
+
def self.acceptable_openapi_nullable
|
|
135
|
+
openapi_nullable
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Initializes the object
|
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
140
|
+
def initialize(attributes = {})
|
|
141
|
+
if (!attributes.is_a?(Hash))
|
|
142
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::EmailDomain` initialize method"
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
146
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
147
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
148
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
149
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::EmailDomain`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
150
|
+
end
|
|
151
|
+
h[k.to_sym] = v
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'id')
|
|
155
|
+
self.id = attributes[:'id']
|
|
156
|
+
else
|
|
157
|
+
self.id = nil
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'domain')
|
|
161
|
+
self.domain = attributes[:'domain']
|
|
162
|
+
else
|
|
163
|
+
self.domain = nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'state')
|
|
167
|
+
self.state = attributes[:'state']
|
|
168
|
+
else
|
|
169
|
+
self.state = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'dkim_state')
|
|
173
|
+
self.dkim_state = attributes[:'dkim_state']
|
|
174
|
+
else
|
|
175
|
+
self.dkim_state = nil
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'mail_from_state')
|
|
179
|
+
self.mail_from_state = attributes[:'mail_from_state']
|
|
180
|
+
else
|
|
181
|
+
self.mail_from_state = nil
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'dns_records')
|
|
185
|
+
if (value = attributes[:'dns_records']).is_a?(Array)
|
|
186
|
+
self.dns_records = value
|
|
187
|
+
end
|
|
188
|
+
else
|
|
189
|
+
self.dns_records = nil
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'dmarc_policy')
|
|
193
|
+
self.dmarc_policy = attributes[:'dmarc_policy']
|
|
194
|
+
else
|
|
195
|
+
self.dmarc_policy = nil
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'last_error')
|
|
199
|
+
self.last_error = attributes[:'last_error']
|
|
200
|
+
else
|
|
201
|
+
self.last_error = nil
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if attributes.key?(:'verified_at')
|
|
205
|
+
self.verified_at = attributes[:'verified_at']
|
|
206
|
+
else
|
|
207
|
+
self.verified_at = nil
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'checked_at')
|
|
211
|
+
self.checked_at = attributes[:'checked_at']
|
|
212
|
+
else
|
|
213
|
+
self.checked_at = nil
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'created_at')
|
|
217
|
+
self.created_at = attributes[:'created_at']
|
|
218
|
+
else
|
|
219
|
+
self.created_at = nil
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
224
|
+
# @return Array for valid properties with the reasons
|
|
225
|
+
def list_invalid_properties
|
|
226
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
227
|
+
invalid_properties = Array.new
|
|
228
|
+
if @id.nil?
|
|
229
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
if @domain.nil?
|
|
233
|
+
invalid_properties.push('invalid value for "domain", domain cannot be nil.')
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if @state.nil?
|
|
237
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
if @dkim_state.nil?
|
|
241
|
+
invalid_properties.push('invalid value for "dkim_state", dkim_state cannot be nil.')
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if @mail_from_state.nil?
|
|
245
|
+
invalid_properties.push('invalid value for "mail_from_state", mail_from_state cannot be nil.')
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if @dns_records.nil?
|
|
249
|
+
invalid_properties.push('invalid value for "dns_records", dns_records cannot be nil.')
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if @created_at.nil?
|
|
253
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
invalid_properties
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Check to see if the all the properties in the model are valid
|
|
260
|
+
# @return true if the model is valid
|
|
261
|
+
def valid?
|
|
262
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
263
|
+
return false if @id.nil?
|
|
264
|
+
return false if @domain.nil?
|
|
265
|
+
return false if @state.nil?
|
|
266
|
+
return false if @dkim_state.nil?
|
|
267
|
+
return false if @mail_from_state.nil?
|
|
268
|
+
return false if @dns_records.nil?
|
|
269
|
+
return false if @created_at.nil?
|
|
270
|
+
true
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Custom attribute writer method with validation
|
|
274
|
+
# @param [Object] id Value to be assigned
|
|
275
|
+
def id=(id)
|
|
276
|
+
if id.nil?
|
|
277
|
+
fail ArgumentError, 'id cannot be nil'
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
@id = id
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Custom attribute writer method with validation
|
|
284
|
+
# @param [Object] domain Value to be assigned
|
|
285
|
+
def domain=(domain)
|
|
286
|
+
if domain.nil?
|
|
287
|
+
fail ArgumentError, 'domain cannot be nil'
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
@domain = domain
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Custom attribute writer method with validation
|
|
294
|
+
# @param [Object] state Value to be assigned
|
|
295
|
+
def state=(state)
|
|
296
|
+
if state.nil?
|
|
297
|
+
fail ArgumentError, 'state cannot be nil'
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
@state = state
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Custom attribute writer method with validation
|
|
304
|
+
# @param [Object] dkim_state Value to be assigned
|
|
305
|
+
def dkim_state=(dkim_state)
|
|
306
|
+
if dkim_state.nil?
|
|
307
|
+
fail ArgumentError, 'dkim_state cannot be nil'
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
@dkim_state = dkim_state
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Custom attribute writer method with validation
|
|
314
|
+
# @param [Object] mail_from_state Value to be assigned
|
|
315
|
+
def mail_from_state=(mail_from_state)
|
|
316
|
+
if mail_from_state.nil?
|
|
317
|
+
fail ArgumentError, 'mail_from_state cannot be nil'
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
@mail_from_state = mail_from_state
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Custom attribute writer method with validation
|
|
324
|
+
# @param [Object] dns_records Value to be assigned
|
|
325
|
+
def dns_records=(dns_records)
|
|
326
|
+
if dns_records.nil?
|
|
327
|
+
fail ArgumentError, 'dns_records cannot be nil'
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
@dns_records = dns_records
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Custom attribute writer method with validation
|
|
334
|
+
# @param [Object] created_at Value to be assigned
|
|
335
|
+
def created_at=(created_at)
|
|
336
|
+
if created_at.nil?
|
|
337
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
@created_at = created_at
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Checks equality by comparing each attribute.
|
|
344
|
+
# @param [Object] Object to be compared
|
|
345
|
+
def ==(o)
|
|
346
|
+
return true if self.equal?(o)
|
|
347
|
+
self.class == o.class &&
|
|
348
|
+
id == o.id &&
|
|
349
|
+
domain == o.domain &&
|
|
350
|
+
state == o.state &&
|
|
351
|
+
dkim_state == o.dkim_state &&
|
|
352
|
+
mail_from_state == o.mail_from_state &&
|
|
353
|
+
dns_records == o.dns_records &&
|
|
354
|
+
dmarc_policy == o.dmarc_policy &&
|
|
355
|
+
last_error == o.last_error &&
|
|
356
|
+
verified_at == o.verified_at &&
|
|
357
|
+
checked_at == o.checked_at &&
|
|
358
|
+
created_at == o.created_at
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# @see the `==` method
|
|
362
|
+
# @param [Object] Object to be compared
|
|
363
|
+
def eql?(o)
|
|
364
|
+
self == o
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# Calculates hash code according to all attributes.
|
|
368
|
+
# @return [Integer] Hash code
|
|
369
|
+
def hash
|
|
370
|
+
[id, domain, state, dkim_state, mail_from_state, dns_records, dmarc_policy, last_error, verified_at, checked_at, created_at].hash
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Builds the object from hash
|
|
374
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
375
|
+
# @return [Object] Returns the model itself
|
|
376
|
+
def self.build_from_hash(attributes)
|
|
377
|
+
return nil unless attributes.is_a?(Hash)
|
|
378
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
379
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
380
|
+
map = acceptable_attribute_map
|
|
381
|
+
transformed_hash = {}
|
|
382
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
383
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
384
|
+
transformed_hash["#{key}"] = nil
|
|
385
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
386
|
+
# check to ensure the input is an array given that the attribute
|
|
387
|
+
# is documented as an array but the input is not
|
|
388
|
+
if attributes[map[key]].is_a?(Array)
|
|
389
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
390
|
+
end
|
|
391
|
+
elsif !attributes[map[key]].nil?
|
|
392
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
393
|
+
end
|
|
394
|
+
end
|
|
395
|
+
# Responses can include enum values added after this client was released, so the enum setters
|
|
396
|
+
# accept any value while the model is built from a response
|
|
397
|
+
allocate.tap do |model|
|
|
398
|
+
model.instance_variable_set(:@_skip_enum_validation, true)
|
|
399
|
+
model.send(:initialize, transformed_hash)
|
|
400
|
+
model.remove_instance_variable(:@_skip_enum_validation)
|
|
401
|
+
end
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
# Returns the object in the form of hash
|
|
405
|
+
# @return [Hash] Returns the object in the form of hash
|
|
406
|
+
def to_hash
|
|
407
|
+
hash = {}
|
|
408
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
409
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
410
|
+
value = self.send(attr)
|
|
411
|
+
if value.nil?
|
|
412
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
413
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
hash[param] = _to_hash(value)
|
|
417
|
+
end
|
|
418
|
+
hash
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
end
|