pingram 1.0.19 → 1.0.22
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 +3 -3
- data/lib/pingram/api/account_api.rb +70 -66
- data/lib/pingram/api/email_api.rb +61 -0
- data/lib/pingram/api/members_api.rb +2 -2
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +0 -10
- data/lib/pingram/models/{push_settings_fcm_response.rb → campaign_webhook_response.rb} +20 -19
- data/lib/pingram/models/create_account_request.rb +150 -0
- data/lib/pingram/models/create_account_response.rb +30 -30
- data/lib/pingram/models/{create_account_request_body.rb → create_personal_access_token_request.rb} +18 -7
- data/lib/pingram/models/create_personal_access_token_response.rb +313 -0
- data/lib/pingram/models/{apn_config.rb → delete_email_suppressions_response.rb} +36 -86
- data/lib/pingram/models/get_members_response_inner.rb +29 -1
- data/lib/pingram/models/intercom_webhook_data_item_any_of.rb +1 -0
- data/lib/pingram/models/list_invoices_response.rb +194 -0
- data/lib/pingram/models/list_invoices_response_invoices_inner.rb +389 -0
- data/lib/pingram/models/{push_settings_fcm_put_request.rb → list_personal_access_tokens_response.rb} +21 -19
- data/lib/pingram/models/list_personal_access_tokens_response_tokens_inner.rb +287 -0
- data/lib/pingram/models/member_update_request.rb +1 -0
- data/lib/pingram/models/sender_post_body.rb +1 -11
- data/lib/pingram/models/ten_dlc_brand_registration_details.rb +14 -14
- data/lib/pingram/models/ten_dlc_campaign_registration_details.rb +457 -0
- data/lib/pingram/models/ten_dlc_campaign_update_request.rb +363 -0
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +11 -5
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/reline-0.7.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.8.2 → io-console-0.9.2}/gem_make.out +15 -14
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.8.2 → io-console-0.9.2}/mkmf.log +112 -109
- 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
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/ext/io/console/Makefile +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/ext/io/console/console.c +521 -28
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/ext/io/console/extconf.rb +13 -14
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/ext/io/console/win32_vk.inc +313 -165
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/ansi.rb +6 -4
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/windows.rb +49 -23
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io.rb +8 -2
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/line_editor.rb +49 -21
- data/vendor/bundle/ruby/3.2.0/gems/reline-0.7.0/lib/reline/version.rb +3 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline.rb +10 -9
- data/vendor/bundle/ruby/3.2.0/specifications/{io-console-0.8.2.gemspec → io-console-0.9.2.gemspec} +3 -3
- data/vendor/bundle/ruby/3.2.0/specifications/{reline-0.6.3.gemspec → reline-0.7.0.gemspec} +2 -2
- metadata +55 -49
- data/lib/pingram/api/push_settings_api.rb +0 -374
- data/vendor/bundle/ruby/3.2.0/cache/io-console-0.8.2.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/cache/reline-0.6.3.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/io-console-0.8.2/lib/io/console.so +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/reline-0.6.3/lib/reline/version.rb +0 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.8.2 → io-console-0.9.2}/gem.build_complete +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/.document +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/BSDL +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/COPYING +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/README.md +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.8.2 → io-console-0.9.2}/lib/io/console/size.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/BSDL +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/COPYING +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/README.md +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/config.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/face.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/history.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/dumb.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/base.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/composite.rb +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/emacs.rb +2 -2
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_command.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_insert.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_stroke.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/kill_ring.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode/east_asian_width.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/license_of_rb-readline +0 -0
|
@@ -14,22 +14,18 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
|
-
class
|
|
18
|
-
|
|
17
|
+
class DeleteEmailSuppressionsResponse < ApiModelBase
|
|
18
|
+
# Number of users whose email suppression was removed.
|
|
19
|
+
attr_accessor :removed
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
attr_accessor :team_id
|
|
23
|
-
|
|
24
|
-
attr_accessor :topic
|
|
21
|
+
# Number of suppressed users that did not match the requested reason.
|
|
22
|
+
attr_accessor :skipped
|
|
25
23
|
|
|
26
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
25
|
def self.attribute_map
|
|
28
26
|
{
|
|
29
|
-
:'
|
|
30
|
-
:'
|
|
31
|
-
:'team_id' => :'TeamId',
|
|
32
|
-
:'topic' => :'Topic'
|
|
27
|
+
:'removed' => :'removed',
|
|
28
|
+
:'skipped' => :'skipped'
|
|
33
29
|
}
|
|
34
30
|
end
|
|
35
31
|
|
|
@@ -46,10 +42,8 @@ module Pingram
|
|
|
46
42
|
# Attribute type mapping.
|
|
47
43
|
def self.openapi_types
|
|
48
44
|
{
|
|
49
|
-
:'
|
|
50
|
-
:'
|
|
51
|
-
:'team_id' => :'String',
|
|
52
|
-
:'topic' => :'String'
|
|
45
|
+
:'removed' => :'Float',
|
|
46
|
+
:'skipped' => :'Float'
|
|
53
47
|
}
|
|
54
48
|
end
|
|
55
49
|
|
|
@@ -63,40 +57,28 @@ module Pingram
|
|
|
63
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
58
|
def initialize(attributes = {})
|
|
65
59
|
if (!attributes.is_a?(Hash))
|
|
66
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::DeleteEmailSuppressionsResponse` initialize method"
|
|
67
61
|
end
|
|
68
62
|
|
|
69
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
64
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
66
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::DeleteEmailSuppressionsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
68
|
end
|
|
75
69
|
h[k.to_sym] = v
|
|
76
70
|
}
|
|
77
71
|
|
|
78
|
-
if attributes.key?(:'
|
|
79
|
-
self.
|
|
80
|
-
else
|
|
81
|
-
self.key_id = nil
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
if attributes.key?(:'key')
|
|
85
|
-
self.key = attributes[:'key']
|
|
72
|
+
if attributes.key?(:'removed')
|
|
73
|
+
self.removed = attributes[:'removed']
|
|
86
74
|
else
|
|
87
|
-
self.
|
|
75
|
+
self.removed = nil
|
|
88
76
|
end
|
|
89
77
|
|
|
90
|
-
if attributes.key?(:'
|
|
91
|
-
self.
|
|
78
|
+
if attributes.key?(:'skipped')
|
|
79
|
+
self.skipped = attributes[:'skipped']
|
|
92
80
|
else
|
|
93
|
-
self.
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
if attributes.key?(:'topic')
|
|
97
|
-
self.topic = attributes[:'topic']
|
|
98
|
-
else
|
|
99
|
-
self.topic = nil
|
|
81
|
+
self.skipped = nil
|
|
100
82
|
end
|
|
101
83
|
end
|
|
102
84
|
|
|
@@ -105,20 +87,12 @@ module Pingram
|
|
|
105
87
|
def list_invalid_properties
|
|
106
88
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
107
89
|
invalid_properties = Array.new
|
|
108
|
-
if @
|
|
109
|
-
invalid_properties.push('invalid value for "
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
if @key.nil?
|
|
113
|
-
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
if @team_id.nil?
|
|
117
|
-
invalid_properties.push('invalid value for "team_id", team_id cannot be nil.')
|
|
90
|
+
if @removed.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "removed", removed cannot be nil.')
|
|
118
92
|
end
|
|
119
93
|
|
|
120
|
-
if @
|
|
121
|
-
invalid_properties.push('invalid value for "
|
|
94
|
+
if @skipped.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "skipped", skipped cannot be nil.')
|
|
122
96
|
end
|
|
123
97
|
|
|
124
98
|
invalid_properties
|
|
@@ -128,51 +102,29 @@ module Pingram
|
|
|
128
102
|
# @return true if the model is valid
|
|
129
103
|
def valid?
|
|
130
104
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
|
-
return false if @
|
|
132
|
-
return false if @
|
|
133
|
-
return false if @team_id.nil?
|
|
134
|
-
return false if @topic.nil?
|
|
105
|
+
return false if @removed.nil?
|
|
106
|
+
return false if @skipped.nil?
|
|
135
107
|
true
|
|
136
108
|
end
|
|
137
109
|
|
|
138
110
|
# Custom attribute writer method with validation
|
|
139
|
-
# @param [Object]
|
|
140
|
-
def
|
|
141
|
-
if
|
|
142
|
-
fail ArgumentError, '
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
@key_id = key_id
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
# Custom attribute writer method with validation
|
|
149
|
-
# @param [Object] key Value to be assigned
|
|
150
|
-
def key=(key)
|
|
151
|
-
if key.nil?
|
|
152
|
-
fail ArgumentError, 'key cannot be nil'
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
@key = key
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
# Custom attribute writer method with validation
|
|
159
|
-
# @param [Object] team_id Value to be assigned
|
|
160
|
-
def team_id=(team_id)
|
|
161
|
-
if team_id.nil?
|
|
162
|
-
fail ArgumentError, 'team_id cannot be nil'
|
|
111
|
+
# @param [Object] removed Value to be assigned
|
|
112
|
+
def removed=(removed)
|
|
113
|
+
if removed.nil?
|
|
114
|
+
fail ArgumentError, 'removed cannot be nil'
|
|
163
115
|
end
|
|
164
116
|
|
|
165
|
-
@
|
|
117
|
+
@removed = removed
|
|
166
118
|
end
|
|
167
119
|
|
|
168
120
|
# Custom attribute writer method with validation
|
|
169
|
-
# @param [Object]
|
|
170
|
-
def
|
|
171
|
-
if
|
|
172
|
-
fail ArgumentError, '
|
|
121
|
+
# @param [Object] skipped Value to be assigned
|
|
122
|
+
def skipped=(skipped)
|
|
123
|
+
if skipped.nil?
|
|
124
|
+
fail ArgumentError, 'skipped cannot be nil'
|
|
173
125
|
end
|
|
174
126
|
|
|
175
|
-
@
|
|
127
|
+
@skipped = skipped
|
|
176
128
|
end
|
|
177
129
|
|
|
178
130
|
# Checks equality by comparing each attribute.
|
|
@@ -180,10 +132,8 @@ module Pingram
|
|
|
180
132
|
def ==(o)
|
|
181
133
|
return true if self.equal?(o)
|
|
182
134
|
self.class == o.class &&
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
team_id == o.team_id &&
|
|
186
|
-
topic == o.topic
|
|
135
|
+
removed == o.removed &&
|
|
136
|
+
skipped == o.skipped
|
|
187
137
|
end
|
|
188
138
|
|
|
189
139
|
# @see the `==` method
|
|
@@ -195,7 +145,7 @@ module Pingram
|
|
|
195
145
|
# Calculates hash code according to all attributes.
|
|
196
146
|
# @return [Integer] Hash code
|
|
197
147
|
def hash
|
|
198
|
-
[
|
|
148
|
+
[removed, skipped].hash
|
|
199
149
|
end
|
|
200
150
|
|
|
201
151
|
# Builds the object from hash
|
|
@@ -21,6 +21,8 @@ module Pingram
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :created_at
|
|
23
23
|
|
|
24
|
+
attr_accessor :role
|
|
25
|
+
|
|
24
26
|
attr_accessor :email
|
|
25
27
|
|
|
26
28
|
attr_accessor :groups
|
|
@@ -55,6 +57,7 @@ module Pingram
|
|
|
55
57
|
:'account_id' => :'accountId',
|
|
56
58
|
:'user_id' => :'userId',
|
|
57
59
|
:'created_at' => :'createdAt',
|
|
60
|
+
:'role' => :'role',
|
|
58
61
|
:'email' => :'email',
|
|
59
62
|
:'groups' => :'groups',
|
|
60
63
|
:'enabled_mfas' => :'enabledMFAs'
|
|
@@ -77,6 +80,7 @@ module Pingram
|
|
|
77
80
|
:'account_id' => :'String',
|
|
78
81
|
:'user_id' => :'String',
|
|
79
82
|
:'created_at' => :'String',
|
|
83
|
+
:'role' => :'String',
|
|
80
84
|
:'email' => :'String',
|
|
81
85
|
:'groups' => :'Array<String>',
|
|
82
86
|
:'enabled_mfas' => :'Array<String>'
|
|
@@ -123,6 +127,12 @@ module Pingram
|
|
|
123
127
|
self.created_at = nil
|
|
124
128
|
end
|
|
125
129
|
|
|
130
|
+
if attributes.key?(:'role')
|
|
131
|
+
self.role = attributes[:'role']
|
|
132
|
+
else
|
|
133
|
+
self.role = nil
|
|
134
|
+
end
|
|
135
|
+
|
|
126
136
|
if attributes.key?(:'email')
|
|
127
137
|
self.email = attributes[:'email']
|
|
128
138
|
end
|
|
@@ -157,6 +167,10 @@ module Pingram
|
|
|
157
167
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
158
168
|
end
|
|
159
169
|
|
|
170
|
+
if @role.nil?
|
|
171
|
+
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
|
172
|
+
end
|
|
173
|
+
|
|
160
174
|
invalid_properties
|
|
161
175
|
end
|
|
162
176
|
|
|
@@ -167,6 +181,9 @@ module Pingram
|
|
|
167
181
|
return false if @account_id.nil?
|
|
168
182
|
return false if @user_id.nil?
|
|
169
183
|
return false if @created_at.nil?
|
|
184
|
+
return false if @role.nil?
|
|
185
|
+
role_validator = EnumAttributeValidator.new('String', ["owner", "admin"])
|
|
186
|
+
return false unless role_validator.valid?(@role)
|
|
170
187
|
true
|
|
171
188
|
end
|
|
172
189
|
|
|
@@ -200,6 +217,16 @@ module Pingram
|
|
|
200
217
|
@created_at = created_at
|
|
201
218
|
end
|
|
202
219
|
|
|
220
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
221
|
+
# @param [Object] role Object to be assigned
|
|
222
|
+
def role=(role)
|
|
223
|
+
validator = EnumAttributeValidator.new('String', ["owner", "admin"])
|
|
224
|
+
unless validator.valid?(role)
|
|
225
|
+
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
|
226
|
+
end
|
|
227
|
+
@role = role
|
|
228
|
+
end
|
|
229
|
+
|
|
203
230
|
# Checks equality by comparing each attribute.
|
|
204
231
|
# @param [Object] Object to be compared
|
|
205
232
|
def ==(o)
|
|
@@ -208,6 +235,7 @@ module Pingram
|
|
|
208
235
|
account_id == o.account_id &&
|
|
209
236
|
user_id == o.user_id &&
|
|
210
237
|
created_at == o.created_at &&
|
|
238
|
+
role == o.role &&
|
|
211
239
|
email == o.email &&
|
|
212
240
|
groups == o.groups &&
|
|
213
241
|
enabled_mfas == o.enabled_mfas
|
|
@@ -222,7 +250,7 @@ module Pingram
|
|
|
222
250
|
# Calculates hash code according to all attributes.
|
|
223
251
|
# @return [Integer] Hash code
|
|
224
252
|
def hash
|
|
225
|
-
[account_id, user_id, created_at, email, groups, enabled_mfas].hash
|
|
253
|
+
[account_id, user_id, created_at, role, email, groups, enabled_mfas].hash
|
|
226
254
|
end
|
|
227
255
|
|
|
228
256
|
# Builds the object from hash
|
|
@@ -0,0 +1,194 @@
|
|
|
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
|
+
# GET /account/invoices response.
|
|
18
|
+
class ListInvoicesResponse < ApiModelBase
|
|
19
|
+
attr_accessor :invoices
|
|
20
|
+
|
|
21
|
+
# True when more invoices exist; pass the last invoice `id` as `startingAfter`.
|
|
22
|
+
attr_accessor :has_more
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'invoices' => :'invoices',
|
|
28
|
+
:'has_more' => :'hasMore'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'invoices' => :'Array<ListInvoicesResponseInvoicesInner>',
|
|
46
|
+
:'has_more' => :'Boolean'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ListInvoicesResponse` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ListInvoicesResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'invoices')
|
|
73
|
+
if (value = attributes[:'invoices']).is_a?(Array)
|
|
74
|
+
self.invoices = value
|
|
75
|
+
end
|
|
76
|
+
else
|
|
77
|
+
self.invoices = nil
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'has_more')
|
|
81
|
+
self.has_more = attributes[:'has_more']
|
|
82
|
+
else
|
|
83
|
+
self.has_more = nil
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
if @invoices.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "invoices", invoices cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if @has_more.nil?
|
|
97
|
+
invalid_properties.push('invalid value for "has_more", has_more cannot be nil.')
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
invalid_properties
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Check to see if the all the properties in the model are valid
|
|
104
|
+
# @return true if the model is valid
|
|
105
|
+
def valid?
|
|
106
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
107
|
+
return false if @invoices.nil?
|
|
108
|
+
return false if @has_more.nil?
|
|
109
|
+
true
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Custom attribute writer method with validation
|
|
113
|
+
# @param [Object] invoices Value to be assigned
|
|
114
|
+
def invoices=(invoices)
|
|
115
|
+
if invoices.nil?
|
|
116
|
+
fail ArgumentError, 'invoices cannot be nil'
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
@invoices = invoices
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Custom attribute writer method with validation
|
|
123
|
+
# @param [Object] has_more Value to be assigned
|
|
124
|
+
def has_more=(has_more)
|
|
125
|
+
if has_more.nil?
|
|
126
|
+
fail ArgumentError, 'has_more cannot be nil'
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
@has_more = has_more
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Checks equality by comparing each attribute.
|
|
133
|
+
# @param [Object] Object to be compared
|
|
134
|
+
def ==(o)
|
|
135
|
+
return true if self.equal?(o)
|
|
136
|
+
self.class == o.class &&
|
|
137
|
+
invoices == o.invoices &&
|
|
138
|
+
has_more == o.has_more
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# @see the `==` method
|
|
142
|
+
# @param [Object] Object to be compared
|
|
143
|
+
def eql?(o)
|
|
144
|
+
self == o
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Calculates hash code according to all attributes.
|
|
148
|
+
# @return [Integer] Hash code
|
|
149
|
+
def hash
|
|
150
|
+
[invoices, has_more].hash
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Builds the object from hash
|
|
154
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
155
|
+
# @return [Object] Returns the model itself
|
|
156
|
+
def self.build_from_hash(attributes)
|
|
157
|
+
return nil unless attributes.is_a?(Hash)
|
|
158
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
159
|
+
transformed_hash = {}
|
|
160
|
+
openapi_types.each_pair do |key, type|
|
|
161
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
162
|
+
transformed_hash["#{key}"] = nil
|
|
163
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
164
|
+
# check to ensure the input is an array given that the attribute
|
|
165
|
+
# is documented as an array but the input is not
|
|
166
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
167
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
168
|
+
end
|
|
169
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
170
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
new(transformed_hash)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Returns the object in the form of hash
|
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
|
178
|
+
def to_hash
|
|
179
|
+
hash = {}
|
|
180
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
181
|
+
value = self.send(attr)
|
|
182
|
+
if value.nil?
|
|
183
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
184
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
hash[param] = _to_hash(value)
|
|
188
|
+
end
|
|
189
|
+
hash
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
end
|