smplkit 3.0.13 → 3.0.14

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.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/api_keys_api.rb +9 -0
  3. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/billing_api.rb +20 -2
  4. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_types_api.rb +9 -0
  5. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/context_values_api.rb +97 -0
  6. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/contexts_api.rb +16 -4
  7. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/environments_api.rb +9 -0
  8. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/invitations_api.rb +9 -0
  9. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/metrics_api.rb +27 -0
  10. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/plans_api.rb +9 -0
  11. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/products_api.rb +9 -0
  12. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/services_api.rb +9 -0
  13. data/lib/smplkit/_generated/app/lib/smplkit_app_client/api/users_api.rb +8 -17
  14. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/api_key_list_response.rb +30 -4
  15. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context.rb +12 -1
  16. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_list_response.rb +30 -4
  17. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_resource.rb +1 -1
  18. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_type_list_response.rb +30 -4
  19. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value.rb +166 -0
  20. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_list_response.rb +193 -0
  21. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/context_value_resource.rb +225 -0
  22. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/environment_list_response.rb +30 -4
  23. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invitation_list_response.rb +30 -4
  24. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/invoice_list_response.rb +30 -4
  25. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{user_list_meta.rb → list_meta.rb} +20 -19
  26. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_list_response.rb +30 -4
  27. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_names_response.rb +30 -4
  28. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/metric_rollup_list_response.rb +30 -4
  29. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/{page_meta.rb → pagination_meta.rb} +43 -75
  30. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/payment_method_list_response.rb +30 -4
  31. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/plan_list_response.rb +30 -4
  32. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/product_list_response.rb +30 -4
  33. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/service_list_response.rb +30 -4
  34. data/lib/smplkit/_generated/app/lib/smplkit_app_client/models/user_list_response.rb +18 -1
  35. data/lib/smplkit/_generated/app/lib/smplkit_app_client.rb +6 -2
  36. data/lib/smplkit/_generated/app/spec/api/api_keys_api_spec.rb +3 -0
  37. data/lib/smplkit/_generated/app/spec/api/billing_api_spec.rb +7 -1
  38. data/lib/smplkit/_generated/app/spec/api/context_types_api_spec.rb +3 -0
  39. data/lib/smplkit/_generated/app/spec/api/context_values_api_spec.rb +52 -0
  40. data/lib/smplkit/_generated/app/spec/api/contexts_api_spec.rb +6 -2
  41. data/lib/smplkit/_generated/app/spec/api/environments_api_spec.rb +3 -0
  42. data/lib/smplkit/_generated/app/spec/api/invitations_api_spec.rb +3 -0
  43. data/lib/smplkit/_generated/app/spec/api/metrics_api_spec.rb +9 -0
  44. data/lib/smplkit/_generated/app/spec/api/plans_api_spec.rb +3 -0
  45. data/lib/smplkit/_generated/app/spec/api/products_api_spec.rb +3 -0
  46. data/lib/smplkit/_generated/app/spec/api/services_api_spec.rb +3 -0
  47. data/lib/smplkit/_generated/app/spec/api/users_api_spec.rb +3 -2
  48. data/lib/smplkit/_generated/app/spec/models/api_key_list_response_spec.rb +6 -0
  49. data/lib/smplkit/_generated/app/spec/models/context_list_response_spec.rb +6 -0
  50. data/lib/smplkit/_generated/app/spec/models/context_spec.rb +6 -0
  51. data/lib/smplkit/_generated/app/spec/models/context_type_list_response_spec.rb +6 -0
  52. data/lib/smplkit/_generated/app/spec/models/context_value_list_response_spec.rb +42 -0
  53. data/lib/smplkit/_generated/app/spec/models/context_value_resource_spec.rb +52 -0
  54. data/lib/smplkit/_generated/app/spec/models/{user_list_meta_spec.rb → context_value_spec.rb} +7 -7
  55. data/lib/smplkit/_generated/app/spec/models/environment_list_response_spec.rb +6 -0
  56. data/lib/smplkit/_generated/app/spec/models/invitation_list_response_spec.rb +6 -0
  57. data/lib/smplkit/_generated/app/spec/models/invoice_list_response_spec.rb +6 -0
  58. data/lib/smplkit/_generated/app/spec/models/list_meta_spec.rb +36 -0
  59. data/lib/smplkit/_generated/app/spec/models/metric_list_response_spec.rb +6 -0
  60. data/lib/smplkit/_generated/app/spec/models/metric_names_response_spec.rb +6 -0
  61. data/lib/smplkit/_generated/app/spec/models/metric_rollup_list_response_spec.rb +6 -0
  62. data/lib/smplkit/_generated/app/spec/models/{page_meta_spec.rb → pagination_meta_spec.rb} +9 -9
  63. data/lib/smplkit/_generated/app/spec/models/payment_method_list_response_spec.rb +6 -0
  64. data/lib/smplkit/_generated/app/spec/models/plan_list_response_spec.rb +6 -0
  65. data/lib/smplkit/_generated/app/spec/models/product_list_response_spec.rb +6 -0
  66. data/lib/smplkit/_generated/app/spec/models/service_list_response_spec.rb +6 -0
  67. metadata +13 -5
