wesley-key-sdk 4.0.0 → 4.2.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.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +47 -34
  3. data/bin/console +4 -4
  4. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/api_helper.rb +2 -2
  5. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/apis/base_api.rb +3 -3
  6. data/lib/swagger_petstore_open_api30/apis/pet_api.rb +287 -0
  7. data/lib/swagger_petstore_open_api30/apis/store_api.rb +131 -0
  8. data/lib/swagger_petstore_open_api30/apis/user_api.rb +233 -0
  9. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/client.rb +34 -15
  10. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/configuration.rb +30 -20
  11. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/exceptions/api_exception.rb +2 -2
  12. data/lib/swagger_petstore_open_api30/exceptions/oauth_provider_exception.rb +64 -0
  13. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/api_response.rb +2 -2
  14. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/auth/api_key.rb +15 -15
  15. data/lib/swagger_petstore_open_api30/http/auth/petstore_auth.rb +112 -0
  16. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_call_back.rb +2 -2
  17. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_method_enum.rb +2 -2
  18. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_request.rb +2 -2
  19. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_response.rb +2 -2
  20. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/proxy_settings.rb +2 -2
  21. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/logging/configuration/api_logging_configuration.rb +2 -2
  22. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/logging/sdk_logger.rb +2 -2
  23. data/lib/swagger_petstore_open_api30/models/api_response.rb +118 -0
  24. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/models/base_model.rb +2 -2
  25. data/lib/{webhooks_and_callbacks_api/models/package.rb → swagger_petstore_open_api30/models/category.rb} +39 -29
  26. data/lib/swagger_petstore_open_api30/models/oauth_provider_error.rb +62 -0
  27. data/lib/swagger_petstore_open_api30/models/oauth_scope_petstore_auth.rb +36 -0
  28. data/lib/swagger_petstore_open_api30/models/oauth_token.rb +125 -0
  29. data/lib/swagger_petstore_open_api30/models/order.rb +167 -0
  30. data/lib/swagger_petstore_open_api30/models/order_status.rb +40 -0
  31. data/lib/swagger_petstore_open_api30/models/pet.rb +168 -0
  32. data/lib/swagger_petstore_open_api30/models/pet_status.rb +40 -0
  33. data/lib/{webhooks_and_callbacks_api/models/delivery_details.rb → swagger_petstore_open_api30/models/tag.rb} +36 -35
  34. data/lib/swagger_petstore_open_api30/models/user.rb +182 -0
  35. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/utilities/date_time_helper.rb +2 -2
  36. data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/utilities/file_wrapper.rb +2 -2
  37. data/lib/swagger_petstore_open_api30/utilities/xml_utilities.rb +12 -0
  38. data/lib/swagger_petstore_open_api30.rb +62 -0
  39. metadata +37 -78
  40. data/lib/webhooks_and_callbacks_api/apis/orders_api.rb +0 -34
  41. data/lib/webhooks_and_callbacks_api/events/callbacks/callbacks_a_handler.rb +0 -66
  42. data/lib/webhooks_and_callbacks_api/events/callbacks/callbacks_b_handler.rb +0 -78
  43. data/lib/webhooks_and_callbacks_api/events/signature_verification_failure.rb +0 -33
  44. data/lib/webhooks_and_callbacks_api/events/signature_verification_result.rb +0 -14
  45. data/lib/webhooks_and_callbacks_api/events/unknown_event.rb +0 -32
  46. data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_a_handler.rb +0 -67
  47. data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_b_handler.rb +0 -86
  48. data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_c_handler.rb +0 -79
  49. data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_handler.rb +0 -67
  50. data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_no_verification_handler.rb +0 -39
  51. data/lib/webhooks_and_callbacks_api/exceptions/error_exception.rb +0 -57
  52. data/lib/webhooks_and_callbacks_api/http/auth/bearer_auth.rb +0 -53
  53. data/lib/webhooks_and_callbacks_api/models/address.rb +0 -114
  54. data/lib/webhooks_and_callbacks_api/models/audit_log_event.rb +0 -115
  55. data/lib/webhooks_and_callbacks_api/models/create_order_request.rb +0 -131
  56. data/lib/webhooks_and_callbacks_api/models/email_notification_callback.rb +0 -97
  57. data/lib/webhooks_and_callbacks_api/models/event.rb +0 -52
  58. data/lib/webhooks_and_callbacks_api/models/event_type.rb +0 -26
  59. data/lib/webhooks_and_callbacks_api/models/event_type1.rb +0 -26
  60. data/lib/webhooks_and_callbacks_api/models/event_type2.rb +0 -26
  61. data/lib/webhooks_and_callbacks_api/models/event_type3.rb +0 -26
  62. data/lib/webhooks_and_callbacks_api/models/fulfillment_callback.rb +0 -411
  63. data/lib/webhooks_and_callbacks_api/models/fulfillment_status.rb +0 -40
  64. data/lib/webhooks_and_callbacks_api/models/fulfillment_statuss.rb +0 -40
  65. data/lib/webhooks_and_callbacks_api/models/inventory_stock_decrease_event.rb +0 -90
  66. data/lib/webhooks_and_callbacks_api/models/inventory_stock_depleted_event.rb +0 -90
  67. data/lib/webhooks_and_callbacks_api/models/inventory_stock_increase_event.rb +0 -90
  68. data/lib/webhooks_and_callbacks_api/models/notification_callback.rb +0 -119
  69. data/lib/webhooks_and_callbacks_api/models/oauth_scope_oauth_acg.rb +0 -44
  70. data/lib/webhooks_and_callbacks_api/models/order.rb +0 -161
  71. data/lib/webhooks_and_callbacks_api/models/order_created_event.rb +0 -314
  72. data/lib/webhooks_and_callbacks_api/models/order_item.rb +0 -102
  73. data/lib/webhooks_and_callbacks_api/models/order_updated_event.rb +0 -100
  74. data/lib/webhooks_and_callbacks_api/models/payment_callback.rb +0 -167
  75. data/lib/webhooks_and_callbacks_api/models/payment_completed_event.rb +0 -98
  76. data/lib/webhooks_and_callbacks_api/models/payment_status.rb +0 -40
  77. data/lib/webhooks_and_callbacks_api/models/payment_status_created_event.rb +0 -89
  78. data/lib/webhooks_and_callbacks_api/models/payment_status_updated_event.rb +0 -89
  79. data/lib/webhooks_and_callbacks_api/models/primitive_collection_event.rb +0 -98
  80. data/lib/webhooks_and_callbacks_api/models/root_level_primitive_one_of_event_request.rb +0 -40
  81. data/lib/webhooks_and_callbacks_api/models/root_level_primitive_one_of_event_request1.rb +0 -40
  82. data/lib/webhooks_and_callbacks_api/models/sms_notification_callback.rb +0 -95
  83. data/lib/webhooks_and_callbacks_api/models/status.rb +0 -44
  84. data/lib/webhooks_and_callbacks_api/models/status1.rb +0 -36
  85. data/lib/webhooks_and_callbacks_api/models/status2.rb +0 -36
  86. data/lib/webhooks_and_callbacks_api/models/system_alert_notification_event.rb +0 -90
  87. data/lib/webhooks_and_callbacks_api/models/system_maintenance_notification_event.rb +0 -90
  88. data/lib/webhooks_and_callbacks_api/models/system_performance_notification_event.rb +0 -90
  89. data/lib/webhooks_and_callbacks_api/models/user_action_notification_event.rb +0 -90
  90. data/lib/webhooks_and_callbacks_api/models/user_preference_notification_event.rb +0 -90
  91. data/lib/webhooks_and_callbacks_api/models/user_status_notification_event.rb +0 -90
  92. data/lib/webhooks_and_callbacks_api/models/webhook.rb +0 -142
  93. data/lib/webhooks_and_callbacks_api/models/webhook_registration.rb +0 -103
  94. data/lib/webhooks_and_callbacks_api/models/webhook_update.rb +0 -105
  95. data/lib/webhooks_and_callbacks_api/utilities/union_type_lookup.rb +0 -172
  96. data/lib/webhooks_and_callbacks_api.rb +0 -122
