pingram 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fa3e26c7e5afa45e1ca10b5db3146e17a8762c780b58ddd6faa12f46beff5dd
4
- data.tar.gz: 40dd7c81e987dfd1bc6712e6efdc3966f4a55340a0bf249bc3c1492da6347acd
3
+ metadata.gz: 1068d240160a74f07c492a15382fc450ae928defc754df7ce84e0d532f2b9944
4
+ data.tar.gz: bc727c4b567e5c013a247e22fc13dc99f2be55ceaf39eb46f665f64eb4debfde
5
5
  SHA512:
6
- metadata.gz: fe0a51b6f97655ab7aae2d0ed4d82cea96186b945b1d2cf72dd4ff5df85f5f995c51966819c8d91eab6349b556a3d676545a3c13b7cbdcb24d25e2dde780c400
7
- data.tar.gz: 348a7721e3e4b99dff472630ae6f9ba74ffb782f9ff93cfba62125ea4c747cb580adb6818ae9c08d90f7db01fd78ca463ec3a001eb68648ca8ed0e9f9948828b
6
+ metadata.gz: a31bf5263da40a7e522ad5ebb6f69c70780635df3b71890b9d606772f915e3c8696cecb3c124cfe3ced3990cf01a6e09564c5abb73a4e03424789565c90ace2c
7
+ data.tar.gz: 470b1cf267a4bf4153eebc53485342a88868db905cdaeb0504c69761ebac358749c8324a0792af5e7ca036c61686b4abd414bafdd454ac9c7b1f2f218cfdf87f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pingram (1.0.1)
4
+ pingram (1.0.2)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -140,6 +140,61 @@ module Pingram
140
140
  return data, status_code, headers
141
141
  end
142
142
 
143
+ # Get organization for the authenticated account (new billing model).
144
+ # @param [Hash] opts the optional parameters
145
+ # @return [Organization]
146
+ def account_get_organization(opts = {})
147
+ data, _status_code, _headers = account_get_organization_with_http_info(opts)
148
+ data
149
+ end
150
+
151
+ # Get organization for the authenticated account (new billing model).
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
154
+ def account_get_organization_with_http_info(opts = {})
155
+ if @api_client.config.debugging
156
+ @api_client.config.logger.debug 'Calling API: AccountApi.account_get_organization ...'
157
+ end
158
+ # resource path
159
+ local_var_path = '/account/organization'
160
+
161
+ # query parameters
162
+ query_params = opts[:query_params] || {}
163
+
164
+ # header parameters
165
+ header_params = opts[:header_params] || {}
166
+ # HTTP header 'Accept' (if needed)
167
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
168
+
169
+ # form parameters
170
+ form_params = opts[:form_params] || {}
171
+
172
+ # http body (model)
173
+ post_body = opts[:debug_body]
174
+
175
+ # return_type
176
+ return_type = opts[:debug_return_type] || 'Organization'
177
+
178
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
179
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
180
+
181
+ new_options = opts.merge(
182
+ :operation => :"AccountApi.account_get_organization",
183
+ :header_params => header_params,
184
+ :query_params => query_params,
185
+ :form_params => form_params,
186
+ :body => post_body,
187
+ :auth_names => auth_names,
188
+ :return_type => return_type
189
+ )
190
+
191
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug "API called: AccountApi#account_get_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
194
+ end
195
+ return data, status_code, headers
196
+ end
197
+
143
198
  # Get Supabase integration status for the account
144
199
  # @param [Hash] opts the optional parameters
145
200
  # @return [SupabaseStatusResponse]
