payabli 3.0.12 → 3.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/lib/payabli/client.rb +6 -1
  4. data/lib/payabli/device/client.rb +6 -5
  5. data/lib/payabli/money_out/client.rb +2 -2
  6. data/lib/payabli/payout_subscription/client.rb +4 -4
  7. data/lib/payabli/statistic/client.rb +16 -26
  8. data/lib/payabli/statistic/types/basic_stats_request.rb +0 -2
  9. data/lib/payabli/subscription/client.rb +2 -2
  10. data/lib/payabli/taptopay/client.rb +68 -0
  11. data/lib/payabli/taptopay/types/tap_to_pay_activation_challenge_request.rb +13 -0
  12. data/lib/payabli/types/bill_out_data.rb +1 -1
  13. data/lib/payabli/types/bill_pay_out_data.rb +1 -1
  14. data/lib/payabli/types/bill_pay_out_data_request.rb +1 -1
  15. data/lib/payabli/types/bill_response_data.rb +1 -1
  16. data/lib/payabli/types/{stat_basic_query_record.rb → stat_customer_basic_query_record.rb} +1 -5
  17. data/lib/payabli/types/tap_to_pay_activation_challenge_data.rb +14 -0
  18. data/lib/payabli/types/tap_to_pay_activation_challenge_error_response.rb +16 -0
  19. data/lib/payabli/types/tap_to_pay_activation_challenge_error_response_response_data.rb +11 -0
  20. data/lib/payabli/types/tap_to_pay_activation_challenge_response.rb +22 -0
  21. data/lib/payabli/types/user_data.rb +1 -1
  22. data/lib/payabli/types/user_query_record.rb +1 -1
  23. data/lib/payabli/types/v_card_get_response_associated_vendor.rb +1 -1
  24. data/lib/payabli/types/vendor_query_record.rb +53 -53
  25. data/lib/payabli/vendor/client.rb +3 -3
  26. data/lib/payabli/version.rb +1 -1
  27. data/lib/payabli.rb +13 -10
  28. data/reference.md +111 -55
  29. data/wiremock/wiremock-mappings.json +43 -17
  30. metadata +9 -6
  31. data/lib/payabli/statistic/types/customer_basic_stats_request.rb +0 -17
  32. data/lib/payabli/statistic/types/sub_stats_request.rb +0 -17
  33. data/lib/payabli/statistic/types/vendor_basic_stats_request.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0144b8863c13e815b04ac5deeb134ec9ff868dee0f613ebdb32c30f65fcc4e53
4
- data.tar.gz: 2480d71e0c0ff34170adf2da7059c19e5ff6e133939639d2e19b4120a70642f5
3
+ metadata.gz: 147a9430a2f80e4414a0b5809e18fce98312c5345ab53e37ef7a0abcdcbd35b1
4
+ data.tar.gz: '0882e1a96a2c8cedc591bffb46399be9b10a1e790a66dcaeb0f0b0f793a5b262'
5
5
  SHA512:
6
- metadata.gz: 4f72da83aae935c0a21d6a95f45547261c3557a06a169c210b26a6ca114eb8f341581be1e6cc805b1ab2ad55afc8294f1348c93c2cb55923bc36f1896531f2c6
7
- data.tar.gz: 1018bb7c00bec622ea398c474c8a90ce426a6348375d9a08984c70d8d2f1bca7a1d5389d21cae149d01bd0a713e35ace4ce506884cb2dc744d6adc3f216c315c
6
+ metadata.gz: 5fbb7ffcd3229b83e79e204bc0148d5d6b79a6c5ca403672f2c53c4e18e4b86afaa80f860dcbc232a2c18a0ce7c4ceba60d3e6b948726e554d6c8bde1442ad30
7
+ data.tar.gz: 1fa9e94b9e828ce81b0bc446446880eb66e35c9a95c144da155eec8ce5c2227306d28288e3f8324d52cb40ef16bded0ed61dbd1c79f40cdb10bd45a6b397ce12
data/.fern/metadata.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "cliVersion": "5.98.1",
2
+ "cliVersion": "5.128.3",
3
3
  "generatorName": "fernapi/fern-ruby-sdk",
4
4
  "generatorVersion": "1.24.0",
5
5
  "generatorConfig": {
@@ -7,10 +7,10 @@
7
7
  "rubocopVariableNumberStyle": "snake_case",
8
8
  "respectOptionalRequestBody": true
9
9
  },