@@ -14,13 +14,14 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::App
17
- class UserListMeta < ApiModelBase
18
- attr_accessor :page
17
+ # Top-level ``meta`` block included on every JSON:API list response.
18
+ class ListMeta < ApiModelBase
19
+ attr_accessor :pagination
19
20
 
20
21
  # Attribute mapping from ruby-style variable name to JSON key.
21
22
  def self.attribute_map
22
23
  {
23
- :'page' => :'page'
24
+ :'pagination' => :'pagination'
24
25
  }
25
26
  end
26
27
 
@@ -37,7 +38,7 @@ module SmplkitGeneratedClient::App
37
38
  # Attribute type mapping.
38
39
  def self.openapi_types
39
40
  {
40
- :'page' => :'PageMeta'
41
+ :'pagination' => :'PaginationMeta'
41
42
  }
42
43
  end
43
44
 
@@ -51,22 +52,22 @@ module SmplkitGeneratedClient::App
51
52
  # @param [Hash] attributes Model attributes in the form of hash
52
53
  def initialize(attributes = {})
53
54
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::UserListMeta` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::ListMeta` initialize method"
55
56
  end
56
57
 
57
58
  # check to see if the attribute exists and convert string to symbol for hash key
58
59
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
61
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::UserListMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::ListMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
63
  end
63
64
  h[k.to_sym] = v
64
65
  }
65
66
 
66
- if attributes.key?(:'page')
67
- self.page = attributes[:'page']
67
+ if attributes.key?(:'pagination')
68
+ self.pagination = attributes[:'pagination']
68
69
  else
69
- self.page = nil
70
+ self.pagination = nil
70
71
  end
71
72
  end
72
73
 
@@ -75,8 +76,8 @@ module SmplkitGeneratedClient::App
75
76
  def list_invalid_properties
76
77
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
78
  invalid_properties = Array.new
78
- if @page.nil?
79
- invalid_properties.push('invalid value for "page", page cannot be nil.')
79
+ if @pagination.nil?
80
+ invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
80
81
  end
81
82
 
82
83
  invalid_properties
@@ -86,18 +87,18 @@ module SmplkitGeneratedClient::App
86
87
  # @return true if the model is valid
87
88
  def valid?
88
89
  warn '[DEPRECATED] the `valid?` method is obsolete'
89
- return false if @page.nil?
90
+ return false if @pagination.nil?
90
91
  true
91
92
  end
92
93
 
93
94
  # Custom attribute writer method with validation
94
- # @param [Object] page Value to be assigned
95
- def page=(page)
96
- if page.nil?
97
- fail ArgumentError, 'page cannot be nil'
95
+ # @param [Object] pagination Value to be assigned
96
+ def pagination=(pagination)
97
+ if pagination.nil?
98
+ fail ArgumentError, 'pagination cannot be nil'
98
99
  end
99
100
 
100
- @page = page
101
+ @pagination = pagination
101
102
  end
102
103
 
103
104
  # Checks equality by comparing each attribute.
@@ -105,7 +106,7 @@ module SmplkitGeneratedClient::App
105
106
  def ==(o)
106
107
  return true if self.equal?(o)
107
108
  self.class == o.class &&
108
- page == o.page
109
+ pagination == o.pagination
109
110
  end
110
111
 
111
112
  # @see the `==` method
@@ -117,7 +118,7 @@ module SmplkitGeneratedClient::App
117
118
  # Calculates hash code according to all attributes.
118
119
  # @return [Integer] Hash code
119
120
  def hash