@@ -0,0 +1,146 @@
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 'cgi'
14
+
15
+ module Pingram
16
+ class OrganizationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get usage for the authenticated account's organization (new billing model).
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [OrganizationUsage]
25
+ def organization_get_usage(opts = {})
26
+ data, _status_code, _headers = organization_get_usage_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # Get usage for the authenticated account&#39;s organization (new billing model).
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(OrganizationUsage, Integer, Hash)>] OrganizationUsage data, response status code and response headers
33
+ def organization_get_usage_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.organization_get_usage ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/organization/usage'
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
47
+
48
+ # form parameters
49
+ form_params = opts[:form_params] || {}
50
+
51
+ # http body (model)
52
+ post_body = opts[:debug_body]
53
+
54
+ # return_type
55
+ return_type = opts[:debug_return_type] || 'OrganizationUsage'
56
+
57
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
58
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
59
+
60
+ new_options = opts.merge(
61
+ :operation => :"OrganizationApi.organization_get_usage",
62
+ :header_params => header_params,
63
+ :query_params => query_params,
64
+ :form_params => form_params,
65
+ :body => post_body,
66
+ :auth_names => auth_names,
67
+ :return_type => return_type
68
+ )
69
+
70
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: OrganizationApi#organization_get_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+
77
+ # Get historical usage for the authenticated account's organization over a date range.
78
+ # @param start_date [String] Start date (YYYY-MM-DD) for the range
79
+ # @param end_date [String] End date (YYYY-MM-DD) for the range
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [OrganizationUsageHistory]
82
+ def organization_get_usage_history(start_date, end_date, opts = {})
83
+ data, _status_code, _headers = organization_get_usage_history_with_http_info(start_date, end_date, opts)
84
+ data
85
+ end
86
+
87
+ # Get historical usage for the authenticated account&#39;s organization over a date range.
88
+ # @param start_date [String] Start date (YYYY-MM-DD) for the range
89
+ # @param end_date [String] End date (YYYY-MM-DD) for the range
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [Array<(OrganizationUsageHistory, Integer, Hash)>] OrganizationUsageHistory data, response status code and response headers
92
+ def organization_get_usage_history_with_http_info(start_date, end_date, opts = {})
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug 'Calling API: OrganizationApi.organization_get_usage_history ...'
95
+ end
96
+ # verify the required parameter 'start_date' is set
97
+ if @api_client.config.client_side_validation && start_date.nil?
98
+ fail ArgumentError, "Missing the required parameter 'start_date' when calling OrganizationApi.organization_get_usage_history"
99
+ end
100
+ # verify the required parameter 'end_date' is set
101
+ if @api_client.config.client_side_validation && end_date.nil?
102
+ fail ArgumentError, "Missing the required parameter 'end_date' when calling OrganizationApi.organization_get_usage_history"
103
+ end
104
+ # resource path
105
+ local_var_path = '/organization/usage/history'
106
+
107
+ # query parameters
108
+ query_params = opts[:query_params] || {}
109
+ query_params[:'startDate'] = start_date
110
+ query_params[:'endDate'] = end_date
111
+
112
+ # header parameters
113
+ header_params = opts[:header_params] || {}
114
+ # HTTP header 'Accept' (if needed)
115
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
116
+
117
+ # form parameters
118
+ form_params = opts[:form_params] || {}
119
+
120
+ # http body (model)
121
+ post_body = opts[:debug_body]
122
+
123
+ # return_type
124
+ return_type = opts[:debug_return_type] || 'OrganizationUsageHistory'
125
+
126
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
127
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"OrganizationApi.organization_get_usage_history",
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: OrganizationApi#organization_get_usage_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+ end
146
+ end
@@ -0,0 +1,196 @@
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 'cgi'
14
+
15
+ module Pingram
16
+ class WebhooksApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete the events webhook configuration for the current account/environment.
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [nil]
25
+ def webhooks_delete_events_webhook(opts = {})
26
+ webhooks_delete_events_webhook_with_http_info(opts)
27
+ nil
28
+ end
29
+
30
+ # Delete the events webhook configuration for the current account/environment.
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
33
+ def webhooks_delete_events_webhook_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_delete_events_webhook ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/webhooks/events'
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+
46
+ # form parameters
47
+ form_params = opts[:form_params] || {}
48
+
49
+ # http body (model)
50
+ post_body = opts[:debug_body]
51
+
52
+ # return_type
53
+ return_type = opts[:debug_return_type]
54
+
55
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
56
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
57
+
58
+ new_options = opts.merge(
59
+ :operation => :"WebhooksApi.webhooks_delete_events_webhook",
60
+ :header_params => header_params,
61
+ :query_params => query_params,
62
+ :form_params => form_params,
63
+ :body => post_body,
64
+ :auth_names => auth_names,
65
+ :return_type => return_type
66
+ )
67
+
68
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
69
+ if @api_client.config.debugging
70
+ @api_client.config.logger.debug "API called: WebhooksApi#webhooks_delete_events_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
71
+ end
72
+ return data, status_code, headers
73
+ end
74
+
75
+ # Get the events webhook configuration for the current account/environment.
76
+ # @param [Hash] opts the optional parameters
77
+ # @return [EventsWebhookResponse]
78
+ def webhooks_get_events_webhook(opts = {})
79
+ data, _status_code, _headers = webhooks_get_events_webhook_with_http_info(opts)
80
+ data
81
+ end
82
+
83
+ # Get the events webhook configuration for the current account/environment.
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [Array<(EventsWebhookResponse, Integer, Hash)>] EventsWebhookResponse data, response status code and response headers
86
+ def webhooks_get_events_webhook_with_http_info(opts = {})
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_get_events_webhook ...'
89
+ end
90
+ # resource path
91
+ local_var_path = '/webhooks/events'
92
+
93
+ # query parameters
94
+ query_params = opts[:query_params] || {}
95
+
96
+ # header parameters
97
+ header_params = opts[:header_params] || {}
98
+ # HTTP header 'Accept' (if needed)
99
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
100
+
101
+ # form parameters
102
+ form_params = opts[:form_params] || {}
103
+
104
+ # http body (model)
105
+ post_body = opts[:debug_body]
106
+
107
+ # return_type
108
+ return_type = opts[:debug_return_type] || 'EventsWebhookResponse'
109
+
110
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
111
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
112
+
113
+ new_options = opts.merge(
114
+ :operation => :"WebhooksApi.webhooks_get_events_webhook",
115
+ :header_params => header_params,
116
+ :query_params => query_params,
117
+ :form_params => form_params,
118
+ :body => post_body,
119
+ :auth_names => auth_names,
120
+ :return_type => return_type
121
+ )
122
+
123
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug "API called: WebhooksApi#webhooks_get_events_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
126
+ end
127
+ return data, status_code, headers
128
+ end
129
+
130
+ # Create or update the events webhook configuration for the current account/environment.
131
+ # @param events_webhook_upsert_request [EventsWebhookUpsertRequest]
132
+ # @param [Hash] opts the optional parameters
133
+ # @return [EventsWebhookResponse]
134
+ def webhooks_upsert_events_webhook(events_webhook_upsert_request, opts = {})
135
+ data, _status_code, _headers = webhooks_upsert_events_webhook_with_http_info(events_webhook_upsert_request, opts)
136
+ data
137
+ end
138
+
139
+ # Create or update the events webhook configuration for the current account/environment.
140
+ # @param events_webhook_upsert_request [EventsWebhookUpsertRequest]
141
+ # @param [Hash] opts the optional parameters
142
+ # @return [Array<(EventsWebhookResponse, Integer, Hash)>] EventsWebhookResponse data, response status code and response headers
143
+ def webhooks_upsert_events_webhook_with_http_info(events_webhook_upsert_request, opts = {})
144
+ if @api_client.config.debugging
145
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.webhooks_upsert_events_webhook ...'
146
+ end
147
+ # verify the required parameter 'events_webhook_upsert_request' is set
148
+ if @api_client.config.client_side_validation && events_webhook_upsert_request.nil?
149
+ fail ArgumentError, "Missing the required parameter 'events_webhook_upsert_request' when calling WebhooksApi.webhooks_upsert_events_webhook"
150
+ end
151
+ # resource path
152
+ local_var_path = '/webhooks/events'
153
+
154
+ # query parameters
155
+ query_params = opts[:query_params] || {}
156
+
157
+ # header parameters
158
+ header_params = opts[:header_params] || {}
159
+ # HTTP header 'Accept' (if needed)
160
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
161
+ # HTTP header 'Content-Type'
162
+ content_type = @api_client.select_header_content_type(['application/json'])
163
+ if !content_type.nil?
164
+ header_params['Content-Type'] = content_type
165
+ end
166
+
167
+ # form parameters
168
+ form_params = opts[:form_params] || {}
169
+
170
+ # http body (model)
171
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(events_webhook_upsert_request)
172
+
173
+ # return_type
174
+ return_type = opts[:debug_return_type] || 'EventsWebhookResponse'
175
+
176
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
177
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
178
+
179
+ new_options = opts.merge(
180
+ :operation => :"WebhooksApi.webhooks_upsert_events_webhook",
181
+ :header_params => header_params,
182
+ :query_params => query_params,
183
+ :form_params => form_params,
184
+ :body => post_body,
185
+ :auth_names => auth_names,
186
+ :return_type => return_type
187
+ )
188
+
189
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug "API called: WebhooksApi#webhooks_upsert_events_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
192
+ end
193
+ return data, status_code, headers
194
+ end
195
+ end
196
+ end
@@ -32,7 +32,7 @@ module Pingram
32
32
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
33
33
  def initialize(config = Configuration.default)