10
- "originGitCommit": "75a6ae666f6df6ac60fb9521709c38d26cb8db9e",
10
+ "originGitCommit": "1297058d5bfc3ce61ca5d71a9b2bcdf427e20073",
11
11
  "originGitCommitIsDirty": true,
12
12
  "invokedBy": "ci",
13
- "requestedVersion": "3.0.12",
13
+ "requestedVersion": "3.0.14",
14
14
  "ciProvider": "github",
15
- "sdkVersion": "3.0.12"
15
+ "sdkVersion": "3.0.14"
16
16
  }
@@ -32,7 +32,7 @@ module Payabli
32
32
  @raw_client = Payabli::Internal::Http::RawClient.new(
33
33
  base_url: base_url || Payabli::Environment::SANDBOX,
34
34
  headers: {
35
- "User-Agent" => "payabli/3.0.12",
35
+ "User-Agent" => "payabli/3.0.14",
36
36
  "X-Fern-Language" => "Ruby"
37
37
  },
38
38
  auth_provider: Payabli::Internal::RoutingAuthProvider.new(
@@ -128,6 +128,11 @@ module Payabli
128
128
  @device ||= Payabli::Device::Client.new(client: @raw_client)
129
129
  end
130
130
 
131
+ # @return [Payabli::Taptopay::Client]
132
+ def taptopay
133
+ @taptopay ||= Payabli::Taptopay::Client.new(client: @raw_client)
134
+ end
135
+
131
136
  # @return [Payabli::Cloud::Client]
132
137
  def cloud
133
138
  @cloud ||= Payabli::Cloud::Client.new(client: @raw_client)
@@ -11,16 +11,17 @@ module Payabli
11
11
  end
12
12
 
13
13
  # Generates a one-time, 6-digit verification code for activating a
14
- # semi-integrated card-present device in a paypoint. After calling this endpoint, an operator enters the returned
15
- # code
16
- # on the device's terminal, along with a device name, to register the
17
- # device to the paypoint resolved from `{entry}`.
14
+ # semi-integrated card-present device in a paypoint. This endpoint is
15
+ # for AXIUM devices only. After calling this endpoint, an operator
16
+ # enters the returned code on the device's terminal, along with a
17
+ # device name, to register the device to the paypoint resolved from
18
+ # `{entry}`.
18
19
  #
19
20
  # A code expires 5 minutes after it's issued. A paypoint can have several
20
21
  # codes active at once — for example, when activating a batch of devices —
21
22
  # and a code binds to whichever device enters it first.
22
23
  #
23
- # Authenticate with an OAuth2 Bearer token that has the `device_registry` scope.
24
+ # Authenticate with an OAuth2 bearer token that has the `device_registry` scope.
24
25
  #
25
26
  # @param request_options [Hash]
26
27
  # @param params [Hash]
@@ -110,7 +110,7 @@ module Payabli
110
110
  # @option request_options [Integer] :timeout_in_seconds
111
111
  #
112
112
  # @example
113
- # client.money_out.cancel_all_out(request: %w[2-29 2-28 2-27])
113
+ # client.money_out.cancel_all_out(request: %w[129-230 129-219])
114
114
  #
115
115
  # @return [Payabli::Types::CaptureAllOutResponse]
116
116
  def cancel_all_out(request_options: {}, **params)
@@ -230,7 +230,7 @@ module Payabli
230
230
  # @option params [String, nil] :idempotency_key
231
231
  #
232
232
  # @example
233
- # client.money_out.capture_all_out(body: %w[2-29 2-28 2-27])
233
+ # client.money_out.capture_all_out(body: %w[129-230 129-219])
234
234
  #
235
235
  # @return [Payabli::Types::CaptureAllOutResponse]
236
236
  def capture_all_out(request_options: {}, **params)
@@ -43,12 +43,12 @@ module Payabli
43
43
  # bill_data: [{
44
44
  # invoice_number: "INV-2345",
45
45
  # net_amount: "500",
46
- # invoice_date: "2025-08-01",
47
- # due_date: "2025-08-15"
46
+ # invoice_date: "2027-08-01",
47
+ # due_date: "2027-08-15"
48
48
  # }],
49
49
  # schedule_details: {
50
- # start_date: "09/01/2027",
51
- # end_date: "09/01/2026",
50
+ # start_date: "01/01/2027",
51
+ # end_date: "12/31/2027",
52
52
  # frequency: "monthly"
53
53
  # }
54
54
  # )
@@ -10,8 +10,9 @@ module Payabli
10
10
  @client = client
11
11
  end
12
12
 
13
- # Retrieves the basic statistics for an organization or a paypoint, for a given time period, grouped by a
14
- # particular frequency.
13
+ # Retrieves the basic statistics for an organization or a paypoint over a date range, grouped by a frequency. The
14
+ # response returns one row per time bucket. Counts and volumes cover approved transactions only and leave out
15
+ # declines. Volumes are net of fees.
15
16
  #
16
17
  # @param request_options [Hash]
17
18
  # @param params [Hash]
@@ -25,7 +26,6 @@ module Payabli
25
26
  # @option params [Integer] :level
26
27
  # @option params [Integer] :entry_id
27
28
  # @option params [String, nil] :end_date
28
- # @option params [Hash[String, String, nil], nil] :parameters
29
29
  # @option params [String, nil] :start_date
30
30
  #
31
31
  # @example
@@ -43,7 +43,6 @@ module Payabli
43
43
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
44
44
  query_params = {}
45
45
  query_params["endDate"] = params[:end_date] if params.key?(:end_date)
46
- query_params["parameters"] = params[:parameters] if params.key?(:parameters)
47
46
  query_params["startDate"] = params[:start_date] if params.key?(:start_date)
48
47
 
49
48
  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
@@ -67,7 +66,9 @@ module Payabli
67
66
  raise error_class.new(response.body, code: code)
68
67
  end
69
68
 
70
- # Retrieves the basic statistics for a customer for a specific time period, grouped by a selected frequency.
69
+ # Retrieves the basic statistics for a customer over a date range, grouped by a frequency. This is a Pay In view:
70
+ # it counts the customer's approved transactions and returns one row per time bucket. Volume here is the gross
71
+ # amount, before fees.
71
72
  #
72
73
  # @param request_options [Hash]
73
74
  # @param params [Hash]
@@ -79,28 +80,23 @@ module Payabli
79
80
  # @option params [String] :mode
80
81
  # @option params [String] :freq
81
82
  # @option params [Integer] :customer_id
82
- # @option params [Hash[String, String, nil], nil] :parameters
83
83
  #
84
84
  # @example
85
85
  # client.statistic.customer_basic_stats(
86
- # mode: "ytd",
86
+ # mode: "m12",
87
87
  # freq: "m",
88
88
  # customer_id: 4440
89
89
  # )
90
90
  #
91
- # @return [Array[Payabli::Types::SubscriptionStatsQueryRecord]]
91
+ # @return [Array[Payabli::Types::StatCustomerBasicQueryRecord]]
92
92
  def customer_basic_stats(request_options: {}, **params)
93
93
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
94
- query_params = {}
95
- query_params["parameters"] = params[:parameters] if params.key?(:parameters)
96
-
97
94
  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
98
95
  request = Payabli::Internal::JSON::Request.new(
99
96
  base_url: request_options[:base_url],
100
97
  method: "GET",
101
98
  path: "Statistic/customerbasic/#{URI.encode_uri_component(params[:mode].to_s)}/#{URI.encode_uri_component(params[:freq].to_s)}/#{URI.encode_uri_component(params[:customer_id].to_s)}",
102
99
  headers: headers,
103
- query: query_params,
104
100
  request_options: request_options
105
101
  )
106
102
  begin
@@ -115,7 +111,9 @@ module Payabli
115
111
  raise error_class.new(response.body, code: code)
116
112
  end
117
113
 
118
- # Retrieves the subscription statistics for a given interval for a paypoint or organization.
114
+ # Retrieves subscription statistics for a paypoint or organization, bucketed by how soon active subscriptions are
115
+ # due to renew. This is a forward-looking forecast of upcoming renewals, not charges already taken. Request a
116
+ # single window with `interval`, or `all` to return every window in one call.
119
117
  #
120
118
  # @param request_options [Hash]
121
119
  # @param params [Hash]
@@ -127,28 +125,23 @@ module Payabli
127
125
  # @option params [String] :interval
128
126
  # @option params [Integer] :level
129
127
  # @option params [Integer] :entry_id
130
- # @option params [Hash[String, String, nil], nil] :parameters
131
128
  #
132
129
  # @example
133
130
  # client.statistic.sub_stats(
134
- # interval: "30",
131
+ # interval: "all",
135
132
  # level: 2,
136
133
  # entry_id: 1000000
137
134
  # )
138
135
  #
139
- # @return [Array[Payabli::Types::StatBasicQueryRecord]]
136
+ # @return [Array[Payabli::Types::SubscriptionStatsQueryRecord]]
140
137
  def sub_stats(request_options: {}, **params)
141
138
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
142
- query_params = {}
143
- query_params["parameters"] = params[:parameters] if params.key?(:parameters)
144
-
145
139
  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
146
140
  request = Payabli::Internal::JSON::Request.new(
147
141
  base_url: request_options[:base_url],
148
142
  method: "GET",
149
143
  path: "Statistic/subscriptions/#{URI.encode_uri_component(params[:interval].to_s)}/#{URI.encode_uri_component(params[:level].to_s)}/#{URI.encode_uri_component(params[:entry_id].to_s)}",
150
144
  headers: headers,
151
- query: query_params,
152
145
  request_options: request_options
153
146
  )
154
147
  begin
@@ -163,7 +156,9 @@ module Payabli
163
156
  raise error_class.new(response.body, code: code)
164
157
  end
165
158
 
166
- # Retrieve the basic statistics about a vendor for a given time period, grouped by frequency.
159
+ # Retrieve the basic statistics about a vendor over a date range, grouped by frequency. The response returns one
160
+ # row per time bucket, breaking the vendor's bills down by bill state (active, sent to approval, approved, in
161
+ # transit, paid, and so on). Volumes are net of fees.
167
162
  #
168
163
  # @param request_options [Hash]
169
164
  # @param params [Hash]
@@ -175,7 +170,6 @@ module Payabli
175
170
  # @option params [String] :mode
176
171
  # @option params [String] :freq
177
172
  # @option params [Integer] :id_vendor
178
- # @option params [Hash[String, String, nil], nil] :parameters
179
173
  #
180
174
  # @example
181
175
  # client.statistic.vendor_basic_stats(
@@ -187,16 +181,12 @@ module Payabli
187
181
  # @return [Array[Payabli::Types::StatisticsVendorQueryRecord]]
188
182
  def vendor_basic_stats(request_options: {}, **params)
189
183
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
190
- query_params = {}
191
- query_params["parameters"] = params[:parameters] if params.key?(:parameters)
192
-
193
184
  headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
194
185
  request = Payabli::Internal::JSON::Request.new(
195
186
  base_url: request_options[:base_url],
196
187
  method: "GET",
197
188
  path: "Statistic/vendorbasic/#{URI.encode_uri_component(params[:mode].to_s)}/#{URI.encode_uri_component(params[:freq].to_s)}/#{URI.encode_uri_component(params[:id_vendor].to_s)}",
198
189
  headers: headers,
199
- query: query_params,
200
190
  request_options: request_options
201
191
  )
202
192
  begin
@@ -14,8 +14,6 @@ module Payabli
14
14
 
15
15
  field :end_date, -> { String }, optional: true, nullable: false, api_name: "endDate"
16
16
 
17
- field :parameters, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
18
-
19
17
  field :start_date, -> { String }, optional: true, nullable: false, api_name: "startDate"
20
18
  end
21
19
  end
@@ -168,10 +168,10 @@ module Payabli
168
168
  # method_: "card"
169
169
  # },
170
170
  # schedule_details: {
171
- # end_date: "2025-03-20",
171
+ # end_date: "2027-12-31",
172
172
  # frequency: "weekly",
173
173
  # plan_id: 1,
174
- # start_date: "2024-09-20"
174
+ # start_date: "2027-01-01"
175
175
  # }
176
176
  # )
177
177
  #
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Taptopay
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
+ # Issues a short-lived activation code for a Tap to Pay device in the
14
+ # `Pending` state. This endpoint is for Tap to Pay devices only.
15
+ # Deliver the code to the device to complete activation.
16
+ #
17
+ # A code is valid for 30 minutes after it's issued. Calling this
18
+ # endpoint again for the same device before the code expires returns
19
+ # the same code, with `alreadyIssued` set to `true`, instead of
20
+ # generating a new one. A new code is only generated when no valid
21
+ # code exists.
22
+ #
23
+ # Authenticate with an OAuth2 bearer token that has the `pos_create`
24
+ # permission. See [Accept Tap to Pay payments](/guides/pay-in-developer-tap-to-pay)
25
+ # for the full integration guide.
26
+ #
27
+ # @param request_options [Hash]
28
+ # @param params [Payabli::Taptopay::Types::TapToPayActivationChallengeRequest]
29
+ # @option request_options [String] :base_url
30
+ # @option request_options [Hash{String => Object}] :additional_headers
31
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
32
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
33
+ # @option request_options [Integer] :timeout_in_seconds
34
+ #
35
+ # @example
36
+ # client.taptopay.activation_challenge(
37
+ # entry: "8cfec329267",
38
+ # device_id: "499585-389fj484-3jcj8hj3"
39
+ # )
40
+ #
41
+ # @return [Payabli::Types::TapToPayActivationChallengeResponse]
42
+ def activation_challenge(request_options: {}, **params)
43
+ params = Payabli::Internal::Types::Utils.normalize_keys(params)
44
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }])
45
+ request = Payabli::Internal::JSON::Request.new(
46
+ base_url: request_options[:base_url],
47
+ method: "POST",
48
+ path: "v2/device/taptopay/activate/challenge",
49
+ headers: headers,
50
+ body: Payabli::Taptopay::Types::TapToPayActivationChallengeRequest.new(params).to_h,
51
+ request_options: request_options
52
+ )
53
+ begin
54
+ response = @client.send(request)
55
+ rescue Net::HTTPRequestTimeout
56
+ raise Payabli::Errors::TimeoutError
57
+ end
58
+ code = response.code.to_i
59
+ if code.between?(200, 299)
60
+ Payabli::Types::TapToPayActivationChallengeResponse.load(response.body)
61
+ else
62
+ error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
63
+ raise error_class.new(response.body, code: code)
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Taptopay
5
+ module Types
6
+ class TapToPayActivationChallengeRequest < Internal::Types::Model
7
+ field :entry, -> { String }, optional: false, nullable: false
8
+
9
+ field :device_id, -> { String }, optional: false, nullable: false, api_name: "deviceId"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -8,7 +8,7 @@ module Payabli
8
8
 
