talon_one 1.1.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +21 -12
  3. data/docs/AccountAnalytics.md +1 -0
  4. data/docs/AccountLimits.md +1 -0
  5. data/docs/Application.md +2 -1
  6. data/docs/ApplicationCustomer.md +1 -1
  7. data/docs/ApplicationSession.md +2 -1
  8. data/docs/Attribute.md +0 -2
  9. data/docs/AttributesMandatory.md +9 -0
  10. data/docs/AttributesSettings.md +8 -0
  11. data/docs/BaseSamlConnection.md +15 -0
  12. data/docs/Campaign.md +2 -0
  13. data/docs/CampaignAnalytics.md +9 -3
  14. data/docs/CampaignCopy.md +4 -0
  15. data/docs/Change.md +2 -2
  16. data/docs/CustomerInventory.md +9 -0
  17. data/docs/CustomerProfile.md +1 -1
  18. data/docs/ErrorSource.md +1 -0
  19. data/docs/Event.md +1 -1
  20. data/docs/InlineResponse20020.md +1 -1
  21. data/docs/InlineResponse20021.md +1 -1
  22. data/docs/InlineResponse20022.md +1 -1
  23. data/docs/InlineResponse20023.md +1 -1
  24. data/docs/InlineResponse20024.md +1 -1
  25. data/docs/InlineResponse20025.md +1 -1
  26. data/docs/InlineResponse20026.md +3 -2
  27. data/docs/InlineResponse20027.md +1 -1
  28. data/docs/InlineResponse20028.md +1 -1
  29. data/docs/InlineResponse20029.md +9 -0
  30. data/docs/IntegrationApi.md +66 -0
  31. data/docs/IntegrationEvent.md +10 -0
  32. data/docs/IntegrationState.md +1 -0
  33. data/docs/ManagementApi.md +175 -104
  34. data/docs/Meta.md +1 -0
  35. data/docs/NewApplication.md +2 -1
  36. data/docs/NewEvent.md +1 -1
  37. data/docs/NewSamlConnection.md +16 -0
  38. data/docs/Notification.md +10 -0
  39. data/docs/{ApplicationStorageData.md → Notifications.md} +1 -1
  40. data/docs/ReferralRejectionReason.md +10 -0
  41. data/docs/SamlConnection.md +18 -0
  42. data/docs/SamlConnectionMetadata.md +11 -0
  43. data/docs/UpdateApplication.md +15 -0
  44. data/docs/UpdateUser.md +1 -0
  45. data/docs/User.md +2 -0
  46. data/docs/Webhook.md +0 -1
  47. data/lib/talon_one.rb +13 -6
  48. data/lib/talon_one/api/integration_api.rb +60 -0
  49. data/lib/talon_one/api/management_api.rb +194 -121
  50. data/lib/talon_one/models/account_analytics.rb +19 -4
  51. data/lib/talon_one/models/account_limits.rb +11 -1
  52. data/lib/talon_one/models/application.rb +62 -53
  53. data/lib/talon_one/models/application_customer.rb +0 -5
  54. data/lib/talon_one/models/application_session.rb +12 -2
  55. data/lib/talon_one/models/attribute.rb +4 -38
  56. data/lib/talon_one/models/attributes_mandatory.rb +199 -0
  57. data/lib/talon_one/models/{new_application_storage_data.rb → attributes_settings.rb} +13 -4
  58. data/lib/talon_one/models/{application_storage.rb → base_saml_connection.rb} +122 -78
  59. data/lib/talon_one/models/campaign.rb +21 -1
  60. data/lib/talon_one/models/campaign_analytics.rb +94 -4
  61. data/lib/talon_one/models/campaign_copy.rb +46 -4
  62. data/lib/talon_one/models/change.rb +2 -2
  63. data/lib/talon_one/models/coupon_rejection_reason.rb +2 -2
  64. data/lib/talon_one/models/customer_inventory.rb +194 -0
  65. data/lib/talon_one/models/customer_profile.rb +0 -5
  66. data/lib/talon_one/models/error_source.rb +14 -4
  67. data/lib/talon_one/models/event.rb +11 -35
  68. data/lib/talon_one/models/inline_response_200_20.rb +1 -1
  69. data/lib/talon_one/models/inline_response_200_21.rb +1 -1
  70. data/lib/talon_one/models/inline_response_200_22.rb +1 -1
  71. data/lib/talon_one/models/inline_response_200_23.rb +1 -1
  72. data/lib/talon_one/models/inline_response_200_24.rb +1 -1
  73. data/lib/talon_one/models/inline_response_200_25.rb +1 -1
  74. data/lib/talon_one/models/inline_response_200_26.rb +11 -7
  75. data/lib/talon_one/models/inline_response_200_27.rb +1 -1
  76. data/lib/talon_one/models/inline_response_200_28.rb +1 -1
  77. data/lib/talon_one/models/{new_application_storage_tuple.rb → inline_response_200_29.rb} +22 -40
  78. data/lib/talon_one/models/integration_event.rb +234 -0
  79. data/lib/talon_one/models/integration_state.rb +13 -4
  80. data/lib/talon_one/models/limit_config.rb +2 -2
  81. data/lib/talon_one/models/meta.rb +10 -1
  82. data/lib/talon_one/models/new_application.rb +57 -56
  83. data/lib/talon_one/models/new_event.rb +38 -38
  84. data/lib/talon_one/models/new_saml_connection.rb +371 -0
  85. data/lib/talon_one/models/{new_application_storage.rb → notification.rb} +22 -17
  86. data/lib/talon_one/models/{application_storage_data.rb → notifications.rb} +1 -2
  87. data/lib/talon_one/models/referral_rejection_reason.rb +251 -0
  88. data/lib/talon_one/models/saml_connection.rb +387 -0
  89. data/lib/talon_one/models/{application_storage_tuple.rb → saml_connection_metadata.rb} +68 -80
  90. data/lib/talon_one/models/update_application.rb +361 -0
  91. data/lib/talon_one/models/update_user.rb +13 -4
  92. data/lib/talon_one/models/user.rb +23 -4
  93. data/lib/talon_one/models/webhook.rb +4 -21
  94. data/lib/talon_one/version.rb +1 -1
  95. data/spec/api/integration_api_spec.rb +14 -0
  96. data/spec/api/management_api_spec.rb +56 -37
  97. data/spec/models/account_analytics_spec.rb +6 -0
  98. data/spec/models/account_limits_spec.rb +6 -0
  99. data/spec/models/application_session_spec.rb +6 -0
  100. data/spec/models/application_spec.rb +12 -6
  101. data/spec/models/attribute_spec.rb +0 -12
  102. data/spec/models/{new_application_storage_tuple_spec.rb → attributes_mandatory_spec.rb} +8 -8
  103. data/spec/models/{new_application_storage_data_spec.rb → attributes_settings_spec.rb} +12 -6
  104. data/spec/models/{application_storage_spec.rb → base_saml_connection_spec.rb} +14 -14
  105. data/spec/models/campaign_analytics_spec.rb +36 -0
  106. data/spec/models/campaign_copy_spec.rb +24 -0
  107. data/spec/models/campaign_spec.rb +12 -0
  108. data/spec/models/coupon_rejection_reason_spec.rb +1 -1
  109. data/spec/models/customer_inventory_spec.rb +47 -0
  110. data/spec/models/error_source_spec.rb +6 -0
  111. data/spec/models/event_spec.rb +3 -3
  112. data/spec/models/inline_response_200_26_spec.rb +6 -0
  113. data/spec/models/inline_response_200_29_spec.rb +47 -0
  114. data/spec/models/integration_event_spec.rb +53 -0
  115. data/spec/models/integration_state_spec.rb +6 -0
  116. data/spec/models/limit_config_spec.rb +1 -1
  117. data/spec/models/meta_spec.rb +6 -0
  118. data/spec/models/new_application_spec.rb +12 -6
  119. data/spec/models/new_event_spec.rb +3 -3
  120. data/spec/models/new_saml_connection_spec.rb +89 -0
  121. data/spec/models/{new_application_storage_spec.rb → notification_spec.rb} +8 -8
  122. data/spec/models/{application_storage_data_spec.rb → notifications_spec.rb} +6 -6
  123. data/spec/models/referral_rejection_reason_spec.rb +57 -0
  124. data/spec/models/{application_storage_tuple_spec.rb → saml_connection_metadata_spec.rb} +10 -22
  125. data/spec/models/saml_connection_spec.rb +101 -0
  126. data/spec/models/update_application_spec.rb +87 -0
  127. data/spec/models/update_user_spec.rb +6 -0
  128. data/spec/models/user_spec.rb +12 -0
  129. data/spec/models/webhook_spec.rb +0 -6
  130. data/talon_one-1.0.0.gem +0 -0
  131. data/talon_one-1.1.0.gem +0 -0
  132. data/talon_one-1.1.1.gem +0 -0
  133. data/talon_one-1.1.2.gem +0 -0
  134. data/talon_one-1.2.0.gem +0 -0
  135. data/talon_one-1.3.0.gem +0 -0
  136. data/talon_one.gemspec +1 -1
  137. metadata +74 -42
  138. data/docs/ApplicationStorage.md +0 -15
  139. data/docs/ApplicationStorageTuple.md +0 -13
  140. data/docs/NewApplicationStorage.md +0 -10
  141. data/docs/NewApplicationStorageData.md +0 -7
  142. data/docs/NewApplicationStorageTuple.md +0 -9
  143. data/fck.rb +0 -64
