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,118 @@
|
|
|
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
|
+
# RegisterSellerOfRecordRequest Model.
|
|
8
|
+
class RegisterSellerOfRecordRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Container element for business details
|
|
13
|
+
# @return [BusinessDetails]
|
|
14
|
+
attr_accessor :business_details
|
|
15
|
+
|
|
16
|
+
# ISO 3166-1 alpha-2 country code where the seller of record is incorporated
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :country
|
|
19
|
+
|
|
20
|
+
# Boku-assigned merchant ID.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :merchant_id
|
|
23
|
+
|
|
24
|
+
# Merchant-assigned unique request ID.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :merchant_request_id
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['business_details'] = 'business-details'
|
|
32
|
+
@_hash['country'] = 'country'
|
|
33
|
+
@_hash['merchant_id'] = 'merchant-id'
|
|
34
|
+
@_hash['merchant_request_id'] = 'merchant-request-id'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for nullable fields
|
|
44
|
+
def self.nullables
|
|
45
|
+
[]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def initialize(business_details = nil, country = nil, merchant_id = nil,
|
|
49
|
+
merchant_request_id = nil)
|
|
50
|
+
@business_details = business_details
|
|
51
|
+
@country = country
|
|
52
|
+
@merchant_id = merchant_id
|
|
53
|
+
@merchant_request_id = merchant_request_id
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Creates an instance of the object from a hash.
|
|
57
|
+
def self.from_hash(hash)
|
|
58
|
+
return nil unless hash
|
|
59
|
+
|
|
60
|
+
# Extract variables from the hash.
|
|
61
|
+
business_details = BusinessDetails.from_hash(hash['business-details']) if
|
|
62
|
+
hash['business-details']
|
|
63
|
+
country = hash.key?('country') ? hash['country'] : nil
|
|
64
|
+
merchant_id = hash.key?('merchant-id') ? hash['merchant-id'] : nil
|
|
65
|
+
merchant_request_id =
|
|
66
|
+
hash.key?('merchant-request-id') ? hash['merchant-request-id'] : nil
|
|
67
|
+
|
|
68
|
+
# Create object from extracted values.
|
|
69
|
+
RegisterSellerOfRecordRequest.new(business_details,
|
|
70
|
+
country,
|
|
71
|
+
merchant_id,
|
|
72
|
+
merchant_request_id)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def self.from_element(root)
|
|
76
|
+
business_details = XmlUtilities.from_element(root, 'business-details',
|
|
77
|
+
BusinessDetails)
|
|
78
|
+
country = XmlUtilities.from_element(root, 'country', String)
|
|
79
|
+
merchant_id = XmlUtilities.from_element(root, 'merchant-id', String)
|
|
80
|
+
merchant_request_id = XmlUtilities.from_element(root,
|
|
81
|
+
'merchant-request-id',
|
|
82
|
+
String)
|
|
83
|
+
|
|
84
|
+
new(business_details,
|
|
85
|
+
country,
|
|
86
|
+
merchant_id,
|
|
87
|
+
merchant_request_id)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def to_xml_element(doc, root_name)
|
|
91
|
+
root = doc.create_element(root_name)
|
|
92
|
+
|
|
93
|
+
XmlUtilities.add_as_subelement(doc, root, 'business-details',
|
|
94
|
+
business_details)
|
|
95
|
+
XmlUtilities.add_as_subelement(doc, root, 'country', country)
|
|
96
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-id', merchant_id)
|
|
97
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-request-id',
|
|
98
|
+
merchant_request_id)
|
|
99
|
+
|
|
100
|
+
root
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Provides a human-readable string representation of the object.
|
|
104
|
+
def to_s
|
|
105
|
+
class_name = self.class.name.split('::').last
|
|
106
|
+
"<#{class_name} business_details: #{@business_details}, country: #{@country}, merchant_id:"\
|
|
107
|
+
" #{@merchant_id}, merchant_request_id: #{@merchant_request_id}>"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
111
|
+
def inspect
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} business_details: #{@business_details.inspect}, country:"\
|
|
114
|
+
" #{@country.inspect}, merchant_id: #{@merchant_id.inspect}, merchant_request_id:"\
|
|
115
|
+
" #{@merchant_request_id.inspect}>"
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
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
|
+
# RegisterSellerOfRecordResponse Model.
|
|
8
|
+
class RegisterSellerOfRecordResponse < 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
|
+
# Boku-assigned merchant ID.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :merchant_id
|
|
24
|
+
|
|
25
|
+
# Merchant-assigned unique request ID.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :merchant_request_id
|
|
28
|
+
|
|
29
|
+
# Boku-generated ID associated with seller of record. This ID will be used
|
|
30
|
+
# in subsequent requests.
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :seller_of_record_id
|
|
33
|
+
|
|
34
|
+
# The status of Seller Of Record
|
|
35
|
+
# @return [SellerOfRecordStatusEnum]
|
|
36
|
+
attr_accessor :seller_of_record_status
|
|
37
|
+
|
|
38
|
+
# A mapping from model property names to API property names.
|
|
39
|
+
def self.names
|
|
40
|
+
@_hash = {} if @_hash.nil?
|
|
41
|
+
@_hash['result'] = 'result'
|
|
42
|
+
@_hash['country'] = 'country'
|
|
43
|
+
@_hash['merchant_id'] = 'merchant-id'
|
|
44
|
+
@_hash['merchant_request_id'] = 'merchant-request-id'
|
|
45
|
+
@_hash['seller_of_record_id'] = 'seller-of-record-id'
|
|
46
|
+
@_hash['seller_of_record_status'] = 'seller-of-record-status'
|
|
47
|
+
@_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# An array for optional fields
|
|
51
|
+
def self.optionals
|
|
52
|
+
%w[
|
|
53
|
+
country
|
|
54
|
+
merchant_id
|
|
55
|
+
merchant_request_id
|
|
56
|
+
seller_of_record_id
|
|
57
|
+
seller_of_record_status
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
[]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(result = nil, country = SKIP, merchant_id = SKIP,
|
|
67
|
+
merchant_request_id = SKIP, seller_of_record_id = SKIP,
|
|
68
|
+
seller_of_record_status = SKIP)
|
|
69
|
+
@result = result
|
|
70
|
+
@country = country unless country == SKIP
|
|
71
|
+
@merchant_id = merchant_id unless merchant_id == SKIP
|
|
72
|
+
@merchant_request_id = merchant_request_id unless merchant_request_id == SKIP
|
|
73
|
+
@seller_of_record_id = seller_of_record_id unless seller_of_record_id == SKIP
|
|
74
|
+
@seller_of_record_status = seller_of_record_status unless seller_of_record_status == SKIP
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Creates an instance of the object from a hash.
|
|
78
|
+
def self.from_hash(hash)
|
|
79
|
+
return nil unless hash
|
|
80
|
+
|
|
81
|
+
# Extract variables from the hash.
|
|
82
|
+
result = Result.from_hash(hash['result']) if hash['result']
|
|
83
|
+
country = hash.key?('country') ? hash['country'] : SKIP
|
|
84
|
+
merchant_id = hash.key?('merchant-id') ? hash['merchant-id'] : SKIP
|
|
85
|
+
merchant_request_id =
|
|
86
|
+
hash.key?('merchant-request-id') ? hash['merchant-request-id'] : SKIP
|
|
87
|
+
seller_of_record_id =
|
|
88
|
+
hash.key?('seller-of-record-id') ? hash['seller-of-record-id'] : SKIP
|
|
89
|
+
seller_of_record_status =
|
|
90
|
+
hash.key?('seller-of-record-status') ? hash['seller-of-record-status'] : SKIP
|
|
91
|
+
|
|
92
|
+
# Create object from extracted values.
|
|
93
|
+
RegisterSellerOfRecordResponse.new(result,
|
|
94
|
+
country,
|
|
95
|
+
merchant_id,
|
|
96
|
+
merchant_request_id,
|
|
97
|
+
seller_of_record_id,
|
|
98
|
+
seller_of_record_status)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def self.from_element(root)
|
|
102
|
+
result = XmlUtilities.from_element(root, 'result', Result)
|
|
103
|
+
country = XmlUtilities.from_element(root, 'country', String)
|
|
104
|
+
merchant_id = XmlUtilities.from_element(root, 'merchant-id', String)
|
|
105
|
+
merchant_request_id = XmlUtilities.from_element(root,
|
|
106
|
+
'merchant-request-id',
|
|
107
|
+
String)
|
|
108
|
+
seller_of_record_id = XmlUtilities.from_element(root,
|
|
109
|
+
'seller-of-record-id',
|
|
110
|
+
String)
|
|
111
|
+
seller_of_record_status = XmlUtilities.from_element(
|
|
112
|
+
root, 'seller-of-record-status', String
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
new(result,
|
|
116
|
+
country,
|
|
117
|
+
merchant_id,
|
|
118
|
+
merchant_request_id,
|
|
119
|
+
seller_of_record_id,
|
|
120
|
+
seller_of_record_status)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def to_xml_element(doc, root_name)
|
|
124
|
+
root = doc.create_element(root_name)
|
|
125
|
+
|
|
126
|
+
XmlUtilities.add_as_subelement(doc, root, 'result', result)
|
|
127
|
+
XmlUtilities.add_as_subelement(doc, root, 'country', country)
|
|
128
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-id', merchant_id)
|
|
129
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-request-id',
|
|
130
|
+
merchant_request_id)
|
|
131
|
+
XmlUtilities.add_as_subelement(doc, root, 'seller-of-record-id',
|
|
132
|
+
seller_of_record_id)
|
|
133
|
+
XmlUtilities.add_as_subelement(doc, root, 'seller-of-record-status',
|
|
134
|
+
seller_of_record_status)
|
|
135
|
+
|
|
136
|
+
root
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Provides a human-readable string representation of the object.
|
|
140
|
+
def to_s
|
|
141
|
+
class_name = self.class.name.split('::').last
|
|
142
|
+
"<#{class_name} result: #{@result}, country: #{@country}, merchant_id: #{@merchant_id},"\
|
|
143
|
+
" merchant_request_id: #{@merchant_request_id}, seller_of_record_id:"\
|
|
144
|
+
" #{@seller_of_record_id}, seller_of_record_status: #{@seller_of_record_status}>"
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
148
|
+
def inspect
|
|
149
|
+
class_name = self.class.name.split('::').last
|
|
150
|
+
"<#{class_name} result: #{@result.inspect}, country: #{@country.inspect}, merchant_id:"\
|
|
151
|
+
" #{@merchant_id.inspect}, merchant_request_id: #{@merchant_request_id.inspect},"\
|
|
152
|
+
" seller_of_record_id: #{@seller_of_record_id.inspect}, seller_of_record_status:"\
|
|
153
|
+
" #{@seller_of_record_status.inspect}>"
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
@@ -0,0 +1,167 @@
|
|
|
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
|
+
# 'otp-resend' Request
|
|
8
|
+
class ResendOtpRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Boku-assigned merchant ID.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :merchant_id
|
|
15
|
+
|
|
16
|
+
# Merchant-assigned unique request ID.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :merchant_request_id
|
|
19
|
+
|
|
20
|
+
# ISO 3166-1 alpha-2 country code.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :country
|
|
23
|
+
|
|
24
|
+
# Merchant-assigned unique opt-in ID.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :merchant_optin_id
|
|
27
|
+
|
|
28
|
+
# Boku-assigned consumer opt-in ID.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :optin_id
|
|
31
|
+
|
|
32
|
+
# The merchant-assigned ID used as `merchant-request-id` in the original
|
|
33
|
+
# opt-in call, carrier-gw URL, or silent-mo SMS.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :optin_request_id
|
|
36
|
+
|
|
37
|
+
# Boku-assigned device verification session ID.
|
|
38
|
+
# @return [Integer]
|
|
39
|
+
attr_accessor :verify_session_id
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['merchant_id'] = 'merchant-id'
|
|
45
|
+
@_hash['merchant_request_id'] = 'merchant-request-id'
|
|
46
|
+
@_hash['country'] = 'country'
|
|
47
|
+
@_hash['merchant_optin_id'] = 'merchant-optin-id'
|
|
48
|
+
@_hash['optin_id'] = 'optin-id'
|
|
49
|
+
@_hash['optin_request_id'] = 'optin-request-id'
|
|
50
|
+
@_hash['verify_session_id'] = 'verify-session-id'
|
|
51
|
+
@_hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array for optional fields
|
|
55
|
+
def self.optionals
|
|
56
|
+
%w[
|
|
57
|
+
country
|
|
58
|
+
merchant_optin_id
|
|
59
|
+
optin_id
|
|
60
|
+
optin_request_id
|
|
61
|
+
verify_session_id
|
|
62
|
+
]
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# An array for nullable fields
|
|
66
|
+
def self.nullables
|
|
67
|
+
[]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def initialize(merchant_id = nil, merchant_request_id = nil, country = SKIP,
|
|
71
|
+
merchant_optin_id = SKIP, optin_id = SKIP,
|
|
72
|
+
optin_request_id = SKIP, verify_session_id = SKIP)
|
|
73
|
+
@merchant_id = merchant_id
|
|
74
|
+
@merchant_request_id = merchant_request_id
|
|
75
|
+
@country = country unless country == SKIP
|
|
76
|
+
@merchant_optin_id = merchant_optin_id unless merchant_optin_id == SKIP
|
|
77
|
+
@optin_id = optin_id unless optin_id == SKIP
|
|
78
|
+
@optin_request_id = optin_request_id unless optin_request_id == SKIP
|
|
79
|
+
@verify_session_id = verify_session_id unless verify_session_id == SKIP
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Creates an instance of the object from a hash.
|
|
83
|
+
def self.from_hash(hash)
|
|
84
|
+
return nil unless hash
|
|
85
|
+
|
|
86
|
+
# Extract variables from the hash.
|
|
87
|
+
merchant_id = hash.key?('merchant-id') ? hash['merchant-id'] : nil
|
|
88
|
+
merchant_request_id =
|
|
89
|
+
hash.key?('merchant-request-id') ? hash['merchant-request-id'] : nil
|
|
90
|
+
country = hash.key?('country') ? hash['country'] : SKIP
|
|
91
|
+
merchant_optin_id =
|
|
92
|
+
hash.key?('merchant-optin-id') ? hash['merchant-optin-id'] : SKIP
|
|
93
|
+
optin_id = hash.key?('optin-id') ? hash['optin-id'] : SKIP
|
|
94
|
+
optin_request_id =
|
|
95
|
+
hash.key?('optin-request-id') ? hash['optin-request-id'] : SKIP
|
|
96
|
+
verify_session_id =
|
|
97
|
+
hash.key?('verify-session-id') ? hash['verify-session-id'] : SKIP
|
|
98
|
+
|
|
99
|
+
# Create object from extracted values.
|
|
100
|
+
ResendOtpRequest.new(merchant_id,
|
|
101
|
+
merchant_request_id,
|
|
102
|
+
country,
|
|
103
|
+
merchant_optin_id,
|
|
104
|
+
optin_id,
|
|
105
|
+
optin_request_id,
|
|
106
|
+
verify_session_id)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def self.from_element(root)
|
|
110
|
+
merchant_id = XmlUtilities.from_element(root, 'merchant-id', String)
|
|
111
|
+
merchant_request_id = XmlUtilities.from_element(root,
|
|
112
|
+
'merchant-request-id',
|
|
113
|
+
String)
|
|
114
|
+
country = XmlUtilities.from_element(root, 'country', String)
|
|
115
|
+
merchant_optin_id = XmlUtilities.from_element(root, 'merchant-optin-id',
|
|
116
|
+
String)
|
|
117
|
+
optin_id = XmlUtilities.from_element(root, 'optin-id', String)
|
|
118
|
+
optin_request_id = XmlUtilities.from_element(root, 'optin-request-id',
|
|
119
|
+
String)
|
|
120
|
+
verify_session_id = XmlUtilities.from_element(root, 'verify-session-id',
|
|
121
|
+
Integer)
|
|
122
|
+
|
|
123
|
+
new(merchant_id,
|
|
124
|
+
merchant_request_id,
|
|
125
|
+
country,
|
|
126
|
+
merchant_optin_id,
|
|
127
|
+
optin_id,
|
|
128
|
+
optin_request_id,
|
|
129
|
+
verify_session_id)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def to_xml_element(doc, root_name)
|
|
133
|
+
root = doc.create_element(root_name)
|
|
134
|
+
|
|
135
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-id', merchant_id)
|
|
136
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-request-id',
|
|
137
|
+
merchant_request_id)
|
|
138
|
+
XmlUtilities.add_as_subelement(doc, root, 'country', country)
|
|
139
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-optin-id',
|
|
140
|
+
merchant_optin_id)
|
|
141
|
+
XmlUtilities.add_as_subelement(doc, root, 'optin-id', optin_id)
|
|
142
|
+
XmlUtilities.add_as_subelement(doc, root, 'optin-request-id',
|
|
143
|
+
optin_request_id)
|
|
144
|
+
XmlUtilities.add_as_subelement(doc, root, 'verify-session-id',
|
|
145
|
+
verify_session_id)
|
|
146
|
+
|
|
147
|
+
root
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Provides a human-readable string representation of the object.
|
|
151
|
+
def to_s
|
|
152
|
+
class_name = self.class.name.split('::').last
|
|
153
|
+
"<#{class_name} merchant_id: #{@merchant_id}, merchant_request_id: #{@merchant_request_id},"\
|
|
154
|
+
" country: #{@country}, merchant_optin_id: #{@merchant_optin_id}, optin_id: #{@optin_id},"\
|
|
155
|
+
" optin_request_id: #{@optin_request_id}, verify_session_id: #{@verify_session_id}>"
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
159
|
+
def inspect
|
|
160
|
+
class_name = self.class.name.split('::').last
|
|
161
|
+
"<#{class_name} merchant_id: #{@merchant_id.inspect}, merchant_request_id:"\
|
|
162
|
+
" #{@merchant_request_id.inspect}, country: #{@country.inspect}, merchant_optin_id:"\
|
|
163
|
+
" #{@merchant_optin_id.inspect}, optin_id: #{@optin_id.inspect}, optin_request_id:"\
|
|
164
|
+
" #{@optin_request_id.inspect}, verify_session_id: #{@verify_session_id.inspect}>"
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
# 'resend-otp' Response
|
|
8
|
+
class ResendOtpResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Boku-assigned merchant ID.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :merchant_id
|
|
15
|
+
|
|
16
|
+
# The 'result' element is defined in every response type. It is used to
|
|
17
|
+
# convey the outcome of an API request.
|
|
18
|
+
# @return [Result]
|
|
19
|
+
attr_accessor :result
|
|
20
|
+
|
|
21
|
+
# Merchant-assigned unique request id. Required if provided in request.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :merchant_request_id
|
|
24
|
+
|
|
25
|
+
# Boku-assigned unique opt-in id. Required if the opt-in exists.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :optin_id
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['merchant_id'] = 'merchant-id'
|
|
33
|
+
@_hash['result'] = 'result'
|
|
34
|
+
@_hash['merchant_request_id'] = 'merchant-request-id'
|
|
35
|
+
@_hash['optin_id'] = 'optin-id'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
merchant_request_id
|
|
43
|
+
optin_id
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(merchant_id = nil, result = nil, merchant_request_id = SKIP,
|
|
53
|
+
optin_id = SKIP)
|
|
54
|
+
@merchant_id = merchant_id
|
|
55
|
+
@result = result
|
|
56
|
+
@merchant_request_id = merchant_request_id unless merchant_request_id == SKIP
|
|
57
|
+
@optin_id = optin_id unless optin_id == SKIP
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
merchant_id = hash.key?('merchant-id') ? hash['merchant-id'] : nil
|
|
66
|
+
result = Result.from_hash(hash['result']) if hash['result']
|
|
67
|
+
merchant_request_id =
|
|
68
|
+
hash.key?('merchant-request-id') ? hash['merchant-request-id'] : SKIP
|
|
69
|
+
optin_id = hash.key?('optin-id') ? hash['optin-id'] : SKIP
|
|
70
|
+
|
|
71
|
+
# Create object from extracted values.
|
|
72
|
+
ResendOtpResponse.new(merchant_id,
|
|
73
|
+
result,
|
|
74
|
+
merchant_request_id,
|
|
75
|
+
optin_id)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def self.from_element(root)
|
|
79
|
+
merchant_id = XmlUtilities.from_element(root, 'merchant-id', String)
|
|
80
|
+
result = XmlUtilities.from_element(root, 'result', Result)
|
|
81
|
+
merchant_request_id = XmlUtilities.from_element(root,
|
|
82
|
+
'merchant-request-id',
|
|
83
|
+
String)
|
|
84
|
+
optin_id = XmlUtilities.from_element(root, 'optin-id', String)
|
|
85
|
+
|
|
86
|
+
new(merchant_id,
|
|
87
|
+
result,
|
|
88
|
+
merchant_request_id,
|
|
89
|
+
optin_id)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def to_xml_element(doc, root_name)
|
|
93
|
+
root = doc.create_element(root_name)
|
|
94
|
+
|
|
95
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-id', merchant_id)
|
|
96
|
+
XmlUtilities.add_as_subelement(doc, root, 'result', result)
|
|
97
|
+
XmlUtilities.add_as_subelement(doc, root, 'merchant-request-id',
|
|
98
|
+
merchant_request_id)
|
|
99
|
+
XmlUtilities.add_as_subelement(doc, root, 'optin-id', optin_id)
|
|
100
|
+
|
|
101
|
+
root
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Provides a human-readable string representation of the object.
|
|
105
|
+
def to_s
|
|
106
|
+
class_name = self.class.name.split('::').last
|
|
107
|
+
"<#{class_name} merchant_id: #{@merchant_id}, result: #{@result}, merchant_request_id:"\
|
|
108
|
+
" #{@merchant_request_id}, optin_id: #{@optin_id}>"
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
112
|
+
def inspect
|
|
113
|
+
class_name = self.class.name.split('::').last
|
|
114
|
+
"<#{class_name} merchant_id: #{@merchant_id.inspect}, result: #{@result.inspect},"\
|
|
115
|
+
" merchant_request_id: #{@merchant_request_id.inspect}, optin_id: #{@optin_id.inspect}>"
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|