9
9
  field :accounting_field_2, -> { String }, optional: true, nullable: false, api_name: "accountingField2"
10
10
 
11
- field :additional_data, -> { String }, optional: true, nullable: false, api_name: "additionalData"
11
+ field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false, api_name: "additionalData"
12
12
 
13
13
  field :attachments, -> { Internal::Types::Array[Payabli::Types::FileContent] }, optional: true, nullable: false
14
14
 
@@ -13,7 +13,7 @@ module Payabli
13
13
 
14
14
  field :terms, -> { Payabli::Types::Terms }, optional: true, nullable: false, api_name: "Terms"
15
15
 
16
- field :additional_data, -> { String }, optional: true, nullable: false, api_name: "AdditionalData"
16
+ field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: true, api_name: "AdditionalData"
17
17
 
18
18
  field :attachments, -> { Internal::Types::Array[Payabli::Types::FileContent] }, optional: true, nullable: false
19
19
 
@@ -23,7 +23,7 @@ module Payabli
23
23
 
24
24
  field :accounting_field_2, -> { String }, optional: true, nullable: false, api_name: "accountingField2"
25
25
 
26
- field :additional_data, -> { String }, optional: true, nullable: false, api_name: "additionalData"
26
+ field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false, api_name: "additionalData"
27
27
 