120
- [page].hash
121
+ [pagination].hash
121
122
  end
122
123
 
123
124
  # Builds the object from hash
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::App
18
18
  class MetricListResponse < ApiModelBase
19
19
  attr_accessor :data
20
20
 
21
+ attr_accessor :meta
22
+
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
24
- :'data' => :'data'
26
+ :'data' => :'data',
27
+ :'meta' => :'meta'
25
28
  }
26
29
  end
27
30
 
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::App
38
41
  # Attribute type mapping.
39
42
  def self.openapi_types
40
43
  {
41
- :'data' => :'Array<MetricResource>'
44
+ :'data' => :'Array<MetricResource>',
45
+ :'meta' => :'ListMeta'
42
46
  }
43
47
  end
44
48
 
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::App
71
75
  else
72
76
  self.data = nil
73
77
  end
78
+
79
+ if attributes.key?(:'meta')
80
+ self.meta = attributes[:'meta']
81
+ else
82
+ self.meta = nil
83
+ end
74
84
  end
75
85
 
76
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::App
82
92
  invalid_properties.push('invalid value for "data", data cannot be nil.')
83
93
  end
84
94
 
95
+ if @meta.nil?
96
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
97
+ end
98
+
85
99
  invalid_properties
86
100
  end
87
101
 
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::App
90
104
  def valid?
91
105
  warn '[DEPRECATED] the `valid?` method is obsolete'
92
106
  return false if @data.nil?
107
+ return false if @meta.nil?
93
108
  true
94
109
  end
95
110
 
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::App
103
118
  @data = data
104
119
  end
105
120
 
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] meta Value to be assigned
123
+ def meta=(meta)
124
+ if meta.nil?
125
+ fail ArgumentError, 'meta cannot be nil'
126
+ end
127
+
128
+ @meta = meta
129
+ end
130
+
106
131
  # Checks equality by comparing each attribute.
107
132
  # @param [Object] Object to be compared
108
133
  def ==(o)
109
134
  return true if self.equal?(o)
110
135
  self.class == o.class &&
111
- data == o.data
136
+ data == o.data &&
137
+ meta == o.meta
112
138
  end
113
139
 
114
140
  # @see the `==` method
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::App
120
146
  # Calculates hash code according to all attributes.
121
147
  # @return [Integer] Hash code
122
148
  def hash
123
- [data].hash
149
+ [data, meta].hash
124
150
  end
125
151
 
126
152
  # Builds the object from hash
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::App
18
18
  class MetricNamesResponse < ApiModelBase
19
19
  attr_accessor :data
20
20
 
21
+ attr_accessor :meta
22
+
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
24
- :'data' => :'data'
26
+ :'data' => :'data',
27
+ :'meta' => :'meta'
25
28
  }
26
29
  end
27
30
 
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::App
38
41
  # Attribute type mapping.
39
42
  def self.openapi_types
40
43
  {
41
- :'data' => :'Array<MetricNameItem>'
44
+ :'data' => :'Array<MetricNameItem>',
45
+ :'meta' => :'ListMeta'
42
46
  }
43
47
  end
44
48
 
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::App
71
75
  else
72
76
  self.data = nil
73
77
  end
78
+
79
+ if attributes.key?(:'meta')
80
+ self.meta = attributes[:'meta']
81
+ else
82
+ self.meta = nil
83
+ end
74
84
  end
75
85
 
76
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::App
82
92
  invalid_properties.push('invalid value for "data", data cannot be nil.')
83
93
  end
84
94
 
95
+ if @meta.nil?
96
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
97
+ end
98
+
85
99
  invalid_properties
86
100
  end
87
101
 
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::App
90
104
  def valid?
91
105
  warn '[DEPRECATED] the `valid?` method is obsolete'
92
106
  return false if @data.nil?
107
+ return false if @meta.nil?
93
108
  true
94
109
  end
95
110
 
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::App
103
118
  @data = data
104
119
  end
105
120
 
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] meta Value to be assigned
123
+ def meta=(meta)
124
+ if meta.nil?
125
+ fail ArgumentError, 'meta cannot be nil'
126
+ end
127
+
128
+ @meta = meta
129
+ end
130
+
106
131
  # Checks equality by comparing each attribute.
107
132
  # @param [Object] Object to be compared
108
133
  def ==(o)
109
134
  return true if self.equal?(o)
