payabli 2.2.19 → 2.2.21
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 -3
- data/LICENSE.md +5 -6
- data/README.md +6 -0
- data/lib/payabli/bill/client.rb +11 -11
- data/lib/payabli/boarding/client.rb +10 -10
- data/lib/payabli/charge_backs/client.rb +3 -3
- data/lib/payabli/client.rb +11 -1
- data/lib/payabli/cloud/client.rb +4 -4
- data/lib/payabli/customer/client.rb +6 -6
- data/lib/payabli/export/client.rb +29 -29
- data/lib/payabli/ghost_card/client.rb +99 -0
- data/lib/payabli/ghost_card/types/card_status.rb +16 -0
- data/lib/payabli/ghost_card/types/create_ghost_card_request_body.rb +27 -0
- data/lib/payabli/ghost_card/types/create_ghost_card_response.rb +14 -0
- data/lib/payabli/ghost_card/types/create_ghost_card_response_data.rb +13 -0
- data/lib/payabli/ghost_card/types/update_card_request_body.rb +13 -0
- data/lib/payabli/hosted_payment_pages/client.rb +3 -3
- data/lib/payabli/import/client.rb +3 -3
- data/lib/payabli/invoice/client.rb +11 -11
- data/lib/payabli/line_item/client.rb +5 -5
- data/lib/payabli/money_in/client.rb +13 -13
- data/lib/payabli/money_out/client.rb +7 -7
- data/lib/payabli/notification/client.rb +4 -4
- data/lib/payabli/notificationlogs/client.rb +2 -2
- data/lib/payabli/ocr/client.rb +2 -2
- data/lib/payabli/organization/client.rb +6 -6
- data/lib/payabli/payment_link/client.rb +11 -11
- data/lib/payabli/payment_method_domain/client.rb +5 -5
- data/lib/payabli/payout_subscription/client.rb +160 -0
- data/lib/payabli/payout_subscription/types/add_payout_subscription_response.rb +15 -0
- data/lib/payabli/payout_subscription/types/delete_payout_subscription_response.rb +14 -0
- data/lib/payabli/payout_subscription/types/get_payout_subscription_response.rb +14 -0
- data/lib/payabli/payout_subscription/types/payout_payment_detail.rb +24 -0
- data/lib/payabli/payout_subscription/types/payout_schedule_detail.rb +13 -0
- data/lib/payabli/payout_subscription/types/payout_set_pause.rb +25 -0
- data/lib/payabli/payout_subscription/types/payout_subscription_query_record.rb +39 -0
- data/lib/payabli/payout_subscription/types/payout_subscription_query_record_pascal.rb +39 -0
- data/lib/payabli/payout_subscription/types/payout_subscription_request_body.rb +20 -0
- data/lib/payabli/payout_subscription/types/query_payout_subscription_response.rb +13 -0
- data/lib/payabli/payout_subscription/types/request_payout_schedule.rb +12 -0
- data/lib/payabli/payout_subscription/types/update_payout_subscription_body.rb +14 -0
- data/lib/payabli/payout_subscription/types/update_payout_subscription_response.rb +15 -0
- data/lib/payabli/paypoint/client.rb +7 -7
- data/lib/payabli/query/client.rb +143 -43
- data/lib/payabli/query/types/list_payout_subscriptions_org_request.rb +16 -0
- data/lib/payabli/query/types/list_payout_subscriptions_request.rb +16 -0
- data/lib/payabli/statistic/client.rb +4 -4
- data/lib/payabli/subscription/client.rb +3 -3
- data/lib/payabli/templates/client.rb +4 -4
- data/lib/payabli/token_storage/client.rb +3 -3
- data/lib/payabli/types/notification_standard_request_content_event_type.rb +0 -31
- data/lib/payabli/user/client.rb +6 -6
- data/lib/payabli/vendor/client.rb +4 -4
- data/lib/payabli/version.rb +1 -1
- data/lib/payabli.rb +22 -0
- data/reference.md +1304 -372
- data/wiremock/wiremock-mappings.json +1 -1
- metadata +23 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module GhostCard
|
|
5
|
+
class Client
|
|
6
|
+
# @param client [Payabli::Internal::Http::RawClient]
|
|
7
|
+
#
|
|
8
|
+
# @return [void]
|
|
9
|
+
def initialize(client:)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Creates a ghost card, a multi-use virtual debit card issued to a vendor for recurring or discretionary spend.
|
|
14
|
+
#
|
|
15
|
+
# Unlike single-use virtual cards issued as part of a payout transaction, ghost cards aren't tied to a specific
|
|
16
|
+
# payout. They're issued directly to a vendor and can be reused up to a configurable number of times within the
|
|
17
|
+
# card's spending limits.
|
|
18
|
+
#
|
|
19
|
+
# Only one ghost card can exist per vendor per paypoint. To issue a new card to the same vendor, cancel the
|
|
20
|
+
# existing card first.
|
|
21
|
+
#
|
|
22
|
+
# @param request_options [Hash]
|
|
23
|
+
# @param params [Payabli::GhostCard::Types::CreateGhostCardRequestBody]
|
|
24
|
+
# @option request_options [String] :base_url
|
|
25
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
26
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
27
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
28
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
29
|
+
# @option params [Payabli::Types::Entry] :entry
|
|
30
|
+
#
|
|
31
|
+
# @return [Payabli::GhostCard::Types::CreateGhostCardResponse]
|
|
32
|
+
def create_ghost_card(request_options: {}, **params)
|
|
33
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
34
|
+
request_data = Payabli::GhostCard::Types::CreateGhostCardRequestBody.new(params).to_h
|
|
35
|
+
non_body_param_names = ["entry"]
|
|
36
|
+
body = request_data.except(*non_body_param_names)
|
|
37
|
+
|
|
38
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
39
|
+
base_url: request_options[:base_url],
|
|
40
|
+
method: "POST",
|
|
41
|
+
path: "MoneyOutCard/GhostCard/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
42
|
+
body: body,
|
|
43
|
+
request_options: request_options
|
|
44
|
+
)
|
|
45
|
+
begin
|
|
46
|
+
response = @client.send(request)
|
|
47
|
+
rescue Net::HTTPRequestTimeout
|
|
48
|
+
raise Payabli::Errors::TimeoutError
|
|
49
|
+
end
|
|
50
|
+
code = response.code.to_i
|
|
51
|
+
if code.between?(200, 299)
|
|
52
|
+
Payabli::GhostCard::Types::CreateGhostCardResponse.load(response.body)
|
|
53
|
+
else
|
|
54
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
55
|
+
raise error_class.new(response.body, code: code)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Updates the status of a virtual card (including ghost cards) under a paypoint.
|
|
60
|
+
#
|
|
61
|
+
# @param request_options [Hash]
|
|
62
|
+
# @param params [Payabli::GhostCard::Types::UpdateCardRequestBody]
|
|
63
|
+
# @option request_options [String] :base_url
|
|
64
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
65
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
66
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
67
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
68
|
+
# @option params [Payabli::Types::Entry] :entry
|
|
69
|
+
#
|
|
70
|
+
# @return [Payabli::Types::PayabliApiResponse]
|
|
71
|
+
def update_card(request_options: {}, **params)
|
|
72
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
73
|
+
request_data = Payabli::GhostCard::Types::UpdateCardRequestBody.new(params).to_h
|
|
74
|
+
non_body_param_names = ["entry"]
|
|
75
|
+
body = request_data.except(*non_body_param_names)
|
|
76
|
+
|
|
77
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
78
|
+
base_url: request_options[:base_url],
|
|
79
|
+
method: "PATCH",
|
|
80
|
+
path: "MoneyOutCard/card/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
81
|
+
body: body,
|
|
82
|
+
request_options: request_options
|
|
83
|
+
)
|
|
84
|
+
begin
|
|
85
|
+
response = @client.send(request)
|
|
86
|
+
rescue Net::HTTPRequestTimeout
|
|
87
|
+
raise Payabli::Errors::TimeoutError
|
|
88
|
+
end
|
|
89
|
+
code = response.code.to_i
|
|
90
|
+
if code.between?(200, 299)
|
|
91
|
+
Payabli::Types::PayabliApiResponse.load(response.body)
|
|
92
|
+
else
|
|
93
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
94
|
+
raise error_class.new(response.body, code: code)
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module GhostCard
|
|
5
|
+
module Types
|
|
6
|
+
module CardStatus
|
|
7
|
+
extend Payabli::Internal::Types::Enum
|
|
8
|
+
|
|
9
|
+
ACTIVE = "Active"
|
|
10
|
+
INACTIVE = "Inactive"
|
|
11
|
+
CANCELLED = "Cancelled"
|
|
12
|
+
EXPIRED = "Expired"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module GhostCard
|
|
5
|
+
module Types
|
|
6
|
+
class CreateGhostCardRequestBody < Internal::Types::Model
|
|
7
|
+
field :entry, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :vendor_id, -> { Integer }, optional: false, nullable: false, api_name: "vendorId"
|
|
9
|
+
field :expense_limit, -> { Integer }, optional: false, nullable: false, api_name: "expenseLimit"
|
|
10
|
+
field :expiration_date, -> { String }, optional: true, nullable: false, api_name: "expirationDate"
|
|
11
|
+
field :amount, -> { Integer }, optional: false, nullable: false
|
|
12
|
+
field :max_number_of_uses, -> { Integer }, optional: false, nullable: false, api_name: "maxNumberOfUses"
|
|
13
|
+
field :exact_amount, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "exactAmount"
|
|
14
|
+
field :expense_limit_period, -> { String }, optional: false, nullable: false, api_name: "expenseLimitPeriod"
|
|
15
|
+
field :billing_cycle, -> { String }, optional: false, nullable: false, api_name: "billingCycle"
|
|
16
|
+
field :billing_cycle_day, -> { String }, optional: false, nullable: false, api_name: "billingCycleDay"
|
|
17
|
+
field :daily_transaction_count, -> { Integer }, optional: false, nullable: false, api_name: "dailyTransactionCount"
|
|
18
|
+
field :daily_amount_limit, -> { Integer }, optional: false, nullable: false, api_name: "dailyAmountLimit"
|
|
19
|
+
field :transaction_amount_limit, -> { Integer }, optional: false, nullable: false, api_name: "transactionAmountLimit"
|
|
20
|
+
field :mcc, -> { String }, optional: true, nullable: false
|
|
21
|
+
field :tcc, -> { String }, optional: true, nullable: false
|
|
22
|
+
field :misc_1, -> { String }, optional: true, nullable: false, api_name: "misc1"
|
|
23
|
+
field :misc_2, -> { String }, optional: true, nullable: false, api_name: "misc2"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module GhostCard
|
|
5
|
+
module Types
|
|
6
|
+
# Response for creating a ghost card.
|
|
7
|
+
class CreateGhostCardResponse < Internal::Types::Model
|
|
8
|
+
field :is_success, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isSuccess"
|
|
9
|
+
field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
|
|
10
|
+
field :response_data, -> { Payabli::GhostCard::Types::CreateGhostCardResponseData }, optional: true, nullable: false, api_name: "responseData"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module GhostCard
|
|
5
|
+
module Types
|
|
6
|
+
class CreateGhostCardResponseData < Internal::Types::Model
|
|
7
|
+
field :reference_id, -> { String }, optional: true, nullable: false, api_name: "ReferenceId"
|
|
8
|
+
field :result_code, -> { Integer }, optional: true, nullable: false, api_name: "ResultCode"
|
|
9
|
+
field :result_text, -> { String }, optional: true, nullable: false, api_name: "ResultText"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module GhostCard
|
|
5
|
+
module Types
|
|
6
|
+
class UpdateCardRequestBody < Internal::Types::Model
|
|
7
|
+
field :entry, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :card_token, -> { String }, optional: false, nullable: false, api_name: "cardToken"
|
|
9
|
+
field :status, -> { Payabli::GhostCard::Types::CardStatus }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -29,7 +29,7 @@ module Payabli
|
|
|
29
29
|
request = Payabli::Internal::JSON::Request.new(
|
|
30
30
|
base_url: request_options[:base_url],
|
|
31
31
|
method: "GET",
|
|
32
|
-
path: "Paypoint/load/#{params[:entry]}/#{params[:subdomain]}",
|
|
32
|
+
path: "Paypoint/load/#{URI.encode_uri_component(params[:entry].to_s)}/#{URI.encode_uri_component(params[:subdomain].to_s)}",
|
|
33
33
|
request_options: request_options
|
|
34
34
|
)
|
|
35
35
|
begin
|
|
@@ -73,7 +73,7 @@ module Payabli
|
|
|
73
73
|
request = Payabli::Internal::JSON::Request.new(
|
|
74
74
|
base_url: request_options[:base_url],
|
|
75
75
|
method: "POST",
|
|
76
|
-
path: "Paypoint/#{params[:entry]}",
|
|
76
|
+
path: "Paypoint/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
77
77
|
headers: headers,
|
|
78
78
|
body: Payabli::Types::PayabliPages.new(body_params).to_h,
|
|
79
79
|
request_options: request_options
|
|
@@ -110,7 +110,7 @@ module Payabli
|
|
|
110
110
|
request = Payabli::Internal::JSON::Request.new(
|
|
111
111
|
base_url: request_options[:base_url],
|
|
112
112
|
method: "PUT",
|
|
113
|
-
path: "Paypoint/#{params[:entry]}/#{params[:subdomain]}",
|
|
113
|
+
path: "Paypoint/#{URI.encode_uri_component(params[:entry].to_s)}/#{URI.encode_uri_component(params[:subdomain].to_s)}",
|
|
114
114
|
body: Payabli::Types::PayabliPages.new(params).to_h,
|
|
115
115
|
request_options: request_options
|
|
116
116
|
)
|
|
@@ -32,7 +32,7 @@ module Payabli
|
|
|
32
32
|
request = Payabli::Internal::Multipart::Request.new(
|
|
33
33
|
base_url: request_options[:base_url],
|
|
34
34
|
method: "POST",
|
|
35
|
-
path: "Import/billsForm/#{params[:entry]}",
|
|
35
|
+
path: "Import/billsForm/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
36
36
|
body: body,
|
|
37
37
|
request_options: request_options
|
|
38
38
|
)
|
|
@@ -73,7 +73,7 @@ module Payabli
|
|
|
73
73
|
request = Payabli::Internal::Multipart::Request.new(
|
|
74
74
|
base_url: request_options[:base_url],
|
|
75
75
|
method: "POST",
|
|
76
|
-
path: "Import/customersForm/#{params[:entry]}",
|
|
76
|
+
path: "Import/customersForm/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
77
77
|
body: body,
|
|
78
78
|
request_options: request_options
|
|
79
79
|
)
|
|
@@ -113,7 +113,7 @@ module Payabli
|
|
|
113
113
|
request = Payabli::Internal::Multipart::Request.new(
|
|
114
114
|
base_url: request_options[:base_url],
|
|
115
115
|
method: "POST",
|
|
116
|
-
path: "Import/vendorsForm/#{params[:entry]}",
|
|
116
|
+
path: "Import/vendorsForm/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
117
117
|
body: body,
|
|
118
118
|
request_options: request_options
|
|
119
119
|
)
|
|
@@ -40,7 +40,7 @@ module Payabli
|
|
|
40
40
|
request = Payabli::Internal::JSON::Request.new(
|
|
41
41
|
base_url: request_options[:base_url],
|
|
42
42
|
method: "POST",
|
|
43
|
-
path: "Invoice/#{params[:entry]}",
|
|
43
|
+
path: "Invoice/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
44
44
|
headers: headers,
|
|
45
45
|
query: query_params,
|
|
46
46
|
body: Payabli::Invoice::Types::InvoiceDataRequest.new(body_params).to_h,
|
|
@@ -78,7 +78,7 @@ module Payabli
|
|
|
78
78
|
request = Payabli::Internal::JSON::Request.new(
|
|
79
79
|
base_url: request_options[:base_url],
|
|
80
80
|
method: "DELETE",
|
|
81
|
-
path: "Invoice/attachedFileFromInvoice/#{params[:id_invoice]}/#{params[:filename]}",
|
|
81
|
+
path: "Invoice/attachedFileFromInvoice/#{URI.encode_uri_component(params[:id_invoice].to_s)}/#{URI.encode_uri_component(params[:filename].to_s)}",
|
|
82
82
|
request_options: request_options
|
|
83
83
|
)
|
|
84
84
|
begin
|
|
@@ -112,7 +112,7 @@ module Payabli
|
|
|
112
112
|
request = Payabli::Internal::JSON::Request.new(
|
|
113
113
|
base_url: request_options[:base_url],
|
|
114
114
|
method: "DELETE",
|
|
115
|
-
path: "Invoice/#{params[:id_invoice]}",
|
|
115
|
+
path: "Invoice/#{URI.encode_uri_component(params[:id_invoice].to_s)}",
|
|
116
116
|
request_options: request_options
|
|
117
117
|
)
|
|
118
118
|
begin
|
|
@@ -155,7 +155,7 @@ module Payabli
|
|
|
155
155
|
request = Payabli::Internal::JSON::Request.new(
|
|
156
156
|
base_url: request_options[:base_url],
|
|
157
157
|
method: "PUT",
|
|
158
|
-
path: "Invoice/#{params[:id_invoice]}",
|
|
158
|
+
path: "Invoice/#{URI.encode_uri_component(params[:id_invoice].to_s)}",
|
|
159
159
|
query: query_params,
|
|
160
160
|
body: Payabli::Invoice::Types::InvoiceDataRequest.new(body_params).to_h,
|
|
161
161
|
request_options: request_options
|
|
@@ -198,7 +198,7 @@ module Payabli
|
|
|
198
198
|
request = Payabli::Internal::JSON::Request.new(
|
|
199
199
|
base_url: request_options[:base_url],
|
|
200
200
|
method: "GET",
|
|
201
|
-
path: "Invoice/attachedFileFromInvoice/#{params[:id_invoice]}/#{params[:filename]}",
|
|
201
|
+
path: "Invoice/attachedFileFromInvoice/#{URI.encode_uri_component(params[:id_invoice].to_s)}/#{URI.encode_uri_component(params[:filename].to_s)}",
|
|
202
202
|
query: query_params,
|
|
203
203
|
request_options: request_options
|
|
204
204
|
)
|
|
@@ -233,7 +233,7 @@ module Payabli
|
|
|
233
233
|
request = Payabli::Internal::JSON::Request.new(
|
|
234
234
|
base_url: request_options[:base_url],
|
|
235
235
|
method: "GET",
|
|
236
|
-
path: "Invoice/#{params[:id_invoice]}",
|
|
236
|
+
path: "Invoice/#{URI.encode_uri_component(params[:id_invoice].to_s)}",
|
|
237
237
|
request_options: request_options
|
|
238
238
|
)
|
|
239
239
|
begin
|
|
@@ -267,7 +267,7 @@ module Payabli
|
|
|
267
267
|
request = Payabli::Internal::JSON::Request.new(
|
|
268
268
|
base_url: request_options[:base_url],
|
|
269
269
|
method: "GET",
|
|
270
|
-
path: "Invoice/getNumber/#{params[:entry]}",
|
|
270
|
+
path: "Invoice/getNumber/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
271
271
|
request_options: request_options
|
|
272
272
|
)
|
|
273
273
|
begin
|
|
@@ -316,7 +316,7 @@ module Payabli
|
|
|
316
316
|
request = Payabli::Internal::JSON::Request.new(
|
|
317
317
|
base_url: request_options[:base_url],
|
|
318
318
|
method: "GET",
|
|
319
|
-
path: "Query/invoices/#{params[:entry]}",
|
|
319
|
+
path: "Query/invoices/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
320
320
|
query: query_params,
|
|
321
321
|
request_options: request_options
|
|
322
322
|
)
|
|
@@ -366,7 +366,7 @@ module Payabli
|
|
|
366
366
|
request = Payabli::Internal::JSON::Request.new(
|
|
367
367
|
base_url: request_options[:base_url],
|
|
368
368
|
method: "GET",
|
|
369
|
-
path: "Query/invoices/org/#{params[:org_id]}",
|
|
369
|
+
path: "Query/invoices/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
|
|
370
370
|
query: query_params,
|
|
371
371
|
request_options: request_options
|
|
372
372
|
)
|
|
@@ -409,7 +409,7 @@ module Payabli
|
|
|
409
409
|
request = Payabli::Internal::JSON::Request.new(
|
|
410
410
|
base_url: request_options[:base_url],
|
|
411
411
|
method: "GET",
|
|
412
|
-
path: "Invoice/send/#{params[:id_invoice]}",
|
|
412
|
+
path: "Invoice/send/#{URI.encode_uri_component(params[:id_invoice].to_s)}",
|
|
413
413
|
query: query_params,
|
|
414
414
|
request_options: request_options
|
|
415
415
|
)
|
|
@@ -444,7 +444,7 @@ module Payabli
|
|
|
444
444
|
request = Payabli::Internal::JSON::Request.new(
|
|
445
445
|
base_url: request_options[:base_url],
|
|
446
446
|
method: "GET",
|
|
447
|
-
path: "Export/invoicePdf/#{params[:id_invoice]}",
|
|
447
|
+
path: "Export/invoicePdf/#{URI.encode_uri_component(params[:id_invoice].to_s)}",
|
|
448
448
|
request_options: request_options
|
|
449
449
|
)
|
|
450
450
|
begin
|
|
@@ -35,7 +35,7 @@ module Payabli
|
|
|
35
35
|
request = Payabli::Internal::JSON::Request.new(
|
|
36
36
|
base_url: request_options[:base_url],
|
|
37
37
|
method: "POST",
|
|
38
|
-
path: "LineItem/#{params[:entry]}",
|
|
38
|
+
path: "LineItem/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
39
39
|
headers: headers,
|
|
40
40
|
body: Payabli::Types::LineItem.new(body_params).to_h,
|
|
41
41
|
request_options: request_options
|
|
@@ -71,7 +71,7 @@ module Payabli
|
|
|
71
71
|
request = Payabli::Internal::JSON::Request.new(
|
|
72
72
|
base_url: request_options[:base_url],
|
|
73
73
|
method: "DELETE",
|
|
74
|
-
path: "LineItem/#{params[:line_item_id]}",
|
|
74
|
+
path: "LineItem/#{URI.encode_uri_component(params[:line_item_id].to_s)}",
|
|
75
75
|
request_options: request_options
|
|
76
76
|
)
|
|
77
77
|
begin
|
|
@@ -105,7 +105,7 @@ module Payabli
|
|
|
105
105
|
request = Payabli::Internal::JSON::Request.new(
|
|
106
106
|
base_url: request_options[:base_url],
|
|
107
107
|
method: "GET",
|
|
108
|
-
path: "LineItem/#{params[:line_item_id]}",
|
|
108
|
+
path: "LineItem/#{URI.encode_uri_component(params[:line_item_id].to_s)}",
|
|
109
109
|
request_options: request_options
|
|
110
110
|
)
|
|
111
111
|
begin
|
|
@@ -152,7 +152,7 @@ module Payabli
|
|
|
152
152
|
request = Payabli::Internal::JSON::Request.new(
|
|
153
153
|
base_url: request_options[:base_url],
|
|
154
154
|
method: "GET",
|
|
155
|
-
path: "Query/lineitems/#{params[:entry]}",
|
|
155
|
+
path: "Query/lineitems/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
156
156
|
query: query_params,
|
|
157
157
|
request_options: request_options
|
|
158
158
|
)
|
|
@@ -187,7 +187,7 @@ module Payabli
|
|
|
187
187
|
request = Payabli::Internal::JSON::Request.new(
|
|
188
188
|
base_url: request_options[:base_url],
|
|
189
189
|
method: "PUT",
|
|
190
|
-
path: "LineItem/#{params[:line_item_id]}",
|
|
190
|
+
path: "LineItem/#{URI.encode_uri_component(params[:line_item_id].to_s)}",
|
|
191
191
|
body: Payabli::Types::LineItem.new(params).to_h,
|
|
192
192
|
request_options: request_options
|
|
193
193
|
)
|
|
@@ -88,7 +88,7 @@ module Payabli
|
|
|
88
88
|
request = Payabli::Internal::JSON::Request.new(
|
|
89
89
|
base_url: request_options[:base_url],
|
|
90
90
|
method: "GET",
|
|
91
|
-
path: "MoneyIn/capture/#{params[:trans_id]}/#{params[:amount]}",
|
|
91
|
+
path: "MoneyIn/capture/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
|
|
92
92
|
request_options: request_options
|
|
93
93
|
)
|
|
94
94
|
begin
|
|
@@ -133,7 +133,7 @@ module Payabli
|
|
|
133
133
|
request = Payabli::Internal::JSON::Request.new(
|
|
134
134
|
base_url: request_options[:base_url],
|
|
135
135
|
method: "POST",
|
|
136
|
-
path: "MoneyIn/capture/#{params[:trans_id]}",
|
|
136
|
+
path: "MoneyIn/capture/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
137
137
|
body: Payabli::MoneyIn::Types::CaptureRequest.new(params).to_h,
|
|
138
138
|
request_options: request_options
|
|
139
139
|
)
|
|
@@ -222,7 +222,7 @@ module Payabli
|
|
|
222
222
|
request = Payabli::Internal::JSON::Request.new(
|
|
223
223
|
base_url: request_options[:base_url],
|
|
224
224
|
method: "GET",
|
|
225
|
-
path: "MoneyIn/details/#{params[:trans_id]}",
|
|
225
|
+
path: "MoneyIn/details/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
226
226
|
request_options: request_options
|
|
227
227
|
)
|
|
228
228
|
begin
|
|
@@ -317,7 +317,7 @@ module Payabli
|
|
|
317
317
|
request = Payabli::Internal::JSON::Request.new(
|
|
318
318
|
base_url: request_options[:base_url],
|
|
319
319
|
method: "GET",
|
|
320
|
-
path: "MoneyIn/reverse/#{params[:trans_id]}/#{params[:amount]}",
|
|
320
|
+
path: "MoneyIn/reverse/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
|
|
321
321
|
request_options: request_options
|
|
322
322
|
)
|
|
323
323
|
begin
|
|
@@ -358,7 +358,7 @@ module Payabli
|
|
|
358
358
|
request = Payabli::Internal::JSON::Request.new(
|
|
359
359
|
base_url: request_options[:base_url],
|
|
360
360
|
method: "GET",
|
|
361
|
-
path: "MoneyIn/refund/#{params[:trans_id]}/#{params[:amount]}",
|
|
361
|
+
path: "MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
|
|
362
362
|
request_options: request_options
|
|
363
363
|
)
|
|
364
364
|
begin
|
|
@@ -400,7 +400,7 @@ module Payabli
|
|
|
400
400
|
request = Payabli::Internal::JSON::Request.new(
|
|
401
401
|
base_url: request_options[:base_url],
|
|
402
402
|
method: "POST",
|
|
403
|
-
path: "MoneyIn/refund/#{params[:trans_id]}",
|
|
403
|
+
path: "MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
404
404
|
headers: headers,
|
|
405
405
|
body: body,
|
|
406
406
|
request_options: request_options
|
|
@@ -437,7 +437,7 @@ module Payabli
|
|
|
437
437
|
request = Payabli::Internal::JSON::Request.new(
|
|
438
438
|
base_url: request_options[:base_url],
|
|
439
439
|
method: "GET",
|
|
440
|
-
path: "MoneyIn/reverseCredit/#{params[:trans_id]}",
|
|
440
|
+
path: "MoneyIn/reverseCredit/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
441
441
|
request_options: request_options
|
|
442
442
|
)
|
|
443
443
|
begin
|
|
@@ -477,7 +477,7 @@ module Payabli
|
|
|
477
477
|
request = Payabli::Internal::JSON::Request.new(
|
|
478
478
|
base_url: request_options[:base_url],
|
|
479
479
|
method: "GET",
|
|
480
|
-
path: "MoneyIn/sendreceipt/#{params[:trans_id]}",
|
|
480
|
+
path: "MoneyIn/sendreceipt/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
481
481
|
query: query_params,
|
|
482
482
|
request_options: request_options
|
|
483
483
|
)
|
|
@@ -561,7 +561,7 @@ module Payabli
|
|
|
561
561
|
request = Payabli::Internal::JSON::Request.new(
|
|
562
562
|
base_url: request_options[:base_url],
|
|
563
563
|
method: "GET",
|
|
564
|
-
path: "MoneyIn/void/#{params[:trans_id]}",
|
|
564
|
+
path: "MoneyIn/void/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
565
565
|
request_options: request_options
|
|
566
566
|
)
|
|
567
567
|
begin
|
|
@@ -701,7 +701,7 @@ module Payabli
|
|
|
701
701
|
request = Payabli::Internal::JSON::Request.new(
|
|
702
702
|
base_url: request_options[:base_url],
|
|
703
703
|
method: "POST",
|
|
704
|
-
path: "v2/MoneyIn/capture/#{params[:trans_id]}",
|
|
704
|
+
path: "v2/MoneyIn/capture/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
705
705
|
body: Payabli::MoneyIn::Types::CaptureRequest.new(params).to_h,
|
|
706
706
|
request_options: request_options
|
|
707
707
|
)
|
|
@@ -741,7 +741,7 @@ module Payabli
|
|
|
741
741
|
request = Payabli::Internal::JSON::Request.new(
|
|
742
742
|
base_url: request_options[:base_url],
|
|
743
743
|
method: "POST",
|
|
744
|
-
path: "v2/MoneyIn/refund/#{params[:trans_id]}",
|
|
744
|
+
path: "v2/MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
745
745
|
request_options: request_options
|
|
746
746
|
)
|
|
747
747
|
begin
|
|
@@ -780,7 +780,7 @@ module Payabli
|
|
|
780
780
|
request = Payabli::Internal::JSON::Request.new(
|
|
781
781
|
base_url: request_options[:base_url],
|
|
782
782
|
method: "POST",
|
|
783
|
-
path: "v2/MoneyIn/refund/#{params[:trans_id]}/#{params[:amount]}",
|
|
783
|
+
path: "v2/MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
|
|
784
784
|
request_options: request_options
|
|
785
785
|
)
|
|
786
786
|
begin
|
|
@@ -817,7 +817,7 @@ module Payabli
|
|
|
817
817
|
request = Payabli::Internal::JSON::Request.new(
|
|
818
818
|
base_url: request_options[:base_url],
|
|
819
819
|
method: "POST",
|
|
820
|
-
path: "v2/MoneyIn/void/#{params[:trans_id]}",
|
|
820
|
+
path: "v2/MoneyIn/void/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
821
821
|
request_options: request_options
|
|
822
822
|
)
|
|
823
823
|
begin
|
|
@@ -112,7 +112,7 @@ module Payabli
|
|
|
112
112
|
request = Payabli::Internal::JSON::Request.new(
|
|
113
113
|
base_url: request_options[:base_url],
|
|
114
114
|
method: "GET",
|
|
115
|
-
path: "MoneyOut/cancel/#{params[:reference_id]}",
|
|
115
|
+
path: "MoneyOut/cancel/#{URI.encode_uri_component(params[:reference_id].to_s)}",
|
|
116
116
|
request_options: request_options
|
|
117
117
|
)
|
|
118
118
|
begin
|
|
@@ -146,7 +146,7 @@ module Payabli
|
|
|
146
146
|
request = Payabli::Internal::JSON::Request.new(
|
|
147
147
|
base_url: request_options[:base_url],
|
|
148
148
|
method: "DELETE",
|
|
149
|
-
path: "MoneyOut/cancel/#{params[:reference_id]}",
|
|
149
|
+
path: "MoneyOut/cancel/#{URI.encode_uri_component(params[:reference_id].to_s)}",
|
|
150
150
|
request_options: request_options
|
|
151
151
|
)
|
|
152
152
|
begin
|
|
@@ -224,7 +224,7 @@ module Payabli
|
|
|
224
224
|
request = Payabli::Internal::JSON::Request.new(
|
|
225
225
|
base_url: request_options[:base_url],
|
|
226
226
|
method: "GET",
|
|
227
|
-
path: "MoneyOut/capture/#{params[:reference_id]}",
|
|
227
|
+
path: "MoneyOut/capture/#{URI.encode_uri_component(params[:reference_id].to_s)}",
|
|
228
228
|
headers: headers,
|
|
229
229
|
request_options: request_options
|
|
230
230
|
)
|
|
@@ -259,7 +259,7 @@ module Payabli
|
|
|
259
259
|
request = Payabli::Internal::JSON::Request.new(
|
|
260
260
|
base_url: request_options[:base_url],
|
|
261
261
|
method: "GET",
|
|
262
|
-
path: "MoneyOut/details/#{params[:trans_id]}",
|
|
262
|
+
path: "MoneyOut/details/#{URI.encode_uri_component(params[:trans_id].to_s)}",
|
|
263
263
|
request_options: request_options
|
|
264
264
|
)
|
|
265
265
|
begin
|
|
@@ -293,7 +293,7 @@ module Payabli
|
|
|
293
293
|
request = Payabli::Internal::JSON::Request.new(
|
|
294
294
|
base_url: request_options[:base_url],
|
|
295
295
|
method: "GET",
|
|
296
|
-
path: "MoneyOut/vcard/#{params[:card_token]}",
|
|
296
|
+
path: "MoneyOut/vcard/#{URI.encode_uri_component(params[:card_token].to_s)}",
|
|
297
297
|
request_options: request_options
|
|
298
298
|
)
|
|
299
299
|
begin
|
|
@@ -363,7 +363,7 @@ module Payabli
|
|
|
363
363
|
request = Payabli::Internal::JSON::Request.new(
|
|
364
364
|
base_url: request_options[:base_url],
|
|
365
365
|
method: "GET",
|
|
366
|
-
path: "MoneyOut/checkimage/#{params[:asset_name]}",
|
|
366
|
+
path: "MoneyOut/checkimage/#{URI.encode_uri_component(params[:asset_name].to_s)}",
|
|
367
367
|
request_options: request_options
|
|
368
368
|
)
|
|
369
369
|
begin
|
|
@@ -411,7 +411,7 @@ module Payabli
|
|
|
411
411
|
request = Payabli::Internal::JSON::Request.new(
|
|
412
412
|
base_url: request_options[:base_url],
|
|
413
413
|
method: "PATCH",
|
|
414
|
-
path: "MoneyOut/status/#{params[:trans_id]}/#{params[:check_payment_status]}",
|
|
414
|
+
path: "MoneyOut/status/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:check_payment_status].to_s)}",
|
|
415
415
|
request_options: request_options
|
|
416
416
|
)
|
|
417
417
|
begin
|
|
@@ -61,7 +61,7 @@ module Payabli
|
|
|
61
61
|
request = Payabli::Internal::JSON::Request.new(
|
|
62
62
|
base_url: request_options[:base_url],
|
|
63
63
|
method: "DELETE",
|
|
64
|
-
path: "Notification/#{params[:n_id]}",
|
|
64
|
+
path: "Notification/#{URI.encode_uri_component(params[:n_id].to_s)}",
|
|
65
65
|
request_options: request_options
|
|
66
66
|
)
|
|
67
67
|
begin
|
|
@@ -95,7 +95,7 @@ module Payabli
|
|
|
95
95
|
request = Payabli::Internal::JSON::Request.new(
|
|
96
96
|
base_url: request_options[:base_url],
|
|
97
97
|
method: "GET",
|
|
98
|
-
path: "Notification/#{params[:n_id]}",
|
|
98
|
+
path: "Notification/#{URI.encode_uri_component(params[:n_id].to_s)}",
|
|
99
99
|
request_options: request_options
|
|
100
100
|
)
|
|
101
101
|
begin
|
|
@@ -129,7 +129,7 @@ module Payabli
|
|
|
129
129
|
request = Payabli::Internal::JSON::Request.new(
|
|
130
130
|
base_url: request_options[:base_url],
|
|
131
131
|
method: "PUT",
|
|
132
|
-
path: "Notification/#{params[:n_id]}",
|
|
132
|
+
path: "Notification/#{URI.encode_uri_component(params[:n_id].to_s)}",
|
|
133
133
|
body: Payabli::Notification::Types::UpdateNotificationRequest.new(params).to_h,
|
|
134
134
|
request_options: request_options
|
|
135
135
|
)
|
|
@@ -164,7 +164,7 @@ module Payabli
|
|
|
164
164
|
request = Payabli::Internal::JSON::Request.new(
|
|
165
165
|
base_url: request_options[:base_url],
|
|
166
166
|
method: "GET",
|
|
167
|
-
path: "Export/notificationReport/#{params[:id]}",
|
|
167
|
+
path: "Export/notificationReport/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
168
168
|
request_options: request_options
|
|
169
169
|
)
|
|
170
170
|
begin
|
|
@@ -73,7 +73,7 @@ module Payabli
|
|
|
73
73
|
request = Payabli::Internal::JSON::Request.new(
|
|
74
74
|
base_url: request_options[:base_url],
|
|
75
75
|
method: "GET",
|
|
76
|
-
path: "/v2/notificationlogs/#{params[:uuid]}",
|
|
76
|
+
path: "/v2/notificationlogs/#{URI.encode_uri_component(params[:uuid].to_s)}",
|
|
77
77
|
request_options: request_options
|
|
78
78
|
)
|
|
79
79
|
begin
|
|
@@ -109,7 +109,7 @@ module Payabli
|
|
|
109
109
|
request = Payabli::Internal::JSON::Request.new(
|
|
110
110
|
base_url: request_options[:base_url],
|
|
111
111
|
method: "GET",
|
|
112
|
-
path: "/v2/notificationlogs/#{params[:uuid]}/retry",
|
|
112
|
+
path: "/v2/notificationlogs/#{URI.encode_uri_component(params[:uuid].to_s)}/retry",
|
|
113
113
|
request_options: request_options
|
|
114
114
|
)
|
|
115
115
|
begin
|
data/lib/payabli/ocr/client.rb
CHANGED
|
@@ -30,7 +30,7 @@ module Payabli
|
|
|
30
30
|
request = Payabli::Internal::JSON::Request.new(
|
|
31
31
|
base_url: request_options[:base_url],
|
|
32
32
|
method: "POST",
|
|
33
|
-
path: "/Import/ocrDocumentForm/#{params[:type_result]}",
|
|
33
|
+
path: "/Import/ocrDocumentForm/#{URI.encode_uri_component(params[:type_result].to_s)}",
|
|
34
34
|
body: Payabli::Ocr::Types::FileContentImageOnly.new(params).to_h,
|
|
35
35
|
request_options: request_options
|
|
36
36
|
)
|
|
@@ -68,7 +68,7 @@ module Payabli
|
|
|
68
68
|
request = Payabli::Internal::JSON::Request.new(
|
|
69
69
|
base_url: request_options[:base_url],
|
|
70
70
|
method: "POST",
|
|
71
|
-
path: "/Import/ocrDocumentJson/#{params[:type_result]}",
|
|
71
|
+
path: "/Import/ocrDocumentJson/#{URI.encode_uri_component(params[:type_result].to_s)}",
|
|
72
72
|
body: Payabli::Ocr::Types::FileContentImageOnly.new(params).to_h,
|
|
73
73
|
request_options: request_options
|
|
74
74
|
)
|