28
28
  field :attachments, -> { Internal::Types::Array[Payabli::Types::FileContent] }, optional: true, nullable: false
29
29
  end
@@ -41,7 +41,7 @@ module Payabli
41
41
 
42
42
  field :source, -> { String }, optional: true, nullable: false, api_name: "Source"
43
43
 
44
- field :additional_data, -> { String }, optional: true, nullable: false, api_name: "AdditionalData"
44
+ field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: true, api_name: "AdditionalData"
45
45
 
46
46
  field :vendor, -> { Payabli::Types::VendorDataResponse }, optional: true, nullable: false, api_name: "Vendor"
47
47
 
@@ -2,16 +2,12 @@
2
2
 
3
3
  module Payabli
4
4
  module Types
5
- class StatBasicQueryRecord < Internal::Types::Model
5
+ class StatCustomerBasicQueryRecord < Internal::Types::Model
6
6
  field :stat_x, -> { String }, optional: false, nullable: false, api_name: "statX"
7
7
 
8
8
  field :in_transactions, -> { Integer }, optional: false, nullable: false, api_name: "inTransactions"
9
9
 
10
10
  field :in_transactions_volume, -> { Integer }, optional: false, nullable: false, api_name: "inTransactionsVolume"
11
-
12
- field :in_wallet_transactions, -> { Integer }, optional: false, nullable: false, api_name: "inWalletTransactions"
13
-
14
- field :in_wallet_volume, -> { Integer }, optional: false, nullable: false, api_name: "inWalletVolume"
15
11
  end