@@ -0,0 +1,199 @@
1
+ =begin
2
+ #Talon.One API
3
+
4
+ #The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put
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.7
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TalonOne
16
+ # Arbitrary settings associated with attributes.
17
+ class AttributesMandatory
18
+ # List of mandatory attributes for campaigns.
19
+ attr_accessor :campaigns
20
+
21
+ # List of mandatory attributes for campaigns.
22
+ attr_accessor :coupons
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'campaigns' => :'campaigns',
28
+ :'coupons' => :'coupons'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'campaigns' => :'Array<String>',
36
+ :'coupons' => :'Array<String>'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
47
+
48
+ if attributes.has_key?(:'campaigns')
49
+ if (value = attributes[:'campaigns']).is_a?(Array)
50
+ self.campaigns = value
51
+ end
52
+ end
53
+
54
+ if attributes.has_key?(:'coupons')
55
+ if (value = attributes[:'coupons']).is_a?(Array)
56
+ self.coupons = value
57
+ end
58
+ end
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properties with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ true
72
+ end
73
+
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ campaigns == o.campaigns &&
80
+ coupons == o.coupons
81
+ end
82
+
83
+ # @see the `==` method
84
+ # @param [Object] Object to be compared
85
+ def eql?(o)
86
+ self == o
87
+ end
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Fixnum] Hash code
91
+ def hash
92
+ [campaigns, coupons].hash
93
+ end
94
+
95
+ # Builds the object from hash
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @return [Object] Returns the model itself
98
+ def build_from_hash(attributes)
99
+ return nil unless attributes.is_a?(Hash)
100
+ self.class.swagger_types.each_pair do |key, type|
101
+ if type =~ /\AArray<(.*)>/i
102
+ # check to ensure the input is an array given that the the attribute
103
+ # is documented as an array but the input is not
104
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
105
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
106
+ end
107
+ elsif !attributes[self.class.attribute_map[key]].nil?
108
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
109
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
110
+ end
111
+
112
+ self
113
+ end
114
+
115
+ # Deserializes the data based on type
116
+ # @param string type Data type
117
+ # @param string value Value to be deserialized
118
+ # @return [Object] Deserialized data
119
+ def _deserialize(type, value)
120
+ case type.to_sym
121
+ when :DateTime
122
+ DateTime.parse(value)
123
+ when :Date
124
+ Date.parse(value)
125
+ when :String
126
+ value.to_s
127
+ when :Integer
128
+ value.to_i
129
+ when :Float
130
+ value.to_f
131
+ when :BOOLEAN
132
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
133
+ true
134
+ else
135
+ false
136
+ end
137
+ when :Object
138
+ # generic object (usually a Hash), return directly
139
+ value
140
+ when /\AArray<(?<inner_type>.+)>\z/
141
+ inner_type = Regexp.last_match[:inner_type]
142
+ value.map { |v| _deserialize(inner_type, v) }
143
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
144
+ k_type = Regexp.last_match[:k_type]
145
+ v_type = Regexp.last_match[:v_type]
146
+ {}.tap do |hash|
147
+ value.each do |k, v|
148
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
149
+ end
150
+ end
151
+ else # model
152
+ temp_model = TalonOne.const_get(type).new
153
+ temp_model.build_from_hash(value)
154
+ end
155
+ end
156
+
157
+ # Returns the string representation of the object
158
+ # @return [String] String presentation of the object
159
+ def to_s
160
+ to_hash.to_s
161
+ end
162
+
163
+ # to_body is an alias to to_hash (backward compatibility)
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_body
166
+ to_hash
167
+ end
168
+
169
+ # Returns the object in the form of hash
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_hash
172
+ hash = {}
173
+ self.class.attribute_map.each_pair do |attr, param|
174
+ value = self.send(attr)
175
+ next if value.nil?
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ # Outputs non-array value in the form of hash
182
+ # For object, use to_hash. Otherwise, just return the value
183
+ # @param [Object] value Any valid value
184
+ # @return [Hash] Returns the value in the form of hash
185
+ def _to_hash(value)
186
+ if value.is_a?(Array)
187
+ value.compact.map { |v| _to_hash(v) }
188
+ elsif value.is_a?(Hash)
189
+ {}.tap do |hash|
190
+ value.each { |k, v| hash[k] = _to_hash(v) }
191
+ end
192
+ elsif value.respond_to? :to_hash
193
+ value.to_hash
194
+ else
195
+ value
196
+ end
197
+ end
198
+ end
199
+ end
@@ -13,17 +13,21 @@ Swagger Codegen version: 2.4.7
13
13
  require 'date'
