jamm 1.3.0 → 1.4.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/Gemfile.lock +1 -1
- data/lib/jamm/api/api/customer_api.rb +82 -52
- data/lib/jamm/api/api/healthcheck_api.rb +18 -15
- data/lib/jamm/api/api/payment_api.rb +113 -62
- data/lib/jamm/api/api/webhook_service_api.rb +41 -28
- data/lib/jamm/api/api_client.rb +74 -66
- data/lib/jamm/api/api_error.rb +16 -16
- data/lib/jamm/api/configuration.rb +42 -34
- data/lib/jamm/api/models/apiv1_error.rb +56 -44
- data/lib/jamm/api/models/apiv1_status.rb +57 -47
- data/lib/jamm/api/models/customer_service_update_customer_body.rb +107 -69
- data/lib/jamm/api/models/googlerpc_status.rb +61 -45
- data/lib/jamm/api/models/protobuf_any.rb +42 -35
- data/lib/jamm/api/models/v1_add_charge_request.rb +59 -44
- data/lib/jamm/api/models/v1_add_charge_response.rb +59 -44
- data/lib/jamm/api/models/v1_bank.rb +150 -95
- data/lib/jamm/api/models/v1_bank_assets.rb +60 -47
- data/lib/jamm/api/models/v1_bank_branch.rb +83 -56
- data/lib/jamm/api/models/v1_bank_information.rb +71 -51
- data/lib/jamm/api/models/v1_bank_quota.rb +99 -64
- data/lib/jamm/api/models/v1_bank_scheduled_maintenance_period.rb +75 -52
- data/lib/jamm/api/models/v1_buyer.rb +104 -76
- data/lib/jamm/api/models/v1_charge.rb +67 -52
- data/lib/jamm/api/models/v1_charge_message.rb +151 -93
- data/lib/jamm/api/models/v1_charge_message_status.rb +17 -18
- data/lib/jamm/api/models/v1_charge_result.rb +152 -93
- data/lib/jamm/api/models/v1_contract.rb +64 -52
- data/lib/jamm/api/models/v1_contract_message.rb +67 -48
- data/lib/jamm/api/models/v1_contract_status.rb +20 -21
- data/lib/jamm/api/models/v1_create_contract_with_charge_request.rb +59 -44
- data/lib/jamm/api/models/v1_create_contract_with_charge_response.rb +67 -48
- data/lib/jamm/api/models/v1_create_contract_without_charge_request.rb +51 -40
- data/lib/jamm/api/models/v1_create_contract_without_charge_response.rb +59 -44
- data/lib/jamm/api/models/v1_create_customer_request.rb +42 -35
- data/lib/jamm/api/models/v1_create_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_customer.rb +91 -60
- data/lib/jamm/api/models/v1_delete_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_deposit_type.rb +14 -15
- data/lib/jamm/api/models/v1_error_detail.rb +57 -44
- data/lib/jamm/api/models/v1_error_response.rb +46 -38
- data/lib/jamm/api/models/v1_error_type.rb +30 -31
- data/lib/jamm/api/models/v1_event_type.rb +20 -21
- data/lib/jamm/api/models/v1_get_bank_response.rb +42 -35
- data/lib/jamm/api/models/v1_get_branch_response.rb +42 -35
- data/lib/jamm/api/models/v1_get_branches_response.rb +44 -36
- data/lib/jamm/api/models/v1_get_charge_response.rb +51 -40
- data/lib/jamm/api/models/v1_get_charges_response.rb +60 -45
- data/lib/jamm/api/models/v1_get_contract_response.rb +51 -40
- data/lib/jamm/api/models/v1_get_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_get_major_banks_response.rb +59 -44
- data/lib/jamm/api/models/v1_initial_charge.rb +61 -48
- data/lib/jamm/api/models/v1_kyc_status.rb +16 -17
- data/lib/jamm/api/models/v1_merchant.rb +51 -40
- data/lib/jamm/api/models/v1_merchant_customer.rb +51 -40
- data/lib/jamm/api/models/v1_merchant_webhook_message.rb +75 -57
- data/lib/jamm/api/models/v1_message_response.rb +67 -48
- data/lib/jamm/api/models/v1_off_session_payment_request.rb +51 -40
- data/lib/jamm/api/models/v1_off_session_payment_response.rb +51 -40
- data/lib/jamm/api/models/v1_on_session_payment_data.rb +67 -48
- data/lib/jamm/api/models/v1_on_session_payment_error.rb +55 -45
- data/lib/jamm/api/models/v1_on_session_payment_error_code.rb +21 -22
- data/lib/jamm/api/models/v1_on_session_payment_request.rb +67 -48
- data/lib/jamm/api/models/v1_on_session_payment_response.rb +59 -44
- data/lib/jamm/api/models/v1_pagination.rb +51 -40
- data/lib/jamm/api/models/v1_payment_authorization_status.rb +14 -15
- data/lib/jamm/api/models/v1_payment_link.rb +57 -44
- data/lib/jamm/api/models/v1_ping_response.rb +42 -35
- data/lib/jamm/api/models/v1_search_banks_response.rb +44 -36
- data/lib/jamm/api/models/v1_search_branches_response.rb +44 -36
- data/lib/jamm/api/models/v1_update_customer_response.rb +42 -35
- data/lib/jamm/api/models/v1_url.rb +48 -39
- data/lib/jamm/api/models/v1_user_account_message.rb +67 -48
- data/lib/jamm/api/models/v1_withdraw_request.rb +51 -40
- data/lib/jamm/api/models/v1_withdraw_response.rb +51 -40
- data/lib/jamm/api/version.rb +11 -11
- data/lib/jamm/api.rb +10 -10
- data/lib/jamm/charge.rb +12 -0
- data/lib/jamm/deprecation.rb +13 -0
- data/lib/jamm/payment.rb +61 -0
- data/lib/jamm/version.rb +1 -1
- data/lib/jamm.rb +2 -0
- metadata +4 -2
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
=begin
|
2
|
+
#Jamm API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
@@ -18,7 +18,8 @@ module Api
|
|
18
18
|
attr_accessor :error_type
|
19
19
|
|
20
20
|
class EnumAttributeValidator
|
21
|
-
attr_reader :datatype
|
21
|
+
attr_reader :datatype
|
22
|
+
attr_reader :allowable_values
|
22
23
|
|
23
24
|
def initialize(datatype, allowable_values)
|
24
25
|
@allowable_values = allowable_values.map do |value|
|
@@ -41,7 +42,7 @@ module Api
|
|
41
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
43
|
def self.attribute_map
|
43
44
|
{
|
44
|
-
:error_type => :errorType
|
45
|
+
:'error_type' => :'errorType'
|
45
46
|
}
|
46
47
|
end
|
47
48
|
|
@@ -53,39 +54,44 @@ module Api
|
|
53
54
|
# Attribute type mapping.
|
54
55
|
def self.openapi_types
|
55
56
|
{
|
56
|
-
:error_type => :ErrorType
|
57
|
+
:'error_type' => :'ErrorType'
|
57
58
|
}
|
58
59
|
end
|
59
60
|
|
60
61
|
# List of attributes with nullable: true
|
61
62
|
def self.openapi_nullable
|
62
|
-
Set.new([
|
63
|
+
Set.new([
|
64
|
+
])
|
63
65
|
end
|
64
66
|
|
65
67
|
# Initializes the object
|
66
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
67
69
|
def initialize(attributes = {})
|
68
|
-
|
70
|
+
if (!attributes.is_a?(Hash))
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::ErrorResponse` initialize method"
|
72
|
+
end
|
69
73
|
|
70
74
|
# check to see if the attribute exists and convert string to symbol for hash key
|
71
|
-
attributes = attributes.each_with_object({})
|
72
|
-
|
73
|
-
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::ErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
78
|
+
end
|
74
79
|
h[k.to_sym] = v
|
75
|
-
|
80
|
+
}
|
76
81
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
+
if attributes.key?(:'error_type')
|
83
|
+
self.error_type = attributes[:'error_type']
|
84
|
+
else
|
85
|
+
self.error_type = 'ERROR_TYPE_UNSPECIFIED'
|
86
|
+
end
|
82
87
|
end
|
83
88
|
|
84
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
85
90
|
# @return Array for valid properties with the reasons
|
86
91
|
def list_invalid_properties
|
87
92
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
88
|
-
|
93
|
+
invalid_properties = Array.new
|
94
|
+
invalid_properties
|
89
95
|
end
|
90
96
|
|
91
97
|
# Check to see if the all the properties in the model are valid
|
@@ -97,17 +103,16 @@ module Api
|
|
97
103
|
|
98
104
|
# Checks equality by comparing each attribute.
|
99
105
|
# @param [Object] Object to be compared
|
100
|
-
def ==(
|
101
|
-
return true if equal?(
|
102
|
-
|
103
|
-
|
104
|
-
error_type == other.error_type
|
106
|
+
def ==(o)
|
107
|
+
return true if self.equal?(o)
|
108
|
+
self.class == o.class &&
|
109
|
+
error_type == o.error_type
|
105
110
|
end
|
106
111
|
|
107
112
|
# @see the `==` method
|
108
113
|
# @param [Object] Object to be compared
|
109
|
-
def eql?(
|
110
|
-
self ==
|
114
|
+
def eql?(o)
|
115
|
+
self == o
|
111
116
|
end
|
112
117
|
|
113
118
|
# Calculates hash code according to all attributes.
|
@@ -121,18 +126,19 @@ module Api
|
|
121
126
|
# @return [Object] Returns the model itself
|
122
127
|
def self.build_from_hash(attributes)
|
123
128
|
return nil unless attributes.is_a?(Hash)
|
124
|
-
|
125
129
|
attributes = attributes.transform_keys(&:to_sym)
|
126
130
|
transformed_hash = {}
|
127
131
|
openapi_types.each_pair do |key, type|
|
128
132
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
129
|
-
transformed_hash[key
|
133
|
+
transformed_hash["#{key}"] = nil
|
130
134
|
elsif type =~ /\AArray<(.*)>/i
|
131
135
|
# check to ensure the input is an array given that the attribute
|
132
136
|
# is documented as an array but the input is not
|
133
|
-
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
139
|
+
end
|
134
140
|
elsif !attributes[attribute_map[key]].nil?
|
135
|
-
transformed_hash[key
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
136
142
|
end
|
137
143
|
end
|
138
144
|
new(transformed_hash)
|
@@ -198,7 +204,7 @@ module Api
|
|
198
204
|
def to_hash
|
199
205
|
hash = {}
|
200
206
|
self.class.attribute_map.each_pair do |attr, param|
|
201
|
-
value = send(attr)
|
207
|
+
value = self.send(attr)
|
202
208
|
if value.nil?
|
203
209
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
204
210
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -226,5 +232,7 @@ module Api
|
|
226
232
|
value
|
227
233
|
end
|
228
234
|
end
|
235
|
+
|
229
236
|
end
|
237
|
+
|
230
238
|
end
|
@@ -1,39 +1,39 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
=begin
|
2
|
+
#Jamm API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Api
|
17
17
|
class ErrorType
|
18
|
-
UNSPECIFIED =
|
19
|
-
AUTH_FAILED =
|
20
|
-
AUTH_REJECTED =
|
21
|
-
ACCOUNT_CREATION_FAILED =
|
22
|
-
ACCOUNT_MODIFICATION_FAILED =
|
23
|
-
ACCOUNT_DELETION_FAILED =
|
24
|
-
ACCOUNT_BANK_REGISTRATION_FAILED =
|
25
|
-
KYC_REJECTED =
|
26
|
-
NOTIFICATION_WEBHOOK_FAILED =
|
27
|
-
NOTIFICATION_EMAIL_FAILED =
|
28
|
-
NOTIFICATION_SMS_FAILED =
|
29
|
-
PAYMENT_GATEWAY_UNAVAILABLE =
|
30
|
-
PAYMENT_GATEWAY_FAILED =
|
31
|
-
PAYMENT_VALIDATION_FAILED =
|
32
|
-
PAYMENT_CHARGE_FAILED =
|
33
|
-
PAYMENT_CHARGE_REJECTED =
|
34
|
-
PAYMENT_CHARGE_OVER_LIMIT =
|
35
|
-
PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED =
|
36
|
-
PAYMENT_LINK_EXPIRED =
|
18
|
+
UNSPECIFIED = "ERROR_TYPE_UNSPECIFIED".freeze
|
19
|
+
AUTH_FAILED = "ERROR_TYPE_AUTH_FAILED".freeze
|
20
|
+
AUTH_REJECTED = "ERROR_TYPE_AUTH_REJECTED".freeze
|
21
|
+
ACCOUNT_CREATION_FAILED = "ERROR_TYPE_ACCOUNT_CREATION_FAILED".freeze
|
22
|
+
ACCOUNT_MODIFICATION_FAILED = "ERROR_TYPE_ACCOUNT_MODIFICATION_FAILED".freeze
|
23
|
+
ACCOUNT_DELETION_FAILED = "ERROR_TYPE_ACCOUNT_DELETION_FAILED".freeze
|
24
|
+
ACCOUNT_BANK_REGISTRATION_FAILED = "ERROR_TYPE_ACCOUNT_BANK_REGISTRATION_FAILED".freeze
|
25
|
+
KYC_REJECTED = "ERROR_TYPE_KYC_REJECTED".freeze
|
26
|
+
NOTIFICATION_WEBHOOK_FAILED = "ERROR_TYPE_NOTIFICATION_WEBHOOK_FAILED".freeze
|
27
|
+
NOTIFICATION_EMAIL_FAILED = "ERROR_TYPE_NOTIFICATION_EMAIL_FAILED".freeze
|
28
|
+
NOTIFICATION_SMS_FAILED = "ERROR_TYPE_NOTIFICATION_SMS_FAILED".freeze
|
29
|
+
PAYMENT_GATEWAY_UNAVAILABLE = "ERROR_TYPE_PAYMENT_GATEWAY_UNAVAILABLE".freeze
|
30
|
+
PAYMENT_GATEWAY_FAILED = "ERROR_TYPE_PAYMENT_GATEWAY_FAILED".freeze
|
31
|
+
PAYMENT_VALIDATION_FAILED = "ERROR_TYPE_PAYMENT_VALIDATION_FAILED".freeze
|
32
|
+
PAYMENT_CHARGE_FAILED = "ERROR_TYPE_PAYMENT_CHARGE_FAILED".freeze
|
33
|
+
PAYMENT_CHARGE_REJECTED = "ERROR_TYPE_PAYMENT_CHARGE_REJECTED".freeze
|
34
|
+
PAYMENT_CHARGE_OVER_LIMIT = "ERROR_TYPE_PAYMENT_CHARGE_OVER_LIMIT".freeze
|
35
|
+
PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED = "ERROR_TYPE_PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED".freeze
|
36
|
+
PAYMENT_LINK_EXPIRED = "ERROR_TYPE_PAYMENT_LINK_EXPIRED".freeze
|
37
37
|
|
38
38
|
def self.all_vars
|
39
39
|
@all_vars ||= [UNSPECIFIED, AUTH_FAILED, AUTH_REJECTED, ACCOUNT_CREATION_FAILED, ACCOUNT_MODIFICATION_FAILED, ACCOUNT_DELETION_FAILED, ACCOUNT_BANK_REGISTRATION_FAILED, KYC_REJECTED, NOTIFICATION_WEBHOOK_FAILED, NOTIFICATION_EMAIL_FAILED, NOTIFICATION_SMS_FAILED, PAYMENT_GATEWAY_UNAVAILABLE, PAYMENT_GATEWAY_FAILED, PAYMENT_VALIDATION_FAILED, PAYMENT_CHARGE_FAILED, PAYMENT_CHARGE_REJECTED, PAYMENT_CHARGE_OVER_LIMIT, PAYMENT_CHARGE_SUBSCRIPTION_EXPIRED, PAYMENT_LINK_EXPIRED].freeze
|
@@ -51,7 +51,6 @@ module Api
|
|
51
51
|
# @return [String] The enum value
|
52
52
|
def build_from_hash(value)
|
53
53
|
return value if ErrorType.all_vars.include?(value)
|
54
|
-
|
55
54
|
raise "Invalid ENUM value #{value} for class #ErrorType"
|
56
55
|
end
|
57
56
|
end
|
@@ -1,29 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
=begin
|
2
|
+
#Jamm API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Api
|
17
17
|
class EventType
|
18
|
-
UNSPECIFIED =
|
19
|
-
CHARGE_CREATED =
|
20
|
-
CHARGE_UPDATED =
|
21
|
-
CHARGE_SUCCESS =
|
22
|
-
CHARGE_FAIL =
|
23
|
-
CHARGE_CANCEL =
|
24
|
-
CONTRACT_ACTIVATED =
|
25
|
-
USER_ACCOUNT_DELETED =
|
26
|
-
TESTING =
|
18
|
+
UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED".freeze
|
19
|
+
CHARGE_CREATED = "EVENT_TYPE_CHARGE_CREATED".freeze
|
20
|
+
CHARGE_UPDATED = "EVENT_TYPE_CHARGE_UPDATED".freeze
|
21
|
+
CHARGE_SUCCESS = "EVENT_TYPE_CHARGE_SUCCESS".freeze
|
22
|
+
CHARGE_FAIL = "EVENT_TYPE_CHARGE_FAIL".freeze
|
23
|
+
CHARGE_CANCEL = "EVENT_TYPE_CHARGE_CANCEL".freeze
|
24
|
+
CONTRACT_ACTIVATED = "EVENT_TYPE_CONTRACT_ACTIVATED".freeze
|
25
|
+
USER_ACCOUNT_DELETED = "EVENT_TYPE_USER_ACCOUNT_DELETED".freeze
|
26
|
+
TESTING = "EVENT_TYPE_TESTING".freeze
|
27
27
|
|
28
28
|
def self.all_vars
|
29
29
|
@all_vars ||= [UNSPECIFIED, CHARGE_CREATED, CHARGE_UPDATED, CHARGE_SUCCESS, CHARGE_FAIL, CHARGE_CANCEL, CONTRACT_ACTIVATED, USER_ACCOUNT_DELETED, TESTING].freeze
|
@@ -41,7 +41,6 @@ module Api
|
|
41
41
|
# @return [String] The enum value
|
42
42
|
def build_from_hash(value)
|
43
43
|
return value if EventType.all_vars.include?(value)
|
44
|
-
|
45
44
|
raise "Invalid ENUM value #{value} for class #EventType"
|
46
45
|
end
|
47
46
|
end
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
=begin
|
2
|
+
#Jamm API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
@@ -20,7 +20,7 @@ module Api
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
21
|
def self.attribute_map
|
22
22
|
{
|
23
|
-
:bank => :bank
|
23
|
+
:'bank' => :'bank'
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
@@ -32,37 +32,42 @@ module Api
|
|
32
32
|
# Attribute type mapping.
|
33
33
|
def self.openapi_types
|
34
34
|
{
|
35
|
-
:bank => :Bank
|
35
|
+
:'bank' => :'Bank'
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
39
39
|
# List of attributes with nullable: true
|
40
40
|
def self.openapi_nullable
|
41
|
-
Set.new([
|
41
|
+
Set.new([
|
42
|
+
])
|
42
43
|
end
|
43
44
|
|
44
45
|
# Initializes the object
|
45
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
46
47
|
def initialize(attributes = {})
|
47
|
-
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::GetBankResponse` initialize method"
|
50
|
+
end
|
48
51
|
|
49
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
-
attributes = attributes.each_with_object({})
|
51
|
-
|
52
|
-
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::GetBankResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
53
57
|
h[k.to_sym] = v
|
54
|
-
|
55
|
-
|
56
|
-
return unless attributes.key?(:bank)
|
58
|
+
}
|
57
59
|
|
58
|
-
|
60
|
+
if attributes.key?(:'bank')
|
61
|
+
self.bank = attributes[:'bank']
|
62
|
+
end
|
59
63
|
end
|
60
64
|
|
61
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
62
66
|
# @return Array for valid properties with the reasons
|
63
67
|
def list_invalid_properties
|
64
68
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
65
|
-
|
69
|
+
invalid_properties = Array.new
|
70
|
+
invalid_properties
|
66
71
|
end
|
67
72
|
|
68
73
|
# Check to see if the all the properties in the model are valid
|
@@ -74,17 +79,16 @@ module Api
|
|
74
79
|
|
75
80
|
# Checks equality by comparing each attribute.
|
76
81
|
# @param [Object] Object to be compared
|
77
|
-
def ==(
|
78
|
-
return true if equal?(
|
79
|
-
|
80
|
-
|
81
|
-
bank == other.bank
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
bank == o.bank
|
82
86
|
end
|
83
87
|
|
84
88
|
# @see the `==` method
|
85
89
|
# @param [Object] Object to be compared
|
86
|
-
def eql?(
|
87
|
-
self ==
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
88
92
|
end
|
89
93
|
|
90
94
|
# Calculates hash code according to all attributes.
|
@@ -98,18 +102,19 @@ module Api
|
|
98
102
|
# @return [Object] Returns the model itself
|
99
103
|
def self.build_from_hash(attributes)
|
100
104
|
return nil unless attributes.is_a?(Hash)
|
101
|
-
|
102
105
|
attributes = attributes.transform_keys(&:to_sym)
|
103
106
|
transformed_hash = {}
|
104
107
|
openapi_types.each_pair do |key, type|
|
105
108
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
106
|
-
transformed_hash[key
|
109
|
+
transformed_hash["#{key}"] = nil
|
107
110
|
elsif type =~ /\AArray<(.*)>/i
|
108
111
|
# check to ensure the input is an array given that the attribute
|
109
112
|
# is documented as an array but the input is not
|
110
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
115
|
+
end
|
111
116
|
elsif !attributes[attribute_map[key]].nil?
|
112
|
-
transformed_hash[key
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
113
118
|
end
|
114
119
|
end
|
115
120
|
new(transformed_hash)
|
@@ -175,7 +180,7 @@ module Api
|
|
175
180
|
def to_hash
|
176
181
|
hash = {}
|
177
182
|
self.class.attribute_map.each_pair do |attr, param|
|
178
|
-
value = send(attr)
|
183
|
+
value = self.send(attr)
|
179
184
|
if value.nil?
|
180
185
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
181
186
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -203,5 +208,7 @@ module Api
|
|
203
208
|
value
|
204
209
|
end
|
205
210
|
end
|
211
|
+
|
206
212
|
end
|
213
|
+
|
207
214
|
end
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
=begin
|
2
|
+
#Jamm API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
@@ -20,7 +20,7 @@ module Api
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
21
|
def self.attribute_map
|
22
22
|
{
|
23
|
-
:branch => :branch
|
23
|
+
:'branch' => :'branch'
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
@@ -32,37 +32,42 @@ module Api
|
|
32
32
|
# Attribute type mapping.
|
33
33
|
def self.openapi_types
|
34
34
|
{
|
35
|
-
:branch => :BankBranch
|
35
|
+
:'branch' => :'BankBranch'
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
39
39
|
# List of attributes with nullable: true
|
40
40
|
def self.openapi_nullable
|
41
|
-
Set.new([
|
41
|
+
Set.new([
|
42
|
+
])
|
42
43
|
end
|
43
44
|
|
44
45
|
# Initializes the object
|
45
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
46
47
|
def initialize(attributes = {})
|
47
|
-
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Api::GetBranchResponse` initialize method"
|
50
|
+
end
|
48
51
|
|
49
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
-
attributes = attributes.each_with_object({})
|
51
|
-
|
52
|
-
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Api::GetBranchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
53
57
|
h[k.to_sym] = v
|
54
|
-
|
55
|
-
|
56
|
-
return unless attributes.key?(:branch)
|
58
|
+
}
|
57
59
|
|
58
|
-
|
60
|
+
if attributes.key?(:'branch')
|
61
|
+
self.branch = attributes[:'branch']
|
62
|
+
end
|
59
63
|
end
|
60
64
|
|
61
65
|
# Show invalid properties with the reasons. Usually used together with valid?
|
62
66
|
# @return Array for valid properties with the reasons
|
63
67
|
def list_invalid_properties
|
64
68
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
65
|
-
|
69
|
+
invalid_properties = Array.new
|
70
|
+
invalid_properties
|
66
71
|
end
|
67
72
|
|
68
73
|
# Check to see if the all the properties in the model are valid
|
@@ -74,17 +79,16 @@ module Api
|
|
74
79
|
|
75
80
|
# Checks equality by comparing each attribute.
|
76
81
|
# @param [Object] Object to be compared
|
77
|
-
def ==(
|
78
|
-
return true if equal?(
|
79
|
-
|
80
|
-
|
81
|
-
branch == other.branch
|
82
|
+
def ==(o)
|
83
|
+
return true if self.equal?(o)
|
84
|
+
self.class == o.class &&
|
85
|
+
branch == o.branch
|
82
86
|
end
|
83
87
|
|
84
88
|
# @see the `==` method
|
85
89
|
# @param [Object] Object to be compared
|
86
|
-
def eql?(
|
87
|
-
self ==
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
88
92
|
end
|
89
93
|
|
90
94
|
# Calculates hash code according to all attributes.
|
@@ -98,18 +102,19 @@ module Api
|
|
98
102
|
# @return [Object] Returns the model itself
|
99
103
|
def self.build_from_hash(attributes)
|
100
104
|
return nil unless attributes.is_a?(Hash)
|
101
|
-
|
102
105
|
attributes = attributes.transform_keys(&:to_sym)
|
103
106
|
transformed_hash = {}
|
104
107
|
openapi_types.each_pair do |key, type|
|
105
108
|
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
106
|
-
transformed_hash[key
|
109
|
+
transformed_hash["#{key}"] = nil
|
107
110
|
elsif type =~ /\AArray<(.*)>/i
|
108
111
|
# check to ensure the input is an array given that the attribute
|
109
112
|
# is documented as an array but the input is not
|
110
|
-
|
113
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
114
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
115
|
+
end
|
111
116
|
elsif !attributes[attribute_map[key]].nil?
|
112
|
-
transformed_hash[key
|
117
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
113
118
|
end
|
114
119
|
end
|
115
120
|
new(transformed_hash)
|
@@ -175,7 +180,7 @@ module Api
|
|
175
180
|
def to_hash
|
176
181
|
hash = {}
|
177
182
|
self.class.attribute_map.each_pair do |attr, param|
|
178
|
-
value = send(attr)
|
183
|
+
value = self.send(attr)
|
179
184
|
if value.nil?
|
180
185
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
181
186
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -203,5 +208,7 @@ module Api
|
|
203
208
|
value
|
204
209
|
end
|
205
210
|
end
|
211
|
+
|
206
212
|
end
|
213
|
+
|
207
214
|
end
|