16
12
  end
17
13
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ # The issued activation code, its expiration, and whether it was reused.
6
+ class TapToPayActivationChallengeData < Internal::Types::Model
7
+ field :code, -> { String }, optional: false, nullable: false
8
+
9
+ field :expires_at, -> { String }, optional: false, nullable: false, api_name: "expiresAt"
10
+
11
+ field :already_issued, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "alreadyIssued"
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ # Error response for a Tap to Pay activation challenge request.
6
+ # `responseData` carries the same status code as the HTTP response
7
+ # and a message describing the refusal.
8
+ class TapToPayActivationChallengeErrorResponse < Internal::Types::Model
9
+ field :is_success, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isSuccess"
10
+
11
+ field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
12
+
13
+ field :response_data, -> { Payabli::Types::TapToPayActivationChallengeErrorResponseResponseData }, optional: false, nullable: false, api_name: "responseData"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ class TapToPayActivationChallengeErrorResponseResponseData < Internal::Types::Model
6
+ field :result_code, -> { Integer }, optional: false, nullable: false, api_name: "resultCode"
7
+
8
+ field :result_text, -> { String }, optional: false, nullable: false, api_name: "resultText"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ # Response to a Tap to Pay activation code request. On success,
6
+ # `responseData` carries the activation code, its expiration, and
7
+ # whether an existing code was reused.
8
+ class TapToPayActivationChallengeResponse < Internal::Types::Model
9
+ field :response_code, -> { Integer }, optional: true, nullable: false, api_name: "responseCode"
10
+
11
+ field :page_identifier, -> { String }, optional: true, nullable: false, api_name: "pageIdentifier"
12
+
13
+ field :room_id, -> { Integer }, optional: true, nullable: false, api_name: "roomId"
14
+
15
+ field :is_success, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isSuccess"
16
+
17
+ field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
18
+
19
+ field :response_data, -> { Payabli::Types::TapToPayActivationChallengeData }, optional: false, nullable: false, api_name: "responseData"
20
+ end
21
+ end
22
+ end
@@ -5,7 +5,7 @@ module Payabli
5
5
  class UserData < Internal::Types::Model