14
14
 
15
15
  module TalonOne
16
- # Array of ApplicationStorageData to be created.
17
- class NewApplicationStorageData
16
+ # Arbitrary settings associated with attributes.
17
+ class AttributesSettings
18
+ attr_accessor :mandatory
19
+
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
23
+ :'mandatory' => :'mandatory'
21
24
  }
22
25
  end
23
26
 
24
27
  # Attribute type mapping.
25
28
  def self.swagger_types
26
29
  {
30
+ :'mandatory' => :'AttributesMandatory'
27
31
  }
28
32
  end
29
33
 
@@ -34,6 +38,10 @@ module TalonOne
34
38
 
35
39
  # convert string to symbol for hash key
36
40
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
41
+
42
+ if attributes.has_key?(:'mandatory')
43
+ self.mandatory = attributes[:'mandatory']
44
+ end
37
45
  end
38
46
 
39
47
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -53,7 +61,8 @@ module TalonOne
53
61
  # @param [Object] Object to be compared
54
62
  def ==(o)
55
63
  return true if self.equal?(o)
56
- self.class == o.class
64
+ self.class == o.class &&
65
+ mandatory == o.mandatory
57
66
  end
58
67
 
59
68
  # @see the `==` method
@@ -65,7 +74,7 @@ module TalonOne
65
74
  # Calculates hash code according to all attributes.
