splitit-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.
Files changed (87) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +154 -0
  4. data/bin/console +15 -0
  5. data/lib/splitit_web_api_v4/api_helper.rb +10 -0
  6. data/lib/splitit_web_api_v4/client.rb +83 -0
  7. data/lib/splitit_web_api_v4/configuration.rb +188 -0
  8. data/lib/splitit_web_api_v4/controllers/base_controller.rb +60 -0
  9. data/lib/splitit_web_api_v4/controllers/installment_plan_controller.rb +242 -0
  10. data/lib/splitit_web_api_v4/controllers/o_auth_authorization_controller.rb +42 -0
  11. data/lib/splitit_web_api_v4/exceptions/api_error_response_exception.rb +51 -0
  12. data/lib/splitit_web_api_v4/exceptions/api_exception.rb +21 -0
  13. data/lib/splitit_web_api_v4/exceptions/o_auth_provider_exception.rb +64 -0
  14. data/lib/splitit_web_api_v4/http/auth/api_key.rb +52 -0
  15. data/lib/splitit_web_api_v4/http/auth/o_auth2.rb +156 -0
  16. data/lib/splitit_web_api_v4/http/http_call_back.rb +10 -0
  17. data/lib/splitit_web_api_v4/http/http_method_enum.rb +10 -0
  18. data/lib/splitit_web_api_v4/http/http_request.rb +10 -0
  19. data/lib/splitit_web_api_v4/http/http_response.rb +10 -0
  20. data/lib/splitit_web_api_v4/http/proxy_settings.rb +22 -0
  21. data/lib/splitit_web_api_v4/models/amount_data.rb +70 -0
  22. data/lib/splitit_web_api_v4/models/api_error_model.rb +93 -0
  23. data/lib/splitit_web_api_v4/models/apr_data.rb +70 -0
  24. data/lib/splitit_web_api_v4/models/authorization_status_enum.rb +40 -0
  25. data/lib/splitit_web_api_v4/models/authorize_authorization_data.rb +154 -0
  26. data/lib/splitit_web_api_v4/models/authorize_request.rb +115 -0
  27. data/lib/splitit_web_api_v4/models/authorize_response.rb +221 -0
  28. data/lib/splitit_web_api_v4/models/base_model.rb +110 -0
  29. data/lib/splitit_web_api_v4/models/billing_address_data.rb +111 -0
  30. data/lib/splitit_web_api_v4/models/card_details.rb +108 -0
  31. data/lib/splitit_web_api_v4/models/card_validity_request.rb +62 -0
  32. data/lib/splitit_web_api_v4/models/card_validity_response.rb +80 -0
  33. data/lib/splitit_web_api_v4/models/checkout_url_data.rb +80 -0
  34. data/lib/splitit_web_api_v4/models/content_segment.rb +90 -0
  35. data/lib/splitit_web_api_v4/models/external_provider_types_enum.rb +48 -0
  36. data/lib/splitit_web_api_v4/models/inline_content.rb +71 -0
  37. data/lib/splitit_web_api_v4/models/installment_item.rb +101 -0
  38. data/lib/splitit_web_api_v4/models/installment_plan_details_response.rb +280 -0
  39. data/lib/splitit_web_api_v4/models/installment_plan_search_details_response.rb +71 -0
  40. data/lib/splitit_web_api_v4/models/installment_plan_search_request.rb +79 -0
  41. data/lib/splitit_web_api_v4/models/installment_plan_status_enum.rb +72 -0
  42. data/lib/splitit_web_api_v4/models/installment_status_enum.rb +60 -0
  43. data/lib/splitit_web_api_v4/models/masked_card_details.rb +82 -0
  44. data/lib/splitit_web_api_v4/models/metadata_item.rb +71 -0
  45. data/lib/splitit_web_api_v4/models/o_auth_provider_error_enum.rb +62 -0
  46. data/lib/splitit_web_api_v4/models/o_auth_scope_o_auth2_enum.rb +26 -0
  47. data/lib/splitit_web_api_v4/models/o_auth_token.rb +96 -0
  48. data/lib/splitit_web_api_v4/models/offer_item.rb +164 -0
  49. data/lib/splitit_web_api_v4/models/offers_billing_address.rb +108 -0
  50. data/lib/splitit_web_api_v4/models/offers_card_details.rb +108 -0
  51. data/lib/splitit_web_api_v4/models/offers_merchant_details.rb +82 -0
  52. data/lib/splitit_web_api_v4/models/offers_payment_method.rb +66 -0
  53. data/lib/splitit_web_api_v4/models/offers_payment_method_response.rb +88 -0
  54. data/lib/splitit_web_api_v4/models/offers_request.rb +145 -0
  55. data/lib/splitit_web_api_v4/models/offers_response.rb +156 -0
  56. data/lib/splitit_web_api_v4/models/offers_shopper_details.rb +112 -0
  57. data/lib/splitit_web_api_v4/models/offers_store_location.rb +108 -0
  58. data/lib/splitit_web_api_v4/models/payment_link_request.rb +195 -0
  59. data/lib/splitit_web_api_v4/models/payment_link_response.rb +107 -0
  60. data/lib/splitit_web_api_v4/models/payment_method.rb +66 -0
  61. data/lib/splitit_web_api_v4/models/payment_method_data.rb +78 -0
  62. data/lib/splitit_web_api_v4/models/payment_method_type_enum.rb +26 -0
  63. data/lib/splitit_web_api_v4/models/pis_error_codes_enum.rb +1021 -0
  64. data/lib/splitit_web_api_v4/models/plan_authorization_data.rb +172 -0
  65. data/lib/splitit_web_api_v4/models/plan_links_data.rb +91 -0
  66. data/lib/splitit_web_api_v4/models/plan_status_enum.rb +48 -0
  67. data/lib/splitit_web_api_v4/models/processing_data.rb +63 -0
  68. data/lib/splitit_web_api_v4/models/purchase_method_enum.rb +52 -0
  69. data/lib/splitit_web_api_v4/models/redirect_urls.rb +81 -0
  70. data/lib/splitit_web_api_v4/models/refund_item.rb +136 -0
  71. data/lib/splitit_web_api_v4/models/refund_request.rb +70 -0
  72. data/lib/splitit_web_api_v4/models/refund_response.rb +105 -0
  73. data/lib/splitit_web_api_v4/models/shipping_status_enum.rb +40 -0
  74. data/lib/splitit_web_api_v4/models/shopper_details_data.rb +113 -0
  75. data/lib/splitit_web_api_v4/models/three_ds_authentication_data.rb +90 -0
  76. data/lib/splitit_web_api_v4/models/three_ds_execute.rb +62 -0
  77. data/lib/splitit_web_api_v4/models/three_ds_redirect_data.rb +93 -0
  78. data/lib/splitit_web_api_v4/models/three_ds_request_data.rb +84 -0
  79. data/lib/splitit_web_api_v4/models/update_offers_payment_method.rb +66 -0
  80. data/lib/splitit_web_api_v4/models/update_offers_request.rb +105 -0
  81. data/lib/splitit_web_api_v4/models/update_order_request.rb +104 -0
  82. data/lib/splitit_web_api_v4/models/update_order_response.rb +126 -0
  83. data/lib/splitit_web_api_v4/models/validation_error.rb +71 -0
  84. data/lib/splitit_web_api_v4/utilities/date_time_helper.rb +11 -0
  85. data/lib/splitit_web_api_v4/utilities/file_wrapper.rb +28 -0
  86. data/lib/splitit_web_api_v4.rb +108 -0
  87. metadata +170 -0
