pingram 1.0.20 → 1.0.23
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/accounts_api.rb +143 -0
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +10 -0
- data/lib/pingram/models/account_get_response.rb +25 -4
- data/lib/pingram/models/billing_post_response_body.rb +22 -1
- data/lib/pingram/models/create_account_request.rb +45 -9
- data/lib/pingram/models/create_account_request_plan.rb +216 -0
- data/lib/pingram/models/create_account_response.rb +103 -30
- data/lib/pingram/models/first_account_request.rb +150 -0
- data/lib/pingram/models/first_account_response.rb +190 -0
- data/lib/pingram/models/list_accounts_response.rb +167 -0
- data/lib/pingram/models/list_accounts_response_accounts_inner.rb +304 -0
- data/lib/pingram/models/phone_verify_confirm_response.rb +13 -4
- data/lib/pingram/models/sender_post_body.rb +1 -11
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +6 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- metadata +8 -2
|
@@ -14,16 +14,45 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
|
+
# Response for POST /accounts
|
|
17
18
|
class CreateAccountResponse < ApiModelBase
|
|
18
|
-
attr_accessor :success
|
|
19
|
-
|
|
20
19
|
attr_accessor :account_id
|
|
21
20
|
|
|
21
|
+
attr_accessor :name
|
|
22
|
+
|
|
23
|
+
attr_accessor :status
|
|
24
|
+
|
|
25
|
+
attr_accessor :subscription_status
|
|
26
|
+
|
|
27
|
+
class EnumAttributeValidator
|
|
28
|
+
attr_reader :datatype
|
|
29
|
+
attr_reader :allowable_values
|
|
30
|
+
|
|
31
|
+
def initialize(datatype, allowable_values)
|
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
|
33
|
+
case datatype.to_s
|
|
34
|
+
when /Integer/i
|
|
35
|
+
value.to_i
|
|
36
|
+
when /Float/i
|
|
37
|
+
value.to_f
|
|
38
|
+
else
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def valid?(value)
|
|
45
|
+
!value || allowable_values.include?(value)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
22
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
50
|
def self.attribute_map
|
|
24
51
|
{
|
|
25
|
-
:'
|
|
26
|
-
:'
|
|
52
|
+
:'account_id' => :'accountId',
|
|
53
|
+
:'name' => :'name',
|
|
54
|
+
:'status' => :'status',
|
|
55
|
+
:'subscription_status' => :'subscriptionStatus'
|
|
27
56
|
}
|
|
28
57
|
end
|
|
29
58
|
|
|
@@ -40,14 +69,17 @@ module Pingram
|
|
|
40
69
|
# Attribute type mapping.
|
|
41
70
|
def self.openapi_types
|
|
42
71
|
{
|
|
43
|
-
:'
|
|
44
|
-
:'
|
|
72
|
+
:'account_id' => :'String',
|
|
73
|
+
:'name' => :'String',
|
|
74
|
+
:'status' => :'String',
|
|
75
|
+
:'subscription_status' => :'String'
|
|
45
76
|
}
|
|
46
77
|
end
|
|
47
78
|
|
|
48
79
|
# List of attributes with nullable: true
|
|
49
80
|
def self.openapi_nullable
|
|
50
81
|
Set.new([
|
|
82
|
+
:'subscription_status'
|
|
51
83
|
])
|
|
52
84
|
end
|
|
53
85
|
|
|
@@ -67,17 +99,27 @@ module Pingram
|
|
|
67
99
|
h[k.to_sym] = v
|
|
68
100
|
}
|
|
69
101
|
|
|
70
|
-
if attributes.key?(:'success')
|
|
71
|
-
self.success = attributes[:'success']
|
|
72
|
-
else
|
|
73
|
-
self.success = nil
|
|
74
|
-
end
|
|
75
|
-
|
|
76
102
|
if attributes.key?(:'account_id')
|
|
77
103
|
self.account_id = attributes[:'account_id']
|
|
78
104
|
else
|
|
79
105
|
self.account_id = nil
|
|
80
106
|
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'name')
|
|
109
|
+
self.name = attributes[:'name']
|
|
110
|
+
else
|
|
111
|
+
self.name = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'status')
|
|
115
|
+
self.status = attributes[:'status']
|
|
116
|
+
else
|
|
117
|
+
self.status = nil
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'subscription_status')
|
|
121
|
+
self.subscription_status = attributes[:'subscription_status']
|
|
122
|
+
end
|
|
81
123
|
end
|
|
82
124
|
|
|
83
125
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -85,14 +127,18 @@ module Pingram
|
|
|
85
127
|
def list_invalid_properties
|
|
86
128
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
129
|
invalid_properties = Array.new
|
|
88
|
-
if @success.nil?
|
|
89
|
-
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
|
90
|
-
end
|
|
91
|
-
|
|
92
130
|
if @account_id.nil?
|
|
93
131
|
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
94
132
|
end
|
|
95
133
|
|
|
134
|
+
if @name.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @status.nil?
|
|
139
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
140
|
+
end
|
|
141
|
+
|
|
96
142
|
invalid_properties
|
|
97
143
|
end
|
|
98
144
|
|
|
@@ -100,21 +146,16 @@ module Pingram
|
|
|
100
146
|
# @return true if the model is valid
|
|
101
147
|
def valid?
|
|
102
148
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
-
return false if @success.nil?
|
|
104
149
|
return false if @account_id.nil?
|
|
150
|
+
return false if @name.nil?
|
|
151
|
+
return false if @status.nil?
|
|
152
|
+
status_validator = EnumAttributeValidator.new('String', ["verified", "unverified", "blocked"])
|
|
153
|
+
return false unless status_validator.valid?(@status)
|
|
154
|
+
subscription_status_validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
|
|
155
|
+
return false unless subscription_status_validator.valid?(@subscription_status)
|
|
105
156
|
true
|
|
106
157
|
end
|
|
107
158
|
|
|
108
|
-
# Custom attribute writer method with validation
|
|
109
|
-
# @param [Object] success Value to be assigned
|
|
110
|
-
def success=(success)
|
|
111
|
-
if success.nil?
|
|
112
|
-
fail ArgumentError, 'success cannot be nil'
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
@success = success
|
|
116
|
-
end
|
|
117
|
-
|
|
118
159
|
# Custom attribute writer method with validation
|
|
119
160
|
# @param [Object] account_id Value to be assigned
|
|
120
161
|
def account_id=(account_id)
|
|
@@ -125,13 +166,45 @@ module Pingram
|
|
|
125
166
|
@account_id = account_id
|
|
126
167
|
end
|
|
127
168
|
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] name Value to be assigned
|
|
171
|
+
def name=(name)
|
|
172
|
+
if name.nil?
|
|
173
|
+
fail ArgumentError, 'name cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@name = name
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
180
|
+
# @param [Object] status Object to be assigned
|
|
181
|
+
def status=(status)
|
|
182
|
+
validator = EnumAttributeValidator.new('String', ["verified", "unverified", "blocked"])
|
|
183
|
+
unless validator.valid?(status)
|
|
184
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
185
|
+
end
|
|
186
|
+
@status = status
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
190
|
+
# @param [Object] subscription_status Object to be assigned
|
|
191
|
+
def subscription_status=(subscription_status)
|
|
192
|
+
validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
|
|
193
|
+
unless validator.valid?(subscription_status)
|
|
194
|
+
fail ArgumentError, "invalid value for \"subscription_status\", must be one of #{validator.allowable_values}."
|
|
195
|
+
end
|
|
196
|
+
@subscription_status = subscription_status
|
|
197
|
+
end
|
|
198
|
+
|
|
128
199
|
# Checks equality by comparing each attribute.
|
|
129
200
|
# @param [Object] Object to be compared
|
|
130
201
|
def ==(o)
|
|
131
202
|
return true if self.equal?(o)
|
|
132
203
|
self.class == o.class &&
|
|
133
|
-
|
|
134
|
-
|
|
204
|
+
account_id == o.account_id &&
|
|
205
|
+
name == o.name &&
|
|
206
|
+
status == o.status &&
|
|
207
|
+
subscription_status == o.subscription_status
|
|
135
208
|
end
|
|
136
209
|
|
|
137
210
|
# @see the `==` method
|
|
@@ -143,7 +216,7 @@ module Pingram
|
|
|
143
216
|
# Calculates hash code according to all attributes.
|
|
144
217
|
# @return [Integer] Hash code
|
|
145
218
|
def hash
|
|
146
|
-
[
|
|
219
|
+
[account_id, name, status, subscription_status].hash
|
|
147
220
|
end
|
|
148
221
|
|
|
149
222
|
# Builds the object from hash
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pingram
|
|
17
|
+
class FirstAccountRequest < ApiModelBase
|
|
18
|
+
# First-touch PostHog props from the client; attached to signup events.
|
|
19
|
+
attr_accessor :attribution
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'attribution' => :'attribution'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'attribution' => :'Hash<String, String>'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::FirstAccountRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::FirstAccountRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'attribution')
|
|
68
|
+
if (value = attributes[:'attribution']).is_a?(Hash)
|
|
69
|
+
self.attribution = value
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
86
|
+
true
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Checks equality by comparing each attribute.
|
|
90
|
+
# @param [Object] Object to be compared
|
|
91
|
+
def ==(o)
|
|
92
|
+
return true if self.equal?(o)
|
|
93
|
+
self.class == o.class &&
|
|
94
|
+
attribution == o.attribution
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[attribution].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
return nil unless attributes.is_a?(Hash)
|
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
115
|
+
transformed_hash = {}
|
|
116
|
+
openapi_types.each_pair do |key, type|
|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
118
|
+
transformed_hash["#{key}"] = nil
|
|
119
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
120
|
+
# check to ensure the input is an array given that the attribute
|
|
121
|
+
# is documented as an array but the input is not
|
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
124
|
+
end
|
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
new(transformed_hash)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Returns the object in the form of hash
|
|
133
|
+
# @return [Hash] Returns the object in the form of hash
|
|
134
|
+
def to_hash
|
|
135
|
+
hash = {}
|
|
136
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
137
|
+
value = self.send(attr)
|
|
138
|
+
if value.nil?
|
|
139
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
140
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
hash[param] = _to_hash(value)
|
|
144
|
+
end
|
|
145
|
+
hash
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
end
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pingram
|
|
17
|
+
class FirstAccountResponse < ApiModelBase
|
|
18
|
+
attr_accessor :success
|
|
19
|
+
|
|
20
|
+
attr_accessor :account_id
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'success' => :'success',
|
|
26
|
+
:'account_id' => :'accountId'
|
|
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
|
+
:'success' => :'Boolean',
|
|
44
|
+
:'account_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 `Pingram::FirstAccountResponse` 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 `Pingram::FirstAccountResponse`. 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?(:'success')
|
|
71
|
+
self.success = attributes[:'success']
|
|
72
|
+
else
|
|
73
|
+
self.success = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'account_id')
|
|
77
|
+
self.account_id = attributes[:'account_id']
|
|
78
|
+
else
|
|
79
|
+
self.account_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 @success.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @account_id.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "account_id", account_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 @success.nil?
|
|
104
|
+
return false if @account_id.nil?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param [Object] success Value to be assigned
|
|
110
|
+
def success=(success)
|
|
111
|
+
if success.nil?
|
|
112
|
+
fail ArgumentError, 'success cannot be nil'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
@success = success
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] account_id Value to be assigned
|
|
120
|
+
def account_id=(account_id)
|
|
121
|
+
if account_id.nil?
|
|
122
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@account_id = account_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
|
+
success == o.success &&
|
|
134
|
+
account_id == o.account_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
|
+
[success, account_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
|