66
75
  # @return [Fixnum] Hash code
67
76
  def hash
68
- [].hash
77
+ [mandatory].hash
69
78
  end
70
79
 
71
80
  # Builds the object from hash
@@ -13,57 +13,56 @@ Swagger Codegen version: 2.4.7
13
13
  require 'date'
14
14
 
15
15
  module TalonOne
16
- #
17
- class ApplicationStorage
18
- # Unique ID for this entity.
19
- attr_accessor :id
16
+ class BaseSamlConnection
17
+ # The ID of the account that owns this entity.
18
+ attr_accessor :account_id
20
19
 
21
- # The exact moment this entity was created.
22
- attr_accessor :created
20
+ # ID of the SAML service.
21
+ attr_accessor :name
23
22
 
24
- # The exact moment this entity was last modified.
25
- attr_accessor :modified
23
+ # Determines if this SAML connection active.
24
+ attr_accessor :enabled
26
25
 
27
- # The ID of the application that owns this entity.
28
- attr_accessor :application_id
26
+ # Identity Provider Entity ID.
27
+ attr_accessor :issuer
29
28
 
30
- # Identifier for the information to be saved, e.g. \"Loyalty points for SKU\".
31
- attr_accessor :name
29
+ # Single Sign-On URL.
30
+ attr_accessor :sign_on_url
32
31
 
33
- # A JSON Schema describing the information to be saved in the storage
34
- attr_accessor :datatype
32
+ # Single Sign-Out URL.
33
+ attr_accessor :sign_out_url
35
34
 
36
- # Description of the application store
37
- attr_accessor :description
35
+ # Metadata URL.
36
+ attr_accessor :metadata_url
38
37
 
39
- # array of rulesets where the application storage is used
40
- attr_accessor :used_at
38
+ # The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used.
39
+ attr_accessor :audience_uri
41
40
 
42
41
  # Attribute mapping from ruby-style variable name to JSON key.
43
42
  def self.attribute_map