@@ -1,36 +0,0 @@
1
- # webhooks_and_callbacks_api
2
- #
3
- # This file was automatically generated by
4
- # APIMATIC v3.0 ( https://www.apimatic.io ).
5
-
6
- module WebhooksAndCallbacksApi
7
- # Status2.
8
- class Status2
9
- STATUS2 = [
10
- # TODO: Write general description for DELIVERED
11
- DELIVERED = 'delivered'.freeze,
12
-
13
- # TODO: Write general description for FAILED
14
- FAILED = 'failed'.freeze
15
- ].freeze
16
-
17
- def self.validate(value)
18
- return false if value.nil?
19
-
20
- STATUS2.include?(value)
21
- end
22
-
23
- def self.from_value(value, default_value = DELIVERED)
24
- return default_value if value.nil?
25
-
26
- str = value.to_s.strip
27
-
28
- case str.downcase
29
- when 'delivered' then DELIVERED
30
- when 'failed' then FAILED
31
- else
32
- default_value
33
- end
34
- end
35
- end
36
- end
@@ -1,90 +0,0 @@
1
- # webhooks_and_callbacks_api
2
- #
3
- # This file was automatically generated by
4
- # APIMATIC v3.0 ( https://www.apimatic.io ).
5
-
6
- module WebhooksAndCallbacksApi
7
- # SystemAlertNotificationEvent Model.
8
- class SystemAlertNotificationEvent < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # TODO: Write general description for this method
13
- # @return [String]
14
- attr_reader :system_alert_notification_event_type
15
-
16
- # A mapping from model property names to API property names.
17
- def self.names
18
- @_hash = {} if @_hash.nil?
19
- @_hash['system_alert_notification_event_type'] =
20
- 'systemAlertNotificationEventType'
21
- @_hash
22
- end
23
-
24
- # An array for optional fields
25
- def self.optionals
26
- []
27
- end
28
-
29
- # An array for nullable fields
30
- def self.nullables
31
- []
32
- end
33
-
34
- def initialize(additional_properties: nil)
35
- # Add additional model properties to the instance
36
- additional_properties = {} if additional_properties.nil?
37
-
38
- @system_alert_notification_event_type = 'system.alert'
39
- @additional_properties = additional_properties
40
- end
41
-
42
- # Creates an instance of the object from a hash.
43
- def self.from_hash(hash)
44
- return nil unless hash
45
-
46
- # Extract variables from the hash.
47
-
48
-
49
- # Create a new hash for additional properties, removing known properties.
50
- new_hash = hash.reject { |k, _| names.value?(k) }
51
-
52
- additional_properties = APIHelper.get_additional_properties(
53
- new_hash, proc { |value| value }
54
- )
55
-
56
- # Create object from extracted values.
57
- SystemAlertNotificationEvent.new(additional_properties: additional_properties)
58
- end
59
-
60
- # Validates an instance of the object from a given value.
61
- # @param [SystemAlertNotificationEvent | Hash] The value against the validation is performed.
62
- def self.validate(value)
63
- if value.instance_of? self
64
- return APIHelper.valid_type?(value.system_alert_notification_event_type,
65
- ->(val) { val.instance_of? String })
66
- end
67
-
68
- return false unless value.instance_of? Hash
69
-
70
- APIHelper.valid_type?(value['systemAlertNotificationEventType'],
71
- ->(val) { val.instance_of? String })
72
- end
73
-
74
- # Provides a human-readable string representation of the object.
75
- def to_s
76
- class_name = self.class.name.split('::').last
77
- "<#{class_name} system_alert_notification_event_type:"\
78
- " #{@system_alert_notification_event_type}, additional_properties:"\
79
- " #{@additional_properties}>"
80
- end
81
-
82
- # Provides a debugging-friendly string with detailed object information.
83
- def inspect
84
- class_name = self.class.name.split('::').last
85
- "<#{class_name} system_alert_notification_event_type:"\
86
- " #{@system_alert_notification_event_type.inspect}, additional_properties:"\
87
- " #{@additional_properties}>"
88
- end
89
- end
90
- end
@@ -1,90 +0,0 @@
1
- # webhooks_and_callbacks_api
2
- #
3
- # This file was automatically generated by
4
- # APIMATIC v3.0 ( https://www.apimatic.io ).
5
-
6
- module WebhooksAndCallbacksApi
7
- # SystemMaintenanceNotificationEvent Model.
8
- class SystemMaintenanceNotificationEvent < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # TODO: Write general description for this method
13
- # @return [String]
14
- attr_reader :system_maintenance_notification_event_type
15
-
16
- # A mapping from model property names to API property names.
17
- def self.names
18
- @_hash = {} if @_hash.nil?
19
- @_hash['system_maintenance_notification_event_type'] =
20
- 'systemMaintenanceNotificationEventType'
21
- @_hash
22
- end
23
-
24
- # An array for optional fields
25
- def self.optionals
26
- []
27
- end
28
-
29
- # An array for nullable fields
30
- def self.nullables
31
- []
32
- end
33
-
34
- def initialize(additional_properties: nil)
35
- # Add additional model properties to the instance
36
- additional_properties = {} if additional_properties.nil?
37
-
38
- @system_maintenance_notification_event_type = 'system.maintenance'
39
- @additional_properties = additional_properties
40
- end
41
-
42
- # Creates an instance of the object from a hash.
43
- def self.from_hash(hash)
44
- return nil unless hash
45
-
46
- # Extract variables from the hash.
47
-
48
-
49
- # Create a new hash for additional properties, removing known properties.
50
- new_hash = hash.reject { |k, _| names.value?(k) }
51
-
52
- additional_properties = APIHelper.get_additional_properties(
53
- new_hash, proc { |value| value }
54
- )
55
-
56
- # Create object from extracted values.
57
- SystemMaintenanceNotificationEvent.new(additional_properties: additional_properties)
58
- end
59
-
60
- # Validates an instance of the object from a given value.
61
- # @param [SystemMaintenanceNotificationEvent | Hash] The value against the validation is performed.
62
- def self.validate(value)
63
- if value.instance_of? self
64
- return APIHelper.valid_type?(value.system_maintenance_notification_event_type,
65
- ->(val) { val.instance_of? String })
66
- end
67
-
68
- return false unless value.instance_of? Hash
69
-
70
- APIHelper.valid_type?(value['systemMaintenanceNotificationEventType'],
71
- ->(val) { val.instance_of? String })
72
- end
73
-
74
- # Provides a human-readable string representation of the object.
75
- def to_s
76
- class_name = self.class.name.split('::').last
77
- "<#{class_name} system_maintenance_notification_event_type:"\
78
- " #{@system_maintenance_notification_event_type}, additional_properties:"\
79
- " #{@additional_properties}>"
80
- end
81
-
82
- # Provides a debugging-friendly string with detailed object information.
83
- def inspect
84
- class_name = self.class.name.split('::').last
85
- "<#{class_name} system_maintenance_notification_event_type:"\
86
- " #{@system_maintenance_notification_event_type.inspect}, additional_properties:"\
87
- " #{@additional_properties}>"
88
- end
89
- end
90
- end
@@ -1,90 +0,0 @@
1
- # webhooks_and_callbacks_api
2
- #
3
- # This file was automatically generated by
4
- # APIMATIC v3.0 ( https://www.apimatic.io ).
5
-
6
- module WebhooksAndCallbacksApi
7
- # SystemPerformanceNotificationEvent Model.
8
- class SystemPerformanceNotificationEvent < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # TODO: Write general description for this method
13
- # @return [String]
14
- attr_reader :system_performance_notification_event_type
15
-
16
- # A mapping from model property names to API property names.
17
- def self.names
18
- @_hash = {} if @_hash.nil?
19
- @_hash['system_performance_notification_event_type'] =
20
- 'systemPerformanceNotificationEventType'
21
- @_hash
22
- end
23
-
24
- # An array for optional fields
25
- def self.optionals
26
- []
27
- end
28
-
29
- # An array for nullable fields
30
- def self.nullables
31
- []
32
- end
33
-
34
- def initialize(additional_properties: nil)
35
- # Add additional model properties to the instance
36
- additional_properties = {} if additional_properties.nil?
37
-
38
- @system_performance_notification_event_type = 'system.performance'
39
- @additional_properties = additional_properties
40
- end
41
-
42
- # Creates an instance of the object from a hash.
43
- def self.from_hash(hash)
44
- return nil unless hash
45
-
46
- # Extract variables from the hash.
47
-
48
-
49
- # Create a new hash for additional properties, removing known properties.
50
- new_hash = hash.reject { |k, _| names.value?(k) }
51
-
52
- additional_properties = APIHelper.get_additional_properties(
53
- new_hash, proc { |value| value }
54
- )
55
-
56
- # Create object from extracted values.
57
- SystemPerformanceNotificationEvent.new(additional_properties: additional_properties)
58
- end
59
-
60
- # Validates an instance of the object from a given value.
61
- # @param [SystemPerformanceNotificationEvent | Hash] The value against the validation is performed.
62
- def self.validate(value)
63
- if value.instance_of? self
64
- return APIHelper.valid_type?(value.system_performance_notification_event_type,
65
- ->(val) { val.instance_of? String })
66
- end
67
-
68
- return false unless value.instance_of? Hash
69
-
70
- APIHelper.valid_type?(value['systemPerformanceNotificationEventType'],
71
- ->(val) { val.instance_of? String })
72
- end
73
-
74
- # Provides a human-readable string representation of the object.
75
- def to_s
76
- class_name = self.class.name.split('::').last
77
- "<#{class_name} system_performance_notification_event_type:"\
78
- " #{@system_performance_notification_event_type}, additional_properties:"\
79
- " #{@additional_properties}>"
80
- end
81
-
82
- # Provides a debugging-friendly string with detailed object information.
83
- def inspect
84
- class_name = self.class.name.split('::').last
85
- "<#{class_name} system_performance_notification_event_type:"\
86
- " #{@system_performance_notification_event_type.inspect}, additional_properties:"\
87
- " #{@additional_properties}>"
88
- end
89
- end
90
- end
@@ -1,90 +0,0 @@
1
- # webhooks_and_callbacks_api
2
- #
3
- # This file was automatically generated by
4
- # APIMATIC v3.0 ( https://www.apimatic.io ).
5
-
6
- module WebhooksAndCallbacksApi
7
- # UserActionNotificationEvent Model.
8
- class UserActionNotificationEvent < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # TODO: Write general description for this method
13
- # @return [String]
14
- attr_reader :user_action_notification_event_type
15
-
16
- # A mapping from model property names to API property names.
17
- def self.names
18
- @_hash = {} if @_hash.nil?
19
- @_hash['user_action_notification_event_type'] =
20
- 'userActionNotificationEventType'
21
- @_hash
22
- end
23
-
24
- # An array for optional fields
25
- def self.optionals
26
- []
27
- end
28
-
29
- # An array for nullable fields
30
- def self.nullables
31
- []
32
- end
33
-
34
- def initialize(additional_properties: nil)
35
- # Add additional model properties to the instance
36
- additional_properties = {} if additional_properties.nil?
37
-
38
- @user_action_notification_event_type = 'user.action'
39
- @additional_properties = additional_properties
40
- end
41
-
42
- # Creates an instance of the object from a hash.
43
- def self.from_hash(hash)
44
- return nil unless hash
45
-
46
- # Extract variables from the hash.
47
-
48
-
49
- # Create a new hash for additional properties, removing known properties.
50
- new_hash = hash.reject { |k, _| names.value?(k) }
51
-
52
- additional_properties = APIHelper.get_additional_properties(
53
- new_hash, proc { |value| value }
54
- )
55
-
56
- # Create object from extracted values.
57
- UserActionNotificationEvent.new(additional_properties: additional_properties)
58
- end
59
-
60
- # Validates an instance of the object from a given value.
61
- # @param [UserActionNotificationEvent | Hash] The value against the validation is performed.
62
- def self.validate(value)
63
- if value.instance_of? self
64
- return APIHelper.valid_type?(value.user_action_notification_event_type,
65
- ->(val) { val.instance_of? String })
66
- end
67
-
68
- return false unless value.instance_of? Hash
69
-
70
- APIHelper.valid_type?(value['userActionNotificationEventType'],
71
- ->(val) { val.instance_of? String })
72
- end
73
-
74
- # Provides a human-readable string representation of the object.
75
- def to_s
76
- class_name = self.class.name.split('::').last
77
- "<#{class_name} user_action_notification_event_type:"\
78
- " #{@user_action_notification_event_type}, additional_properties:"\
79
- " #{@additional_properties}>"
80
- end
81
-
82
- # Provides a debugging-friendly string with detailed object information.
83
- def inspect
84
- class_name = self.class.name.split('::').last
85
- "<#{class_name} user_action_notification_event_type:"\
86
- " #{@user_action_notification_event_type.inspect}, additional_properties:"\
87
- " #{@additional_properties}>"
88
- end
89
- end
90
- end
@@ -1,90 +0,0 @@
1
- # webhooks_and_callbacks_api
2
- #
3
- # This file was automatically generated by
4
- # APIMATIC v3.0 ( https://www.apimatic.io ).
5
-
6
- module WebhooksAndCallbacksApi
7
- # UserPreferenceNotificationEvent Model.
8
- class UserPreferenceNotificationEvent < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # TODO: Write general description for this method
13
- # @return [String]
14
- attr_reader :user_preference_notification_event_type
15
-
16
- # A mapping from model property names to API property names.
17
- def self.names
18
- @_hash = {} if @_hash.nil?
19
- @_hash['user_preference_notification_event_type'] =
20
- 'userPreferenceNotificationEventType'
21
- @_hash
22
- end
23
-
24
- # An array for optional fields
25
- def self.optionals
26
- []
27
- end
28
-
29
- # An array for nullable fields
30
- def self.nullables
31
- []
32
- end
33
-
34
- def initialize(additional_properties: nil)
35
- # Add additional model properties to the instance
36
- additional_properties = {} if additional_properties.nil?
37
-
38
- @user_preference_notification_event_type = 'user.preference'
39
- @additional_properties = additional_properties
40
- end
41
-
42
- # Creates an instance of the object from a hash.
43
- def self.from_hash(hash)
44
- return nil unless hash
45
-
46
- # Extract variables from the hash.
47
-
48
-
49
- # Create a new hash for additional properties, removing known properties.
50
- new_hash = hash.reject { |k, _| names.value?(k) }
51
-
52
- additional_properties = APIHelper.get_additional_properties(
53
- new_hash, proc { |value| value }
54
- )
55
-
56
- # Create object from extracted values.
57
- UserPreferenceNotificationEvent.new(additional_properties: additional_properties)
58
- end
59
-
60
- # Validates an instance of the object from a given value.
61
- # @param [UserPreferenceNotificationEvent | Hash] The value against the validation is performed.
62
- def self.validate(value)
63
- if value.instance_of? self
64
- return APIHelper.valid_type?(value.user_preference_notification_event_type,
65
- ->(val) { val.instance_of? String })
66
- end
67
-
68
- return false unless value.instance_of? Hash
69
-
70
- APIHelper.valid_type?(value['userPreferenceNotificationEventType'],
71
- ->(val) { val.instance_of? String })
72
- end
73
-
74
- # Provides a human-readable string representation of the object.
75
- def to_s
76
- class_name = self.class.name.split('::').last
77
- "<#{class_name} user_preference_notification_event_type:"\
78
- " #{@user_preference_notification_event_type}, additional_properties:"\
79
- " #{@additional_properties}>"
80
- end
81
-
82
- # Provides a debugging-friendly string with detailed object information.
83
- def inspect
84
- class_name = self.class.name.split('::').last
85
- "<#{class_name} user_preference_notification_event_type:"\
86
- " #{@user_preference_notification_event_type.inspect}, additional_properties:"\
87
- " #{@additional_properties}>"
88
- end
89
- end
90
- end
@@ -1,90 +0,0 @@
1
- # webhooks_and_callbacks_api
2
- #
3
- # This file was automatically generated by
4
- # APIMATIC v3.0 ( https://www.apimatic.io ).
5
-
6
- module WebhooksAndCallbacksApi
7
- # UserStatusNotificationEvent Model.
8
- class UserStatusNotificationEvent < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # TODO: Write general description for this method
13
- # @return [String]
14
- attr_reader :user_status_notification_event_type
15
-
16
- # A mapping from model property names to API property names.
17
- def self.names
18
- @_hash = {} if @_hash.nil?
19
- @_hash['user_status_notification_event_type'] =
20
- 'userStatusNotificationEventType'
21
- @_hash
22
- end
23
-
24
- # An array for optional fields
25
- def self.optionals
26
- []
27
- end
28
-
29
- # An array for nullable fields
30
- def self.nullables
31
- []
32
- end
33
-
34
- def initialize(additional_properties: nil)
35
- # Add additional model properties to the instance
36
- additional_properties = {} if additional_properties.nil?
37
-
38
- @user_status_notification_event_type = 'user.status'
39
- @additional_properties = additional_properties
40
- end
41
-
42
- # Creates an instance of the object from a hash.
43
- def self.from_hash(hash)
44
- return nil unless hash
45
-
46
- # Extract variables from the hash.
47
-
48
-
49
- # Create a new hash for additional properties, removing known properties.
50
- new_hash = hash.reject { |k, _| names.value?(k) }
51
-
52
- additional_properties = APIHelper.get_additional_properties(
53
- new_hash, proc { |value| value }
54
- )
55
-
56
- # Create object from extracted values.
57
- UserStatusNotificationEvent.new(additional_properties: additional_properties)
58
- end
59
-
60
- # Validates an instance of the object from a given value.
61
- # @param [UserStatusNotificationEvent | Hash] The value against the validation is performed.
62
- def self.validate(value)
63
- if value.instance_of? self
64
- return APIHelper.valid_type?(value.user_status_notification_event_type,
65
- ->(val) { val.instance_of? String })
66
- end
67
-
68
- return false unless value.instance_of? Hash
69
-
70
- APIHelper.valid_type?(value['userStatusNotificationEventType'],
71
- ->(val) { val.instance_of? String })
72
- end
73
-
74
- # Provides a human-readable string representation of the object.
75
- def to_s
76
- class_name = self.class.name.split('::').last
77
- "<#{class_name} user_status_notification_event_type:"\
78
- " #{@user_status_notification_event_type}, additional_properties:"\
79
- " #{@additional_properties}>"
80
- end
81
-
82
- # Provides a debugging-friendly string with detailed object information.
83
- def inspect
84
- class_name = self.class.name.split('::').last
85
- "<#{class_name} user_status_notification_event_type:"\
86
- " #{@user_status_notification_event_type.inspect}, additional_properties:"\
87
- " #{@additional_properties}>"
88
- end
89
- end
90
- end