paze-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 +147 -0
- data/bin/console +15 -0
- data/lib/paze_checkout_api/api_helper.rb +10 -0
- data/lib/paze_checkout_api/client.rb +97 -0
- data/lib/paze_checkout_api/configuration.rb +221 -0
- data/lib/paze_checkout_api/controllers/base_controller.rb +60 -0
- data/lib/paze_checkout_api/controllers/checkout_session_controller.rb +108 -0
- data/lib/paze_checkout_api/controllers/identity_controller.rb +43 -0
- data/lib/paze_checkout_api/controllers/merchant_onboarding_controller.rb +39 -0
- data/lib/paze_checkout_api/controllers/o_auth_authorization_controller.rb +42 -0
- data/lib/paze_checkout_api/exceptions/api_error_response_exception.rb +67 -0
- data/lib/paze_checkout_api/exceptions/api_exception.rb +21 -0
- data/lib/paze_checkout_api/exceptions/base_response_exception.rb +75 -0
- data/lib/paze_checkout_api/exceptions/o_auth_provider_exception.rb +64 -0
- data/lib/paze_checkout_api/exceptions/simple_error_exception.rb +46 -0
- data/lib/paze_checkout_api/http/auth/o_auth2.rb +149 -0
- data/lib/paze_checkout_api/http/http_call_back.rb +10 -0
- data/lib/paze_checkout_api/http/http_method_enum.rb +10 -0
- data/lib/paze_checkout_api/http/http_request.rb +10 -0
- data/lib/paze_checkout_api/http/http_response.rb +10 -0
- data/lib/paze_checkout_api/http/proxy_settings.rb +22 -0
- data/lib/paze_checkout_api/models/api_response_metadata.rb +87 -0
- data/lib/paze_checkout_api/models/base_model.rb +110 -0
- data/lib/paze_checkout_api/models/billing_preference_enum.rb +36 -0
- data/lib/paze_checkout_api/models/checkout_session_complete_request.rb +70 -0
- data/lib/paze_checkout_api/models/checkout_session_complete_response.rb +97 -0
- data/lib/paze_checkout_api/models/checkout_session_create_request.rb +70 -0
- data/lib/paze_checkout_api/models/checkout_session_create_response.rb +97 -0
- data/lib/paze_checkout_api/models/checkout_session_review_request.rb +70 -0
- data/lib/paze_checkout_api/models/checkout_session_review_response.rb +97 -0
- data/lib/paze_checkout_api/models/client.rb +80 -0
- data/lib/paze_checkout_api/models/client_assertion_type_enum.rb +27 -0
- data/lib/paze_checkout_api/models/complete_session_data.rb +131 -0
- data/lib/paze_checkout_api/models/complete_session_response_data.rb +71 -0
- data/lib/paze_checkout_api/models/consumer.rb +100 -0
- data/lib/paze_checkout_api/models/create_session_data.rb +134 -0
- data/lib/paze_checkout_api/models/create_session_response_data.rb +71 -0
- data/lib/paze_checkout_api/models/data.rb +62 -0
- data/lib/paze_checkout_api/models/ecommerce_data.rb +109 -0
- data/lib/paze_checkout_api/models/enhanced_transaction_data.rb +71 -0
- data/lib/paze_checkout_api/models/error_detail.rb +81 -0
- data/lib/paze_checkout_api/models/error_message.rb +88 -0
- data/lib/paze_checkout_api/models/grant_type_enum.rb +26 -0
- data/lib/paze_checkout_api/models/intent_enum.rb +40 -0
- data/lib/paze_checkout_api/models/links.rb +74 -0
- data/lib/paze_checkout_api/models/masked_card.rb +107 -0
- data/lib/paze_checkout_api/models/merchant_address.rb +97 -0
- data/lib/paze_checkout_api/models/merchant_onboard_data.rb +115 -0
- data/lib/paze_checkout_api/models/merchant_onboard_request.rb +70 -0
- data/lib/paze_checkout_api/models/merchant_profile.rb +83 -0
- data/lib/paze_checkout_api/models/merchant_response.rb +122 -0
- data/lib/paze_checkout_api/models/o_auth_provider_error_enum.rb +62 -0
- data/lib/paze_checkout_api/models/o_auth_token.rb +96 -0
- data/lib/paze_checkout_api/models/o_auth_token_request.rb +75 -0
- data/lib/paze_checkout_api/models/o_auth_token_response.rb +78 -0
- data/lib/paze_checkout_api/models/onboard_merchant_key.rb +112 -0
- data/lib/paze_checkout_api/models/payload_type_indicator_enum.rb +36 -0
- data/lib/paze_checkout_api/models/payment_card_brand_enum.rb +40 -0
- data/lib/paze_checkout_api/models/payment_card_type_enum.rb +36 -0
- data/lib/paze_checkout_api/models/phone.rb +72 -0
- data/lib/paze_checkout_api/models/processing_network_enum.rb +40 -0
- data/lib/paze_checkout_api/models/review_session_data.rb +68 -0
- data/lib/paze_checkout_api/models/review_session_response_data.rb +100 -0
- data/lib/paze_checkout_api/models/shipping_address.rb +101 -0
- data/lib/paze_checkout_api/models/transaction_options.rb +87 -0
- data/lib/paze_checkout_api/models/transaction_type_enum.rb +36 -0
- data/lib/paze_checkout_api/models/transaction_value.rb +72 -0
- data/lib/paze_checkout_api/models/travel_data.rb +110 -0
- data/lib/paze_checkout_api/utilities/date_time_helper.rb +11 -0
- data/lib/paze_checkout_api/utilities/file_wrapper.rb +28 -0
- data/lib/paze_checkout_api.rb +93 -0
- metadata +157 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# paze_checkout_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module PazeCheckoutApi
|
|
7
|
+
# MaskedCard Model.
|
|
8
|
+
class MaskedCard < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :pan_last_four
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :payment_account_reference
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :payment_card_descriptor
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [PaymentCardTypeEnum]
|
|
26
|
+
attr_accessor :payment_card_type
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [PaymentCardBrandEnum]
|
|
30
|
+
attr_accessor :payment_card_brand
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['pan_last_four'] = 'panLastFour'
|
|
36
|
+
@_hash['payment_account_reference'] = 'paymentAccountReference'
|
|
37
|
+
@_hash['payment_card_descriptor'] = 'paymentCardDescriptor'
|
|
38
|
+
@_hash['payment_card_type'] = 'paymentCardType'
|
|
39
|
+
@_hash['payment_card_brand'] = 'paymentCardBrand'
|
|
40
|
+
@_hash
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for optional fields
|
|
44
|
+
def self.optionals
|
|
45
|
+
%w[
|
|
46
|
+
payment_card_descriptor
|
|
47
|
+
payment_card_type
|
|
48
|
+
payment_card_brand
|
|
49
|
+
]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# An array for nullable fields
|
|
53
|
+
def self.nullables
|
|
54
|
+
[]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def initialize(pan_last_four = nil, payment_account_reference = nil,
|
|
58
|
+
payment_card_descriptor = SKIP, payment_card_type = SKIP,
|
|
59
|
+
payment_card_brand = SKIP)
|
|
60
|
+
@pan_last_four = pan_last_four
|
|
61
|
+
@payment_account_reference = payment_account_reference
|
|
62
|
+
@payment_card_descriptor = payment_card_descriptor unless payment_card_descriptor == SKIP
|
|
63
|
+
@payment_card_type = payment_card_type unless payment_card_type == SKIP
|
|
64
|
+
@payment_card_brand = payment_card_brand unless payment_card_brand == SKIP
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Creates an instance of the object from a hash.
|
|
68
|
+
def self.from_hash(hash)
|
|
69
|
+
return nil unless hash
|
|
70
|
+
|
|
71
|
+
# Extract variables from the hash.
|
|
72
|
+
pan_last_four = hash.key?('panLastFour') ? hash['panLastFour'] : nil
|
|
73
|
+
payment_account_reference =
|
|
74
|
+
hash.key?('paymentAccountReference') ? hash['paymentAccountReference'] : nil
|
|
75
|
+
payment_card_descriptor =
|
|
76
|
+
hash.key?('paymentCardDescriptor') ? hash['paymentCardDescriptor'] : SKIP
|
|
77
|
+
payment_card_type =
|
|
78
|
+
hash.key?('paymentCardType') ? hash['paymentCardType'] : SKIP
|
|
79
|
+
payment_card_brand =
|
|
80
|
+
hash.key?('paymentCardBrand') ? hash['paymentCardBrand'] : SKIP
|
|
81
|
+
|
|
82
|
+
# Create object from extracted values.
|
|
83
|
+
MaskedCard.new(pan_last_four,
|
|
84
|
+
payment_account_reference,
|
|
85
|
+
payment_card_descriptor,
|
|
86
|
+
payment_card_type,
|
|
87
|
+
payment_card_brand)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Provides a human-readable string representation of the object.
|
|
91
|
+
def to_s
|
|
92
|
+
class_name = self.class.name.split('::').last
|
|
93
|
+
"<#{class_name} pan_last_four: #{@pan_last_four}, payment_account_reference:"\
|
|
94
|
+
" #{@payment_account_reference}, payment_card_descriptor: #{@payment_card_descriptor},"\
|
|
95
|
+
" payment_card_type: #{@payment_card_type}, payment_card_brand: #{@payment_card_brand}>"
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
99
|
+
def inspect
|
|
100
|
+
class_name = self.class.name.split('::').last
|
|
101
|
+
"<#{class_name} pan_last_four: #{@pan_last_four.inspect}, payment_account_reference:"\
|
|
102
|
+
" #{@payment_account_reference.inspect}, payment_card_descriptor:"\
|
|
103
|
+
" #{@payment_card_descriptor.inspect}, payment_card_type: #{@payment_card_type.inspect},"\
|
|
104
|
+
" payment_card_brand: #{@payment_card_brand.inspect}>"
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# paze_checkout_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module PazeCheckoutApi
|
|
7
|
+
# MerchantAddress Model.
|
|
8
|
+
class MerchantAddress < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :line1
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :line2
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :city
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :state
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :zip_code
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['line1'] = 'line1'
|
|
36
|
+
@_hash['line2'] = 'line2'
|
|
37
|
+
@_hash['city'] = 'city'
|
|
38
|
+
@_hash['state'] = 'state'
|
|
39
|
+
@_hash['zip_code'] = 'zipCode'
|
|
40
|
+
@_hash
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for optional fields
|
|
44
|
+
def self.optionals
|
|
45
|
+
%w[
|
|
46
|
+
line2
|
|
47
|
+
]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# An array for nullable fields
|
|
51
|
+
def self.nullables
|
|
52
|
+
[]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def initialize(line1 = nil, city = nil, state = nil, zip_code = nil,
|
|
56
|
+
line2 = SKIP)
|
|
57
|
+
@line1 = line1
|
|
58
|
+
@line2 = line2 unless line2 == SKIP
|
|
59
|
+
@city = city
|
|
60
|
+
@state = state
|
|
61
|
+
@zip_code = zip_code
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Creates an instance of the object from a hash.
|
|
65
|
+
def self.from_hash(hash)
|
|
66
|
+
return nil unless hash
|
|
67
|
+
|
|
68
|
+
# Extract variables from the hash.
|
|
69
|
+
line1 = hash.key?('line1') ? hash['line1'] : nil
|
|
70
|
+
city = hash.key?('city') ? hash['city'] : nil
|
|
71
|
+
state = hash.key?('state') ? hash['state'] : nil
|
|
72
|
+
zip_code = hash.key?('zipCode') ? hash['zipCode'] : nil
|
|
73
|
+
line2 = hash.key?('line2') ? hash['line2'] : SKIP
|
|
74
|
+
|
|
75
|
+
# Create object from extracted values.
|
|
76
|
+
MerchantAddress.new(line1,
|
|
77
|
+
city,
|
|
78
|
+
state,
|
|
79
|
+
zip_code,
|
|
80
|
+
line2)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Provides a human-readable string representation of the object.
|
|
84
|
+
def to_s
|
|
85
|
+
class_name = self.class.name.split('::').last
|
|
86
|
+
"<#{class_name} line1: #{@line1}, line2: #{@line2}, city: #{@city}, state: #{@state},"\
|
|
87
|
+
" zip_code: #{@zip_code}>"
|
|
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} line1: #{@line1.inspect}, line2: #{@line2.inspect}, city: #{@city.inspect},"\
|
|
94
|
+
" state: #{@state.inspect}, zip_code: #{@zip_code.inspect}>"
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# paze_checkout_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module PazeCheckoutApi
|
|
7
|
+
# MerchantOnboardData Model.
|
|
8
|
+
class MerchantOnboardData < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :legal_name
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :trade_name
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :url
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for this method
|
|
25
|
+
# @return [MerchantAddress]
|
|
26
|
+
attr_accessor :address
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for this method
|
|
29
|
+
# @return [OnboardMerchantKey]
|
|
30
|
+
attr_accessor :key
|
|
31
|
+
|
|
32
|
+
# TODO: Write general description for this method
|
|
33
|
+
# @return [Array[MerchantProfile]]
|
|
34
|
+
attr_accessor :profile
|
|
35
|
+
|
|
36
|
+
# A mapping from model property names to API property names.
|
|
37
|
+
def self.names
|
|
38
|
+
@_hash = {} if @_hash.nil?
|
|
39
|
+
@_hash['legal_name'] = 'legalName'
|
|
40
|
+
@_hash['trade_name'] = 'tradeName'
|
|
41
|
+
@_hash['url'] = 'url'
|
|
42
|
+
@_hash['address'] = 'address'
|
|
43
|
+
@_hash['key'] = 'key'
|
|
44
|
+
@_hash['profile'] = 'profile'
|
|
45
|
+
@_hash
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for optional fields
|
|
49
|
+
def self.optionals
|
|
50
|
+
%w[
|
|
51
|
+
trade_name
|
|
52
|
+
]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# An array for nullable fields
|
|
56
|
+
def self.nullables
|
|
57
|
+
[]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def initialize(legal_name = nil, url = nil, address = nil, key = nil,
|
|
61
|
+
profile = nil, trade_name = SKIP)
|
|
62
|
+
@legal_name = legal_name
|
|
63
|
+
@trade_name = trade_name unless trade_name == SKIP
|
|
64
|
+
@url = url
|
|
65
|
+
@address = address
|
|
66
|
+
@key = key
|
|
67
|
+
@profile = profile
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Creates an instance of the object from a hash.
|
|
71
|
+
def self.from_hash(hash)
|
|
72
|
+
return nil unless hash
|
|
73
|
+
|
|
74
|
+
# Extract variables from the hash.
|
|
75
|
+
legal_name = hash.key?('legalName') ? hash['legalName'] : nil
|
|
76
|
+
url = hash.key?('url') ? hash['url'] : nil
|
|
77
|
+
address = MerchantAddress.from_hash(hash['address']) if hash['address']
|
|
78
|
+
key = OnboardMerchantKey.from_hash(hash['key']) if hash['key']
|
|
79
|
+
# Parameter is an array, so we need to iterate through it
|
|
80
|
+
profile = nil
|
|
81
|
+
unless hash['profile'].nil?
|
|
82
|
+
profile = []
|
|
83
|
+
hash['profile'].each do |structure|
|
|
84
|
+
profile << (MerchantProfile.from_hash(structure) if structure)
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
profile = nil unless hash.key?('profile')
|
|
89
|
+
trade_name = hash.key?('tradeName') ? hash['tradeName'] : SKIP
|
|
90
|
+
|
|
91
|
+
# Create object from extracted values.
|
|
92
|
+
MerchantOnboardData.new(legal_name,
|
|
93
|
+
url,
|
|
94
|
+
address,
|
|
95
|
+
key,
|
|
96
|
+
profile,
|
|
97
|
+
trade_name)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Provides a human-readable string representation of the object.
|
|
101
|
+
def to_s
|
|
102
|
+
class_name = self.class.name.split('::').last
|
|
103
|
+
"<#{class_name} legal_name: #{@legal_name}, trade_name: #{@trade_name}, url: #{@url},"\
|
|
104
|
+
" address: #{@address}, key: #{@key}, profile: #{@profile}>"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
108
|
+
def inspect
|
|
109
|
+
class_name = self.class.name.split('::').last
|
|
110
|
+
"<#{class_name} legal_name: #{@legal_name.inspect}, trade_name: #{@trade_name.inspect},"\
|
|
111
|
+
" url: #{@url.inspect}, address: #{@address.inspect}, key: #{@key.inspect}, profile:"\
|
|
112
|
+
" #{@profile.inspect}>"
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# paze_checkout_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module PazeCheckoutApi
|
|
7
|
+
# MerchantOnboardRequest Model.
|
|
8
|
+
class MerchantOnboardRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :client_context
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [MerchantOnboardData]
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['client_context'] = 'clientContext'
|
|
24
|
+
@_hash['data'] = 'data'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
client_context
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(data = nil, client_context = SKIP)
|
|
41
|
+
@client_context = client_context unless client_context == SKIP
|
|
42
|
+
@data = data
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Creates an instance of the object from a hash.
|
|
46
|
+
def self.from_hash(hash)
|
|
47
|
+
return nil unless hash
|
|
48
|
+
|
|
49
|
+
# Extract variables from the hash.
|
|
50
|
+
data = MerchantOnboardData.from_hash(hash['data']) if hash['data']
|
|
51
|
+
client_context = hash.key?('clientContext') ? hash['clientContext'] : SKIP
|
|
52
|
+
|
|
53
|
+
# Create object from extracted values.
|
|
54
|
+
MerchantOnboardRequest.new(data,
|
|
55
|
+
client_context)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Provides a human-readable string representation of the object.
|
|
59
|
+
def to_s
|
|
60
|
+
class_name = self.class.name.split('::').last
|
|
61
|
+
"<#{class_name} client_context: #{@client_context}, data: #{@data}>"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
65
|
+
def inspect
|
|
66
|
+
class_name = self.class.name.split('::').last
|
|
67
|
+
"<#{class_name} client_context: #{@client_context.inspect}, data: #{@data.inspect}>"
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# paze_checkout_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module PazeCheckoutApi
|
|
7
|
+
# MerchantProfile Model.
|
|
8
|
+
class MerchantProfile < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :profile_id
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :domain_name
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for this method
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :merchant_category_code
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['profile_id'] = 'profileId'
|
|
28
|
+
@_hash['domain_name'] = 'domainName'
|
|
29
|
+
@_hash['merchant_category_code'] = 'merchantCategoryCode'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
profile_id
|
|
37
|
+
domain_name
|
|
38
|
+
]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# An array for nullable fields
|
|
42
|
+
def self.nullables
|
|
43
|
+
[]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def initialize(merchant_category_code = nil, profile_id = SKIP,
|
|
47
|
+
domain_name = SKIP)
|
|
48
|
+
@profile_id = profile_id unless profile_id == SKIP
|
|
49
|
+
@domain_name = domain_name unless domain_name == SKIP
|
|
50
|
+
@merchant_category_code = merchant_category_code
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Creates an instance of the object from a hash.
|
|
54
|
+
def self.from_hash(hash)
|
|
55
|
+
return nil unless hash
|
|
56
|
+
|
|
57
|
+
# Extract variables from the hash.
|
|
58
|
+
merchant_category_code =
|
|
59
|
+
hash.key?('merchantCategoryCode') ? hash['merchantCategoryCode'] : nil
|
|
60
|
+
profile_id = hash.key?('profileId') ? hash['profileId'] : SKIP
|
|
61
|
+
domain_name = hash.key?('domainName') ? hash['domainName'] : SKIP
|
|
62
|
+
|
|
63
|
+
# Create object from extracted values.
|
|
64
|
+
MerchantProfile.new(merchant_category_code,
|
|
65
|
+
profile_id,
|
|
66
|
+
domain_name)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Provides a human-readable string representation of the object.
|
|
70
|
+
def to_s
|
|
71
|
+
class_name = self.class.name.split('::').last
|
|
72
|
+
"<#{class_name} profile_id: #{@profile_id}, domain_name: #{@domain_name},"\
|
|
73
|
+
" merchant_category_code: #{@merchant_category_code}>"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
77
|
+
def inspect
|
|
78
|
+
class_name = self.class.name.split('::').last
|
|
79
|
+
"<#{class_name} profile_id: #{@profile_id.inspect}, domain_name: #{@domain_name.inspect},"\
|
|
80
|
+
" merchant_category_code: #{@merchant_category_code.inspect}>"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# paze_checkout_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module PazeCheckoutApi
|
|
8
|
+
# MerchantResponse Model.
|
|
9
|
+
class MerchantResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for this method
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :client_context
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for this method
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :ew_sid
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for this method
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :timestamp_iso8601
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for this method
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :status_code
|
|
28
|
+
|
|
29
|
+
# TODO: Write general description for this method
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :status_text
|
|
32
|
+
|
|
33
|
+
# TODO: Write general description for this method
|
|
34
|
+
# @return [Data]
|
|
35
|
+
attr_accessor :data
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['client_context'] = 'clientContext'
|
|
41
|
+
@_hash['ew_sid'] = 'ewSID'
|
|
42
|
+
@_hash['timestamp_iso8601'] = 'timestampISO8601'
|
|
43
|
+
@_hash['status_code'] = 'statusCode'
|
|
44
|
+
@_hash['status_text'] = 'statusText'
|
|
45
|
+
@_hash['data'] = 'data'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
client_context
|
|
53
|
+
ew_sid
|
|
54
|
+
timestamp_iso8601
|
|
55
|
+
status_code
|
|
56
|
+
status_text
|
|
57
|
+
data
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
[]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(client_context = SKIP, ew_sid = SKIP,
|
|
67
|
+
timestamp_iso8601 = SKIP, status_code = SKIP,
|
|
68
|
+
status_text = SKIP, data = SKIP)
|
|
69
|
+
@client_context = client_context unless client_context == SKIP
|
|
70
|
+
@ew_sid = ew_sid unless ew_sid == SKIP
|
|
71
|
+
@timestamp_iso8601 = timestamp_iso8601 unless timestamp_iso8601 == SKIP
|
|
72
|
+
@status_code = status_code unless status_code == SKIP
|
|
73
|
+
@status_text = status_text unless status_text == SKIP
|
|
74
|
+
@data = data unless data == 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
|
+
client_context = hash.key?('clientContext') ? hash['clientContext'] : SKIP
|
|
83
|
+
ew_sid = hash.key?('ewSID') ? hash['ewSID'] : SKIP
|
|
84
|
+
timestamp_iso8601 = if hash.key?('timestampISO8601')
|
|
85
|
+
(DateTimeHelper.from_rfc3339(hash['timestampISO8601']) if hash['timestampISO8601'])
|
|
86
|
+
else
|
|
87
|
+
SKIP
|
|
88
|
+
end
|
|
89
|
+
status_code = hash.key?('statusCode') ? hash['statusCode'] : SKIP
|
|
90
|
+
status_text = hash.key?('statusText') ? hash['statusText'] : SKIP
|
|
91
|
+
data = Data.from_hash(hash['data']) if hash['data']
|
|
92
|
+
|
|
93
|
+
# Create object from extracted values.
|
|
94
|
+
MerchantResponse.new(client_context,
|
|
95
|
+
ew_sid,
|
|
96
|
+
timestamp_iso8601,
|
|
97
|
+
status_code,
|
|
98
|
+
status_text,
|
|
99
|
+
data)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def to_custom_timestamp_iso8601
|
|
103
|
+
DateTimeHelper.to_rfc3339(timestamp_iso8601)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Provides a human-readable string representation of the object.
|
|
107
|
+
def to_s
|
|
108
|
+
class_name = self.class.name.split('::').last
|
|
109
|
+
"<#{class_name} client_context: #{@client_context}, ew_sid: #{@ew_sid}, timestamp_iso8601:"\
|
|
110
|
+
" #{@timestamp_iso8601}, status_code: #{@status_code}, status_text: #{@status_text}, data:"\
|
|
111
|
+
" #{@data}>"
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
115
|
+
def inspect
|
|
116
|
+
class_name = self.class.name.split('::').last
|
|
117
|
+
"<#{class_name} client_context: #{@client_context.inspect}, ew_sid: #{@ew_sid.inspect},"\
|
|
118
|
+
" timestamp_iso8601: #{@timestamp_iso8601.inspect}, status_code: #{@status_code.inspect},"\
|
|
119
|
+
" status_text: #{@status_text.inspect}, data: #{@data.inspect}>"
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# paze_checkout_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0
|
|
4
|
+
# ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module PazeCheckoutApi
|
|
7
|
+
# OAuth 2 Authorization error codes
|
|
8
|
+
class OAuthProviderErrorEnum
|
|
9
|
+
O_AUTH_PROVIDER_ERROR_ENUM = [
|
|
10
|
+
# The request is missing a required parameter, includes an unsupported
|
|
11
|
+
# parameter value (other than grant type), repeats a parameter, includes
|
|
12
|
+
# multiple credentials, utilizes more than one mechanism for
|
|
13
|
+
# authenticating the client, or is otherwise malformed.
|
|
14
|
+
INVALID_REQUEST = 'invalid_request'.freeze,
|
|
15
|
+
|
|
16
|
+
# Client authentication failed (e.g., unknown client, no client
|
|
17
|
+
# authentication included, or unsupported authentication method).
|
|
18
|
+
INVALID_CLIENT = 'invalid_client'.freeze,
|
|
19
|
+
|
|
20
|
+
# The provided authorization grant (e.g., authorization code, resource
|
|
21
|
+
# owner credentials) or refresh token is invalid, expired, revoked, does
|
|
22
|
+
# not match the redirection URI used in the authorization request, or was
|
|
23
|
+
# issued to another client.
|
|
24
|
+
INVALID_GRANT = 'invalid_grant'.freeze,
|
|
25
|
+
|
|
26
|
+
# The authenticated client is not authorized to use this authorization
|
|
27
|
+
# grant type.
|
|
28
|
+
UNAUTHORIZED_CLIENT = 'unauthorized_client'.freeze,
|
|
29
|
+
|
|
30
|
+
# The authorization grant type is not supported by the authorization
|
|
31
|
+
# server.
|
|
32
|
+
UNSUPPORTED_GRANT_TYPE = 'unsupported_grant_type'.freeze,
|
|
33
|
+
|
|
34
|
+
# The requested scope is invalid, unknown, malformed, or exceeds the scope
|
|
35
|
+
# granted by the resource owner.
|
|
36
|
+
INVALID_SCOPE = 'invalid_scope'.freeze
|
|
37
|
+
].freeze
|
|
38
|
+
|
|
39
|
+
def self.validate(value)
|
|
40
|
+
return false if value.nil?
|
|
41
|
+
|
|
42
|
+
O_AUTH_PROVIDER_ERROR_ENUM.include?(value)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.from_value(value, default_value = INVALID_REQUEST)
|
|
46
|
+
return default_value if value.nil?
|
|
47
|
+
|
|
48
|
+
str = value.to_s.strip
|
|
49
|
+
|
|
50
|
+
case str.downcase
|
|
51
|
+
when 'invalid_request' then INVALID_REQUEST
|
|
52
|
+
when 'invalid_client' then INVALID_CLIENT
|
|
53
|
+
when 'invalid_grant' then INVALID_GRANT
|
|
54
|
+
when 'unauthorized_client' then UNAUTHORIZED_CLIENT
|
|
55
|
+
when 'unsupported_grant_type' then UNSUPPORTED_GRANT_TYPE
|
|
56
|
+
when 'invalid_scope' then INVALID_SCOPE
|
|
57
|
+
else
|
|
58
|
+
default_value
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|