bk-apimatic-sdk 1.0.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 +7 -0
- data/LICENSE +28 -0
- data/README.md +203 -0
- data/bin/console +15 -0
- data/lib/boku_direct_payments_api/api_helper.rb +10 -0
- data/lib/boku_direct_payments_api/client.rb +99 -0
- data/lib/boku_direct_payments_api/configuration.rb +168 -0
- data/lib/boku_direct_payments_api/controllers/account_resources_controller.rb +45 -0
- data/lib/boku_direct_payments_api/controllers/base_controller.rb +60 -0
- data/lib/boku_direct_payments_api/controllers/charge_controller.rb +247 -0
- data/lib/boku_direct_payments_api/controllers/config_resources_controller.rb +50 -0
- data/lib/boku_direct_payments_api/controllers/consumer_registration_controller.rb +428 -0
- data/lib/boku_direct_payments_api/controllers/forex_controller.rb +38 -0
- data/lib/boku_direct_payments_api/controllers/fund_check_controller.rb +39 -0
- data/lib/boku_direct_payments_api/controllers/refund_controller.rb +80 -0
- data/lib/boku_direct_payments_api/controllers/seller_of_record_controller.rb +69 -0
- data/lib/boku_direct_payments_api/exceptions/api_exception.rb +21 -0
- data/lib/boku_direct_payments_api/http/http_call_back.rb +10 -0
- data/lib/boku_direct_payments_api/http/http_method_enum.rb +10 -0
- data/lib/boku_direct_payments_api/http/http_request.rb +10 -0
- data/lib/boku_direct_payments_api/http/http_response.rb +10 -0
- data/lib/boku_direct_payments_api/http/proxy_settings.rb +22 -0
- data/lib/boku_direct_payments_api/models/account_profile.rb +122 -0
- data/lib/boku_direct_payments_api/models/account_profile_attribute.rb +90 -0
- data/lib/boku_direct_payments_api/models/account_profile_request.rb +131 -0
- data/lib/boku_direct_payments_api/models/account_profile_response.rb +104 -0
- data/lib/boku_direct_payments_api/models/account_profile_response_record.rb +142 -0
- data/lib/boku_direct_payments_api/models/account_profile_result_status_enum.rb +47 -0
- data/lib/boku_direct_payments_api/models/account_profile_selector.rb +132 -0
- data/lib/boku_direct_payments_api/models/base_model.rb +110 -0
- data/lib/boku_direct_payments_api/models/begin_single_charge_request.rb +360 -0
- data/lib/boku_direct_payments_api/models/begin_single_charge_request_hosted.rb +110 -0
- data/lib/boku_direct_payments_api/models/begin_single_charge_request_qr_info.rb +74 -0
- data/lib/boku_direct_payments_api/models/begin_single_charge_response.rb +254 -0
- data/lib/boku_direct_payments_api/models/begin_single_charge_response_hosted.rb +90 -0
- data/lib/boku_direct_payments_api/models/begin_single_charge_response_qr_info.rb +85 -0
- data/lib/boku_direct_payments_api/models/business_details.rb +209 -0
- data/lib/boku_direct_payments_api/models/cancel_optin_request.rb +123 -0
- data/lib/boku_direct_payments_api/models/cancel_optin_response.rb +143 -0
- data/lib/boku_direct_payments_api/models/carrier_gw.rb +82 -0
- data/lib/boku_direct_payments_api/models/charge.rb +288 -0
- data/lib/boku_direct_payments_api/models/charge_msisdn_request.rb +233 -0
- data/lib/boku_direct_payments_api/models/charge_plus_optin_request.rb +390 -0
- data/lib/boku_direct_payments_api/models/charge_plus_optin_request_hosted.rb +96 -0
- data/lib/boku_direct_payments_api/models/charge_plus_optin_response.rb +278 -0
- data/lib/boku_direct_payments_api/models/charge_plus_optin_response_hosted.rb +75 -0
- data/lib/boku_direct_payments_api/models/charge_request.rb +332 -0
- data/lib/boku_direct_payments_api/models/charge_response.rb +253 -0
- data/lib/boku_direct_payments_api/models/charge_status_enum.rb +43 -0
- data/lib/boku_direct_payments_api/models/check_eligibility_request.rb +117 -0
- data/lib/boku_direct_payments_api/models/check_eligibility_response.rb +116 -0
- data/lib/boku_direct_payments_api/models/client_call.rb +91 -0
- data/lib/boku_direct_payments_api/models/confirm_optin_request.rb +141 -0
- data/lib/boku_direct_payments_api/models/confirm_optin_response.rb +211 -0
- data/lib/boku_direct_payments_api/models/confirm_verify_device_request.rb +161 -0
- data/lib/boku_direct_payments_api/models/confirm_verify_device_response.rb +137 -0
- data/lib/boku_direct_payments_api/models/eligibility_status_enum.rb +40 -0
- data/lib/boku_direct_payments_api/models/forex_request.rb +97 -0
- data/lib/boku_direct_payments_api/models/forex_response.rb +127 -0
- data/lib/boku_direct_payments_api/models/fund_check_request.rb +132 -0
- data/lib/boku_direct_payments_api/models/fund_check_response.rb +89 -0
- data/lib/boku_direct_payments_api/models/invalid_request_field.rb +93 -0
- data/lib/boku_direct_payments_api/models/mandate_constraint.rb +92 -0
- data/lib/boku_direct_payments_api/models/mandate_period_enum.rb +48 -0
- data/lib/boku_direct_payments_api/models/mcc_mnc_mapping.rb +85 -0
- data/lib/boku_direct_payments_api/models/method_enum.rb +36 -0
- data/lib/boku_direct_payments_api/models/msisdn_network_request.rb +97 -0
- data/lib/boku_direct_payments_api/models/msisdn_network_response.rb +116 -0
- data/lib/boku_direct_payments_api/models/network_info.rb +84 -0
- data/lib/boku_direct_payments_api/models/network_info_network.rb +168 -0
- data/lib/boku_direct_payments_api/models/optin_accept_networks.rb +87 -0
- data/lib/boku_direct_payments_api/models/optin_info.rb +99 -0
- data/lib/boku_direct_payments_api/models/optin_info_optin_network.rb +104 -0
- data/lib/boku_direct_payments_api/models/optin_info_optin_types.rb +128 -0
- data/lib/boku_direct_payments_api/models/optin_network.rb +115 -0
- data/lib/boku_direct_payments_api/models/optin_purpose_enum.rb +62 -0
- data/lib/boku_direct_payments_api/models/optin_request.rb +338 -0
- data/lib/boku_direct_payments_api/models/optin_request_hosted.rb +110 -0
- data/lib/boku_direct_payments_api/models/optin_request_qr_info.rb +75 -0
- data/lib/boku_direct_payments_api/models/optin_response.rb +220 -0
- data/lib/boku_direct_payments_api/models/optin_response_hosted.rb +87 -0
- data/lib/boku_direct_payments_api/models/optin_response_qr_info.rb +85 -0
- data/lib/boku_direct_payments_api/models/optin_state.rb +164 -0
- data/lib/boku_direct_payments_api/models/optin_status_enum.rb +51 -0
- data/lib/boku_direct_payments_api/models/optin_terms.rb +214 -0
- data/lib/boku_direct_payments_api/models/optin_type_enum.rb +45 -0
- data/lib/boku_direct_payments_api/models/payment_method_status_enum.rb +44 -0
- data/lib/boku_direct_payments_api/models/period.rb +89 -0
- data/lib/boku_direct_payments_api/models/period_unit_enum.rb +46 -0
- data/lib/boku_direct_payments_api/models/query_charge_request.rb +149 -0
- data/lib/boku_direct_payments_api/models/query_charge_response.rb +101 -0
- data/lib/boku_direct_payments_api/models/query_optin_request.rb +104 -0
- data/lib/boku_direct_payments_api/models/query_optin_response.rb +129 -0
- data/lib/boku_direct_payments_api/models/query_refund_request.rb +122 -0
- data/lib/boku_direct_payments_api/models/query_refund_response.rb +101 -0
- data/lib/boku_direct_payments_api/models/refund.rb +249 -0
- data/lib/boku_direct_payments_api/models/refund_charge_notification.rb +88 -0
- data/lib/boku_direct_payments_api/models/refund_charge_request.rb +231 -0
- data/lib/boku_direct_payments_api/models/refund_charge_response.rb +203 -0
- data/lib/boku_direct_payments_api/models/refund_status_enum.rb +43 -0
- data/lib/boku_direct_payments_api/models/refund_type_enum.rb +36 -0
- data/lib/boku_direct_payments_api/models/register_payment_method_request.rb +152 -0
- data/lib/boku_direct_payments_api/models/register_payment_method_response.rb +172 -0
- data/lib/boku_direct_payments_api/models/register_seller_of_record_request.rb +118 -0
- data/lib/boku_direct_payments_api/models/register_seller_of_record_response.rb +156 -0
- data/lib/boku_direct_payments_api/models/resend_otp_request.rb +167 -0
- data/lib/boku_direct_payments_api/models/resend_otp_response.rb +118 -0
- data/lib/boku_direct_payments_api/models/result.rb +154 -0
- data/lib/boku_direct_payments_api/models/result_status_enum.rb +36 -0
- data/lib/boku_direct_payments_api/models/reversal.rb +89 -0
- data/lib/boku_direct_payments_api/models/reverse_charge_request.rb +104 -0
- data/lib/boku_direct_payments_api/models/reverse_charge_response.rb +157 -0
- data/lib/boku_direct_payments_api/models/seller_of_record.rb +76 -0
- data/lib/boku_direct_payments_api/models/seller_of_record_status_enum.rb +44 -0
- data/lib/boku_direct_payments_api/models/send_sms.rb +89 -0
- data/lib/boku_direct_payments_api/models/settlement.rb +126 -0
- data/lib/boku_direct_payments_api/models/silent_mo.rb +78 -0
- data/lib/boku_direct_payments_api/models/status_enum.rb +40 -0
- data/lib/boku_direct_payments_api/models/subscription.rb +105 -0
- data/lib/boku_direct_payments_api/models/timeout.rb +75 -0
- data/lib/boku_direct_payments_api/models/type_enum.rb +36 -0
- data/lib/boku_direct_payments_api/models/validate_optin_request.rb +179 -0
- data/lib/boku_direct_payments_api/models/validate_optin_response.rb +195 -0
- data/lib/boku_direct_payments_api/models/verify_device_request.rb +135 -0
- data/lib/boku_direct_payments_api/models/verify_device_response.rb +137 -0
- data/lib/boku_direct_payments_api/utilities/date_time_helper.rb +11 -0
- data/lib/boku_direct_payments_api/utilities/file_wrapper.rb +28 -0
- data/lib/boku_direct_payments_api/utilities/xml_utilities.rb +12 -0
- data/lib/boku_direct_payments_api.rb +166 -0
- data/test/controllers/controller_test_base.rb +23 -0
- data/test/controllers/test_account_resources_controller.rb +44 -0
- data/test/controllers/test_charge_controller.rb +159 -0
- data/test/controllers/test_config_resources_controller.rb +47 -0
- data/test/controllers/test_consumer_registration_controller.rb +262 -0
- data/test/controllers/test_forex_controller.rb +40 -0
- data/test/controllers/test_fund_check_controller.rb +41 -0
- data/test/controllers/test_refund_controller.rb +76 -0
- data/test/controllers/test_seller_of_record_controller.rb +72 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +255 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# boku_direct_payments_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BokuDirectPaymentsApi
|
|
7
|
+
# MccMncMapping Model.
|
|
8
|
+
class MccMncMapping < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :mcc
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :mnc
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['mcc'] = 'mcc'
|
|
24
|
+
@_hash['mnc'] = 'mnc'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for nullable fields
|
|
34
|
+
def self.nullables
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def initialize(mcc = nil, mnc = nil)
|
|
39
|
+
@mcc = mcc
|
|
40
|
+
@mnc = mnc
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
mcc = hash.key?('mcc') ? hash['mcc'] : nil
|
|
49
|
+
mnc = hash.key?('mnc') ? hash['mnc'] : nil
|
|
50
|
+
|
|
51
|
+
# Create object from extracted values.
|
|
52
|
+
MccMncMapping.new(mcc,
|
|
53
|
+
mnc)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def self.from_element(root)
|
|
57
|
+
mcc = XmlUtilities.from_attribute(root, 'mcc', String)
|
|
58
|
+
mnc = XmlUtilities.from_attribute(root, 'mnc', String)
|
|
59
|
+
|
|
60
|
+
new(mcc,
|
|
61
|
+
mnc)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def to_xml_element(doc, root_name)
|
|
65
|
+
root = doc.create_element(root_name)
|
|
66
|
+
|
|
67
|
+
XmlUtilities.add_as_attribute(root, 'mcc', mcc)
|
|
68
|
+
XmlUtilities.add_as_attribute(root, 'mnc', mnc)
|
|
69
|
+
|
|
70
|
+
root
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Provides a human-readable string representation of the object.
|
|
74
|
+
def to_s
|
|
75
|
+
class_name = self.class.name.split('::').last
|
|
76
|
+
"<#{class_name} mcc: #{@mcc}, mnc: #{@mnc}>"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
80
|
+
def inspect
|
|
81
|
+
class_name = self.class.name.split('::').last
|
|
82
|
+
"<#{class_name} mcc: #{@mcc.inspect}, mnc: #{@mnc.inspect}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# boku_direct_payments_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BokuDirectPaymentsApi
|
|
7
|
+
# HTTP method to use for the call, usually 'GET'
|
|
8
|
+
class MethodEnum
|
|
9
|
+
METHOD_ENUM = [
|
|
10
|
+
# TODO: Write general description for GET
|
|
11
|
+
GET = 'GET'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for POST
|
|
14
|
+
POST = 'POST'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
METHOD_ENUM.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = GET)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'get' then GET
|
|
30
|
+
when 'post' then POST
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# boku_direct_payments_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BokuDirectPaymentsApi
|
|
7
|
+
# MsisdnNetworkRequest Model.
|
|
8
|
+
class MsisdnNetworkRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# ISO 3166-1 alpha-2 country code.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :country
|
|
15
|
+
|
|
16
|
+
# Boku-assigned merchant ID.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :merchant_id
|
|
19
|
+
|
|
20
|
+
# Consumer's mobile phone number.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :msisdn
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['country'] = 'country'
|
|
28
|
+
@_hash['merchant_id'] = 'merchant-id'
|
|
29
|
+
@_hash['msisdn'] = 'msisdn'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for nullable fields
|
|
39
|
+
def self.nullables
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(country = nil, merchant_id = nil, msisdn = nil)
|
|
44
|
+
@country = country
|
|
45
|
+
@merchant_id = merchant_id
|
|
46
|
+
@msisdn = msisdn
|
|
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
|
+
country = hash.key?('country') ? hash['country'] : nil
|
|
55
|
+
merchant_id = hash.key?('merchant-id') ? hash['merchant-id'] : nil
|
|
56
|
+
msisdn = hash.key?('msisdn') ? hash['msisdn'] : nil
|
|
57
|
+
|
|
58
|
+
# Create object from extracted values.
|
|
59
|
+
MsisdnNetworkRequest.new(country,
|
|
60
|
+
merchant_id,
|
|
61
|
+
msisdn)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def self.from_element(root)
|
|
65
|
+
country = XmlUtilities.from_element(root, 'country', String)
|
|
66
|
+
merchant_id = XmlUtilities.from_element(root, 'merchant-id', String)
|
|
67
|
+
msisdn = XmlUtilities.from_element(root, 'msisdn', String)
|
|
68
|
+
|
|
69
|
+
new(country,
|
|
70
|
+
merchant_id,
|
|
71
|
+
msisdn)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def to_xml_element(doc, root_name)
|
|
75
|
+
root = doc.create_element(root_name)
|
|
76
|
+
|
|
77
|
+
XmlUtilities.add_as_subelement(doc, root, 'country', country)
|
|
78
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-id', merchant_id)
|
|
79
|
+
XmlUtilities.add_as_subelement(doc, root, 'msisdn', msisdn)
|
|
80
|
+
|
|
81
|
+
root
|
|
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} country: #{@country}, merchant_id: #{@merchant_id}, msisdn: #{@msisdn}>"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
91
|
+
def inspect
|
|
92
|
+
class_name = self.class.name.split('::').last
|
|
93
|
+
"<#{class_name} country: #{@country.inspect}, merchant_id: #{@merchant_id.inspect}, msisdn:"\
|
|
94
|
+
" #{@msisdn.inspect}>"
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# boku_direct_payments_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BokuDirectPaymentsApi
|
|
7
|
+
# MsisdnNetworkResponse Model.
|
|
8
|
+
class MsisdnNetworkResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The 'result' element is defined in every response type. It is used to
|
|
13
|
+
# convey the outcome of an API request.
|
|
14
|
+
# @return [Result]
|
|
15
|
+
attr_accessor :result
|
|
16
|
+
|
|
17
|
+
# ISO 3166-1 alpha-2 country code.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :country
|
|
20
|
+
|
|
21
|
+
# Consumer's mobile phone number normalized into international MSISDN
|
|
22
|
+
# format: country code + mobile phone number
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :msisdn
|
|
25
|
+
|
|
26
|
+
# Unique identifier for the network
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :network_id
|
|
29
|
+
|
|
30
|
+
# A mapping from model property names to API property names.
|
|
31
|
+
def self.names
|
|
32
|
+
@_hash = {} if @_hash.nil?
|
|
33
|
+
@_hash['result'] = 'result'
|
|
34
|
+
@_hash['country'] = 'country'
|
|
35
|
+
@_hash['msisdn'] = 'msisdn'
|
|
36
|
+
@_hash['network_id'] = 'network-id'
|
|
37
|
+
@_hash
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# An array for optional fields
|
|
41
|
+
def self.optionals
|
|
42
|
+
%w[
|
|
43
|
+
country
|
|
44
|
+
msisdn
|
|
45
|
+
network_id
|
|
46
|
+
]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for nullable fields
|
|
50
|
+
def self.nullables
|
|
51
|
+
[]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def initialize(result = nil, country = SKIP, msisdn = SKIP,
|
|
55
|
+
network_id = SKIP)
|
|
56
|
+
@result = result
|
|
57
|
+
@country = country unless country == SKIP
|
|
58
|
+
@msisdn = msisdn unless msisdn == SKIP
|
|
59
|
+
@network_id = network_id unless network_id == SKIP
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Creates an instance of the object from a hash.
|
|
63
|
+
def self.from_hash(hash)
|
|
64
|
+
return nil unless hash
|
|
65
|
+
|
|
66
|
+
# Extract variables from the hash.
|
|
67
|
+
result = Result.from_hash(hash['result']) if hash['result']
|
|
68
|
+
country = hash.key?('country') ? hash['country'] : SKIP
|
|
69
|
+
msisdn = hash.key?('msisdn') ? hash['msisdn'] : SKIP
|
|
70
|
+
network_id = hash.key?('network-id') ? hash['network-id'] : SKIP
|
|
71
|
+
|
|
72
|
+
# Create object from extracted values.
|
|
73
|
+
MsisdnNetworkResponse.new(result,
|
|
74
|
+
country,
|
|
75
|
+
msisdn,
|
|
76
|
+
network_id)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def self.from_element(root)
|
|
80
|
+
result = XmlUtilities.from_element(root, 'result', Result)
|
|
81
|
+
country = XmlUtilities.from_element(root, 'country', String)
|
|
82
|
+
msisdn = XmlUtilities.from_element(root, 'msisdn', String)
|
|
83
|
+
network_id = XmlUtilities.from_element(root, 'network-id', String)
|
|
84
|
+
|
|
85
|
+
new(result,
|
|
86
|
+
country,
|
|
87
|
+
msisdn,
|
|
88
|
+
network_id)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def to_xml_element(doc, root_name)
|
|
92
|
+
root = doc.create_element(root_name)
|
|
93
|
+
|
|
94
|
+
XmlUtilities.add_as_subelement(doc, root, 'result', result)
|
|
95
|
+
XmlUtilities.add_as_subelement(doc, root, 'country', country)
|
|
96
|
+
XmlUtilities.add_as_subelement(doc, root, 'msisdn', msisdn)
|
|
97
|
+
XmlUtilities.add_as_subelement(doc, root, 'network-id', network_id)
|
|
98
|
+
|
|
99
|
+
root
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Provides a human-readable string representation of the object.
|
|
103
|
+
def to_s
|
|
104
|
+
class_name = self.class.name.split('::').last
|
|
105
|
+
"<#{class_name} result: #{@result}, country: #{@country}, msisdn: #{@msisdn}, network_id:"\
|
|
106
|
+
" #{@network_id}>"
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
110
|
+
def inspect
|
|
111
|
+
class_name = self.class.name.split('::').last
|
|
112
|
+
"<#{class_name} result: #{@result.inspect}, country: #{@country.inspect}, msisdn:"\
|
|
113
|
+
" #{@msisdn.inspect}, network_id: #{@network_id.inspect}>"
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# boku_direct_payments_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BokuDirectPaymentsApi
|
|
7
|
+
# NetworkInfo Model.
|
|
8
|
+
class NetworkInfo < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[NetworkInfoNetwork]]
|
|
14
|
+
attr_accessor :networks
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['networks'] = 'networks'
|
|
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(networks = nil)
|
|
34
|
+
@networks = networks
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Creates an instance of the object from a hash.
|
|
38
|
+
def self.from_hash(hash)
|
|
39
|
+
return nil unless hash
|
|
40
|
+
|
|
41
|
+
# Extract variables from the hash.
|
|
42
|
+
# Parameter is an array, so we need to iterate through it
|
|
43
|
+
networks = nil
|
|
44
|
+
unless hash['networks'].nil?
|
|
45
|
+
networks = []
|
|
46
|
+
hash['networks'].each do |structure|
|
|
47
|
+
networks << (NetworkInfoNetwork.from_hash(structure) if structure)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
networks = nil unless hash.key?('networks')
|
|
52
|
+
|
|
53
|
+
# Create object from extracted values.
|
|
54
|
+
NetworkInfo.new(networks)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def self.from_element(root)
|
|
58
|
+
networks = XmlUtilities.from_element_to_array(root, 'network',
|
|
59
|
+
NetworkInfoNetwork)
|
|
60
|
+
|
|
61
|
+
new(networks)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def to_xml_element(doc, root_name)
|
|
65
|
+
root = doc.create_element(root_name)
|
|
66
|
+
|
|
67
|
+
XmlUtilities.add_array_as_subelement(doc, root, 'network', networks)
|
|
68
|
+
|
|
69
|
+
root
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Provides a human-readable string representation of the object.
|
|
73
|
+
def to_s
|
|
74
|
+
class_name = self.class.name.split('::').last
|
|
75
|
+
"<#{class_name} networks: #{@networks}>"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
79
|
+
def inspect
|
|
80
|
+
class_name = self.class.name.split('::').last
|
|
81
|
+
"<#{class_name} networks: #{@networks.inspect}>"
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# boku_direct_payments_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BokuDirectPaymentsApi
|
|
7
|
+
# NetworkInfoNetwork Model.
|
|
8
|
+
class NetworkInfoNetwork < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :country
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :logo
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [Array[MccMncMapping]]
|
|
30
|
+
attr_accessor :mcc_mnc_mappings
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :payment_method
|
|
35
|
+
|
|
36
|
+
# TODO: Write general description for this method
|
|
37
|
+
# @return [StatusEnum]
|
|
38
|
+
attr_accessor :status
|
|
39
|
+
|
|
40
|
+
# A mapping from model property names to API property names.
|
|
41
|
+
def self.names
|
|
42
|
+
@_hash = {} if @_hash.nil?
|
|
43
|
+
@_hash['country'] = 'country'
|
|
44
|
+
@_hash['id'] = 'id'
|
|
45
|
+
@_hash['name'] = 'name'
|
|
46
|
+
@_hash['logo'] = 'logo'
|
|
47
|
+
@_hash['mcc_mnc_mappings'] = 'mcc-mnc-mappings'
|
|
48
|
+
@_hash['payment_method'] = 'payment-method'
|
|
49
|
+
@_hash['status'] = 'status'
|
|
50
|
+
@_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for optional fields
|
|
54
|
+
def self.optionals
|
|
55
|
+
%w[
|
|
56
|
+
logo
|
|
57
|
+
mcc_mnc_mappings
|
|
58
|
+
payment_method
|
|
59
|
+
status
|
|
60
|
+
]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# An array for nullable fields
|
|
64
|
+
def self.nullables
|
|
65
|
+
[]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def initialize(country = nil, id = nil, name = nil, logo = SKIP,
|
|
69
|
+
mcc_mnc_mappings = SKIP, payment_method = SKIP,
|
|
70
|
+
status = SKIP)
|
|
71
|
+
@country = country
|
|
72
|
+
@id = id
|
|
73
|
+
@name = name
|
|
74
|
+
@logo = logo unless logo == SKIP
|
|
75
|
+
@mcc_mnc_mappings = mcc_mnc_mappings unless mcc_mnc_mappings == SKIP
|
|
76
|
+
@payment_method = payment_method unless payment_method == SKIP
|
|
77
|
+
@status = status unless status == SKIP
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Creates an instance of the object from a hash.
|
|
81
|
+
def self.from_hash(hash)
|
|
82
|
+
return nil unless hash
|
|
83
|
+
|
|
84
|
+
# Extract variables from the hash.
|
|
85
|
+
country = hash.key?('country') ? hash['country'] : nil
|
|
86
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
87
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
88
|
+
logo = hash.key?('logo') ? hash['logo'] : SKIP
|
|
89
|
+
# Parameter is an array, so we need to iterate through it
|
|
90
|
+
mcc_mnc_mappings = nil
|
|
91
|
+
unless hash['mcc-mnc-mappings'].nil?
|
|
92
|
+
mcc_mnc_mappings = []
|
|
93
|
+
hash['mcc-mnc-mappings'].each do |structure|
|
|
94
|
+
mcc_mnc_mappings << (MccMncMapping.from_hash(structure) if structure)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
mcc_mnc_mappings = SKIP unless hash.key?('mcc-mnc-mappings')
|
|
99
|
+
payment_method =
|
|
100
|
+
hash.key?('payment-method') ? hash['payment-method'] : SKIP
|
|
101
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
|
102
|
+
|
|
103
|
+
# Create object from extracted values.
|
|
104
|
+
NetworkInfoNetwork.new(country,
|
|
105
|
+
id,
|
|
106
|
+
name,
|
|
107
|
+
logo,
|
|
108
|
+
mcc_mnc_mappings,
|
|
109
|
+
payment_method,
|
|
110
|
+
status)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def self.from_element(root)
|
|
114
|
+
country = XmlUtilities.from_attribute(root, 'country', String)
|
|
115
|
+
id = XmlUtilities.from_attribute(root, 'id', String)
|
|
116
|
+
name = XmlUtilities.from_attribute(root, 'name', String)
|
|
117
|
+
logo = XmlUtilities.from_attribute(root, 'logo', String)
|
|
118
|
+
mcc_mnc_mappings = XmlUtilities.from_element_to_array(
|
|
119
|
+
root, 'MccMncMapping', MccMncMapping,
|
|
120
|
+
wrapping_element_name: 'mcc-mnc-mappings'
|
|
121
|
+
)
|
|
122
|
+
payment_method = XmlUtilities.from_attribute(root, 'payment-method',
|
|
123
|
+
String)
|
|
124
|
+
status = XmlUtilities.from_attribute(root, 'status', String)
|
|
125
|
+
|
|
126
|
+
new(country,
|
|
127
|
+
id,
|
|
128
|
+
name,
|
|
129
|
+
logo,
|
|
130
|
+
mcc_mnc_mappings,
|
|
131
|
+
payment_method,
|
|
132
|
+
status)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def to_xml_element(doc, root_name)
|
|
136
|
+
root = doc.create_element(root_name)
|
|
137
|
+
|
|
138
|
+
XmlUtilities.add_as_attribute(root, 'country', country)
|
|
139
|
+
XmlUtilities.add_as_attribute(root, 'id', id)
|
|
140
|
+
XmlUtilities.add_as_attribute(root, 'name', name)
|
|
141
|
+
XmlUtilities.add_as_attribute(root, 'logo', logo)
|
|
142
|
+
XmlUtilities.add_array_as_subelement(
|
|
143
|
+
doc, root, 'MccMncMapping', mcc_mnc_mappings,
|
|
144
|
+
wrapping_element_name: 'mcc-mnc-mappings'
|
|
145
|
+
)
|
|
146
|
+
XmlUtilities.add_as_attribute(root, 'payment-method', payment_method)
|
|
147
|
+
XmlUtilities.add_as_attribute(root, 'status', status)
|
|
148
|
+
|
|
149
|
+
root
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Provides a human-readable string representation of the object.
|
|
153
|
+
def to_s
|
|
154
|
+
class_name = self.class.name.split('::').last
|
|
155
|
+
"<#{class_name} country: #{@country}, id: #{@id}, name: #{@name}, logo: #{@logo},"\
|
|
156
|
+
" mcc_mnc_mappings: #{@mcc_mnc_mappings}, payment_method: #{@payment_method}, status:"\
|
|
157
|
+
" #{@status}>"
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
161
|
+
def inspect
|
|
162
|
+
class_name = self.class.name.split('::').last
|
|
163
|
+
"<#{class_name} country: #{@country.inspect}, id: #{@id.inspect}, name: #{@name.inspect},"\
|
|
164
|
+
" logo: #{@logo.inspect}, mcc_mnc_mappings: #{@mcc_mnc_mappings.inspect}, payment_method:"\
|
|
165
|
+
" #{@payment_method.inspect}, status: #{@status.inspect}>"
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# boku_direct_payments_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module BokuDirectPaymentsApi
|
|
7
|
+
# A container element that allows the merchant to restrict which networks are
|
|
8
|
+
# permitted for this request. - If omitted, all networks enabled on the
|
|
9
|
+
# merchant account will be allowed. - If specified, only the networks listed
|
|
10
|
+
# and enabled for the merchant will be permitted.
|
|
11
|
+
class OptinAcceptNetworks < BaseModel
|
|
12
|
+
SKIP = Object.new
|
|
13
|
+
private_constant :SKIP
|
|
14
|
+
|
|
15
|
+
# Specifies the set of networks to which the opt-in request is restricted.
|
|
16
|
+
# @return [Array[OptinNetwork]]
|
|
17
|
+
attr_accessor :networks
|
|
18
|
+
|
|
19
|
+
# A mapping from model property names to API property names.
|
|
20
|
+
def self.names
|
|
21
|
+
@_hash = {} if @_hash.nil?
|
|
22
|
+
@_hash['networks'] = 'networks'
|
|
23
|
+
@_hash
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# An array for optional fields
|
|
27
|
+
def self.optionals
|
|
28
|
+
[]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for nullable fields
|
|
32
|
+
def self.nullables
|
|
33
|
+
[]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def initialize(networks = nil)
|
|
37
|
+
@networks = networks
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Creates an instance of the object from a hash.
|
|
41
|
+
def self.from_hash(hash)
|
|
42
|
+
return nil unless hash
|
|
43
|
+
|
|
44
|
+
# Extract variables from the hash.
|
|
45
|
+
# Parameter is an array, so we need to iterate through it
|
|
46
|
+
networks = nil
|
|
47
|
+
unless hash['networks'].nil?
|
|
48
|
+
networks = []
|
|
49
|
+
hash['networks'].each do |structure|
|
|
50
|
+
networks << (OptinNetwork.from_hash(structure) if structure)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
networks = nil unless hash.key?('networks')
|
|
55
|
+
|
|
56
|
+
# Create object from extracted values.
|
|
57
|
+
OptinAcceptNetworks.new(networks)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def self.from_element(root)
|
|
61
|
+
networks = XmlUtilities.from_element_to_array(root, 'network',
|
|
62
|
+
OptinNetwork)
|
|
63
|
+
|
|
64
|
+
new(networks)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def to_xml_element(doc, root_name)
|
|
68
|
+
root = doc.create_element(root_name)
|
|
69
|
+
|
|
70
|
+
XmlUtilities.add_array_as_subelement(doc, root, 'network', networks)
|
|
71
|
+
|
|
72
|
+
root
|
|
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} networks: #{@networks}>"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
82
|
+
def inspect
|
|
83
|
+
class_name = self.class.name.split('::').last
|
|
84
|
+
"<#{class_name} networks: #{@networks.inspect}>"
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|