@@ -0,0 +1,195 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module SplititWebApiV4
8
+ # PaymentLinkRequest Model.
9
+ class PaymentLinkRequest < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [String]
15
+ attr_accessor :amount
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [String]
19
+ attr_accessor :currency
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [TrueClass | FalseClass]
23
+ attr_accessor :auto_capture
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [String]
27
+ attr_accessor :merchant_order_reference
28
+
29
+ # TODO: Write general description for this method
30
+ # @return [PurchaseMethodEnum]
31
+ attr_accessor :purchase_method
32
+
33
+ # TODO: Write general description for this method
34
+ # @return [OffersShopperDetails]
35
+ attr_accessor :shopper_details
36
+
37
+ # TODO: Write general description for this method
38
+ # @return [OffersMerchantDetails]
39
+ attr_accessor :merchant_details
40
+
41
+ # TODO: Write general description for this method
42
+ # @return [DateTime]
43
+ attr_accessor :checkout_url_validity
44
+
45
+ # TODO: Write general description for this method
46
+ # @return [Array[MetadataItem]]
47
+ attr_accessor :metadata
48
+
49
+ # TODO: Write general description for this method
50
+ # @return [RedirectUrls]
51
+ attr_accessor :redirect_urls
52
+
53
+ # TODO: Write general description for this method
54
+ # @return [ProcessingData]
55
+ attr_accessor :processing_data
56
+
57
+ # TODO: Write general description for this method
58
+ # @return [ThreeDSExecute]
59
+ attr_accessor :three_ds
60
+
61
+ # A mapping from model property names to API property names.
62
+ def self.names
63
+ @_hash = {} if @_hash.nil?
64
+ @_hash['amount'] = 'Amount'
65
+ @_hash['currency'] = 'Currency'
66
+ @_hash['auto_capture'] = 'AutoCapture'
67
+ @_hash['merchant_order_reference'] = 'MerchantOrderReference'
68
+ @_hash['purchase_method'] = 'PurchaseMethod'
69
+ @_hash['shopper_details'] = 'ShopperDetails'
70
+ @_hash['merchant_details'] = 'MerchantDetails'
71
+ @_hash['checkout_url_validity'] = 'CheckoutUrlValidity'
72
+ @_hash['metadata'] = 'Metadata'
73
+ @_hash['redirect_urls'] = 'RedirectUrls'
74
+ @_hash['processing_data'] = 'ProcessingData'
75
+ @_hash['three_ds'] = 'ThreeDS'
76
+ @_hash
77
+ end
78
+
79
+ # An array for optional fields
80
+ def self.optionals
81
+ %w[
82
+ auto_capture
83
+ merchant_order_reference
84
+ merchant_details
85
+ checkout_url_validity
86
+ metadata
87
+ redirect_urls
88
+ processing_data
89
+ three_ds
90
+ ]
91
+ end
92
+
93
+ # An array for nullable fields
94
+ def self.nullables
95
+ []
96
+ end
97
+
98
+ def initialize(amount = nil, currency = nil, purchase_method = nil,
99
+ shopper_details = nil, auto_capture = SKIP,
100
+ merchant_order_reference = SKIP, merchant_details = SKIP,
101
+ checkout_url_validity = SKIP, metadata = SKIP,
102
+ redirect_urls = SKIP, processing_data = SKIP,
103
+ three_ds = SKIP)
104
+ @amount = amount
105
+ @currency = currency
106
+ @auto_capture = auto_capture unless auto_capture == SKIP
107
+ @merchant_order_reference = merchant_order_reference unless merchant_order_reference == SKIP
108
+ @purchase_method = purchase_method
109
+ @shopper_details = shopper_details
110
+ @merchant_details = merchant_details unless merchant_details == SKIP
111
+ @checkout_url_validity = checkout_url_validity unless checkout_url_validity == SKIP
112
+ @metadata = metadata unless metadata == SKIP
113
+ @redirect_urls = redirect_urls unless redirect_urls == SKIP
114
+ @processing_data = processing_data unless processing_data == SKIP
115
+ @three_ds = three_ds unless three_ds == SKIP
116
+ end
117
+
118
+ # Creates an instance of the object from a hash.
119
+ def self.from_hash(hash)
120
+ return nil unless hash
121
+
122
+ # Extract variables from the hash.
123
+ amount = hash.key?('Amount') ? hash['Amount'] : nil
124
+ currency = hash.key?('Currency') ? hash['Currency'] : nil
125
+ purchase_method =
126
+ hash.key?('PurchaseMethod') ? hash['PurchaseMethod'] : nil
127
+ shopper_details = OffersShopperDetails.from_hash(hash['ShopperDetails']) if
128
+ hash['ShopperDetails']
129
+ auto_capture = hash.key?('AutoCapture') ? hash['AutoCapture'] : SKIP
130
+ merchant_order_reference =
131
+ hash.key?('MerchantOrderReference') ? hash['MerchantOrderReference'] : SKIP
132
+ merchant_details = OffersMerchantDetails.from_hash(hash['MerchantDetails']) if
133
+ hash['MerchantDetails']
134
+ checkout_url_validity = if hash.key?('CheckoutUrlValidity')
135
+ (DateTimeHelper.from_rfc3339(hash['CheckoutUrlValidity']) if hash['CheckoutUrlValidity'])
136
+ else
137
+ SKIP
138
+ end
139
+ # Parameter is an array, so we need to iterate through it
140
+ metadata = nil
141
+ unless hash['Metadata'].nil?
142
+ metadata = []
143
+ hash['Metadata'].each do |structure|
144
+ metadata << (MetadataItem.from_hash(structure) if structure)
145
+ end
146
+ end
147
+
148
+ metadata = SKIP unless hash.key?('Metadata')
149
+ redirect_urls = RedirectUrls.from_hash(hash['RedirectUrls']) if hash['RedirectUrls']
150
+ processing_data = ProcessingData.from_hash(hash['ProcessingData']) if hash['ProcessingData']
151
+ three_ds = ThreeDSExecute.from_hash(hash['ThreeDS']) if hash['ThreeDS']
152
+
153
+ # Create object from extracted values.
154
+ PaymentLinkRequest.new(amount,
155
+ currency,
156
+ purchase_method,
157
+ shopper_details,
158
+ auto_capture,
159
+ merchant_order_reference,
160
+ merchant_details,
161
+ checkout_url_validity,
162
+ metadata,
163
+ redirect_urls,
164
+ processing_data,
165
+ three_ds)
166
+ end
167
+
168
+ def to_custom_checkout_url_validity
169
+ DateTimeHelper.to_rfc3339(checkout_url_validity)
170
+ end
171
+
172
+ # Provides a human-readable string representation of the object.
173
+ def to_s
174
+ class_name = self.class.name.split('::').last
175
+ "<#{class_name} amount: #{@amount}, currency: #{@currency}, auto_capture: #{@auto_capture},"\
176
+ " merchant_order_reference: #{@merchant_order_reference}, purchase_method:"\
177
+ " #{@purchase_method}, shopper_details: #{@shopper_details}, merchant_details:"\
178
+ " #{@merchant_details}, checkout_url_validity: #{@checkout_url_validity}, metadata:"\
179
+ " #{@metadata}, redirect_urls: #{@redirect_urls}, processing_data: #{@processing_data},"\
180
+ " three_ds: #{@three_ds}>"
181
+ end
182
+
183
+ # Provides a debugging-friendly string with detailed object information.
184
+ def inspect
185
+ class_name = self.class.name.split('::').last
186
+ "<#{class_name} amount: #{@amount.inspect}, currency: #{@currency.inspect}, auto_capture:"\
187
+ " #{@auto_capture.inspect}, merchant_order_reference: #{@merchant_order_reference.inspect},"\
188
+ " purchase_method: #{@purchase_method.inspect}, shopper_details:"\
189
+ " #{@shopper_details.inspect}, merchant_details: #{@merchant_details.inspect},"\
190
+ " checkout_url_validity: #{@checkout_url_validity.inspect}, metadata: #{@metadata.inspect},"\
191
+ " redirect_urls: #{@redirect_urls.inspect}, processing_data: #{@processing_data.inspect},"\
192
+ " three_ds: #{@three_ds.inspect}>"
193
+ end
194
+ end
195
+ end
@@ -0,0 +1,107 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # PaymentLinkResponse Model.
8
+ class PaymentLinkResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [CheckoutUrlData]
14
+ attr_accessor :checkout_url
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :installment_plan_number
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :merchant_order_reference
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Float]
26
+ attr_accessor :purchase_amount
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [String]
30
+ attr_accessor :currency
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['checkout_url'] = 'CheckoutUrl'
36
+ @_hash['installment_plan_number'] = 'InstallmentPlanNumber'
37
+ @_hash['merchant_order_reference'] = 'MerchantOrderReference'
38
+ @_hash['purchase_amount'] = 'PurchaseAmount'
39
+ @_hash['currency'] = 'Currency'
40
+ @_hash
41
+ end
42
+
43
+ # An array for optional fields
44
+ def self.optionals
45
+ %w[
46
+ checkout_url
47
+ installment_plan_number
48
+ merchant_order_reference
49
+ currency
50
+ ]
51
+ end
52
+
53
+ # An array for nullable fields
54
+ def self.nullables
55
+ []
56
+ end
57
+
58
+ def initialize(purchase_amount = nil, checkout_url = SKIP,
59
+ installment_plan_number = SKIP,
60
+ merchant_order_reference = SKIP, currency = SKIP)
61
+ @checkout_url = checkout_url unless checkout_url == SKIP
62
+ @installment_plan_number = installment_plan_number unless installment_plan_number == SKIP
63
+ @merchant_order_reference = merchant_order_reference unless merchant_order_reference == SKIP
64
+ @purchase_amount = purchase_amount
65
+ @currency = currency unless currency == SKIP
66
+ end
67
+
68
+ # Creates an instance of the object from a hash.
69
+ def self.from_hash(hash)
70
+ return nil unless hash
71
+
72
+ # Extract variables from the hash.
73
+ purchase_amount =
74
+ hash.key?('PurchaseAmount') ? hash['PurchaseAmount'] : nil
75
+ checkout_url = CheckoutUrlData.from_hash(hash['CheckoutUrl']) if hash['CheckoutUrl']
76
+ installment_plan_number =
77
+ hash.key?('InstallmentPlanNumber') ? hash['InstallmentPlanNumber'] : SKIP
78
+ merchant_order_reference =
79
+ hash.key?('MerchantOrderReference') ? hash['MerchantOrderReference'] : SKIP
80
+ currency = hash.key?('Currency') ? hash['Currency'] : SKIP
81
+
82
+ # Create object from extracted values.
83
+ PaymentLinkResponse.new(purchase_amount,
84
+ checkout_url,
85
+ installment_plan_number,
86
+ merchant_order_reference,
87
+ currency)
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} checkout_url: #{@checkout_url}, installment_plan_number:"\
94
+ " #{@installment_plan_number}, merchant_order_reference: #{@merchant_order_reference},"\
95
+ " purchase_amount: #{@purchase_amount}, currency: #{@currency}>"
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} checkout_url: #{@checkout_url.inspect}, installment_plan_number:"\
102
+ " #{@installment_plan_number.inspect}, merchant_order_reference:"\
103
+ " #{@merchant_order_reference.inspect}, purchase_amount: #{@purchase_amount.inspect},"\
104
+ " currency: #{@currency.inspect}>"
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,66 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # PaymentMethod Model.
8
+ class PaymentMethod < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_reader :type
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :value
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['type'] = 'Type'
24
+ @_hash['value'] = 'Value'
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(value = nil)
39
+ @type = 'Card'
40
+ @value = value
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
+ value = hash.key?('Value') ? hash['Value'] : nil
49
+
50
+ # Create object from extracted values.
51
+ PaymentMethod.new(value)
52
+ end
53
+
54
+ # Provides a human-readable string representation of the object.
55
+ def to_s
56
+ class_name = self.class.name.split('::').last
57
+ "<#{class_name} type: #{@type}, value: #{@value}>"
58
+ end
59
+
60
+ # Provides a debugging-friendly string with detailed object information.
61
+ def inspect
62
+ class_name = self.class.name.split('::').last
63
+ "<#{class_name} type: #{@type.inspect}, value: #{@value.inspect}>"
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,78 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # PaymentMethodData Model.
8
+ class PaymentMethodData < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_reader :type
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [MaskedCardDetails]
18
+ attr_accessor :card_details
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :par
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['type'] = 'Type'
28
+ @_hash['card_details'] = 'CardDetails'
29
+ @_hash['par'] = 'Par'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ card_details
37
+ par
38
+ ]
39
+ end
40
+
41
+ # An array for nullable fields
42
+ def self.nullables
43
+ []
44
+ end
45
+
46
+ def initialize(card_details = SKIP, par = SKIP)
47
+ @type = 'Card'
48
+ @card_details = card_details unless card_details == SKIP
49
+ @par = par unless par == SKIP
50
+ end
51
+
52
+ # Creates an instance of the object from a hash.
53
+ def self.from_hash(hash)
54
+ return nil unless hash
55
+
56
+ # Extract variables from the hash.
57
+ card_details = MaskedCardDetails.from_hash(hash['CardDetails']) if hash['CardDetails']
58
+ par = hash.key?('Par') ? hash['Par'] : SKIP
59
+
60
+ # Create object from extracted values.
61
+ PaymentMethodData.new(card_details,
62
+ par)
63
+ end
64
+
65
+ # Provides a human-readable string representation of the object.
66
+ def to_s
67
+ class_name = self.class.name.split('::').last
68
+ "<#{class_name} type: #{@type}, card_details: #{@card_details}, par: #{@par}>"
69
+ end
70
+
71
+ # Provides a debugging-friendly string with detailed object information.
72
+ def inspect
73
+ class_name = self.class.name.split('::').last
74
+ "<#{class_name} type: #{@type.inspect}, card_details: #{@card_details.inspect}, par:"\
75
+ " #{@par.inspect}>"
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,26 @@
1
+ # splitit_web_api_v4
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SplititWebApiV4
7
+ # PaymentMethodType.
8
+ class PaymentMethodTypeEnum
9
+ PAYMENT_METHOD_TYPE_ENUM = [
10
+ # TODO: Write general description for CARD
11
+ CARD = 'Card'.freeze
12
+ ].freeze
13
+
14
+ def self.validate(value)
15
+ return false if value.nil?
16
+
17
+ PAYMENT_METHOD_TYPE_ENUM.include?(value)
18
+ end
19
+
20
+ def self.from_value(value, default_value = CARD)
21
+ return default_value if value.nil?
22
+
23
+ default_value
24
+ end
25
+ end
26
+ end