44
43
  {
45
- :'id' => :'id',
46
- :'created' => :'created',
47
- :'modified' => :'modified',
48
- :'application_id' => :'applicationId',
44
+ :'account_id' => :'accountId',
49
45
  :'name' => :'name',
50
- :'datatype' => :'datatype',
51
- :'description' => :'description',
52
- :'used_at' => :'usedAt'
46
+ :'enabled' => :'enabled',
47
+ :'issuer' => :'issuer',
48
+ :'sign_on_url' => :'signOnURL',
49
+ :'sign_out_url' => :'signOutURL',
50
+ :'metadata_url' => :'metadataURL',
51
+ :'audience_uri' => :'audienceURI'
53
52
  }
54
53
  end
55
54
 
56
55
  # Attribute type mapping.
57
56
  def self.swagger_types
58
57
  {
59
- :'id' => :'Integer',
60
- :'created' => :'DateTime',
61
- :'modified' => :'DateTime',
62
- :'application_id' => :'Integer',
58
+ :'account_id' => :'Integer',
63
59
  :'name' => :'String',
64
- :'datatype' => :'Object',
65
- :'description' => :'String',
66
- :'used_at' => :'Array<String>'
60
+ :'enabled' => :'BOOLEAN',
61
+ :'issuer' => :'String',
62
+ :'sign_on_url' => :'String',
63
+ :'sign_out_url' => :'String',
64
+ :'metadata_url' => :'String',
65
+ :'audience_uri' => :'String'
67
66
  }
68
67
  end
69
68
 
@@ -75,38 +74,36 @@ module TalonOne
75
74
  # convert string to symbol for hash key
76
75
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
77
76
 
78
- if attributes.has_key?(:'id')
79
- self.id = attributes[:'id']
77
+ if attributes.has_key?(:'accountId')
78
+ self.account_id = attributes[:'accountId']
80
79
  end
81
80
 
82
- if attributes.has_key?(:'created')
83
- self.created = attributes[:'created']
81
+ if attributes.has_key?(:'name')
82
+ self.name = attributes[:'name']
84
83
  end
85
84
 
86
- if attributes.has_key?(:'modified')
87
- self.modified = attributes[:'modified']
85
+ if attributes.has_key?(:'enabled')
86
+ self.enabled = attributes[:'enabled']
88
87
  end
89
88
 
90
- if attributes.has_key?(:'applicationId')
91
- self.application_id = attributes[:'applicationId']
89
+ if attributes.has_key?(:'issuer')
90
+ self.issuer = attributes[:'issuer']
92
91
  end
93
92
 
94
- if attributes.has_key?(:'name')
95
- self.name = attributes[:'name']
93
+ if attributes.has_key?(:'signOnURL')
94
+ self.sign_on_url = attributes[:'signOnURL']
96
95
  end
97
96
 
98
- if attributes.has_key?(:'datatype')
99
- self.datatype = attributes[:'datatype']
97
+ if attributes.has_key?(:'signOutURL')
98
+ self.sign_out_url = attributes[:'signOutURL']
100
99
  end
101
100
 
102
- if attributes.has_key?(:'description')
103
- self.description = attributes[:'description']
101
+ if attributes.has_key?(:'metadataURL')
102
+ self.metadata_url = attributes[:'metadataURL']
104
103
  end
105
104
 
106
- if attributes.has_key?(:'usedAt')
107
- if (value = attributes[:'usedAt']).is_a?(Array)
108
- self.used_at = value
109
- end
105
+ if attributes.has_key?(:'audienceURI')
106
+ self.audience_uri = attributes[:'audienceURI']
110
107
  end
111
108
  end
112
109
 
@@ -114,32 +111,36 @@ module TalonOne
114
111
  # @return Array for valid properties with the reasons
115
112
  def list_invalid_properties
116
113
  invalid_properties = Array.new
117
- if @id.nil?
118
- invalid_properties.push('invalid value for "id", id cannot be nil.')
114
+ if @account_id.nil?
115
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
116
+ end
117
+
118
+ if @name.nil?
119
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
119
120
  end
120
121
 
121
- if @created.nil?
122
- invalid_properties.push('invalid value for "created", created cannot be nil.')
122
+ if @name.to_s.length < 1
123
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
123
124
  end
124
125
 
125
- if @modified.nil?
126
- invalid_properties.push('invalid value for "modified", modified cannot be nil.')
126
+ if @enabled.nil?
127
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
127
128
  end
128
129
 
129
- if @application_id.nil?
130
- invalid_properties.push('invalid value for "application_id", application_id cannot be nil.')
130
+ if @issuer.nil?
131
+ invalid_properties.push('invalid value for "issuer", issuer cannot be nil.')
131
132
  end