6
6
  field :access, -> { Internal::Types::Array[Payabli::Types::UsrAccess] }, optional: true, nullable: false
7
7
 
8
- field :additional_data, -> { Internal::Types::Hash[String, Internal::Types::Hash[String, Object]] }, optional: true, nullable: false, api_name: "additionalData"
8
+ field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false, api_name: "additionalData"
9
9
 
10
10
  field :email, -> { String }, optional: true, nullable: false
11
11
 
@@ -5,7 +5,7 @@ module Payabli
5
5
  class UserQueryRecord < Internal::Types::Model
6
6
  field :access, -> { Internal::Types::Array[Payabli::Types::UsrAccess] }, optional: true, nullable: false, api_name: "Access"
7
7
 
8
- field :additional_data, -> { String }, optional: true, nullable: false, api_name: "AdditionalData"
8
+ field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false, api_name: "AdditionalData"
9
9
 
10
10
  field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
11
11
 
@@ -86,7 +86,7 @@ module Payabli
86
86
 
87
87
  field :internal_reference_id, -> { Integer }, optional: true, nullable: false, api_name: "InternalReferenceId"
88
88
 
89
- field :additional_data, -> { String }, optional: true, nullable: false, api_name: "additionalData"
89
+ field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: true, api_name: "additionalData"
90
90
 
91
91
  field :external_paypoint_id, -> { String }, optional: true, nullable: false, api_name: "externalPaypointID"
92
92