110
135
  self.class == o.class &&
111
- data == o.data
136
+ data == o.data &&
137
+ meta == o.meta
112
138
  end
113
139
 
114
140
  # @see the `==` method
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::App
120
146
  # Calculates hash code according to all attributes.
121
147
  # @return [Integer] Hash code
122
148
  def hash
123
- [data].hash
149
+ [data, meta].hash
124
150
  end
125
151
 
126
152
  # Builds the object from hash
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::App
18
18
  class MetricRollupListResponse < ApiModelBase
19
19
  attr_accessor :data
20
20
 
21
+ attr_accessor :meta
22
+
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
24
- :'data' => :'data'
26
+ :'data' => :'data',
27
+ :'meta' => :'meta'
25
28
  }
26
29
  end
27
30
 
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::App
38
41
  # Attribute type mapping.
39
42
  def self.openapi_types
40
43
  {
41
- :'data' => :'Array<MetricRollupResource>'
44
+ :'data' => :'Array<MetricRollupResource>',
45
+ :'meta' => :'ListMeta'
42
46
  }
43
47
  end
44
48
 
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::App
71
75
  else
72
76
  self.data = nil
73
77
  end
78
+
79
+ if attributes.key?(:'meta')
80
+ self.meta = attributes[:'meta']
81
+ else
82
+ self.meta = nil
83
+ end
74
84
  end
75
85
 
76
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::App
82
92
  invalid_properties.push('invalid value for "data", data cannot be nil.')
83
93
  end
84
94
 
95
+ if @meta.nil?
96
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
97
+ end
98
+
85
99
  invalid_properties
86
100
  end
87
101
 
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::App
90
104
  def valid?
91
105
  warn '[DEPRECATED] the `valid?` method is obsolete'
92
106
  return false if @data.nil?
107
+ return false if @meta.nil?
93
108
  true
94
109
  end
95
110
 
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::App
103
118
  @data = data
104
119
  end
105
120
 
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] meta Value to be assigned
123
+ def meta=(meta)
124
+ if meta.nil?
125
+ fail ArgumentError, 'meta cannot be nil'
126
+ end
127
+
128
+ @meta = meta
129
+ end
130
+
106
131
  # Checks equality by comparing each attribute.
107
132
  # @param [Object] Object to be compared
108
133
  def ==(o)
109
134
  return true if self.equal?(o)
110
135
  self.class == o.class &&
111
- data == o.data
136
+ data == o.data &&
137
+ meta == o.meta
112
138
  end
113
139
 
114
140
  # @see the `==` method
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::App
120
146
  # Calculates hash code according to all attributes.
121
147
  # @return [Integer] Hash code
122
148
  def hash
123
- [data].hash
149
+ [data, meta].hash
124
150
  end
125
151
 
126
152
  # Builds the object from hash
@@ -14,26 +14,26 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module SmplkitGeneratedClient::App
17
- # Pagination metadata returned with a collection response.
18
- class PageMeta < ApiModelBase
19
- # Page size used for this response.
20
- attr_accessor :size
21
-
17
+ # Pagination block returned inside ``meta`` on every list response. ``page`` and ``size`` are always present and echo the parameters that served the response (their defaults when the client omitted them). ``total`` and ``total_pages`` are present only when the request included ``meta[total]=true``.
18
+ class PaginationMeta < ApiModelBase
22
19
  # 1-based page number returned.
23
- attr_accessor :number
20
+ attr_accessor :page
24
21
 
25
- # Total number of matching items across all pages.
26
- attr_accessor :total_items
22
+ # Number of items per page.
23
+ attr_accessor :size
27
24
 
28
- # Total number of pages at the current page size.
25
+ # Total number of matching items across all pages. Present only when the request included `meta[total]=true`.
26
+ attr_accessor :total
27
+
28
+ # Total number of pages at the requested page size. Present only when the request included `meta[total]=true`.
29
29
  attr_accessor :total_pages
30
30
 
31
31
  # Attribute mapping from ruby-style variable name to JSON key.
32
32
  def self.attribute_map
33
33
  {
34
+ :'page' => :'page',
34
35
  :'size' => :'size',
35
- :'number' => :'number',
36
- :'total_items' => :'total_items',
36
+ :'total' => :'total',
37
37
  :'total_pages' => :'total_pages'
38
38
  }
39
39
  end
