subskribe_dev 1.2.0 → 1.3.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/README.md +18 -13
- data/docs/AccountingApi.md +1 -1
- data/docs/AccountsApi.md +3 -3
- data/docs/ApprovalsApi.md +1 -1
- data/docs/AttachmentsApi.md +1 -1
- data/docs/AuthenticationApi.md +1 -1
- data/docs/AutomatedInvoiceRule.md +2 -2
- data/docs/BillingApi.md +1 -1
- data/docs/BulkInvoiceRunItem.md +2 -2
- data/docs/BulkPaymentUploadData.md +3 -3
- data/docs/BulkPaymentUploadResult.md +1 -1
- data/docs/ChargeJson.md +2 -2
- data/docs/CreditMemoApi.md +1 -1
- data/docs/CustomFieldApi.md +1 -1
- data/docs/CustomizationApi.md +1 -1
- data/docs/DefaultApi.md +1 -1
- data/docs/DiscountsApi.md +1 -1
- data/docs/ERPApi.md +21 -21
- data/docs/EntitiesApi.md +173 -1
- data/docs/ImportApi.md +1 -1
- data/docs/IntegrationsApi.md +1 -1
- data/docs/MetricsReportingApi.md +1 -1
- data/docs/NotificationsApi.md +1 -1
- data/docs/OpportunityApi.md +1 -1
- data/docs/OrderLineItemJson.md +1 -0
- data/docs/OrderLineItemRequestJson.md +1 -0
- data/docs/OrdersApi.md +1 -1
- data/docs/PaginatedAccountsResponse.md +10 -0
- data/docs/PaymentsApi.md +1 -1
- data/docs/PlanMetadataJson.md +8 -0
- data/docs/ProductCatalogApi.md +59 -1
- data/docs/RateCardApi.md +1 -1
- data/docs/RefundsApi.md +1 -1
- data/docs/ReportsApi.md +1 -1
- data/docs/RevenueRecognitionApi.md +21 -21
- data/docs/SalesRoomApi.md +1 -1
- data/docs/SettingsApi.md +1 -1
- data/docs/SubscriptionsApi.md +1 -1
- data/docs/TaxJarIntegration.md +1 -1
- data/docs/UsageApi.md +1 -1
- data/docs/UsersApi.md +1 -1
- data/lib/subskribe_dev/api/accounts_api.rb +3 -3
- data/lib/subskribe_dev/api/entities_api.rb +158 -0
- data/lib/subskribe_dev/api/erp_api.rb +20 -20
- data/lib/subskribe_dev/api/product_catalog_api.rb +58 -0
- data/lib/subskribe_dev/api/revenue_recognition_api.rb +22 -22
- data/lib/subskribe_dev/configuration.rb +1 -1
- data/lib/subskribe_dev/models/automated_invoice_rule.rb +22 -22
- data/lib/subskribe_dev/models/bulk_invoice_run_item.rb +22 -22
- data/lib/subskribe_dev/models/bulk_payment_upload_data.rb +31 -31
- data/lib/subskribe_dev/models/bulk_payment_upload_result.rb +13 -13
- data/lib/subskribe_dev/models/charge_json.rb +19 -19
- data/lib/subskribe_dev/models/order_line_item_json.rb +10 -1
- data/lib/subskribe_dev/models/order_line_item_request_json.rb +10 -1
- data/lib/subskribe_dev/models/paginated_accounts_response.rb +204 -0
- data/lib/subskribe_dev/models/plan_metadata_json.rb +187 -0
- data/lib/subskribe_dev/models/tax_jar_integration.rb +10 -10
- data/lib/subskribe_dev/version.rb +1 -1
- data/lib/subskribe_dev.rb +2 -1
- data/spec/models/paginated_accounts_response_spec.rb +53 -0
- data/spec/models/plan_metadata_json_spec.rb +41 -0
- data/subskribe_dev.gemspec +4 -4
- metadata +195 -187
@@ -86,14 +86,14 @@ module SubskribeDevClient
|
|
86
86
|
|
87
87
|
attr_accessor :should_track_arr
|
88
88
|
|
89
|
-
attr_accessor :custom
|
90
|
-
|
91
89
|
attr_accessor :drawdown
|
92
90
|
|
93
|
-
attr_accessor :
|
91
|
+
attr_accessor :custom
|
94
92
|
|
95
93
|
attr_accessor :list_price_editable
|
96
94
|
|
95
|
+
attr_accessor :event_based
|
96
|
+
|
97
97
|
class EnumAttributeValidator
|
98
98
|
attr_reader :datatype
|
99
99
|
attr_reader :allowable_values
|
@@ -155,10 +155,10 @@ module SubskribeDevClient
|
|
155
155
|
:'billing_term' => :'billingTerm',
|
156
156
|
:'billing_cycle' => :'billingCycle',
|
157
157
|
:'should_track_arr' => :'shouldTrackArr',
|
158
|
-
:'custom' => :'custom',
|
159
158
|
:'drawdown' => :'drawdown',
|
160
|
-
:'
|
161
|
-
:'list_price_editable' => :'listPriceEditable'
|
159
|
+
:'custom' => :'custom',
|
160
|
+
:'list_price_editable' => :'listPriceEditable',
|
161
|
+
:'event_based' => :'eventBased'
|
162
162
|
}
|
163
163
|
end
|
164
164
|
|
@@ -201,10 +201,10 @@ module SubskribeDevClient
|
|
201
201
|
:'billing_term' => :'String',
|
202
202
|
:'billing_cycle' => :'String',
|
203
203
|
:'should_track_arr' => :'BOOLEAN',
|
204
|
-
:'custom' => :'BOOLEAN',
|
205
204
|
:'drawdown' => :'BOOLEAN',
|
206
|
-
:'
|
207
|
-
:'list_price_editable' => :'BOOLEAN'
|
205
|
+
:'custom' => :'BOOLEAN',
|
206
|
+
:'list_price_editable' => :'BOOLEAN',
|
207
|
+
:'event_based' => :'BOOLEAN'
|
208
208
|
}
|
209
209
|
end
|
210
210
|
|
@@ -364,21 +364,21 @@ module SubskribeDevClient
|
|
364
364
|
self.should_track_arr = attributes[:'shouldTrackArr']
|
365
365
|
end
|
366
366
|
|
367
|
-
if attributes.has_key?(:'custom')
|
368
|
-
self.custom = attributes[:'custom']
|
369
|
-
end
|
370
|
-
|
371
367
|
if attributes.has_key?(:'drawdown')
|
372
368
|
self.drawdown = attributes[:'drawdown']
|
373
369
|
end
|
374
370
|
|
375
|
-
if attributes.has_key?(:'
|
376
|
-
self.
|
371
|
+
if attributes.has_key?(:'custom')
|
372
|
+
self.custom = attributes[:'custom']
|
377
373
|
end
|
378
374
|
|
379
375
|
if attributes.has_key?(:'listPriceEditable')
|
380
376
|
self.list_price_editable = attributes[:'listPriceEditable']
|
381
377
|
end
|
378
|
+
|
379
|
+
if attributes.has_key?(:'eventBased')
|
380
|
+
self.event_based = attributes[:'eventBased']
|
381
|
+
end
|
382
382
|
end
|
383
383
|
|
384
384
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -505,10 +505,10 @@ module SubskribeDevClient
|
|
505
505
|
billing_term == o.billing_term &&
|
506
506
|
billing_cycle == o.billing_cycle &&
|
507
507
|
should_track_arr == o.should_track_arr &&
|
508
|
-
custom == o.custom &&
|
509
508
|
drawdown == o.drawdown &&
|
510
|
-
|
511
|
-
list_price_editable == o.list_price_editable
|
509
|
+
custom == o.custom &&
|
510
|
+
list_price_editable == o.list_price_editable &&
|
511
|
+
event_based == o.event_based
|
512
512
|
end
|
513
513
|
|
514
514
|
# @see the `==` method
|
@@ -520,7 +520,7 @@ module SubskribeDevClient
|
|
520
520
|
# Calculates hash code according to all attributes.
|
521
521
|
# @return [Fixnum] Hash code
|
522
522
|
def hash
|
523
|
-
[id, name, display_name, description, tax_rate_id, unit_of_measure_id, is_renewable, min_quantity, default_quantity, max_quantity, external_id, min_amount, max_amount, recognition_rule_id, erp_id, plan_id, amount, type, charge_model, recurrence, price_tiers, is_drawdown, minimum_commit_base_charge_id, overage_base_charge_id, is_custom, is_list_price_editable, percent, percent_derived_from, target_plan_ids, ledger_account_mapping, duration_in_months, is_event_based, rate_card_id, billing_term, billing_cycle, should_track_arr, custom,
|
523
|
+
[id, name, display_name, description, tax_rate_id, unit_of_measure_id, is_renewable, min_quantity, default_quantity, max_quantity, external_id, min_amount, max_amount, recognition_rule_id, erp_id, plan_id, amount, type, charge_model, recurrence, price_tiers, is_drawdown, minimum_commit_base_charge_id, overage_base_charge_id, is_custom, is_list_price_editable, percent, percent_derived_from, target_plan_ids, ledger_account_mapping, duration_in_months, is_event_based, rate_card_id, billing_term, billing_cycle, should_track_arr, drawdown, custom, list_price_editable, event_based].hash
|
524
524
|
end
|
525
525
|
|
526
526
|
# Builds the object from hash
|
@@ -66,6 +66,8 @@ module SubskribeDevClient
|
|
66
66
|
|
67
67
|
attr_accessor :custom_fields
|
68
68
|
|
69
|
+
attr_accessor :arr_override
|
70
|
+
|
69
71
|
attr_accessor :dry_run_item
|
70
72
|
|
71
73
|
class EnumAttributeValidator
|
@@ -119,6 +121,7 @@ module SubskribeDevClient
|
|
119
121
|
:'effective_date' => :'effectiveDate',
|
120
122
|
:'end_date' => :'endDate',
|
121
123
|
:'custom_fields' => :'customFields',
|
124
|
+
:'arr_override' => :'arrOverride',
|
122
125
|
:'dry_run_item' => :'dryRunItem'
|
123
126
|
}
|
124
127
|
end
|
@@ -152,6 +155,7 @@ module SubskribeDevClient
|
|
152
155
|
:'effective_date' => :'Integer',
|
153
156
|
:'end_date' => :'Integer',
|
154
157
|
:'custom_fields' => :'Array<CustomFieldEntry>',
|
158
|
+
:'arr_override' => :'Float',
|
155
159
|
:'dry_run_item' => :'BOOLEAN'
|
156
160
|
}
|
157
161
|
end
|
@@ -276,6 +280,10 @@ module SubskribeDevClient
|
|
276
280
|
end
|
277
281
|
end
|
278
282
|
|
283
|
+
if attributes.has_key?(:'arrOverride')
|
284
|
+
self.arr_override = attributes[:'arrOverride']
|
285
|
+
end
|
286
|
+
|
279
287
|
if attributes.has_key?(:'dryRunItem')
|
280
288
|
self.dry_run_item = attributes[:'dryRunItem']
|
281
289
|
end
|
@@ -342,6 +350,7 @@ module SubskribeDevClient
|
|
342
350
|
effective_date == o.effective_date &&
|
343
351
|
end_date == o.end_date &&
|
344
352
|
custom_fields == o.custom_fields &&
|
353
|
+
arr_override == o.arr_override &&
|
345
354
|
dry_run_item == o.dry_run_item
|
346
355
|
end
|
347
356
|
|
@@ -354,7 +363,7 @@ module SubskribeDevClient
|
|
354
363
|
# Calculates hash code according to all attributes.
|
355
364
|
# @return [Fixnum] Hash code
|
356
365
|
def hash
|
357
|
-
[id, is_dry_run_item, action, plan_id, subscription_charge_id, currency_conversion_rate_id, subscription_charge_group_id, charge_id, quantity, is_ramp, list_unit_price, sell_unit_price, discount_amount, discounts, predefined_discounts, attribute_references, amount, list_amount, annualized_amount, list_price_override_ratio, list_unit_price_before_override, list_amount_before_override, tax_estimate, effective_date, end_date, custom_fields, dry_run_item].hash
|
366
|
+
[id, is_dry_run_item, action, plan_id, subscription_charge_id, currency_conversion_rate_id, subscription_charge_group_id, charge_id, quantity, is_ramp, list_unit_price, sell_unit_price, discount_amount, discounts, predefined_discounts, attribute_references, amount, list_amount, annualized_amount, list_price_override_ratio, list_unit_price_before_override, list_amount_before_override, tax_estimate, effective_date, end_date, custom_fields, arr_override, dry_run_item].hash
|
358
367
|
end
|
359
368
|
|
360
369
|
# Builds the object from hash
|
@@ -46,6 +46,8 @@ module SubskribeDevClient
|
|
46
46
|
|
47
47
|
attr_accessor :custom_fields
|
48
48
|
|
49
|
+
attr_accessor :arr_override
|
50
|
+
|
49
51
|
attr_accessor :dry_run_item
|
50
52
|
|
51
53
|
class EnumAttributeValidator
|
@@ -89,6 +91,7 @@ module SubskribeDevClient
|
|
89
91
|
:'list_price_override_ratio' => :'listPriceOverrideRatio',
|
90
92
|
:'attribute_references' => :'attributeReferences',
|
91
93
|
:'custom_fields' => :'customFields',
|
94
|
+
:'arr_override' => :'arrOverride',
|
92
95
|
:'dry_run_item' => :'dryRunItem'
|
93
96
|
}
|
94
97
|
end
|
@@ -112,6 +115,7 @@ module SubskribeDevClient
|
|
112
115
|
:'list_price_override_ratio' => :'Float',
|
113
116
|
:'attribute_references' => :'Array<AttributeReference>',
|
114
117
|
:'custom_fields' => :'Array<CustomFieldEntry>',
|
118
|
+
:'arr_override' => :'Float',
|
115
119
|
:'dry_run_item' => :'BOOLEAN'
|
116
120
|
}
|
117
121
|
end
|
@@ -196,6 +200,10 @@ module SubskribeDevClient
|
|
196
200
|
end
|
197
201
|
end
|
198
202
|
|
203
|
+
if attributes.has_key?(:'arrOverride')
|
204
|
+
self.arr_override = attributes[:'arrOverride']
|
205
|
+
end
|
206
|
+
|
199
207
|
if attributes.has_key?(:'dryRunItem')
|
200
208
|
self.dry_run_item = attributes[:'dryRunItem']
|
201
209
|
end
|
@@ -252,6 +260,7 @@ module SubskribeDevClient
|
|
252
260
|
list_price_override_ratio == o.list_price_override_ratio &&
|
253
261
|
attribute_references == o.attribute_references &&
|
254
262
|
custom_fields == o.custom_fields &&
|
263
|
+
arr_override == o.arr_override &&
|
255
264
|
dry_run_item == o.dry_run_item
|
256
265
|
end
|
257
266
|
|
@@ -264,7 +273,7 @@ module SubskribeDevClient
|
|
264
273
|
# Calculates hash code according to all attributes.
|
265
274
|
# @return [Fixnum] Hash code
|
266
275
|
def hash
|
267
|
-
[id, is_dry_run_item, action, plan_id, subscription_charge_id, charge_id, quantity, is_ramp, discounts, predefined_discounts, effective_date, end_date, list_unit_price, list_price_override_ratio, attribute_references, custom_fields, dry_run_item].hash
|
276
|
+
[id, is_dry_run_item, action, plan_id, subscription_charge_id, charge_id, quantity, is_ramp, discounts, predefined_discounts, effective_date, end_date, list_unit_price, list_price_override_ratio, attribute_references, custom_fields, arr_override, dry_run_item].hash
|
268
277
|
end
|
269
278
|
|
270
279
|
# Builds the object from hash
|
@@ -0,0 +1,204 @@
|
|
1
|
+
=begin
|
2
|
+
#Subskribe API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.41
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SubskribeDevClient
|
16
|
+
class PaginatedAccountsResponse
|
17
|
+
attr_accessor :data
|
18
|
+
|
19
|
+
attr_accessor :num_elements
|
20
|
+
|
21
|
+
attr_accessor :next_cursor
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'data' => :'data',
|
27
|
+
:'num_elements' => :'numElements',
|
28
|
+
:'next_cursor' => :'nextCursor'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'data' => :'Array<AccountJson>',
|
36
|
+
:'num_elements' => :'Integer',
|
37
|
+
:'next_cursor' => :'String'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
48
|
+
|
49
|
+
if attributes.has_key?(:'data')
|
50
|
+
if (value = attributes[:'data']).is_a?(Array)
|
51
|
+
self.data = value
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
if attributes.has_key?(:'numElements')
|
56
|
+
self.num_elements = attributes[:'numElements']
|
57
|
+
end
|
58
|
+
|
59
|
+
if attributes.has_key?(:'nextCursor')
|
60
|
+
self.next_cursor = attributes[:'nextCursor']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
65
|
+
# @return Array for valid properties with the reasons
|
66
|
+
def list_invalid_properties
|
67
|
+
invalid_properties = Array.new
|
68
|
+
invalid_properties
|
69
|
+
end
|
70
|
+
|
71
|
+
# Check to see if the all the properties in the model are valid
|
72
|
+
# @return true if the model is valid
|
73
|
+
def valid?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def ==(o)
|
80
|
+
return true if self.equal?(o)
|
81
|
+
self.class == o.class &&
|
82
|
+
data == o.data &&
|
83
|
+
num_elements == o.num_elements &&
|
84
|
+
next_cursor == o.next_cursor
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Fixnum] Hash code
|
95
|
+
def hash
|
96
|
+
[data, num_elements, next_cursor].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def build_from_hash(attributes)
|
103
|
+
return nil unless attributes.is_a?(Hash)
|
104
|
+
self.class.swagger_types.each_pair do |key, type|
|
105
|
+
if type =~ /\AArray<(.*)>/i
|
106
|
+
# check to ensure the input is an array given that the attribute
|
107
|
+
# is documented as an array but the input is not
|
108
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
109
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
110
|
+
end
|
111
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
112
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
113
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
114
|
+
end
|
115
|
+
|
116
|
+
self
|
117
|
+
end
|
118
|
+
|
119
|
+
# Deserializes the data based on type
|
120
|
+
# @param string type Data type
|
121
|
+
# @param string value Value to be deserialized
|
122
|
+
# @return [Object] Deserialized data
|
123
|
+
def _deserialize(type, value)
|
124
|
+
case type.to_sym
|
125
|
+
when :DateTime
|
126
|
+
DateTime.parse(value)
|
127
|
+
when :Date
|
128
|
+
Date.parse(value)
|
129
|
+
when :String
|
130
|
+
value.to_s
|
131
|
+
when :Integer
|
132
|
+
value.to_i
|
133
|
+
when :Float
|
134
|
+
value.to_f
|
135
|
+
when :BOOLEAN
|
136
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
137
|
+
true
|
138
|
+
else
|
139
|
+
false
|
140
|
+
end
|
141
|
+
when :Object
|
142
|
+
# generic object (usually a Hash), return directly
|
143
|
+
value
|
144
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
145
|
+
inner_type = Regexp.last_match[:inner_type]
|
146
|
+
value.map { |v| _deserialize(inner_type, v) }
|
147
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
148
|
+
k_type = Regexp.last_match[:k_type]
|
149
|
+
v_type = Regexp.last_match[:v_type]
|
150
|
+
{}.tap do |hash|
|
151
|
+
value.each do |k, v|
|
152
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
else # model
|
156
|
+
temp_model = SubskribeDevClient.const_get(type).new
|
157
|
+
temp_model.build_from_hash(value)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the string representation of the object
|
162
|
+
# @return [String] String presentation of the object
|
163
|
+
def to_s
|
164
|
+
to_hash.to_s
|
165
|
+
end
|
166
|
+
|
167
|
+
# to_body is an alias to to_hash (backward compatibility)
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_body
|
170
|
+
to_hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the object in the form of hash
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_hash
|
176
|
+
hash = {}
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
178
|
+
value = self.send(attr)
|
179
|
+
next if value.nil?
|
180
|
+
hash[param] = _to_hash(value)
|
181
|
+
end
|
182
|
+
hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Outputs non-array value in the form of hash
|
186
|
+
# For object, use to_hash. Otherwise, just return the value
|
187
|
+
# @param [Object] value Any valid value
|
188
|
+
# @return [Hash] Returns the value in the form of hash
|
189
|
+
def _to_hash(value)
|
190
|
+
if value.is_a?(Array)
|
191
|
+
value.compact.map { |v| _to_hash(v) }
|
192
|
+
elsif value.is_a?(Hash)
|
193
|
+
{}.tap do |hash|
|
194
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
195
|
+
end
|
196
|
+
elsif value.respond_to? :to_hash
|
197
|
+
value.to_hash
|
198
|
+
else
|
199
|
+
value
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
end
|
204
|
+
end
|
@@ -0,0 +1,187 @@
|
|
1
|
+
=begin
|
2
|
+
#Subskribe API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.41
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SubskribeDevClient
|
16
|
+
class PlanMetadataJson
|
17
|
+
# Entity ids to be updated
|
18
|
+
attr_accessor :entity_ids
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'entity_ids' => :'entityIds'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.swagger_types
|
29
|
+
{
|
30
|
+
:'entity_ids' => :'Array<String>'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
41
|
+
|
42
|
+
if attributes.has_key?(:'entityIds')
|
43
|
+
if (value = attributes[:'entityIds']).is_a?(Array)
|
44
|
+
self.entity_ids = value
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
50
|
+
# @return Array for valid properties with the reasons
|
51
|
+
def list_invalid_properties
|
52
|
+
invalid_properties = Array.new
|
53
|
+
invalid_properties
|
54
|
+
end
|
55
|
+
|
56
|
+
# Check to see if the all the properties in the model are valid
|
57
|
+
# @return true if the model is valid
|
58
|
+
def valid?
|
59
|
+
true
|
60
|
+
end
|
61
|
+
|
62
|
+
# Checks equality by comparing each attribute.
|
63
|
+
# @param [Object] Object to be compared
|
64
|
+
def ==(o)
|
65
|
+
return true if self.equal?(o)
|
66
|
+
self.class == o.class &&
|
67
|
+
entity_ids == o.entity_ids
|
68
|
+
end
|
69
|
+
|
70
|
+
# @see the `==` method
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def eql?(o)
|
73
|
+
self == o
|
74
|
+
end
|
75
|
+
|
76
|
+
# Calculates hash code according to all attributes.
|
77
|
+
# @return [Fixnum] Hash code
|
78
|
+
def hash
|
79
|
+
[entity_ids].hash
|
80
|
+
end
|
81
|
+
|
82
|
+
# Builds the object from hash
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
# @return [Object] Returns the model itself
|
85
|
+
def build_from_hash(attributes)
|
86
|
+
return nil unless attributes.is_a?(Hash)
|
87
|
+
self.class.swagger_types.each_pair do |key, type|
|
88
|
+
if type =~ /\AArray<(.*)>/i
|
89
|
+
# check to ensure the input is an array given that the attribute
|
90
|
+
# is documented as an array but the input is not
|
91
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
92
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
93
|
+
end
|
94
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
95
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
96
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
97
|
+
end
|
98
|
+
|
99
|
+
self
|
100
|
+
end
|
101
|
+
|
102
|
+
# Deserializes the data based on type
|
103
|
+
# @param string type Data type
|
104
|
+
# @param string value Value to be deserialized
|
105
|
+
# @return [Object] Deserialized data
|
106
|
+
def _deserialize(type, value)
|
107
|
+
case type.to_sym
|
108
|
+
when :DateTime
|
109
|
+
DateTime.parse(value)
|
110
|
+
when :Date
|
111
|
+
Date.parse(value)
|
112
|
+
when :String
|
113
|
+
value.to_s
|
114
|
+
when :Integer
|
115
|
+
value.to_i
|
116
|
+
when :Float
|
117
|
+
value.to_f
|
118
|
+
when :BOOLEAN
|
119
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
120
|
+
true
|
121
|
+
else
|
122
|
+
false
|
123
|
+
end
|
124
|
+
when :Object
|
125
|
+
# generic object (usually a Hash), return directly
|
126
|
+
value
|
127
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
128
|
+
inner_type = Regexp.last_match[:inner_type]
|
129
|
+
value.map { |v| _deserialize(inner_type, v) }
|
130
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
131
|
+
k_type = Regexp.last_match[:k_type]
|
132
|
+
v_type = Regexp.last_match[:v_type]
|
133
|
+
{}.tap do |hash|
|
134
|
+
value.each do |k, v|
|
135
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
else # model
|
139
|
+
temp_model = SubskribeDevClient.const_get(type).new
|
140
|
+
temp_model.build_from_hash(value)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# Returns the string representation of the object
|
145
|
+
# @return [String] String presentation of the object
|
146
|
+
def to_s
|
147
|
+
to_hash.to_s
|
148
|
+
end
|
149
|
+
|
150
|
+
# to_body is an alias to to_hash (backward compatibility)
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
152
|
+
def to_body
|
153
|
+
to_hash
|
154
|
+
end
|
155
|
+
|
156
|
+
# Returns the object in the form of hash
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
158
|
+
def to_hash
|
159
|
+
hash = {}
|
160
|
+
self.class.attribute_map.each_pair do |attr, param|
|
161
|
+
value = self.send(attr)
|
162
|
+
next if value.nil?
|
163
|
+
hash[param] = _to_hash(value)
|
164
|
+
end
|
165
|
+
hash
|
166
|
+
end
|
167
|
+
|
168
|
+
# Outputs non-array value in the form of hash
|
169
|
+
# For object, use to_hash. Otherwise, just return the value
|
170
|
+
# @param [Object] value Any valid value
|
171
|
+
# @return [Hash] Returns the value in the form of hash
|
172
|
+
def _to_hash(value)
|
173
|
+
if value.is_a?(Array)
|
174
|
+
value.compact.map { |v| _to_hash(v) }
|
175
|
+
elsif value.is_a?(Hash)
|
176
|
+
{}.tap do |hash|
|
177
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
178
|
+
end
|
179
|
+
elsif value.respond_to? :to_hash
|
180
|
+
value.to_hash
|
181
|
+
else
|
182
|
+
value
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
187
|
+
end
|
@@ -20,12 +20,12 @@ module SubskribeDevClient
|
|
20
20
|
|
21
21
|
attr_accessor :created_on
|
22
22
|
|
23
|
+
attr_accessor :is_deleted
|
24
|
+
|
23
25
|
attr_accessor :integration_id
|
24
26
|
|
25
27
|
attr_accessor :masked_api_key
|
26
28
|
|
27
|
-
attr_accessor :is_deleted
|
28
|
-
|
29
29
|
attr_accessor :is_sandbox
|
30
30
|
|
31
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -34,9 +34,9 @@ module SubskribeDevClient
|
|
34
34
|
:'tenant_id' => :'tenantId',
|
35
35
|
:'updated_on' => :'updatedOn',
|
36
36
|
:'created_on' => :'createdOn',
|
37
|
+
:'is_deleted' => :'isDeleted',
|
37
38
|
:'integration_id' => :'integrationId',
|
38
39
|
:'masked_api_key' => :'maskedApiKey',
|
39
|
-
:'is_deleted' => :'isDeleted',
|
40
40
|
:'is_sandbox' => :'isSandbox'
|
41
41
|
}
|
42
42
|
end
|
@@ -47,9 +47,9 @@ module SubskribeDevClient
|
|
47
47
|
:'tenant_id' => :'String',
|
48
48
|
:'updated_on' => :'Integer',
|
49
49
|
:'created_on' => :'Integer',
|
50
|
+
:'is_deleted' => :'BOOLEAN',
|
50
51
|
:'integration_id' => :'String',
|
51
52
|
:'masked_api_key' => :'String',
|
52
|
-
:'is_deleted' => :'BOOLEAN',
|
53
53
|
:'is_sandbox' => :'BOOLEAN'
|
54
54
|
}
|
55
55
|
end
|
@@ -74,6 +74,10 @@ module SubskribeDevClient
|
|
74
74
|
self.created_on = attributes[:'createdOn']
|
75
75
|
end
|
76
76
|
|
77
|
+
if attributes.has_key?(:'isDeleted')
|
78
|
+
self.is_deleted = attributes[:'isDeleted']
|
79
|
+
end
|
80
|
+
|
77
81
|
if attributes.has_key?(:'integrationId')
|
78
82
|
self.integration_id = attributes[:'integrationId']
|
79
83
|
end
|
@@ -82,10 +86,6 @@ module SubskribeDevClient
|
|
82
86
|
self.masked_api_key = attributes[:'maskedApiKey']
|
83
87
|
end
|
84
88
|
|
85
|
-
if attributes.has_key?(:'isDeleted')
|
86
|
-
self.is_deleted = attributes[:'isDeleted']
|
87
|
-
end
|
88
|
-
|
89
89
|
if attributes.has_key?(:'isSandbox')
|
90
90
|
self.is_sandbox = attributes[:'isSandbox']
|
91
91
|
end
|
@@ -112,9 +112,9 @@ module SubskribeDevClient
|
|
112
112
|
tenant_id == o.tenant_id &&
|
113
113
|
updated_on == o.updated_on &&
|
114
114
|
created_on == o.created_on &&
|
115
|
+
is_deleted == o.is_deleted &&
|
115
116
|
integration_id == o.integration_id &&
|
116
117
|
masked_api_key == o.masked_api_key &&
|
117
|
-
is_deleted == o.is_deleted &&
|
118
118
|
is_sandbox == o.is_sandbox
|
119
119
|
end
|
120
120
|
|
@@ -127,7 +127,7 @@ module SubskribeDevClient
|
|
127
127
|
# Calculates hash code according to all attributes.
|
128
128
|
# @return [Fixnum] Hash code
|
129
129
|
def hash
|
130
|
-
[tenant_id, updated_on, created_on, integration_id, masked_api_key,
|
130
|
+
[tenant_id, updated_on, created_on, is_deleted, integration_id, masked_api_key, is_sandbox].hash
|
131
131
|
end
|
132
132
|
|
133
133
|
# Builds the object from hash
|