132
133
 
133
- if @name.nil?
134
- invalid_properties.push('invalid value for "name", name cannot be nil.')
134
+ if @issuer.to_s.length < 1
135
+ invalid_properties.push('invalid value for "issuer", the character length must be great than or equal to 1.')
135
136
  end
136
137
 
137
- if @datatype.nil?
138
- invalid_properties.push('invalid value for "datatype", datatype cannot be nil.')
138
+ if @sign_on_url.nil?
139
+ invalid_properties.push('invalid value for "sign_on_url", sign_on_url cannot be nil.')
139
140
  end
140
141
 
141
- if @used_at.nil?
142
- invalid_properties.push('invalid value for "used_at", used_at cannot be nil.')
142
+ if @sign_on_url.to_s.length < 1
143
+ invalid_properties.push('invalid value for "sign_on_url", the character length must be great than or equal to 1.')
143
144
  end
144
145
 
145
146
  invalid_properties
@@ -148,29 +149,72 @@ module TalonOne
148
149
  # Check to see if the all the properties in the model are valid
149
150
  # @return true if the model is valid
150
151
  def valid?
151
- return false if @id.nil?
152
- return false if @created.nil?
153
- return false if @modified.nil?
154
- return false if @application_id.nil?
152
+ return false if @account_id.nil?
155
153
  return false if @name.nil?
156
- return false if @datatype.nil?
157
- return false if @used_at.nil?
154
+ return false if @name.to_s.length < 1
155
+ return false if @enabled.nil?
156
+ return false if @issuer.nil?
157
+ return false if @issuer.to_s.length < 1
158
+ return false if @sign_on_url.nil?
159
+ return false if @sign_on_url.to_s.length < 1
158
160
  true
159
161
  end
160
162
 
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] name Value to be assigned
165
+ def name=(name)
166
+ if name.nil?
167
+ fail ArgumentError, 'name cannot be nil'
168
+ end
169
+
170
+ if name.to_s.length < 1
171
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
172
+ end
173
+
174
+ @name = name
175
+ end
176
+
177
+ # Custom attribute writer method with validation
178
+ # @param [Object] issuer Value to be assigned
179
+ def issuer=(issuer)
180
+ if issuer.nil?
181
+ fail ArgumentError, 'issuer cannot be nil'
182
+ end
183
+
184
+ if issuer.to_s.length < 1
185
+ fail ArgumentError, 'invalid value for "issuer", the character length must be great than or equal to 1.'
186
+ end
187
+
188
+ @issuer = issuer
189
+ end
190
+
191
+ # Custom attribute writer method with validation
192
+ # @param [Object] sign_on_url Value to be assigned
193
+ def sign_on_url=(sign_on_url)
194
+ if sign_on_url.nil?
195
+ fail ArgumentError, 'sign_on_url cannot be nil'
196
+ end
197
+
198
+ if sign_on_url.to_s.length < 1
199
+ fail ArgumentError, 'invalid value for "sign_on_url", the character length must be great than or equal to 1.'
200
+ end
201
+
202
+ @sign_on_url = sign_on_url
203
+ end
204
+
161
205
  # Checks equality by comparing each attribute.
162
206
  # @param [Object] Object to be compared
163
207
  def ==(o)
164
208
  return true if self.equal?(o)
165
209
  self.class == o.class &&
166
- id == o.id &&
167
- created == o.created &&
168
- modified == o.modified &&
169
- application_id == o.application_id &&
210
+ account_id == o.account_id &&
170
211
  name == o.name &&
171
- datatype == o.datatype &&
172
- description == o.description &&
173
- used_at == o.used_at
212
+ enabled == o.enabled &&
213
+ issuer == o.issuer &&
214
+ sign_on_url == o.sign_on_url &&
215
+ sign_out_url == o.sign_out_url &&
216
+ metadata_url == o.metadata_url &&
217
+ audience_uri == o.audience_uri
174
218
  end
175
219
 
176
220
  # @see the `==` method
@@ -182,7 +226,7 @@ module TalonOne
182
226
  # Calculates hash code according to all attributes.
183
227
  # @return [Fixnum] Hash code
184
228
  def hash
185
- [id, created, modified, application_id, name, datatype, description, used_at].hash
229
+ [account_id, name, enabled, issuer, sign_on_url, sign_out_url, metadata_url, audience_uri].hash
186
230
  end
187
231
 
188
232
  # Builds the object from hash