@@ -51,9 +51,9 @@ module SmplkitGeneratedClient::App
51
51
  # Attribute type mapping.
52
52
  def self.openapi_types
53
53
  {
54
+ :'page' => :'Integer',
54
55
  :'size' => :'Integer',
55
- :'number' => :'Integer',
56
- :'total_items' => :'Integer',
56
+ :'total' => :'Integer',
57
57
  :'total_pages' => :'Integer'
58
58
  }
59
59
  end
@@ -61,6 +61,8 @@ module SmplkitGeneratedClient::App
61
61
  # List of attributes with nullable: true
62
62
  def self.openapi_nullable
63
63
  Set.new([
64
+ :'total',
65
+ :'total_pages'
64
66
  ])
65
67
  end
66
68
 
@@ -68,40 +70,36 @@ module SmplkitGeneratedClient::App
68
70
  # @param [Hash] attributes Model attributes in the form of hash
69
71
  def initialize(attributes = {})
70
72
  if (!attributes.is_a?(Hash))
71
- fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::PageMeta` initialize method"
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::App::PaginationMeta` initialize method"
72
74
  end
73
75
 
74
76
  # check to see if the attribute exists and convert string to symbol for hash key
75
77
  acceptable_attribute_map = self.class.acceptable_attribute_map
76
78
  attributes = attributes.each_with_object({}) { |(k, v), h|
77
79
  if (!acceptable_attribute_map.key?(k.to_sym))
78
- fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::PageMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::App::PaginationMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
81
  end
80
82
  h[k.to_sym] = v
81
83
  }
82
84
 
83
- if attributes.key?(:'size')
84
- self.size = attributes[:'size']
85
+ if attributes.key?(:'page')
86
+ self.page = attributes[:'page']
85
87
  else
86
- self.size = nil
88
+ self.page = nil
87
89
  end
88
90
 
89
- if attributes.key?(:'number')
90
- self.number = attributes[:'number']
91
+ if attributes.key?(:'size')
92
+ self.size = attributes[:'size']
91
93
  else
92
- self.number = nil
94
+ self.size = nil
93
95
  end
94
96
 
95
- if attributes.key?(:'total_items')
96
- self.total_items = attributes[:'total_items']
97
- else
98
- self.total_items = nil
97
+ if attributes.key?(:'total')
98
+ self.total = attributes[:'total']
99
99
  end
100
100
 
101
101
  if attributes.key?(:'total_pages')
102
102
  self.total_pages = attributes[:'total_pages']
103
- else
104
- self.total_pages = nil
105
103
  end
106
104
  end
107
105
 
@@ -110,20 +108,12 @@ module SmplkitGeneratedClient::App
110
108
  def list_invalid_properties
111
109
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
110
  invalid_properties = Array.new
113
- if @size.nil?
114
- invalid_properties.push('invalid value for "size", size cannot be nil.')
115
- end
116
-
117
- if @number.nil?
118
- invalid_properties.push('invalid value for "number", number cannot be nil.')
119
- end
120
-
121
- if @total_items.nil?
122
- invalid_properties.push('invalid value for "total_items", total_items cannot be nil.')
111
+ if @page.nil?
112
+ invalid_properties.push('invalid value for "page", page cannot be nil.')
123
113
  end
124
114
 
125
- if @total_pages.nil?
126
- invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
115
+ if @size.nil?
116
+ invalid_properties.push('invalid value for "size", size cannot be nil.')
127
117
  end
128
118
 
129
119
  invalid_properties
@@ -133,51 +123,29 @@ module SmplkitGeneratedClient::App
133
123
  # @return true if the model is valid
134
124
  def valid?
135
125
  warn '[DEPRECATED] the `valid?` method is obsolete'
126
+ return false if @page.nil?
136
127
  return false if @size.nil?
137
- return false if @number.nil?
138
- return false if @total_items.nil?
139
- return false if @total_pages.nil?
140
128
  true
141
129
  end
142
130
 
143
131
  # Custom attribute writer method with validation
144
- # @param [Object] size Value to be assigned
145
- def size=(size)
146
- if size.nil?
147
- fail ArgumentError, 'size cannot be nil'
148
- end
149
-
150
- @size = size
151
- end
152
-
153
- # Custom attribute writer method with validation
154
- # @param [Object] number Value to be assigned
155
- def number=(number)
156
- if number.nil?
157
- fail ArgumentError, 'number cannot be nil'
132
+ # @param [Object] page Value to be assigned
133
+ def page=(page)
134
+ if page.nil?
135
+ fail ArgumentError, 'page cannot be nil'
158
136
  end