34
34
  @config = config
35
- @user_agent = "pingram-ruby/1.0.1"
35
+ @user_agent = "pingram-ruby/1.0.2"
36
36
  @default_headers = {
37
37
  'Content-Type' => 'application/json',
38
38
  'User-Agent' => @user_agent
@@ -31,6 +31,8 @@ require_relative 'api/logs_api'
31
31
 
32
32
  require_relative 'api/members_api'
33
33
 
34
+ require_relative 'api/organization_api'
35
+
34
36
  require_relative 'api/sender_api'
35
37
 
36
38
  require_relative 'api/templates_api'
@@ -41,6 +43,8 @@ require_relative 'api/user_api'
41
43
 
42
44
  require_relative 'api/users_api'
43
45
 
46
+ require_relative 'api/webhooks_api'
47
+
44
48
 
45
49
  module Pingram
46
50
  # High-level Pingram client: holds API key and base URL, exposes tag APIs and +send+.
@@ -85,6 +89,8 @@ module Pingram
85
89
 
86
90
  @members = Pingram::MembersApi.new(@api_client)
87
91
 
92
+ @organization = Pingram::OrganizationApi.new(@api_client)
93
+
88
94
  @sender = Pingram::SenderApi.new(@api_client)
89
95
 
90
96
  @templates = Pingram::TemplatesApi.new(@api_client)
@@ -95,6 +101,8 @@ module Pingram
95
101
 
96
102
  @users = Pingram::UsersApi.new(@api_client)
97
103
 
104
+ @webhooks = Pingram::WebhooksApi.new(@api_client)
105
+
98
106
  end
99
107
 
100
108
 
@@ -170,6 +178,12 @@ module Pingram
170
178
  end
171
179
 
172
180
 
181
+ # @return [Pingram::OrganizationApi]
182
+ def organization
183
+ @organization
184
+ end
185
+
186
+
173
187
  # @return [Pingram::SenderApi]
174
188
  def sender
175
189
  @sender
@@ -200,6 +214,12 @@ module Pingram
200
214
  end
201
215
 
202
216
 
217
+ # @return [Pingram::WebhooksApi]
218
+ def webhooks
219
+ @webhooks
220
+ end
221
+
222
+
203
223
 
204
224
  # Send a notification. Delegates to DefaultApi#call_send (Ruby renames +send+ to +call_send+).
205
225
  # @param body [Object] Request body (e.g. Pingram::SenderPostBody or Hash)
@@ -14,29 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
+ # GET /account response: basic account info (billing fields are on Organization).
17
18
  class AccountGetResponse < ApiModelBase
18
19
  attr_accessor :account_id
19
20
 
21
+ # Optional organization ID; legacy accounts may not have one.
22
+ attr_accessor :organization_id
23
+
20
24
  attr_accessor :name
21
25
 
22
26
  attr_accessor :account_type
23
27
 
24
28
  attr_accessor :created_at
25
29
 
26
- attr_accessor :stripe_customer_id
27
-
28
- attr_accessor :stripe_subscription_id
29
-
30
- attr_accessor :subscription_status
31
-
32
- attr_accessor :anniversary_date
33
-
34
- attr_accessor :pending_downgrade_effective_date
35
-
36
- attr_accessor :pending_downgrade_account_type
37
-
38
- attr_accessor :pending_downgrade_usage_limit
39
-
40
30
  class EnumAttributeValidator
41
31
  attr_reader :datatype
42
32
  attr_reader :allowable_values
@@ -63,16 +53,10 @@ module Pingram
63
53
  def self.attribute_map
64
54
  {
65
55
  :'account_id' => :'accountId',
56
+ :'organization_id' => :'organizationId',
66
57
  :'name' => :'name',
67
58
  :'account_type' => :'accountType',
68
- :'created_at' => :'createdAt',
69
- :'stripe_customer_id' => :'stripeCustomerId',
70
- :'stripe_subscription_id' => :'stripeSubscriptionId',
71
- :'subscription_status' => :'subscriptionStatus',
72
- :'anniversary_date' => :'anniversaryDate',
73
- :'pending_downgrade_effective_date' => :'pendingDowngradeEffectiveDate',
74
- :'pending_downgrade_account_type' => :'pendingDowngradeAccountType',
75
- :'pending_downgrade_usage_limit' => :'pendingDowngradeUsageLimit'
59
+ :'created_at' => :'createdAt'
76
60
  }
77
61
  end
78
62
 
@@ -90,23 +74,16 @@ module Pingram
90
74
  def self.openapi_types
91
75
  {
92
76
  :'account_id' => :'String',
77
+ :'organization_id' => :'String',
93
78
  :'name' => :'String',
94
79
  :'account_type' => :'String',
95
- :'created_at' => :'String',
96
- :'stripe_customer_id' => :'String',
97
- :'stripe_subscription_id' => :'String',
98
- :'subscription_status' => :'String',
99
- :'anniversary_date' => :'String',
100
- :'pending_downgrade_effective_date' => :'String',
101
- :'pending_downgrade_account_type' => :'String',
102
- :'pending_downgrade_usage_limit' => :'AccountGetResponsePendingDowngradeUsageLimit'
80
+ :'created_at' => :'String'
103
81
  }
104
82
  end
105
83
 
106
84
  # List of attributes with nullable: true
107
85
  def self.openapi_nullable
108
86
  Set.new([
109
- :'subscription_status',
110
87
  ])
111
88
  end
112
89
 
@@ -132,6 +109,10 @@ module Pingram
132
109
  self.account_id = nil
133
110
  end
134
111
 
112
+ if attributes.key?(:'organization_id')
113
+ self.organization_id = attributes[:'organization_id']
114
+ end
115
+
135
116
  if attributes.key?(:'name')
136
117
  self.name = attributes[:'name']
137
118
  else
@@ -149,34 +130,6 @@ module Pingram
149
130
  else
150
131
  self.created_at = nil
151
132
  end
152
-
153
- if attributes.key?(:'stripe_customer_id')
154
- self.stripe_customer_id = attributes[:'stripe_customer_id']
155
- end
156
-
157
- if attributes.key?(:'stripe_subscription_id')
158
- self.stripe_subscription_id = attributes[:'stripe_subscription_id']
159
- end
160
-
161
- if attributes.key?(:'subscription_status')
162
- self.subscription_status = attributes[:'subscription_status']
163
- end
164
-
165
- if attributes.key?(:'anniversary_date')
166
- self.anniversary_date = attributes[:'anniversary_date']
167
- end
168
-
169
- if attributes.key?(:'pending_downgrade_effective_date')
170
- self.pending_downgrade_effective_date = attributes[:'pending_downgrade_effective_date']
171
- end
172
-
173
- if attributes.key?(:'pending_downgrade_account_type')
174
- self.pending_downgrade_account_type = attributes[:'pending_downgrade_account_type']
175
- end
176
-
177
- if attributes.key?(:'pending_downgrade_usage_limit')
178
- self.pending_downgrade_usage_limit = attributes[:'pending_downgrade_usage_limit']
179
- end
180
133
  end
181
134
 
182
135
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -213,10 +166,6 @@ module Pingram
213
166
  account_type_validator = EnumAttributeValidator.new('String', ["free", "paid"])
214
167
  return false unless account_type_validator.valid?(@account_type)
215
168
  return false if @created_at.nil?
216
- subscription_status_validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
217
- return false unless subscription_status_validator.valid?(@subscription_status)
218
- pending_downgrade_account_type_validator = EnumAttributeValidator.new('String', ["free"])
219
- return false unless pending_downgrade_account_type_validator.valid?(@pending_downgrade_account_type)
220
169
  true
221
170
  end
222
171
 
@@ -260,42 +209,16 @@ module Pingram
260
209
  @created_at = created_at
261
210
  end
262
211
 
263
- # Custom attribute writer method checking allowed values (enum).
264
- # @param [Object] subscription_status Object to be assigned
265
- def subscription_status=(subscription_status)
266
- validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
267
- unless validator.valid?(subscription_status)
268
- fail ArgumentError, "invalid value for \"subscription_status\", must be one of #{validator.allowable_values}."
269
- end
270
- @subscription_status = subscription_status
271
- end
272
-
273
- # Custom attribute writer method checking allowed values (enum).
274
- # @param [Object] pending_downgrade_account_type Object to be assigned
275
- def pending_downgrade_account_type=(pending_downgrade_account_type)
276
- validator = EnumAttributeValidator.new('String', ["free"])
277
- unless validator.valid?(pending_downgrade_account_type)
278
- fail ArgumentError, "invalid value for \"pending_downgrade_account_type\", must be one of #{validator.allowable_values}."
279
- end
280
- @pending_downgrade_account_type = pending_downgrade_account_type
281
- end
282
-
283
212
  # Checks equality by comparing each attribute.
284
213
  # @param [Object] Object to be compared
285
214
  def ==(o)
286
215
  return true if self.equal?(o)
287
216
  self.class == o.class &&
288
217
  account_id == o.account_id &&
218
+ organization_id == o.organization_id &&
289
219
  name == o.name &&
290
220
  account_type == o.account_type &&
291
- created_at == o.created_at &&
292
- stripe_customer_id == o.stripe_customer_id &&
293
- stripe_subscription_id == o.stripe_subscription_id &&
294
- subscription_status == o.subscription_status &&
295
- anniversary_date == o.anniversary_date &&
296
- pending_downgrade_effective_date == o.pending_downgrade_effective_date &&
297
- pending_downgrade_account_type == o.pending_downgrade_account_type &&
298
- pending_downgrade_usage_limit == o.pending_downgrade_usage_limit
221
+ created_at == o.created_at
299
222
  end
300
223
 
301
224
  # @see the `==` method
@@ -307,7 +230,7 @@ module Pingram
307
230
  # Calculates hash code according to all attributes.
308
231
  # @return [Integer] Hash code
309
232
  def hash
310
- [account_id, name, account_type, created_at, stripe_customer_id, stripe_subscription_id, subscription_status, anniversary_date, pending_downgrade_effective_date, pending_downgrade_account_type, pending_downgrade_usage_limit].hash
233
+ [account_id, organization_id, name, account_type, created_at].hash
311
234
  end
312
235
 
313
236
  # Builds the object from hash