payabli 3.0.7 → 3.0.9
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 +7 -6
- data/lib/payabli/bill/client.rb +8 -2
- data/lib/payabli/billing/client.rb +129 -0
- data/lib/payabli/billing/types/get_profile_billing_request_entity_type.rb +16 -0
- data/lib/payabli/billing/types/get_profile_billing_request_service_group.rb +14 -0
- data/lib/payabli/billing/types/list_billing_profiles_request.rb +23 -0
- data/lib/payabli/boarding/client.rb +4 -1
- data/lib/payabli/client.rb +11 -1
- data/lib/payabli/cloud/client.rb +2 -2
- data/lib/payabli/customer/client.rb +4 -1
- data/lib/payabli/device/client.rb +63 -0
- data/lib/payabli/funding/client.rb +1 -1
- data/lib/payabli/hosted_payment_pages/client.rb +4 -1
- data/lib/payabli/internal/http/raw_client.rb +15 -2
- data/lib/payabli/internal/json/request.rb +7 -5
- data/lib/payabli/line_item/client.rb +4 -1
- data/lib/payabli/money_in/client.rb +71 -64
- data/lib/payabli/money_out/client.rb +2 -4
- data/lib/payabli/money_out/types/request_out_authorize.rb +1 -3
- data/lib/payabli/notification/client.rb +8 -5
- data/lib/payabli/ocr/client.rb +8 -2
- data/lib/payabli/organization/client.rb +5 -5
- data/lib/payabli/organization/types/organization_data.rb +2 -2
- data/lib/payabli/payment_link/client.rb +8 -2
- data/lib/payabli/paypoint/client.rb +4 -1
- data/lib/payabli/types/auth_capture_payout_response_data.rb +1 -1
- data/lib/payabli/types/billable_event.rb +29 -0
- data/lib/payabli/types/billing_entity.rb +13 -0
- data/lib/payabli/types/billing_entity_named.rb +13 -0
- data/lib/payabli/types/billing_profile_query_response.rb +14 -0
- data/lib/payabli/types/billing_profile_record.rb +32 -0
- data/lib/payabli/types/billing_profile_response.rb +31 -0
- data/lib/payabli/types/billing_profile_summary.rb +16 -0
- data/lib/payabli/types/collection_schedule_value.rb +23 -0
- data/lib/payabli/types/device_challenge_data.rb +12 -0
- data/lib/payabli/types/device_challenge_response.rb +21 -0
- data/lib/payabli/types/device_query_record.rb +8 -0
- data/lib/payabli/types/entities_assigned.rb +17 -0
- data/lib/payabli/types/entity_type_name.rb +17 -0
- data/lib/payabli/types/entity_type_value.rb +23 -0
- data/lib/payabli/types/event_group_value.rb +23 -0
- data/lib/payabli/types/event_source_value.rb +23 -0
- data/lib/payabli/types/event_type_value.rb +23 -0
- data/lib/payabli/types/fee_schedule.rb +47 -0
- data/lib/payabli/types/fee_type_name.rb +12 -0
- data/lib/payabli/types/{lot_number.rb → fee_type_value.rb} +2 -2
- data/lib/payabli/types/methodall.rb +1 -0
- data/lib/payabli/types/operation_result.rb +4 -2
- data/lib/payabli/types/passthrough_value.rb +23 -0
- data/lib/payabli/types/pay_method_cloud.rb +0 -2
- data/lib/payabli/types/pay_method_device.rb +14 -0
- data/lib/payabli/types/pay_method_device_method.rb +11 -0
- data/lib/payabli/types/payment_method.rb +2 -0
- data/lib/payabli/types/paypoint_data.rb +2 -0
- data/lib/payabli/types/query_payout_transaction_records_item.rb +2 -0
- data/lib/payabli/types/query_payout_transaction_records_item_allowed_actions_item.rb +13 -0
- data/lib/payabli/types/region_type_value.rb +23 -0
- data/lib/payabli/types/request_out_authorize_invoice_data.rb +4 -25
- data/lib/payabli/types/request_out_authorize_vendor_data.rb +3 -61
- data/lib/payabli/types/service_group_value.rb +23 -0
- data/lib/payabli/types/service_type_value.rb +23 -0
- data/lib/payabli/types/service_value.rb +23 -0
- data/lib/payabli/types/service_vertical_name.rb +13 -0
- data/lib/payabli/types/transaction_detail_payment_data.rb +2 -2
- data/lib/payabli/types/v_2_transaction_detail_response_data.rb +1 -1
- data/lib/payabli/types/v_2_transaction_details.rb +1 -1
- data/lib/payabli/user/client.rb +8 -2
- data/lib/payabli/vendor/client.rb +8 -2
- data/lib/payabli/version.rb +1 -1
- data/lib/payabli.rb +33 -2
- data/reference.md +690 -531
- data/wiremock/wiremock-mappings.json +172 -65
- metadata +35 -4
- data/lib/payabli/types/request_out_authorize_vendor_billing_data.rb +0 -19
|
@@ -36,22 +36,12 @@ module Payabli
|
|
|
36
36
|
#
|
|
37
37
|
# @example
|
|
38
38
|
# client.money_in.authorize(
|
|
39
|
-
# customer_data: {
|
|
40
|
-
# customer_id: 4440
|
|
41
|
-
# },
|
|
42
|
-
# entry_point: "8cfec329267",
|
|
43
|
-
# ipaddress: "255.255.255.255",
|
|
44
39
|
# payment_details: {
|
|
45
|
-
#
|
|
46
|
-
# total_amount: 100
|
|
40
|
+
# total_amount: 1.1
|
|
47
41
|
# },
|
|
48
42
|
# payment_method: {
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# card_holder: "John Cassian",
|
|
52
|
-
# cardnumber: "4111111111111111",
|
|
53
|
-
# cardzip: "12345",
|
|
54
|
-
# initiator: "payor",
|
|
43
|
+
# cardexp: "cardexp",
|
|
44
|
+
# cardnumber: "cardnumber",
|
|
55
45
|
# method_: "card"
|
|
56
46
|
# }
|
|
57
47
|
# )
|
|
@@ -113,8 +103,8 @@ module Payabli
|
|
|
113
103
|
#
|
|
114
104
|
# @example
|
|
115
105
|
# client.money_in.capture(
|
|
116
|
-
# trans_id: "
|
|
117
|
-
# amount:
|
|
106
|
+
# trans_id: "transId",
|
|
107
|
+
# amount: 1.1
|
|
118
108
|
# )
|
|
119
109
|
#
|
|
120
110
|
# @return [Payabli::Types::CaptureResponse]
|
|
@@ -168,23 +158,25 @@ module Payabli
|
|
|
168
158
|
#
|
|
169
159
|
# @example
|
|
170
160
|
# client.money_in.capture_auth(
|
|
171
|
-
# trans_id: "
|
|
161
|
+
# trans_id: "transId",
|
|
172
162
|
# payment_details: {
|
|
173
|
-
# total_amount:
|
|
174
|
-
# service_fee: 5
|
|
163
|
+
# total_amount: 1.1
|
|
175
164
|
# }
|
|
176
165
|
# )
|
|
177
166
|
#
|
|
178
167
|
# @return [Payabli::Types::CaptureResponse]
|
|
179
168
|
def capture_auth(request_options: {}, **params)
|
|
180
169
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
170
|
+
path_param_names = %i[trans_id]
|
|
171
|
+
body_params = params.except(*path_param_names)
|
|
172
|
+
|
|
181
173
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
182
174
|
request = Payabli::Internal::JSON::Request.new(
|
|
183
175
|
base_url: request_options[:base_url],
|
|
184
176
|
method: "POST",
|
|
185
177
|
path: "MoneyIn/capture/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
186
178
|
headers: headers,
|
|
187
|
-
body: Payabli::Types::CaptureRequest.new(
|
|
179
|
+
body: Payabli::Types::CaptureRequest.new(body_params).to_h,
|
|
188
180
|
request_options: request_options
|
|
189
181
|
)
|
|
190
182
|
begin
|
|
@@ -338,22 +330,12 @@ module Payabli
|
|
|
338
330
|
#
|
|
339
331
|
# @example
|
|
340
332
|
# client.money_in.getpaid(
|
|
341
|
-
# customer_data: {
|
|
342
|
-
# customer_id: 4440
|
|
343
|
-
# },
|
|
344
|
-
# entry_point: "8cfec329267",
|
|
345
|
-
# ipaddress: "255.255.255.255",
|
|
346
333
|
# payment_details: {
|
|
347
|
-
#
|
|
348
|
-
# total_amount: 100
|
|
334
|
+
# total_amount: 1.1
|
|
349
335
|
# },
|
|
350
336
|
# payment_method: {
|
|
351
|
-
#
|
|
352
|
-
#
|
|
353
|
-
# card_holder: "John Cassian",
|
|
354
|
-
# cardnumber: "4111111111111111",
|
|
355
|
-
# cardzip: "12345",
|
|
356
|
-
# initiator: "payor",
|
|
337
|
+
# cardexp: "cardexp",
|
|
338
|
+
# cardnumber: "cardnumber",
|
|
357
339
|
# method_: "card"
|
|
358
340
|
# }
|
|
359
341
|
# )
|
|
@@ -423,8 +405,8 @@ module Payabli
|
|
|
423
405
|
#
|
|
424
406
|
# @example
|
|
425
407
|
# client.money_in.reverse(
|
|
426
|
-
# trans_id: "
|
|
427
|
-
# amount:
|
|
408
|
+
# trans_id: "transId",
|
|
409
|
+
# amount: 1.1
|
|
428
410
|
# )
|
|
429
411
|
#
|
|
430
412
|
# @return [Payabli::Types::ReverseResponse]
|
|
@@ -475,8 +457,8 @@ module Payabli
|
|
|
475
457
|
#
|
|
476
458
|
# @example
|
|
477
459
|
# client.money_in.refund(
|
|
478
|
-
# trans_id: "
|
|
479
|
-
# amount:
|
|
460
|
+
# trans_id: "transId",
|
|
461
|
+
# amount: 1.1
|
|
480
462
|
# )
|
|
481
463
|
#
|
|
482
464
|
# @return [Payabli::Types::RefundResponse]
|
|
@@ -526,26 +508,7 @@ module Payabli
|
|
|
526
508
|
# @option params [String, nil] :idempotency_key
|
|
527
509
|
#
|
|
528
510
|
# @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
|
-
# )
|
|
511
|
+
# client.money_in.refund_with_instructions(trans_id: "transId")
|
|
549
512
|
#
|
|
550
513
|
# @return [Payabli::Types::RefundWithInstructionsResponse]
|
|
551
514
|
def refund_with_instructions(request_options: {}, **params)
|
|
@@ -744,7 +707,7 @@ module Payabli
|
|
|
744
707
|
# @option params [String] :trans_id
|
|
745
708
|
#
|
|
746
709
|
# @example
|
|
747
|
-
# client.money_in.void(trans_id: "
|
|
710
|
+
# client.money_in.void(trans_id: "transId")
|
|
748
711
|
#
|
|
749
712
|
# @return [Payabli::Types::VoidResponse]
|
|
750
713
|
def void(request_options: {}, **params)
|
|
@@ -946,13 +909,16 @@ module Payabli
|
|
|
946
909
|
# @return [Payabli::Types::V2TransactionResponseWrapper]
|
|
947
910
|
def capturev_2(request_options: {}, **params)
|
|
948
911
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
912
|
+
path_param_names = %i[trans_id]
|
|
913
|
+
body_params = params.except(*path_param_names)
|
|
914
|
+
|
|
949
915
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
950
916
|
request = Payabli::Internal::JSON::Request.new(
|
|
951
917
|
base_url: request_options[:base_url],
|
|
952
918
|
method: "POST",
|
|
953
919
|
path: "v2/MoneyIn/capture/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
954
920
|
headers: headers,
|
|
955
|
-
body: Payabli::Types::CaptureRequest.new(
|
|
921
|
+
body: Payabli::Types::CaptureRequest.new(body_params).to_h,
|
|
956
922
|
request_options: request_options
|
|
957
923
|
)
|
|
958
924
|
begin
|
|
@@ -991,18 +957,40 @@ module Payabli
|
|
|
991
957
|
# @option params [String] :trans_id
|
|
992
958
|
#
|
|
993
959
|
# @example
|
|
994
|
-
# client.money_in.refundv_2(
|
|
960
|
+
# client.money_in.refundv_2(
|
|
961
|
+
# trans_id: "10-3ffa27df-b171-44e0-b251-e95fbfc7a723",
|
|
962
|
+
# amount: 100,
|
|
963
|
+
# order_description: "Materials deposit",
|
|
964
|
+
# refund_details: {
|
|
965
|
+
# split_refunding: [{
|
|
966
|
+
# origination_entry_point: "495147f647",
|
|
967
|
+
# account_id: "187-342",
|
|
968
|
+
# description: "Refunding undelivered materials",
|
|
969
|
+
# amount: 60
|
|
970
|
+
# }, {
|
|
971
|
+
# origination_entry_point: "8cfec329267",
|
|
972
|
+
# account_id: "187-343",
|
|
973
|
+
# description: "Refunding deposit for undelivered materials",
|
|
974
|
+
# amount: 40
|
|
975
|
+
# }]
|
|
976
|
+
# },
|
|
977
|
+
# source: "api"
|
|
978
|
+
# )
|
|
995
979
|
#
|
|
996
980
|
# @return [Payabli::Types::V2TransactionResponseWrapper]
|
|
997
981
|
def refundv_2(request_options: {}, **params)
|
|
998
982
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
983
|
+
path_param_names = %i[trans_id]
|
|
984
|
+
body_params = params.except(*path_param_names)
|
|
985
|
+
|
|
999
986
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
1000
987
|
request = Payabli::Internal::JSON::Request.new(
|
|
1001
988
|
base_url: request_options[:base_url],
|
|
1002
989
|
method: "POST",
|
|
1003
990
|
path: "v2/MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
1004
991
|
headers: headers,
|
|
1005
|
-
body: Payabli::Types::RefundV2Request.new(
|
|
992
|
+
body: body_params.empty? ? nil : Payabli::Types::RefundV2Request.new(body_params).to_h,
|
|
993
|
+
omit_content_type_without_body: true,
|
|
1006
994
|
request_options: request_options
|
|
1007
995
|
)
|
|
1008
996
|
begin
|
|
@@ -1026,8 +1014,8 @@ module Payabli
|
|
|
1026
1014
|
# response codes reference](/guides/pay-in-unified-response-codes-reference) for more information.
|
|
1027
1015
|
#
|
|
1028
1016
|
# <Note>
|
|
1029
|
-
#
|
|
1030
|
-
#
|
|
1017
|
+
# For a standard refund, whether full (`amount` set to 0) or partial, send no request body. Include a request body
|
|
1018
|
+
# only to refund a split-funded transaction, with split instructions in `refundDetails`.
|
|
1031
1019
|
# </Note>
|
|
1032
1020
|
#
|
|
1033
1021
|
# @param request_options [Hash]
|
|
@@ -1043,19 +1031,38 @@ module Payabli
|
|
|
1043
1031
|
# @example
|
|
1044
1032
|
# client.money_in.refundv_2_amount(
|
|
1045
1033
|
# trans_id: "10-3ffa27df-b171-44e0-b251-e95fbfc7a723",
|
|
1046
|
-
# amount:
|
|
1034
|
+
# amount: 70,
|
|
1035
|
+
# order_description: "Materials deposit",
|
|
1036
|
+
# refund_details: {
|
|
1037
|
+
# split_refunding: [{
|
|
1038
|
+
# origination_entry_point: "495147f647",
|
|
1039
|
+
# account_id: "187-342",
|
|
1040
|
+
# description: "Refunding undelivered materials",
|
|
1041
|
+
# amount: 40
|
|
1042
|
+
# }, {
|
|
1043
|
+
# origination_entry_point: "8cfec329267",
|
|
1044
|
+
# account_id: "187-343",
|
|
1045
|
+
# description: "Refunding deposit for undelivered materials",
|
|
1046
|
+
# amount: 30
|
|
1047
|
+
# }]
|
|
1048
|
+
# },
|
|
1049
|
+
# source: "api"
|
|
1047
1050
|
# )
|
|
1048
1051
|
#
|
|
1049
1052
|
# @return [Payabli::Types::V2TransactionResponseWrapper]
|
|
1050
1053
|
def refundv_2_amount(request_options: {}, **params)
|
|
1051
1054
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
1055
|
+
path_param_names = %i[trans_id amount]
|
|
1056
|
+
body_params = params.except(*path_param_names)
|
|
1057
|
+
|
|
1052
1058
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
1053
1059
|
request = Payabli::Internal::JSON::Request.new(
|
|
1054
1060
|
base_url: request_options[:base_url],
|
|
1055
1061
|
method: "POST",
|
|
1056
1062
|
path: "v2/MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
|
|
1057
1063
|
headers: headers,
|
|
1058
|
-
body: Payabli::Types::RefundV2Request.new(
|
|
1064
|
+
body: body_params.empty? ? nil : Payabli::Types::RefundV2Request.new(body_params).to_h,
|
|
1065
|
+
omit_content_type_without_body: true,
|
|
1059
1066
|
request_options: request_options
|
|
1060
1067
|
)
|
|
1061
1068
|
begin
|
|
@@ -39,7 +39,6 @@ module Payabli
|
|
|
39
39
|
# @option request_options [Integer] :timeout_in_seconds
|
|
40
40
|
# @option params [Boolean, nil] :allow_duplicated_bills
|
|
41
41
|
# @option params [Boolean, nil] :do_not_create_bills
|
|
42
|
-
# @option params [Boolean, nil] :force_vendor_creation
|
|
43
42
|
# @option params [Boolean, nil] :same_day_ach
|
|
44
43
|
# @option params [String, nil] :idempotency_key
|
|
45
44
|
#
|
|
@@ -67,13 +66,12 @@ module Payabli
|
|
|
67
66
|
def authorize_out(request_options: {}, **params)
|
|
68
67
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
69
68
|
request_data = Payabli::MoneyOut::Types::RequestOutAuthorize.new(params).to_h
|
|
70
|
-
non_body_param_names = %w[allowDuplicatedBills doNotCreateBills
|
|
69
|
+
non_body_param_names = %w[allowDuplicatedBills doNotCreateBills sameDayACH idempotencyKey]
|
|
71
70
|
body = request_data.except(*non_body_param_names)
|
|
72
71
|
|
|
73
72
|
query_params = {}
|
|
74
73
|
query_params["allowDuplicatedBills"] = params[:allow_duplicated_bills] if params.key?(:allow_duplicated_bills)
|
|
75
74
|
query_params["doNotCreateBills"] = params[:do_not_create_bills] if params.key?(:do_not_create_bills)
|
|
76
|
-
query_params["forceVendorCreation"] = params[:force_vendor_creation] if params.key?(:force_vendor_creation)
|
|
77
75
|
query_params["sameDayACH"] = params[:same_day_ach] if params.key?(:same_day_ach)
|
|
78
76
|
|
|
79
77
|
headers = {}
|
|
@@ -477,7 +475,7 @@ module Payabli
|
|
|
477
475
|
request = Payabli::Internal::JSON::Request.new(
|
|
478
476
|
base_url: request_options[:base_url],
|
|
479
477
|
method: "POST",
|
|
480
|
-
path: "vcard/send-card-link",
|
|
478
|
+
path: "MoneyOut/vcard/send-card-link",
|
|
481
479
|
headers: headers,
|
|
482
480
|
body: Payabli::MoneyOut::Types::SendVCardLinkRequest.new(params).to_h,
|
|
483
481
|
request_options: request_options
|
|
@@ -8,8 +8,6 @@ module Payabli
|
|
|
8
8
|
|
|
9
9
|
field :do_not_create_bills, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "doNotCreateBills"
|
|
10
10
|
|
|
11
|
-
field :force_vendor_creation, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "forceVendorCreation"
|
|
12
|
-
|
|
13
11
|
field :same_day_ach, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "sameDayACH"
|
|
14
12
|
|
|
15
13
|
field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "idempotencyKey"
|
|
@@ -28,7 +26,7 @@ module Payabli
|
|
|
28
26
|
|
|
29
27
|
field :vendor_data, -> { Payabli::Types::RequestOutAuthorizeVendorData }, optional: false, nullable: false, api_name: "vendorData"
|
|
30
28
|
|
|
31
|
-
field :invoice_data, -> { Internal::Types::Array[Payabli::Types::RequestOutAuthorizeInvoiceData] }, optional:
|
|
29
|
+
field :invoice_data, -> { Internal::Types::Array[Payabli::Types::RequestOutAuthorizeInvoiceData] }, optional: true, nullable: false, api_name: "invoiceData"
|
|
32
30
|
|
|
33
31
|
field :account_id, -> { String }, optional: true, nullable: false, api_name: "accountId"
|
|
34
32
|
|
|
@@ -10,7 +10,7 @@ module Payabli
|
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
# Create a new notification or
|
|
13
|
+
# Create a new notification or autogenerated report.
|
|
14
14
|
#
|
|
15
15
|
# @param request_options [Hash]
|
|
16
16
|
# @param params [Payabli::Types::AddNotificationRequest]
|
|
@@ -59,7 +59,7 @@ module Payabli
|
|
|
59
59
|
end
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
-
# Retrieves a single notification or
|
|
62
|
+
# Retrieves a single notification or autogenerated report's details.
|
|
63
63
|
#
|
|
64
64
|
# @param request_options [Hash]
|
|
65
65
|
# @param params [Hash]
|
|
@@ -98,7 +98,7 @@ module Payabli
|
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
-
# Update a notification or
|
|
101
|
+
# Update a notification or autogenerated report.
|
|
102
102
|
#
|
|
103
103
|
# @param request_options [Hash]
|
|
104
104
|
# @param params [Payabli::Types::UpdateNotificationRequest]
|
|
@@ -126,13 +126,16 @@ module Payabli
|
|
|
126
126
|
# @return [Payabli::Types::PayabliApiResponseNotifications]
|
|
127
127
|
def update_notification(request_options: {}, **params)
|
|
128
128
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
129
|
+
path_param_names = %i[n_id]
|
|
130
|
+
body_params = params.except(*path_param_names)
|
|
131
|
+
|
|
129
132
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
130
133
|
request = Payabli::Internal::JSON::Request.new(
|
|
131
134
|
base_url: request_options[:base_url],
|
|
132
135
|
method: "PUT",
|
|
133
136
|
path: "Notification/#{URI.encode_uri_component(params[:n_id].to_s)}",
|
|
134
137
|
headers: headers,
|
|
135
|
-
body: Payabli::Types::UpdateNotificationRequest.new(
|
|
138
|
+
body: Payabli::Types::UpdateNotificationRequest.new(body_params).to_h,
|
|
136
139
|
request_options: request_options
|
|
137
140
|
)
|
|
138
141
|
begin
|
|
@@ -149,7 +152,7 @@ module Payabli
|
|
|
149
152
|
end
|
|
150
153
|
end
|
|
151
154
|
|
|
152
|
-
# Deletes a single notification or
|
|
155
|
+
# Deletes a single notification or autogenerated report.
|
|
153
156
|
#
|
|
154
157
|
# @param request_options [Hash]
|
|
155
158
|
# @param params [Hash]
|
data/lib/payabli/ocr/client.rb
CHANGED
|
@@ -30,13 +30,16 @@ module Payabli
|
|
|
30
30
|
# @return [Payabli::Types::PayabliApiResponseOcr]
|
|
31
31
|
def ocr_document_form(request_options: {}, **params)
|
|
32
32
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
33
|
+
path_param_names = %i[type_result]
|
|
34
|
+
body_params = params.except(*path_param_names)
|
|
35
|
+
|
|
33
36
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
34
37
|
request = Payabli::Internal::JSON::Request.new(
|
|
35
38
|
base_url: request_options[:base_url],
|
|
36
39
|
method: "POST",
|
|
37
40
|
path: "Import/ocrDocumentForm/#{URI.encode_uri_component(params[:type_result].to_s)}",
|
|
38
41
|
headers: headers,
|
|
39
|
-
body: Payabli::Types::FileContentImageOnly.new(
|
|
42
|
+
body: Payabli::Types::FileContentImageOnly.new(body_params).to_h,
|
|
40
43
|
request_options: request_options
|
|
41
44
|
)
|
|
42
45
|
begin
|
|
@@ -73,13 +76,16 @@ module Payabli
|
|
|
73
76
|
# @return [Payabli::Types::PayabliApiResponseOcr]
|
|
74
77
|
def ocr_document_json(request_options: {}, **params)
|
|
75
78
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
79
|
+
path_param_names = %i[type_result]
|
|
80
|
+
body_params = params.except(*path_param_names)
|
|
81
|
+
|
|
76
82
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
77
83
|
request = Payabli::Internal::JSON::Request.new(
|
|
78
84
|
base_url: request_options[:base_url],
|
|
79
85
|
method: "POST",
|
|
80
86
|
path: "Import/ocrDocumentJson/#{URI.encode_uri_component(params[:type_result].to_s)}",
|
|
81
87
|
headers: headers,
|
|
82
|
-
body: Payabli::Types::FileContentImageOnly.new(
|
|
88
|
+
body: Payabli::Types::FileContentImageOnly.new(body_params).to_h,
|
|
83
89
|
request_options: request_options
|
|
84
90
|
)
|
|
85
91
|
begin
|
|
@@ -104,11 +104,11 @@ module Payabli
|
|
|
104
104
|
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
105
105
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
106
106
|
# @option request_options [Integer] :timeout_in_seconds
|
|
107
|
-
# @option params [Integer] :
|
|
107
|
+
# @option params [Integer] :org_id_path_param
|
|
108
108
|
#
|
|
109
109
|
# @example
|
|
110
110
|
# client.organization.edit_organization(
|
|
111
|
-
#
|
|
111
|
+
# org_id_path_param: 123,
|
|
112
112
|
# contacts: [{
|
|
113
113
|
# contact_email: "herman@hermanscoatings.com",
|
|
114
114
|
# contact_name: "Herman Martinez",
|
|
@@ -119,7 +119,7 @@ module Payabli
|
|
|
119
119
|
# org_city: "Johnson City",
|
|
120
120
|
# org_country: "US",
|
|
121
121
|
# org_entry_name: "pilgrim-planner",
|
|
122
|
-
#
|
|
122
|
+
# org_id: "123",
|
|
123
123
|
# org_name: "Pilgrim Planner",
|
|
124
124
|
# org_state: "TN",
|
|
125
125
|
# org_timezone: -5,
|
|
@@ -132,14 +132,14 @@ module Payabli
|
|
|
132
132
|
def edit_organization(request_options: {}, **params)
|
|
133
133
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
134
134
|
request_data = Payabli::Organization::Types::OrganizationData.new(params).to_h
|
|
135
|
-
non_body_param_names = %w[
|
|
135
|
+
non_body_param_names = %w[orgIdPathParam]
|
|
136
136
|
body = request_data.except(*non_body_param_names)
|
|
137
137
|
|
|
138
138
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
139
139
|
request = Payabli::Internal::JSON::Request.new(
|
|
140
140
|
base_url: request_options[:base_url],
|
|
141
141
|
method: "PUT",
|
|
142
|
-
path: "Organization/#{URI.encode_uri_component(params[:
|
|
142
|
+
path: "Organization/#{URI.encode_uri_component(params[:org_id_path_param].to_s)}",
|
|
143
143
|
headers: headers,
|
|
144
144
|
body: body,
|
|
145
145
|
request_options: request_options
|
|
@@ -4,7 +4,7 @@ module Payabli
|
|
|
4
4
|
module Organization
|
|
5
5
|
module Types
|
|
6
6
|
class OrganizationData < Internal::Types::Model
|
|
7
|
-
field :
|
|
7
|
+
field :org_id_path_param, -> { Integer }, optional: false, nullable: false, api_name: "orgIdPathParam"
|
|
8
8
|
|
|
9
9
|
field :services, -> { Internal::Types::Array[Payabli::Types::ServiceCost] }, optional: true, nullable: false
|
|
10
10
|
|
|
@@ -24,7 +24,7 @@ module Payabli
|
|
|
24
24
|
|
|
25
25
|
field :org_entry_name, -> { String }, optional: true, nullable: false, api_name: "orgEntryName"
|
|
26
26
|
|
|
27
|
-
field :
|
|
27
|
+
field :org_id, -> { String }, optional: true, nullable: false, api_name: "orgId"
|
|
28
28
|
|
|
29
29
|
field :org_logo, -> { Payabli::Types::FileContent }, optional: true, nullable: false, api_name: "orgLogo"
|
|
30
30
|
|
|
@@ -393,13 +393,16 @@ module Payabli
|
|
|
393
393
|
# @return [Payabli::Types::PayabliApiResponsePaymentLinks]
|
|
394
394
|
def push_pay_link_from_id(request_options: {}, **params)
|
|
395
395
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
396
|
+
path_param_names = %i[pay_link_id]
|
|
397
|
+
body_params = params.except(*path_param_names)
|
|
398
|
+
|
|
396
399
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
397
400
|
request = Payabli::Internal::JSON::Request.new(
|
|
398
401
|
base_url: request_options[:base_url],
|
|
399
402
|
method: "POST",
|
|
400
403
|
path: "PaymentLink/push/#{URI.encode_uri_component(params[:pay_link_id].to_s)}",
|
|
401
404
|
headers: headers,
|
|
402
|
-
body: Payabli::Types::PushPayLinkRequest.new(
|
|
405
|
+
body: Payabli::Types::PushPayLinkRequest.new(body_params).to_h,
|
|
403
406
|
request_options: request_options
|
|
404
407
|
)
|
|
405
408
|
begin
|
|
@@ -816,13 +819,16 @@ module Payabli
|
|
|
816
819
|
# @return [Payabli::Types::PayabliApiResponsePaymentLinks]
|
|
817
820
|
def update_pay_link_out_from_id(request_options: {}, **params)
|
|
818
821
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
822
|
+
path_param_names = %i[paylink_id]
|
|
823
|
+
body_params = params.except(*path_param_names)
|
|
824
|
+
|
|
819
825
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
820
826
|
request = Payabli::Internal::JSON::Request.new(
|
|
821
827
|
base_url: request_options[:base_url],
|
|
822
828
|
method: "PATCH",
|
|
823
829
|
path: "PaymentLink/updateOut/#{URI.encode_uri_component(params[:paylink_id].to_s)}",
|
|
824
830
|
headers: headers,
|
|
825
|
-
body: Payabli::Types::PaymentPageRequestBodyOut.new(
|
|
831
|
+
body: Payabli::Types::PaymentPageRequestBodyOut.new(body_params).to_h,
|
|
826
832
|
request_options: request_options
|
|
827
833
|
)
|
|
828
834
|
begin
|
|
@@ -105,13 +105,16 @@ module Payabli
|
|
|
105
105
|
# @return [Payabli::Types::PayabliApiResponse00Responsedatanonobject]
|
|
106
106
|
def save_logo(request_options: {}, **params)
|
|
107
107
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
108
|
+
path_param_names = %i[entry]
|
|
109
|
+
body_params = params.except(*path_param_names)
|
|
110
|
+
|
|
108
111
|
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
109
112
|
request = Payabli::Internal::JSON::Request.new(
|
|
110
113
|
base_url: request_options[:base_url],
|
|
111
114
|
method: "PUT",
|
|
112
115
|
path: "Paypoint/logo/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
113
116
|
headers: headers,
|
|
114
|
-
body: Payabli::Types::FileContent.new(
|
|
117
|
+
body: Payabli::Types::FileContent.new(body_params).to_h,
|
|
115
118
|
request_options: request_options
|
|
116
119
|
)
|
|
117
120
|
begin
|
|
@@ -5,7 +5,7 @@ module Payabli
|
|
|
5
5
|
class AuthCapturePayoutResponseData < Internal::Types::Model
|
|
6
6
|
field :auth_code, -> { String }, optional: false, nullable: true, api_name: "authCode"
|
|
7
7
|
|
|
8
|
-
field :reference_id, -> { String }, optional: false, nullable:
|
|
8
|
+
field :reference_id, -> { String }, optional: false, nullable: true, api_name: "referenceId"
|
|
9
9
|
|
|
10
10
|
field :result_code, -> { Integer }, optional: false, nullable: false, api_name: "resultCode"
|
|
11
11
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# A chargeable action covered by a billing profile, with the fee schedule(s)
|
|
6
|
+
# that apply to it.
|
|
7
|
+
class BillableEvent < Internal::Types::Model
|
|
8
|
+
field :id, -> { Integer }, optional: false, nullable: false
|
|
9
|
+
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :vertical, -> { Integer }, optional: false, nullable: false
|
|
13
|
+
|
|
14
|
+
field :service, -> { Integer }, optional: false, nullable: false
|
|
15
|
+
|
|
16
|
+
field :service_type, -> { Integer }, optional: false, nullable: false, api_name: "serviceType"
|
|
17
|
+
|
|
18
|
+
field :event_type, -> { Integer }, optional: false, nullable: false, api_name: "eventType"
|
|
19
|
+
|
|
20
|
+
field :event_group, -> { Integer }, optional: false, nullable: false, api_name: "eventGroup"
|
|
21
|
+
|
|
22
|
+
field :event_source, -> { Integer }, optional: false, nullable: false, api_name: "eventSource"
|
|
23
|
+
|
|
24
|
+
field :region_type, -> { Integer }, optional: false, nullable: false, api_name: "regionType"
|
|
25
|
+
|
|
26
|
+
field :fee_schedules, -> { Internal::Types::Array[Payabli::Types::FeeSchedule] }, optional: false, nullable: false, api_name: "feeSchedules"
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# An owning or participating entity, as returned by the View profile endpoint
|
|
6
|
+
# (`entityType` serialized as an integer).
|
|
7
|
+
class BillingEntity < Internal::Types::Model
|
|
8
|
+
field :entity_type, -> { Integer }, optional: false, nullable: false, api_name: "entityType"
|
|
9
|
+
|
|
10
|
+
field :entity_id, -> { Integer }, optional: false, nullable: false, api_name: "entityId"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# An owning entity, as returned by the List profiles endpoint (`entityType`
|
|
6
|
+
# serialized as a name).
|
|
7
|
+
class BillingEntityNamed < Internal::Types::Model
|
|
8
|
+
field :entity_type, -> { Payabli::Types::EntityTypeName }, optional: false, nullable: false, api_name: "entityType"
|
|
9
|
+
|
|
10
|
+
field :entity_id, -> { Integer }, optional: false, nullable: false, api_name: "entityId"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# A page of billing profiles that belong to an organization, returned by the
|
|
6
|
+
# List profiles endpoint. This is the data behind the Profile Library table in
|
|
7
|
+
# the Payabli Portal.
|
|
8
|
+
class BillingProfileQueryResponse < Internal::Types::Model
|
|
9
|
+
field :summary, -> { Payabli::Types::BillingProfileSummary }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :records, -> { Internal::Types::Array[Payabli::Types::BillingProfileRecord] }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
# A single billing profile as it appears in the list.
|
|
6
|
+
class BillingProfileRecord < Internal::Types::Model
|
|
7
|
+
field :id, -> { Integer }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :version_id, -> { Integer }, optional: false, nullable: false, api_name: "versionId"
|
|
10
|
+
|
|
11
|
+
field :version_number, -> { Integer }, optional: false, nullable: false, api_name: "versionNumber"
|
|
12
|
+
|
|
13
|
+
field :business, -> { Payabli::Types::BillingEntityNamed }, optional: false, nullable: false
|
|
14
|
+
|
|
15
|
+
field :service_vertical, -> { Payabli::Types::ServiceVerticalName }, optional: false, nullable: false, api_name: "serviceVertical"
|
|
16
|
+
|
|
17
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
18
|
+
|
|
19
|
+
field :fee_type, -> { Payabli::Types::FeeTypeName }, optional: false, nullable: false, api_name: "feeType"
|
|
20
|
+
|
|
21
|
+
field :created_at, -> { String }, optional: false, nullable: false, api_name: "createdAt"
|
|
22
|
+
|
|
23
|
+
field :updated_at, -> { String }, optional: false, nullable: false, api_name: "updatedAt"
|
|
24
|
+
|
|
25
|
+
field :entities_assigned, -> { Payabli::Types::EntitiesAssigned }, optional: false, nullable: false, api_name: "entitiesAssigned"
|
|
26
|
+
|
|
27
|
+
field :parent_id, -> { String }, optional: false, nullable: false, api_name: "parentId"
|
|
28
|
+
|
|
29
|
+
field :count_of_events, -> { Integer }, optional: false, nullable: false, api_name: "countOfEvents"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|