159
137
 
160
- @number = number
138
+ @page = page
161
139
  end
162
140
 
163
141
  # Custom attribute writer method with validation
164
- # @param [Object] total_items Value to be assigned
165
- def total_items=(total_items)
166
- if total_items.nil?
167
- fail ArgumentError, 'total_items cannot be nil'
168
- end
169
-
170
- @total_items = total_items
171
- end
172
-
173
- # Custom attribute writer method with validation
174
- # @param [Object] total_pages Value to be assigned
175
- def total_pages=(total_pages)
176
- if total_pages.nil?
177
- fail ArgumentError, 'total_pages cannot be nil'
142
+ # @param [Object] size Value to be assigned
143
+ def size=(size)
144
+ if size.nil?
145
+ fail ArgumentError, 'size cannot be nil'
178
146
  end
179
147
 
180
- @total_pages = total_pages
148
+ @size = size
181
149
  end
182
150
 
183
151
  # Checks equality by comparing each attribute.
@@ -185,9 +153,9 @@ module SmplkitGeneratedClient::App
185
153
  def ==(o)
186
154
  return true if self.equal?(o)
187
155
  self.class == o.class &&
156
+ page == o.page &&
188
157
  size == o.size &&
189
- number == o.number &&
190
- total_items == o.total_items &&
158
+ total == o.total &&
191
159
  total_pages == o.total_pages
192
160
  end
193
161
 
@@ -200,7 +168,7 @@ module SmplkitGeneratedClient::App
200
168
  # Calculates hash code according to all attributes.
201
169
  # @return [Integer] Hash code
202
170
  def hash
203
- [size, number, total_items, total_pages].hash
171
+ [page, size, total, total_pages].hash
204
172
  end
205
173
 
206
174
  # Builds the object from hash
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::App
18
18
  class PaymentMethodListResponse < ApiModelBase
19
19
  attr_accessor :data
20
20
 
21
+ attr_accessor :meta
22
+
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
24
- :'data' => :'data'
26
+ :'data' => :'data',
27
+ :'meta' => :'meta'
25
28
  }
26
29
  end
27
30
 
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::App
38
41
  # Attribute type mapping.
39
42
  def self.openapi_types
40
43
  {
41
- :'data' => :'Array<PaymentMethodResource>'
44
+ :'data' => :'Array<PaymentMethodResource>',
45
+ :'meta' => :'ListMeta'
42
46
  }
43
47
  end
44
48
 
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::App
71
75
  else
72
76
  self.data = nil
73
77
  end
78
+
79
+ if attributes.key?(:'meta')
80
+ self.meta = attributes[:'meta']
81
+ else
82
+ self.meta = nil
83
+ end
74
84
  end
75
85
 
76
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::App
82
92
  invalid_properties.push('invalid value for "data", data cannot be nil.')
83
93
  end
84
94
 
95
+ if @meta.nil?
96
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
97
+ end
98
+
85
99
  invalid_properties
86
100
  end
87
101
 
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::App
90
104
  def valid?
91
105
  warn '[DEPRECATED] the `valid?` method is obsolete'
92
106
  return false if @data.nil?
107
+ return false if @meta.nil?
93
108
  true
94
109
  end
95
110
 
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::App
103
118
  @data = data
104
119
  end
105
120
 
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] meta Value to be assigned
123
+ def meta=(meta)
124
+ if meta.nil?
125
+ fail ArgumentError, 'meta cannot be nil'
126
+ end
127
+
128
+ @meta = meta
129
+ end
130
+
106
131
  # Checks equality by comparing each attribute.
107
132
  # @param [Object] Object to be compared
108
133
  def ==(o)
109
134
  return true if self.equal?(o)
110
135
  self.class == o.class &&
111
- data == o.data
136
+ data == o.data &&
137
+ meta == o.meta
112
138
  end
113
139
 
114
140
  # @see the `==` method
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::App
120
146
  # Calculates hash code according to all attributes.
121
147
  # @return [Integer] Hash code
122
148
  def hash
123
- [data].hash
149
+ [data, meta].hash
124
150
  end
125
151
 
126
152
  # Builds the object from hash