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.
- checksums.yaml +4 -4
- data/README.md +47 -34
- data/bin/console +4 -4
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/api_helper.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/apis/base_api.rb +3 -3
- data/lib/swagger_petstore_open_api30/apis/pet_api.rb +287 -0
- data/lib/swagger_petstore_open_api30/apis/store_api.rb +131 -0
- data/lib/swagger_petstore_open_api30/apis/user_api.rb +233 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/client.rb +34 -15
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/configuration.rb +30 -20
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/exceptions/api_exception.rb +2 -2
- data/lib/swagger_petstore_open_api30/exceptions/oauth_provider_exception.rb +64 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/api_response.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/auth/api_key.rb +15 -15
- data/lib/swagger_petstore_open_api30/http/auth/petstore_auth.rb +112 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_call_back.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_method_enum.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_request.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/http_response.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/http/proxy_settings.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/logging/configuration/api_logging_configuration.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/logging/sdk_logger.rb +2 -2
- data/lib/swagger_petstore_open_api30/models/api_response.rb +118 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/models/base_model.rb +2 -2
- data/lib/{webhooks_and_callbacks_api/models/package.rb → swagger_petstore_open_api30/models/category.rb} +39 -29
- data/lib/swagger_petstore_open_api30/models/oauth_provider_error.rb +62 -0
- data/lib/swagger_petstore_open_api30/models/oauth_scope_petstore_auth.rb +36 -0
- data/lib/swagger_petstore_open_api30/models/oauth_token.rb +125 -0
- data/lib/swagger_petstore_open_api30/models/order.rb +167 -0
- data/lib/swagger_petstore_open_api30/models/order_status.rb +40 -0
- data/lib/swagger_petstore_open_api30/models/pet.rb +168 -0
- data/lib/swagger_petstore_open_api30/models/pet_status.rb +40 -0
- data/lib/{webhooks_and_callbacks_api/models/delivery_details.rb → swagger_petstore_open_api30/models/tag.rb} +36 -35
- data/lib/swagger_petstore_open_api30/models/user.rb +182 -0
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/utilities/date_time_helper.rb +2 -2
- data/lib/{webhooks_and_callbacks_api → swagger_petstore_open_api30}/utilities/file_wrapper.rb +2 -2
- data/lib/swagger_petstore_open_api30/utilities/xml_utilities.rb +12 -0
- data/lib/swagger_petstore_open_api30.rb +62 -0
- metadata +37 -78
- data/lib/webhooks_and_callbacks_api/apis/orders_api.rb +0 -34
- data/lib/webhooks_and_callbacks_api/events/callbacks/callbacks_a_handler.rb +0 -66
- data/lib/webhooks_and_callbacks_api/events/callbacks/callbacks_b_handler.rb +0 -78
- data/lib/webhooks_and_callbacks_api/events/signature_verification_failure.rb +0 -33
- data/lib/webhooks_and_callbacks_api/events/signature_verification_result.rb +0 -14
- data/lib/webhooks_and_callbacks_api/events/unknown_event.rb +0 -32
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_a_handler.rb +0 -67
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_b_handler.rb +0 -86
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_c_handler.rb +0 -79
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_handler.rb +0 -67
- data/lib/webhooks_and_callbacks_api/events/webhooks/webhooks_no_verification_handler.rb +0 -39
- data/lib/webhooks_and_callbacks_api/exceptions/error_exception.rb +0 -57
- data/lib/webhooks_and_callbacks_api/http/auth/bearer_auth.rb +0 -53
- data/lib/webhooks_and_callbacks_api/models/address.rb +0 -114
- data/lib/webhooks_and_callbacks_api/models/audit_log_event.rb +0 -115
- data/lib/webhooks_and_callbacks_api/models/create_order_request.rb +0 -131
- data/lib/webhooks_and_callbacks_api/models/email_notification_callback.rb +0 -97
- data/lib/webhooks_and_callbacks_api/models/event.rb +0 -52
- data/lib/webhooks_and_callbacks_api/models/event_type.rb +0 -26
- data/lib/webhooks_and_callbacks_api/models/event_type1.rb +0 -26
- data/lib/webhooks_and_callbacks_api/models/event_type2.rb +0 -26
- data/lib/webhooks_and_callbacks_api/models/event_type3.rb +0 -26
- data/lib/webhooks_and_callbacks_api/models/fulfillment_callback.rb +0 -411
- data/lib/webhooks_and_callbacks_api/models/fulfillment_status.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/fulfillment_statuss.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/inventory_stock_decrease_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/inventory_stock_depleted_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/inventory_stock_increase_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/notification_callback.rb +0 -119
- data/lib/webhooks_and_callbacks_api/models/oauth_scope_oauth_acg.rb +0 -44
- data/lib/webhooks_and_callbacks_api/models/order.rb +0 -161
- data/lib/webhooks_and_callbacks_api/models/order_created_event.rb +0 -314
- data/lib/webhooks_and_callbacks_api/models/order_item.rb +0 -102
- data/lib/webhooks_and_callbacks_api/models/order_updated_event.rb +0 -100
- data/lib/webhooks_and_callbacks_api/models/payment_callback.rb +0 -167
- data/lib/webhooks_and_callbacks_api/models/payment_completed_event.rb +0 -98
- data/lib/webhooks_and_callbacks_api/models/payment_status.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/payment_status_created_event.rb +0 -89
- data/lib/webhooks_and_callbacks_api/models/payment_status_updated_event.rb +0 -89
- data/lib/webhooks_and_callbacks_api/models/primitive_collection_event.rb +0 -98
- data/lib/webhooks_and_callbacks_api/models/root_level_primitive_one_of_event_request.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/root_level_primitive_one_of_event_request1.rb +0 -40
- data/lib/webhooks_and_callbacks_api/models/sms_notification_callback.rb +0 -95
- data/lib/webhooks_and_callbacks_api/models/status.rb +0 -44
- data/lib/webhooks_and_callbacks_api/models/status1.rb +0 -36
- data/lib/webhooks_and_callbacks_api/models/status2.rb +0 -36
- data/lib/webhooks_and_callbacks_api/models/system_alert_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/system_maintenance_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/system_performance_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/user_action_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/user_preference_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/user_status_notification_event.rb +0 -90
- data/lib/webhooks_and_callbacks_api/models/webhook.rb +0 -142
- data/lib/webhooks_and_callbacks_api/models/webhook_registration.rb +0 -103
- data/lib/webhooks_and_callbacks_api/models/webhook_update.rb +0 -105
- data/lib/webhooks_and_callbacks_api/utilities/union_type_lookup.rb +0 -172
- data/lib/webhooks_and_callbacks_api.rb +0 -122
|
@@ -1,98 +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
|
-
# PaymentCompletedEvent Model.
|
|
8
|
-
class PaymentCompletedEvent < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# TODO: Write general description for this method
|
|
13
|
-
# @return [EventType1]
|
|
14
|
-
attr_accessor :event_type
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for this method
|
|
17
|
-
# @return [Integer]
|
|
18
|
-
attr_accessor :payment_id
|
|
19
|
-
|
|
20
|
-
# A mapping from model property names to API property names.
|
|
21
|
-
def self.names
|
|
22
|
-
@_hash = {} if @_hash.nil?
|
|
23
|
-
@_hash['event_type'] = 'eventType'
|
|
24
|
-
@_hash['payment_id'] = 'paymentId'
|
|
25
|
-
@_hash
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# An array for optional fields
|
|
29
|
-
def self.optionals
|
|
30
|
-
%w[
|
|
31
|
-
event_type
|
|
32
|
-
]
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# An array for nullable fields
|
|
36
|
-
def self.nullables
|
|
37
|
-
[]
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def initialize(payment_id:, event_type: SKIP, additional_properties: nil)
|
|
41
|
-
# Add additional model properties to the instance
|
|
42
|
-
additional_properties = {} if additional_properties.nil?
|
|
43
|
-
|
|
44
|
-
@event_type = event_type unless event_type == SKIP
|
|
45
|
-
@payment_id = payment_id
|
|
46
|
-
@additional_properties = additional_properties
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# Creates an instance of the object from a hash.
|
|
50
|
-
def self.from_hash(hash)
|
|
51
|
-
return nil unless hash
|
|
52
|
-
|
|
53
|
-
# Extract variables from the hash.
|
|
54
|
-
payment_id = hash.key?('paymentId') ? hash['paymentId'] : nil
|
|
55
|
-
event_type = hash.key?('eventType') ? hash['eventType'] : SKIP
|
|
56
|
-
|
|
57
|
-
# Create a new hash for additional properties, removing known properties.
|
|
58
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
59
|
-
|
|
60
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
61
|
-
new_hash, proc { |value| value }
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
# Create object from extracted values.
|
|
65
|
-
PaymentCompletedEvent.new(payment_id: payment_id,
|
|
66
|
-
event_type: event_type,
|
|
67
|
-
additional_properties: additional_properties)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
# Validates an instance of the object from a given value.
|
|
71
|
-
# @param [PaymentCompletedEvent | Hash] The value against the validation is performed.
|
|
72
|
-
def self.validate(value)
|
|
73
|
-
if value.instance_of? self
|
|
74
|
-
return APIHelper.valid_type?(value.payment_id,
|
|
75
|
-
->(val) { val.instance_of? Integer })
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
return false unless value.instance_of? Hash
|
|
79
|
-
|
|
80
|
-
APIHelper.valid_type?(value['paymentId'],
|
|
81
|
-
->(val) { val.instance_of? Integer })
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Provides a human-readable string representation of the object.
|
|
85
|
-
def to_s
|
|
86
|
-
class_name = self.class.name.split('::').last
|
|
87
|
-
"<#{class_name} event_type: #{@event_type}, payment_id: #{@payment_id},"\
|
|
88
|
-
" additional_properties: #{@additional_properties}>"
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
92
|
-
def inspect
|
|
93
|
-
class_name = self.class.name.split('::').last
|
|
94
|
-
"<#{class_name} event_type: #{@event_type.inspect}, payment_id: #{@payment_id.inspect},"\
|
|
95
|
-
" additional_properties: #{@additional_properties}>"
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
end
|
|
@@ -1,40 +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
|
-
# PaymentStatus.
|
|
8
|
-
class PaymentStatus
|
|
9
|
-
PAYMENT_STATUS = [
|
|
10
|
-
# TODO: Write general description for SUCCESS
|
|
11
|
-
SUCCESS = 'success'.freeze,
|
|
12
|
-
|
|
13
|
-
# TODO: Write general description for FAILED
|
|
14
|
-
FAILED = 'failed'.freeze,
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for PENDING
|
|
17
|
-
PENDING = 'pending'.freeze
|
|
18
|
-
].freeze
|
|
19
|
-
|
|
20
|
-
def self.validate(value)
|
|
21
|
-
return false if value.nil?
|
|
22
|
-
|
|
23
|
-
PAYMENT_STATUS.include?(value)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def self.from_value(value, default_value = SUCCESS)
|
|
27
|
-
return default_value if value.nil?
|
|
28
|
-
|
|
29
|
-
str = value.to_s.strip
|
|
30
|
-
|
|
31
|
-
case str.downcase
|
|
32
|
-
when 'success' then SUCCESS
|
|
33
|
-
when 'failed' then FAILED
|
|
34
|
-
when 'pending' then PENDING
|
|
35
|
-
else
|
|
36
|
-
default_value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,89 +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
|
-
# PaymentStatusCreatedEvent Model.
|
|
8
|
-
class PaymentStatusCreatedEvent < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# TODO: Write general description for this method
|
|
13
|
-
# @return [String]
|
|
14
|
-
attr_accessor :payment_status_created_id
|
|
15
|
-
|
|
16
|
-
# A mapping from model property names to API property names.
|
|
17
|
-
def self.names
|
|
18
|
-
@_hash = {} if @_hash.nil?
|
|
19
|
-
@_hash['payment_status_created_id'] = 'paymentStatusCreatedId'
|
|
20
|
-
@_hash
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
# An array for optional fields
|
|
24
|
-
def self.optionals
|
|
25
|
-
[]
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# An array for nullable fields
|
|
29
|
-
def self.nullables
|
|
30
|
-
[]
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def initialize(payment_status_created_id:, additional_properties: nil)
|
|
34
|
-
# Add additional model properties to the instance
|
|
35
|
-
additional_properties = {} if additional_properties.nil?
|
|
36
|
-
|
|
37
|
-
@payment_status_created_id = payment_status_created_id
|
|
38
|
-
@additional_properties = additional_properties
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# Creates an instance of the object from a hash.
|
|
42
|
-
def self.from_hash(hash)
|
|
43
|
-
return nil unless hash
|
|
44
|
-
|
|
45
|
-
# Extract variables from the hash.
|
|
46
|
-
payment_status_created_id =
|
|
47
|
-
hash.key?('paymentStatusCreatedId') ? hash['paymentStatusCreatedId'] : nil
|
|
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
|
-
PaymentStatusCreatedEvent.new(payment_status_created_id: payment_status_created_id,
|
|
58
|
-
additional_properties: additional_properties)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# Validates an instance of the object from a given value.
|
|
62
|
-
# @param [PaymentStatusCreatedEvent | Hash] The value against the validation is performed.
|
|
63
|
-
def self.validate(value)
|
|
64
|
-
if value.instance_of? self
|
|
65
|
-
return APIHelper.valid_type?(value.payment_status_created_id,
|
|
66
|
-
->(val) { val.instance_of? String })
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
return false unless value.instance_of? Hash
|
|
70
|
-
|
|
71
|
-
APIHelper.valid_type?(value['paymentStatusCreatedId'],
|
|
72
|
-
->(val) { val.instance_of? String })
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# Provides a human-readable string representation of the object.
|
|
76
|
-
def to_s
|
|
77
|
-
class_name = self.class.name.split('::').last
|
|
78
|
-
"<#{class_name} payment_status_created_id: #{@payment_status_created_id},"\
|
|
79
|
-
" additional_properties: #{@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} payment_status_created_id: #{@payment_status_created_id.inspect},"\
|
|
86
|
-
" additional_properties: #{@additional_properties}>"
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
end
|
|
@@ -1,89 +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
|
-
# PaymentStatusUpdatedEvent Model.
|
|
8
|
-
class PaymentStatusUpdatedEvent < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# TODO: Write general description for this method
|
|
13
|
-
# @return [String]
|
|
14
|
-
attr_accessor :payment_status_id
|
|
15
|
-
|
|
16
|
-
# A mapping from model property names to API property names.
|
|
17
|
-
def self.names
|
|
18
|
-
@_hash = {} if @_hash.nil?
|
|
19
|
-
@_hash['payment_status_id'] = 'paymentStatusId'
|
|
20
|
-
@_hash
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
# An array for optional fields
|
|
24
|
-
def self.optionals
|
|
25
|
-
[]
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# An array for nullable fields
|
|
29
|
-
def self.nullables
|
|
30
|
-
[]
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def initialize(payment_status_id:, additional_properties: nil)
|
|
34
|
-
# Add additional model properties to the instance
|
|
35
|
-
additional_properties = {} if additional_properties.nil?
|
|
36
|
-
|
|
37
|
-
@payment_status_id = payment_status_id
|
|
38
|
-
@additional_properties = additional_properties
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# Creates an instance of the object from a hash.
|
|
42
|
-
def self.from_hash(hash)
|
|
43
|
-
return nil unless hash
|
|
44
|
-
|
|
45
|
-
# Extract variables from the hash.
|
|
46
|
-
payment_status_id =
|
|
47
|
-
hash.key?('paymentStatusId') ? hash['paymentStatusId'] : nil
|
|
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
|
-
PaymentStatusUpdatedEvent.new(payment_status_id: payment_status_id,
|
|
58
|
-
additional_properties: additional_properties)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# Validates an instance of the object from a given value.
|
|
62
|
-
# @param [PaymentStatusUpdatedEvent | Hash] The value against the validation is performed.
|
|
63
|
-
def self.validate(value)
|
|
64
|
-
if value.instance_of? self
|
|
65
|
-
return APIHelper.valid_type?(value.payment_status_id,
|
|
66
|
-
->(val) { val.instance_of? String })
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
return false unless value.instance_of? Hash
|
|
70
|
-
|
|
71
|
-
APIHelper.valid_type?(value['paymentStatusId'],
|
|
72
|
-
->(val) { val.instance_of? String })
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# Provides a human-readable string representation of the object.
|
|
76
|
-
def to_s
|
|
77
|
-
class_name = self.class.name.split('::').last
|
|
78
|
-
"<#{class_name} payment_status_id: #{@payment_status_id}, 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} payment_status_id: #{@payment_status_id.inspect}, additional_properties:"\
|
|
86
|
-
" #{@additional_properties}>"
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
end
|
|
@@ -1,98 +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
|
-
# PrimitiveCollectionEvent Model.
|
|
8
|
-
class PrimitiveCollectionEvent < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# TODO: Write general description for this method
|
|
13
|
-
# @return [EventType2]
|
|
14
|
-
attr_accessor :event_type
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for this method
|
|
17
|
-
# @return [Array[Integer]]
|
|
18
|
-
attr_accessor :ids
|
|
19
|
-
|
|
20
|
-
# A mapping from model property names to API property names.
|
|
21
|
-
def self.names
|
|
22
|
-
@_hash = {} if @_hash.nil?
|
|
23
|
-
@_hash['event_type'] = 'eventType'
|
|
24
|
-
@_hash['ids'] = 'ids'
|
|
25
|
-
@_hash
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# An array for optional fields
|
|
29
|
-
def self.optionals
|
|
30
|
-
%w[
|
|
31
|
-
event_type
|
|
32
|
-
]
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# An array for nullable fields
|
|
36
|
-
def self.nullables
|
|
37
|
-
[]
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def initialize(ids:, event_type: SKIP, additional_properties: nil)
|
|
41
|
-
# Add additional model properties to the instance
|
|
42
|
-
additional_properties = {} if additional_properties.nil?
|
|
43
|
-
|
|
44
|
-
@event_type = event_type unless event_type == SKIP
|
|
45
|
-
@ids = ids
|
|
46
|
-
@additional_properties = additional_properties
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# Creates an instance of the object from a hash.
|
|
50
|
-
def self.from_hash(hash)
|
|
51
|
-
return nil unless hash
|
|
52
|
-
|
|
53
|
-
# Extract variables from the hash.
|
|
54
|
-
ids = hash.key?('ids') ? hash['ids'] : nil
|
|
55
|
-
event_type = hash.key?('eventType') ? hash['eventType'] : SKIP
|
|
56
|
-
|
|
57
|
-
# Create a new hash for additional properties, removing known properties.
|
|
58
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
59
|
-
|
|
60
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
61
|
-
new_hash, proc { |value| value }
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
# Create object from extracted values.
|
|
65
|
-
PrimitiveCollectionEvent.new(ids: ids,
|
|
66
|
-
event_type: event_type,
|
|
67
|
-
additional_properties: additional_properties)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
# Validates an instance of the object from a given value.
|
|
71
|
-
# @param [PrimitiveCollectionEvent | Hash] The value against the validation is performed.
|
|
72
|
-
def self.validate(value)
|
|
73
|
-
if value.instance_of? self
|
|
74
|
-
return APIHelper.valid_type?(value.ids,
|
|
75
|
-
->(val) { val.instance_of? Integer })
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
return false unless value.instance_of? Hash
|
|
79
|
-
|
|
80
|
-
APIHelper.valid_type?(value['ids'],
|
|
81
|
-
->(val) { val.instance_of? Integer })
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Provides a human-readable string representation of the object.
|
|
85
|
-
def to_s
|
|
86
|
-
class_name = self.class.name.split('::').last
|
|
87
|
-
"<#{class_name} event_type: #{@event_type}, ids: #{@ids}, additional_properties:"\
|
|
88
|
-
" #{@additional_properties}>"
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
92
|
-
def inspect
|
|
93
|
-
class_name = self.class.name.split('::').last
|
|
94
|
-
"<#{class_name} event_type: #{@event_type.inspect}, ids: #{@ids.inspect},"\
|
|
95
|
-
" additional_properties: #{@additional_properties}>"
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
end
|
|
@@ -1,40 +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
|
-
# RootLevelPrimitiveOneOfEvent Request.
|
|
8
|
-
class RootLevelPrimitiveOneOfEventRequest
|
|
9
|
-
ROOT_LEVEL_PRIMITIVE_ONE_OF_EVENT_REQUEST = [
|
|
10
|
-
# TODO: Write general description for ON
|
|
11
|
-
ON = 'on'.freeze,
|
|
12
|
-
|
|
13
|
-
# TODO: Write general description for OFF
|
|
14
|
-
OFF = 'off'.freeze,
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for PENDING
|
|
17
|
-
PENDING = 'pending'.freeze
|
|
18
|
-
].freeze
|
|
19
|
-
|
|
20
|
-
def self.validate(value)
|
|
21
|
-
return false if value.nil?
|
|
22
|
-
|
|
23
|
-
ROOT_LEVEL_PRIMITIVE_ONE_OF_EVENT_REQUEST.include?(value)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def self.from_value(value, default_value = ON)
|
|
27
|
-
return default_value if value.nil?
|
|
28
|
-
|
|
29
|
-
str = value.to_s.strip
|
|
30
|
-
|
|
31
|
-
case str.downcase
|
|
32
|
-
when 'on' then ON
|
|
33
|
-
when 'off' then OFF
|
|
34
|
-
when 'pending' then PENDING
|
|
35
|
-
else
|
|
36
|
-
default_value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,40 +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
|
-
# RootLevelPrimitiveOneOfEvent Request1.
|
|
8
|
-
class RootLevelPrimitiveOneOfEventRequest1
|
|
9
|
-
ROOT_LEVEL_PRIMITIVE_ONE_OF_EVENT_REQUEST1 = [
|
|
10
|
-
# TODO: Write general description for ALPHA
|
|
11
|
-
ALPHA = 'alpha'.freeze,
|
|
12
|
-
|
|
13
|
-
# TODO: Write general description for BETA
|
|
14
|
-
BETA = 'beta'.freeze,
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for GAMMA
|
|
17
|
-
GAMMA = 'gamma'.freeze
|
|
18
|
-
].freeze
|
|
19
|
-
|
|
20
|
-
def self.validate(value)
|
|
21
|
-
return false if value.nil?
|
|
22
|
-
|
|
23
|
-
ROOT_LEVEL_PRIMITIVE_ONE_OF_EVENT_REQUEST1.include?(value)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def self.from_value(value, default_value = ALPHA)
|
|
27
|
-
return default_value if value.nil?
|
|
28
|
-
|
|
29
|
-
str = value.to_s.strip
|
|
30
|
-
|
|
31
|
-
case str.downcase
|
|
32
|
-
when 'alpha' then ALPHA
|
|
33
|
-
when 'beta' then BETA
|
|
34
|
-
when 'gamma' then GAMMA
|
|
35
|
-
else
|
|
36
|
-
default_value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,95 +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
|
-
# SmsNotificationCallback Model.
|
|
8
|
-
class SmsNotificationCallback < BaseModel
|
|
9
|
-
SKIP = Object.new
|
|
10
|
-
private_constant :SKIP
|
|
11
|
-
|
|
12
|
-
# TODO: Write general description for this method
|
|
13
|
-
# @return [String]
|
|
14
|
-
attr_accessor :message_id
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for this method
|
|
17
|
-
# @return [String]
|
|
18
|
-
attr_accessor :phone_number
|
|
19
|
-
|
|
20
|
-
# TODO: Write general description for this method
|
|
21
|
-
# @return [Status2]
|
|
22
|
-
attr_accessor :status
|
|
23
|
-
|
|
24
|
-
# A mapping from model property names to API property names.
|
|
25
|
-
def self.names
|
|
26
|
-
@_hash = {} if @_hash.nil?
|
|
27
|
-
@_hash['message_id'] = 'messageId'
|
|
28
|
-
@_hash['phone_number'] = 'phoneNumber'
|
|
29
|
-
@_hash['status'] = 'status'
|
|
30
|
-
@_hash
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# An array for optional fields
|
|
34
|
-
def self.optionals
|
|
35
|
-
%w[
|
|
36
|
-
message_id
|
|
37
|
-
phone_number
|
|
38
|
-
status
|
|
39
|
-
]
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# An array for nullable fields
|
|
43
|
-
def self.nullables
|
|
44
|
-
[]
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def initialize(message_id: SKIP, phone_number: SKIP, status: SKIP,
|
|
48
|
-
additional_properties: nil)
|
|
49
|
-
# Add additional model properties to the instance
|
|
50
|
-
additional_properties = {} if additional_properties.nil?
|
|
51
|
-
|
|
52
|
-
@message_id = message_id unless message_id == SKIP
|
|
53
|
-
@phone_number = phone_number unless phone_number == SKIP
|
|
54
|
-
@status = status unless status == SKIP
|
|
55
|
-
@additional_properties = additional_properties
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# Creates an instance of the object from a hash.
|
|
59
|
-
def self.from_hash(hash)
|
|
60
|
-
return nil unless hash
|
|
61
|
-
|
|
62
|
-
# Extract variables from the hash.
|
|
63
|
-
message_id = hash.key?('messageId') ? hash['messageId'] : SKIP
|
|
64
|
-
phone_number = hash.key?('phoneNumber') ? hash['phoneNumber'] : SKIP
|
|
65
|
-
status = hash.key?('status') ? hash['status'] : SKIP
|
|
66
|
-
|
|
67
|
-
# Create a new hash for additional properties, removing known properties.
|
|
68
|
-
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
-
|
|
70
|
-
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
-
new_hash, proc { |value| value }
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
# Create object from extracted values.
|
|
75
|
-
SmsNotificationCallback.new(message_id: message_id,
|
|
76
|
-
phone_number: phone_number,
|
|
77
|
-
status: status,
|
|
78
|
-
additional_properties: additional_properties)
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# Provides a human-readable string representation of the object.
|
|
82
|
-
def to_s
|
|
83
|
-
class_name = self.class.name.split('::').last
|
|
84
|
-
"<#{class_name} message_id: #{@message_id}, phone_number: #{@phone_number}, status:"\
|
|
85
|
-
" #{@status}, additional_properties: #{@additional_properties}>"
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
# Provides a debugging-friendly string with detailed object information.
|
|
89
|
-
def inspect
|
|
90
|
-
class_name = self.class.name.split('::').last
|
|
91
|
-
"<#{class_name} message_id: #{@message_id.inspect}, phone_number: #{@phone_number.inspect},"\
|
|
92
|
-
" status: #{@status.inspect}, additional_properties: #{@additional_properties}>"
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
end
|
|
@@ -1,44 +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
|
-
# Status.
|
|
8
|
-
class Status
|
|
9
|
-
STATUS = [
|
|
10
|
-
# TODO: Write general description for PENDING
|
|
11
|
-
PENDING = 'pending'.freeze,
|
|
12
|
-
|
|
13
|
-
# TODO: Write general description for PROCESSING
|
|
14
|
-
PROCESSING = 'processing'.freeze,
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for COMPLETED
|
|
17
|
-
COMPLETED = 'completed'.freeze,
|
|
18
|
-
|
|
19
|
-
# TODO: Write general description for CANCELLED
|
|
20
|
-
CANCELLED = 'cancelled'.freeze
|
|
21
|
-
].freeze
|
|
22
|
-
|
|
23
|
-
def self.validate(value)
|
|
24
|
-
return false if value.nil?
|
|
25
|
-
|
|
26
|
-
STATUS.include?(value)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def self.from_value(value, default_value = PENDING)
|
|
30
|
-
return default_value if value.nil?
|
|
31
|
-
|
|
32
|
-
str = value.to_s.strip
|
|
33
|
-
|
|
34
|
-
case str.downcase
|
|
35
|
-
when 'pending' then PENDING
|
|
36
|
-
when 'processing' then PROCESSING
|
|
37
|
-
when 'completed' then COMPLETED
|
|
38
|
-
when 'cancelled' then CANCELLED
|
|
39
|
-
else
|
|
40
|
-
default_value
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
@@ -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
|
-
# Status1.
|
|
8
|
-
class Status1
|
|
9
|
-
STATUS1 = [
|
|
10
|
-
# TODO: Write general description for SENT
|
|
11
|
-
SENT = 'sent'.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
|
-
STATUS1.include?(value)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def self.from_value(value, default_value = SENT)
|
|
24
|
-
return default_value if value.nil?
|
|
25
|
-
|
|
26
|
-
str = value.to_s.strip
|
|
27
|
-
|
|
28
|
-
case str.downcase
|
|
29
|
-
when 'sent' then SENT
|
|
30
|
-
when 'failed' then FAILED
|
|
31
|
-
else
|
|
32
|
-
default_value
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|