payabli 3.0.4 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.fern/metadata.json +4 -4
- data/lib/payabli/bill/client.rb +119 -0
- data/lib/payabli/boarding/client.rb +209 -0
- data/lib/payabli/charge_backs/client.rb +20 -0
- data/lib/payabli/check_capture/client.rb +10 -0
- data/lib/payabli/client.rb +8 -6
- data/lib/payabli/cloud/client.rb +29 -0
- data/lib/payabli/customer/client.rb +54 -0
- data/lib/payabli/export/client.rb +321 -0
- data/lib/payabli/funding/client.rb +9 -0
- data/lib/payabli/ghost_card/client.rb +31 -0
- data/lib/payabli/hosted_payment_pages/client.rb +23 -0
- data/lib/payabli/import/client.rb +15 -0
- data/lib/payabli/internal/http/raw_client.rb +26 -0
- data/lib/payabli/internal/oauth_provider.rb +8 -2
- data/lib/payabli/internal/routing_auth_provider.rb +51 -0
- data/lib/payabli/invoice/client.rb +118 -0
- data/lib/payabli/line_item/client.rb +43 -0
- data/lib/payabli/management/client.rb +13 -0
- data/lib/payabli/money_in/client.rb +238 -0
- data/lib/payabli/money_out/client.rb +94 -0
- data/lib/payabli/notification/client.rb +46 -0
- data/lib/payabli/notificationlogs/client.rb +27 -0
- data/lib/payabli/ocr/client.rb +10 -0
- data/lib/payabli/organization/client.rb +91 -0
- data/lib/payabli/payment_link/client.rb +367 -0
- data/lib/payabli/payment_method_domain/client.rb +56 -0
- data/lib/payabli/payout_subscription/client.rb +50 -0
- data/lib/payabli/paypoint/client.rb +56 -0
- data/lib/payabli/query/client.rb +414 -0
- data/lib/payabli/statistic/client.rb +39 -0
- data/lib/payabli/subscription/client.rb +46 -0
- data/lib/payabli/templates/client.rb +28 -0
- data/lib/payabli/token/client.rb +8 -0
- data/lib/payabli/token_storage/client.rb +55 -0
- data/lib/payabli/types/application_data.rb +1 -1
- data/lib/payabli/types/application_data_managed.rb +1 -1
- data/lib/payabli/types/application_data_odp.rb +1 -1
- data/lib/payabli/types/application_data_pay_in.rb +1 -1
- data/lib/payabli/types/on_create.rb +1 -1
- data/lib/payabli/types/pay_method_body_all_fields.rb +1 -1
- data/lib/payabli/user/client.rb +67 -0
- data/lib/payabli/vendor/client.rb +102 -0
- data/lib/payabli/version.rb +1 -1
- data/lib/payabli/wallet/client.rb +34 -0
- data/lib/payabli.rb +1 -0
- data/reference.md +219 -219
- data/wiremock/wiremock-mappings.json +32 -1302
- metadata +3 -2
|
@@ -23,6 +23,19 @@ module Payabli
|
|
|
23
23
|
# @option params [String] :entry
|
|
24
24
|
# @option params [String, nil] :idempotency_key
|
|
25
25
|
#
|
|
26
|
+
# @example
|
|
27
|
+
# client.line_item.add_item(
|
|
28
|
+
# entry: "8cfec329267",
|
|
29
|
+
# item_commodity_code: "010",
|
|
30
|
+
# item_cost: 12.45,
|
|
31
|
+
# item_description: "Deposit for materials",
|
|
32
|
+
# item_mode: 0,
|
|
33
|
+
# item_product_code: "M-DEPOSIT",
|
|
34
|
+
# item_product_name: "Materials deposit",
|
|
35
|
+
# item_qty: 1,
|
|
36
|
+
# item_unit_of_measure: "SqFt"
|
|
37
|
+
# )
|
|
38
|
+
#
|
|
26
39
|
# @return [Payabli::Types::PayabliApiResponse6]
|
|
27
40
|
def add_item(request_options: {}, **params)
|
|
28
41
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -32,6 +45,7 @@ module Payabli
|
|
|
32
45
|
headers = {}
|
|
33
46
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
34
47
|
|
|
48
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
35
49
|
request = Payabli::Internal::JSON::Request.new(
|
|
36
50
|
base_url: request_options[:base_url],
|
|
37
51
|
method: "POST",
|
|
@@ -65,13 +79,18 @@ module Payabli
|
|
|
65
79
|
# @option request_options [Integer] :timeout_in_seconds
|
|
66
80
|
# @option params [Integer] :line_item_id
|
|
67
81
|
#
|
|
82
|
+
# @example
|
|
83
|
+
# client.line_item.get_item(line_item_id: 700)
|
|
84
|
+
#
|
|
68
85
|
# @return [Payabli::Types::LineItemQueryRecord]
|
|
69
86
|
def get_item(request_options: {}, **params)
|
|
70
87
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
88
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
71
89
|
request = Payabli::Internal::JSON::Request.new(
|
|
72
90
|
base_url: request_options[:base_url],
|
|
73
91
|
method: "GET",
|
|
74
92
|
path: "LineItem/#{URI.encode_uri_component(params[:line_item_id].to_s)}",
|
|
93
|
+
headers: headers,
|
|
75
94
|
request_options: request_options
|
|
76
95
|
)
|
|
77
96
|
begin
|
|
@@ -99,13 +118,22 @@ module Payabli
|
|
|
99
118
|
# @option request_options [Integer] :timeout_in_seconds
|
|
100
119
|
# @option params [Integer] :line_item_id
|
|
101
120
|
#
|
|
121
|
+
# @example
|
|
122
|
+
# client.line_item.update_item(
|
|
123
|
+
# line_item_id: 700,
|
|
124
|
+
# item_cost: 12.45,
|
|
125
|
+
# item_qty: 1
|
|
126
|
+
# )
|
|
127
|
+
#
|
|
102
128
|
# @return [Payabli::Types::PayabliApiResponse6]
|
|
103
129
|
def update_item(request_options: {}, **params)
|
|
104
130
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
131
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
105
132
|
request = Payabli::Internal::JSON::Request.new(
|
|
106
133
|
base_url: request_options[:base_url],
|
|
107
134
|
method: "PUT",
|
|
108
135
|
path: "LineItem/#{URI.encode_uri_component(params[:line_item_id].to_s)}",
|
|
136
|
+
headers: headers,
|
|
109
137
|
body: Payabli::Types::LineItem.new(params).to_h,
|
|
110
138
|
request_options: request_options
|
|
111
139
|
)
|
|
@@ -134,13 +162,18 @@ module Payabli
|
|
|
134
162
|
# @option request_options [Integer] :timeout_in_seconds
|
|
135
163
|
# @option params [Integer] :line_item_id
|
|
136
164
|
#
|
|
165
|
+
# @example
|
|
166
|
+
# client.line_item.delete_item(line_item_id: 700)
|
|
167
|
+
#
|
|
137
168
|
# @return [Payabli::Types::DeleteItemResponse]
|
|
138
169
|
def delete_item(request_options: {}, **params)
|
|
139
170
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
171
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
140
172
|
request = Payabli::Internal::JSON::Request.new(
|
|
141
173
|
base_url: request_options[:base_url],
|
|
142
174
|
method: "DELETE",
|
|
143
175
|
path: "LineItem/#{URI.encode_uri_component(params[:line_item_id].to_s)}",
|
|
176
|
+
headers: headers,
|
|
144
177
|
request_options: request_options
|
|
145
178
|
)
|
|
146
179
|
begin
|
|
@@ -173,6 +206,14 @@ module Payabli
|
|
|
173
206
|
# @option params [Hash[String, String, nil], nil] :parameters
|
|
174
207
|
# @option params [String, nil] :sort_by
|
|
175
208
|
#
|
|
209
|
+
# @example
|
|
210
|
+
# client.line_item.list_line_items(
|
|
211
|
+
# entry: "8cfec329267",
|
|
212
|
+
# from_record: 251,
|
|
213
|
+
# limit_record: 0,
|
|
214
|
+
# sort_by: "desc(field_name)"
|
|
215
|
+
# )
|
|
216
|
+
#
|
|
176
217
|
# @return [Payabli::Types::QueryResponseItems]
|
|
177
218
|
def list_line_items(request_options: {}, **params)
|
|
178
219
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -182,10 +223,12 @@ module Payabli
|
|
|
182
223
|
query_params["parameters"] = params[:parameters] if params.key?(:parameters)
|
|
183
224
|
query_params["sortBy"] = params[:sort_by] if params.key?(:sort_by)
|
|
184
225
|
|
|
226
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
185
227
|
request = Payabli::Internal::JSON::Request.new(
|
|
186
228
|
base_url: request_options[:base_url],
|
|
187
229
|
method: "GET",
|
|
188
230
|
path: "Query/lineitems/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
231
|
+
headers: headers,
|
|
189
232
|
query: query_params,
|
|
190
233
|
request_options: request_options
|
|
191
234
|
)
|
|
@@ -29,6 +29,17 @@ module Payabli
|
|
|
29
29
|
# @option request_options [Integer] :timeout_in_seconds
|
|
30
30
|
# @option params [String] :entry
|
|
31
31
|
#
|
|
32
|
+
# @example
|
|
33
|
+
# client.management.verify_account_details(
|
|
34
|
+
# entry: "8cfec329267",
|
|
35
|
+
# routing_number: "122105278",
|
|
36
|
+
# account_number: "0000000016",
|
|
37
|
+
# account_type: "Checking",
|
|
38
|
+
# country: "US",
|
|
39
|
+
# account_holder_type: "personal",
|
|
40
|
+
# holder_name: "Jane Doe"
|
|
41
|
+
# )
|
|
42
|
+
#
|
|
32
43
|
# @return [Payabli::Types::VerifyAccountDetailsResponse]
|
|
33
44
|
def verify_account_details(request_options: {}, **params)
|
|
34
45
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -36,10 +47,12 @@ module Payabli
|
|
|
36
47
|
non_body_param_names = %w[entry]
|
|
37
48
|
body = request_data.except(*non_body_param_names)
|
|
38
49
|
|
|
50
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
39
51
|
request = Payabli::Internal::JSON::Request.new(
|
|
40
52
|
base_url: request_options[:base_url],
|
|
41
53
|
method: "POST",
|
|
42
54
|
path: "Management/verifyAccountDetails/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
55
|
+
headers: headers,
|
|
43
56
|
body: body,
|
|
44
57
|
request_options: request_options
|
|
45
58
|
)
|
|
@@ -34,6 +34,28 @@ module Payabli
|
|
|
34
34
|
# @option params [Boolean, nil] :force_customer_creation
|
|
35
35
|
# @option params [String, nil] :idempotency_key
|
|
36
36
|
#
|
|
37
|
+
# @example
|
|
38
|
+
# client.money_in.authorize(
|
|
39
|
+
# customer_data: {
|
|
40
|
+
# customer_id: 4440
|
|
41
|
+
# },
|
|
42
|
+
# entry_point: "8cfec329267",
|
|
43
|
+
# ipaddress: "255.255.255.255",
|
|
44
|
+
# payment_details: {
|
|
45
|
+
# service_fee: 0,
|
|
46
|
+
# total_amount: 100
|
|
47
|
+
# },
|
|
48
|
+
# payment_method: {
|
|
49
|
+
# cardcvv: "999",
|
|
50
|
+
# cardexp: "02/27",
|
|
51
|
+
# card_holder: "John Cassian",
|
|
52
|
+
# cardnumber: "4111111111111111",
|
|
53
|
+
# cardzip: "12345",
|
|
54
|
+
# initiator: "payor",
|
|
55
|
+
# method_: "card"
|
|
56
|
+
# }
|
|
57
|
+
# )
|
|
58
|
+
#
|
|
37
59
|
# @return [Payabli::Types::AuthResponse]
|
|
38
60
|
def authorize(request_options: {}, **params)
|
|
39
61
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -45,6 +67,7 @@ module Payabli
|
|
|
45
67
|
headers = {}
|
|
46
68
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
47
69
|
|
|
70
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
48
71
|
request = Payabli::Internal::JSON::Request.new(
|
|
49
72
|
base_url: request_options[:base_url],
|
|
50
73
|
method: "POST",
|
|
@@ -88,13 +111,21 @@ module Payabli
|
|
|
88
111
|
# @option params [String] :trans_id
|
|
89
112
|
# @option params [Integer] :amount
|
|
90
113
|
#
|
|
114
|
+
# @example
|
|
115
|
+
# client.money_in.capture(
|
|
116
|
+
# trans_id: "10-7d9cd67d-2d5d-4cd7-a1b7-72b8b201ec13",
|
|
117
|
+
# amount: 0
|
|
118
|
+
# )
|
|
119
|
+
#
|
|
91
120
|
# @return [Payabli::Types::CaptureResponse]
|
|
92
121
|
def capture(request_options: {}, **params)
|
|
93
122
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
123
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
94
124
|
request = Payabli::Internal::JSON::Request.new(
|
|
95
125
|
base_url: request_options[:base_url],
|
|
96
126
|
method: "GET",
|
|
97
127
|
path: "MoneyIn/capture/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
|
|
128
|
+
headers: headers,
|
|
98
129
|
request_options: request_options
|
|
99
130
|
)
|
|
100
131
|
begin
|
|
@@ -135,13 +166,24 @@ module Payabli
|
|
|
135
166
|
# @option request_options [Integer] :timeout_in_seconds
|
|
136
167
|
# @option params [String] :trans_id
|
|
137
168
|
#
|
|
169
|
+
# @example
|
|
170
|
+
# client.money_in.capture_auth(
|
|
171
|
+
# trans_id: "10-7d9cd67d-2d5d-4cd7-a1b7-72b8b201ec13",
|
|
172
|
+
# payment_details: {
|
|
173
|
+
# total_amount: 105,
|
|
174
|
+
# service_fee: 5
|
|
175
|
+
# }
|
|
176
|
+
# )
|
|
177
|
+
#
|
|
138
178
|
# @return [Payabli::Types::CaptureResponse]
|
|
139
179
|
def capture_auth(request_options: {}, **params)
|
|
140
180
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
181
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
141
182
|
request = Payabli::Internal::JSON::Request.new(
|
|
142
183
|
base_url: request_options[:base_url],
|
|
143
184
|
method: "POST",
|
|
144
185
|
path: "MoneyIn/capture/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
186
|
+
headers: headers,
|
|
145
187
|
body: Payabli::Types::CaptureRequest.new(params).to_h,
|
|
146
188
|
request_options: request_options
|
|
147
189
|
)
|
|
@@ -175,6 +217,27 @@ module Payabli
|
|
|
175
217
|
# @option params [Boolean, nil] :force_customer_creation
|
|
176
218
|
# @option params [String, nil] :idempotency_key
|
|
177
219
|
#
|
|
220
|
+
# @example
|
|
221
|
+
# client.money_in.credit(
|
|
222
|
+
# idempotency_key: "6B29FC40-CA47-1067-B31D-00DD010662DA",
|
|
223
|
+
# customer_data: {
|
|
224
|
+
# billing_address_1: "5127 Linkwood ave",
|
|
225
|
+
# customer_number: "C-90010"
|
|
226
|
+
# },
|
|
227
|
+
# entrypoint: "8cfec329267",
|
|
228
|
+
# payment_details: {
|
|
229
|
+
# service_fee: 0,
|
|
230
|
+
# total_amount: 1
|
|
231
|
+
# },
|
|
232
|
+
# payment_method: {
|
|
233
|
+
# ach_account: "88354454",
|
|
234
|
+
# ach_account_type: "Checking",
|
|
235
|
+
# ach_holder: "John Smith",
|
|
236
|
+
# ach_routing: "021000021",
|
|
237
|
+
# method_: "ach"
|
|
238
|
+
# }
|
|
239
|
+
# )
|
|
240
|
+
#
|
|
178
241
|
# @return [Payabli::Types::PayabliApiResponse0]
|
|
179
242
|
def credit(request_options: {}, **params)
|
|
180
243
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -188,6 +251,7 @@ module Payabli
|
|
|
188
251
|
headers = {}
|
|
189
252
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
190
253
|
|
|
254
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
191
255
|
request = Payabli::Internal::JSON::Request.new(
|
|
192
256
|
base_url: request_options[:base_url],
|
|
193
257
|
method: "POST",
|
|
@@ -222,13 +286,18 @@ module Payabli
|
|
|
222
286
|
# @option request_options [Integer] :timeout_in_seconds
|
|
223
287
|
# @option params [String] :trans_id
|
|
224
288
|
#
|
|
289
|
+
# @example
|
|
290
|
+
# client.money_in.details(trans_id: "45-as456777hhhhhhhhhh77777777-324")
|
|
291
|
+
#
|
|
225
292
|
# @return [Payabli::Types::TransactionQueryRecordsCustomer]
|
|
226
293
|
def details(request_options: {}, **params)
|
|
227
294
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
295
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
228
296
|
request = Payabli::Internal::JSON::Request.new(
|
|
229
297
|
base_url: request_options[:base_url],
|
|
230
298
|
method: "GET",
|
|
231
299
|
path: "MoneyIn/details/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
300
|
+
headers: headers,
|
|
232
301
|
request_options: request_options
|
|
233
302
|
)
|
|
234
303
|
begin
|
|
@@ -267,6 +336,28 @@ module Payabli
|
|
|
267
336
|
# @option params [String, nil] :idempotency_key
|
|
268
337
|
# @option params [String, nil] :validation_code
|
|
269
338
|
#
|
|
339
|
+
# @example
|
|
340
|
+
# client.money_in.getpaid(
|
|
341
|
+
# customer_data: {
|
|
342
|
+
# customer_id: 4440
|
|
343
|
+
# },
|
|
344
|
+
# entry_point: "8cfec329267",
|
|
345
|
+
# ipaddress: "255.255.255.255",
|
|
346
|
+
# payment_details: {
|
|
347
|
+
# service_fee: 0,
|
|
348
|
+
# total_amount: 100
|
|
349
|
+
# },
|
|
350
|
+
# payment_method: {
|
|
351
|
+
# cardcvv: "999",
|
|
352
|
+
# cardexp: "02/27",
|
|
353
|
+
# card_holder: "John Cassian",
|
|
354
|
+
# cardnumber: "4111111111111111",
|
|
355
|
+
# cardzip: "12345",
|
|
356
|
+
# initiator: "payor",
|
|
357
|
+
# method_: "card"
|
|
358
|
+
# }
|
|
359
|
+
# )
|
|
360
|
+
#
|
|
270
361
|
# @return [Payabli::Types::PayabliApiResponseGetPaid]
|
|
271
362
|
def getpaid(request_options: {}, **params)
|
|
272
363
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -281,6 +372,7 @@ module Payabli
|
|
|
281
372
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
282
373
|
headers["validationCode"] = params[:validation_code] if params[:validation_code]
|
|
283
374
|
|
|
375
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
284
376
|
request = Payabli::Internal::JSON::Request.new(
|
|
285
377
|
base_url: request_options[:base_url],
|
|
286
378
|
method: "POST",
|
|
@@ -329,13 +421,21 @@ module Payabli
|
|
|
329
421
|
# @option params [String] :trans_id
|
|
330
422
|
# @option params [Integer] :amount
|
|
331
423
|
#
|
|
424
|
+
# @example
|
|
425
|
+
# client.money_in.reverse(
|
|
426
|
+
# trans_id: "10-3ffa27df-b171-44e0-b251-e95fbfc7a723",
|
|
427
|
+
# amount: 0
|
|
428
|
+
# )
|
|
429
|
+
#
|
|
332
430
|
# @return [Payabli::Types::ReverseResponse]
|
|
333
431
|
def reverse(request_options: {}, **params)
|
|
334
432
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
433
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
335
434
|
request = Payabli::Internal::JSON::Request.new(
|
|
336
435
|
base_url: request_options[:base_url],
|
|
337
436
|
method: "GET",
|
|
338
437
|
path: "MoneyIn/reverse/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
|
|
438
|
+
headers: headers,
|
|
339
439
|
request_options: request_options
|
|
340
440
|
)
|
|
341
441
|
begin
|
|
@@ -373,13 +473,21 @@ module Payabli
|
|
|
373
473
|
# @option params [String] :trans_id
|
|
374
474
|
# @option params [Integer] :amount
|
|
375
475
|
#
|
|
476
|
+
# @example
|
|
477
|
+
# client.money_in.refund(
|
|
478
|
+
# trans_id: "10-3ffa27df-b171-44e0-b251-e95fbfc7a723",
|
|
479
|
+
# amount: 0
|
|
480
|
+
# )
|
|
481
|
+
#
|
|
376
482
|
# @return [Payabli::Types::RefundResponse]
|
|
377
483
|
def refund(request_options: {}, **params)
|
|
378
484
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
485
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
379
486
|
request = Payabli::Internal::JSON::Request.new(
|
|
380
487
|
base_url: request_options[:base_url],
|
|
381
488
|
method: "GET",
|
|
382
489
|
path: "MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
|
|
490
|
+
headers: headers,
|
|
383
491
|
request_options: request_options
|
|
384
492
|
)
|
|
385
493
|
begin
|
|
@@ -417,6 +525,28 @@ module Payabli
|
|
|
417
525
|
# @option params [String] :trans_id
|
|
418
526
|
# @option params [String, nil] :idempotency_key
|
|
419
527
|
#
|
|
528
|
+
# @example
|
|
529
|
+
# client.money_in.refund_with_instructions(
|
|
530
|
+
# trans_id: "10-3ffa27df-b171-44e0-b251-e95fbfc7a723",
|
|
531
|
+
# idempotency_key: "8A29FC40-CA47-1067-B31D-00DD010662DB",
|
|
532
|
+
# amount: 100,
|
|
533
|
+
# order_description: "Materials deposit",
|
|
534
|
+
# refund_details: {
|
|
535
|
+
# split_refunding: [{
|
|
536
|
+
# origination_entry_point: "7f1a381696",
|
|
537
|
+
# account_id: "187-342",
|
|
538
|
+
# description: "Refunding undelivered materials",
|
|
539
|
+
# amount: 60
|
|
540
|
+
# }, {
|
|
541
|
+
# origination_entry_point: "7f1a381696",
|
|
542
|
+
# account_id: "187-343",
|
|
543
|
+
# description: "Refunding deposit for undelivered materials",
|
|
544
|
+
# amount: 40
|
|
545
|
+
# }]
|
|
546
|
+
# },
|
|
547
|
+
# source: "api"
|
|
548
|
+
# )
|
|
549
|
+
#
|
|
420
550
|
# @return [Payabli::Types::RefundWithInstructionsResponse]
|
|
421
551
|
def refund_with_instructions(request_options: {}, **params)
|
|
422
552
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -427,6 +557,7 @@ module Payabli
|
|
|
427
557
|
headers = {}
|
|
428
558
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
429
559
|
|
|
560
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
430
561
|
request = Payabli::Internal::JSON::Request.new(
|
|
431
562
|
base_url: request_options[:base_url],
|
|
432
563
|
method: "POST",
|
|
@@ -461,13 +592,18 @@ module Payabli
|
|
|
461
592
|
# @option request_options [Integer] :timeout_in_seconds
|
|
462
593
|
# @option params [String] :trans_id
|
|
463
594
|
#
|
|
595
|
+
# @example
|
|
596
|
+
# client.money_in.reverse_credit(trans_id: "45-as456777hhhhhhhhhh77777777-324")
|
|
597
|
+
#
|
|
464
598
|
# @return [Payabli::Types::PayabliApiResponse]
|
|
465
599
|
def reverse_credit(request_options: {}, **params)
|
|
466
600
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
601
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
467
602
|
request = Payabli::Internal::JSON::Request.new(
|
|
468
603
|
base_url: request_options[:base_url],
|
|
469
604
|
method: "GET",
|
|
470
605
|
path: "MoneyIn/reverseCredit/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
606
|
+
headers: headers,
|
|
471
607
|
request_options: request_options
|
|
472
608
|
)
|
|
473
609
|
begin
|
|
@@ -496,16 +632,24 @@ module Payabli
|
|
|
496
632
|
# @option params [String] :trans_id
|
|
497
633
|
# @option params [String, nil] :email
|
|
498
634
|
#
|
|
635
|
+
# @example
|
|
636
|
+
# client.money_in.send_receipt_2_trans(
|
|
637
|
+
# trans_id: "45-as456777hhhhhhhhhh77777777-324",
|
|
638
|
+
# email: "example@email.com"
|
|
639
|
+
# )
|
|
640
|
+
#
|
|
499
641
|
# @return [Payabli::Types::ReceiptResponse]
|
|
500
642
|
def send_receipt_2_trans(request_options: {}, **params)
|
|
501
643
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
502
644
|
query_params = {}
|
|
503
645
|
query_params["email"] = params[:email] if params.key?(:email)
|
|
504
646
|
|
|
647
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
505
648
|
request = Payabli::Internal::JSON::Request.new(
|
|
506
649
|
base_url: request_options[:base_url],
|
|
507
650
|
method: "GET",
|
|
508
651
|
path: "MoneyIn/sendreceipt/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
652
|
+
headers: headers,
|
|
509
653
|
query: query_params,
|
|
510
654
|
request_options: request_options
|
|
511
655
|
)
|
|
@@ -534,6 +678,19 @@ module Payabli
|
|
|
534
678
|
# @option request_options [Integer] :timeout_in_seconds
|
|
535
679
|
# @option params [String, nil] :idempotency_key
|
|
536
680
|
#
|
|
681
|
+
# @example
|
|
682
|
+
# client.money_in.validate(
|
|
683
|
+
# idempotency_key: "6B29FC40-CA47-1067-B31D-00DD010662DA",
|
|
684
|
+
# entry_point: "8cfec329267",
|
|
685
|
+
# payment_method: {
|
|
686
|
+
# method_: "card",
|
|
687
|
+
# cardnumber: "4360000001000005",
|
|
688
|
+
# cardexp: "12/29",
|
|
689
|
+
# cardzip: "14602-8328",
|
|
690
|
+
# card_holder: "Dianne Becker-Smith"
|
|
691
|
+
# }
|
|
692
|
+
# )
|
|
693
|
+
#
|
|
537
694
|
# @return [Payabli::Types::ValidateResponse]
|
|
538
695
|
def validate(request_options: {}, **params)
|
|
539
696
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -544,6 +701,7 @@ module Payabli
|
|
|
544
701
|
headers = {}
|
|
545
702
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
546
703
|
|
|
704
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
547
705
|
request = Payabli::Internal::JSON::Request.new(
|
|
548
706
|
base_url: request_options[:base_url],
|
|
549
707
|
method: "POST",
|
|
@@ -585,13 +743,18 @@ module Payabli
|
|
|
585
743
|
# @option request_options [Integer] :timeout_in_seconds
|
|
586
744
|
# @option params [String] :trans_id
|
|
587
745
|
#
|
|
746
|
+
# @example
|
|
747
|
+
# client.money_in.void(trans_id: "10-3ffa27df-b171-44e0-b251-e95fbfc7a723")
|
|
748
|
+
#
|
|
588
749
|
# @return [Payabli::Types::VoidResponse]
|
|
589
750
|
def void(request_options: {}, **params)
|
|
590
751
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
752
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
591
753
|
request = Payabli::Internal::JSON::Request.new(
|
|
592
754
|
base_url: request_options[:base_url],
|
|
593
755
|
method: "GET",
|
|
594
756
|
path: "MoneyIn/void/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
757
|
+
headers: headers,
|
|
595
758
|
request_options: request_options
|
|
596
759
|
)
|
|
597
760
|
begin
|
|
@@ -624,6 +787,28 @@ module Payabli
|
|
|
624
787
|
# @option params [String, nil] :idempotency_key
|
|
625
788
|
# @option params [String, nil] :validation_code
|
|
626
789
|
#
|
|
790
|
+
# @example
|
|
791
|
+
# client.money_in.getpaidv_2(
|
|
792
|
+
# customer_data: {
|
|
793
|
+
# customer_id: 4440
|
|
794
|
+
# },
|
|
795
|
+
# entry_point: "8cfec329267",
|
|
796
|
+
# ipaddress: "255.255.255.255",
|
|
797
|
+
# payment_details: {
|
|
798
|
+
# service_fee: 0,
|
|
799
|
+
# total_amount: 100
|
|
800
|
+
# },
|
|
801
|
+
# payment_method: {
|
|
802
|
+
# cardcvv: "999",
|
|
803
|
+
# cardexp: "02/27",
|
|
804
|
+
# card_holder: "John Cassian",
|
|
805
|
+
# cardnumber: "4111111111111111",
|
|
806
|
+
# cardzip: "12345",
|
|
807
|
+
# initiator: "payor",
|
|
808
|
+
# method_: "card"
|
|
809
|
+
# }
|
|
810
|
+
# )
|
|
811
|
+
#
|
|
627
812
|
# @return [Payabli::Types::V2TransactionResponseWrapper]
|
|
628
813
|
def getpaidv_2(request_options: {}, **params)
|
|
629
814
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -637,6 +822,7 @@ module Payabli
|
|
|
637
822
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
638
823
|
headers["validationCode"] = params[:validation_code] if params[:validation_code]
|
|
639
824
|
|
|
825
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
640
826
|
request = Payabli::Internal::JSON::Request.new(
|
|
641
827
|
base_url: request_options[:base_url],
|
|
642
828
|
method: "POST",
|
|
@@ -677,6 +863,28 @@ module Payabli
|
|
|
677
863
|
# @option params [Boolean, nil] :force_customer_creation
|
|
678
864
|
# @option params [String, nil] :idempotency_key
|
|
679
865
|
#
|
|
866
|
+
# @example
|
|
867
|
+
# client.money_in.authorizev_2(
|
|
868
|
+
# customer_data: {
|
|
869
|
+
# customer_id: 4440
|
|
870
|
+
# },
|
|
871
|
+
# entry_point: "8cfec329267",
|
|
872
|
+
# ipaddress: "255.255.255.255",
|
|
873
|
+
# payment_details: {
|
|
874
|
+
# service_fee: 0,
|
|
875
|
+
# total_amount: 100
|
|
876
|
+
# },
|
|
877
|
+
# payment_method: {
|
|
878
|
+
# cardcvv: "999",
|
|
879
|
+
# cardexp: "02/27",
|
|
880
|
+
# card_holder: "John Cassian",
|
|
881
|
+
# cardnumber: "4111111111111111",
|
|
882
|
+
# cardzip: "12345",
|
|
883
|
+
# initiator: "payor",
|
|
884
|
+
# method_: "card"
|
|
885
|
+
# }
|
|
886
|
+
# )
|
|
887
|
+
#
|
|
680
888
|
# @return [Payabli::Types::V2TransactionResponseWrapper]
|
|
681
889
|
def authorizev_2(request_options: {}, **params)
|
|
682
890
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -688,6 +896,7 @@ module Payabli
|
|
|
688
896
|
headers = {}
|
|
689
897
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
690
898
|
|
|
899
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
691
900
|
request = Payabli::Internal::JSON::Request.new(
|
|
692
901
|
base_url: request_options[:base_url],
|
|
693
902
|
method: "POST",
|
|
@@ -725,13 +934,24 @@ module Payabli
|
|
|
725
934
|
# @option request_options [Integer] :timeout_in_seconds
|
|
726
935
|
# @option params [String] :trans_id
|
|
727
936
|
#
|
|
937
|
+
# @example
|
|
938
|
+
# client.money_in.capturev_2(
|
|
939
|
+
# trans_id: "10-7d9cd67d-2d5d-4cd7-a1b7-72b8b201ec13",
|
|
940
|
+
# payment_details: {
|
|
941
|
+
# total_amount: 105,
|
|
942
|
+
# service_fee: 5
|
|
943
|
+
# }
|
|
944
|
+
# )
|
|
945
|
+
#
|
|
728
946
|
# @return [Payabli::Types::V2TransactionResponseWrapper]
|
|
729
947
|
def capturev_2(request_options: {}, **params)
|
|
730
948
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
949
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
731
950
|
request = Payabli::Internal::JSON::Request.new(
|
|
732
951
|
base_url: request_options[:base_url],
|
|
733
952
|
method: "POST",
|
|
734
953
|
path: "v2/MoneyIn/capture/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
954
|
+
headers: headers,
|
|
735
955
|
body: Payabli::Types::CaptureRequest.new(params).to_h,
|
|
736
956
|
request_options: request_options
|
|
737
957
|
)
|
|
@@ -770,13 +990,18 @@ module Payabli
|
|
|
770
990
|
# @option request_options [Integer] :timeout_in_seconds
|
|
771
991
|
# @option params [String] :trans_id
|
|
772
992
|
#
|
|
993
|
+
# @example
|
|
994
|
+
# client.money_in.refundv_2(trans_id: "10-3ffa27df-b171-44e0-b251-e95fbfc7a723")
|
|
995
|
+
#
|
|
773
996
|
# @return [Payabli::Types::V2TransactionResponseWrapper]
|
|
774
997
|
def refundv_2(request_options: {}, **params)
|
|
775
998
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
999
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
776
1000
|
request = Payabli::Internal::JSON::Request.new(
|
|
777
1001
|
base_url: request_options[:base_url],
|
|
778
1002
|
method: "POST",
|
|
779
1003
|
path: "v2/MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
1004
|
+
headers: headers,
|
|
780
1005
|
body: Payabli::Types::RefundV2Request.new(params).to_h,
|
|
781
1006
|
request_options: request_options
|
|
782
1007
|
)
|
|
@@ -815,13 +1040,21 @@ module Payabli
|
|
|
815
1040
|
# @option params [String] :trans_id
|
|
816
1041
|
# @option params [Integer] :amount
|
|
817
1042
|
#
|
|
1043
|
+
# @example
|
|
1044
|
+
# client.money_in.refundv_2_amount(
|
|
1045
|
+
# trans_id: "10-3ffa27df-b171-44e0-b251-e95fbfc7a723",
|
|
1046
|
+
# amount: 0
|
|
1047
|
+
# )
|
|
1048
|
+
#
|
|
818
1049
|
# @return [Payabli::Types::V2TransactionResponseWrapper]
|
|
819
1050
|
def refundv_2_amount(request_options: {}, **params)
|
|
820
1051
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
1052
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
821
1053
|
request = Payabli::Internal::JSON::Request.new(
|
|
822
1054
|
base_url: request_options[:base_url],
|
|
823
1055
|
method: "POST",
|
|
824
1056
|
path: "v2/MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
|
|
1057
|
+
headers: headers,
|
|
825
1058
|
body: Payabli::Types::RefundV2Request.new(params).to_h,
|
|
826
1059
|
request_options: request_options
|
|
827
1060
|
)
|
|
@@ -853,13 +1086,18 @@ module Payabli
|
|
|
853
1086
|
# @option request_options [Integer] :timeout_in_seconds
|
|
854
1087
|
# @option params [String] :trans_id
|
|
855
1088
|
#
|
|
1089
|
+
# @example
|
|
1090
|
+
# client.money_in.voidv_2(trans_id: "10-3ffa27df-b171-44e0-b251-e95fbfc7a723")
|
|
1091
|
+
#
|
|
856
1092
|
# @return [Payabli::Types::V2TransactionResponseWrapper]
|
|
857
1093
|
def voidv_2(request_options: {}, **params)
|
|
858
1094
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
1095
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
859
1096
|
request = Payabli::Internal::JSON::Request.new(
|
|
860
1097
|
base_url: request_options[:base_url],
|
|
861
1098
|
method: "POST",
|
|
862
1099
|
path: "v2/MoneyIn/void/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
1100
|
+
headers: headers,
|
|
863
1101
|
request_options: request_options
|
|
864
1102
|
)
|
|
865
1103
|
begin
|