Class: UnivapayClientSdk::TransactionHistoryApi

Inherits:
BaseApi
  • Object
show all
Defined in:
lib/univapay_client_sdk/apis/transaction_history_api.rb

Overview

TransactionHistoryApi

Constant Summary

Constants inherited from BaseApi

BaseApi::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseApi

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseApi

#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters

Constructor Details

This class inherits a constructor from UnivapayClientSdk::BaseApi

Instance Method Details

#list_store_transaction_history(store_id, mode: nil, short_id: nil, from: nil, to: nil, status: nil, type: nil, search: nil, email: nil, id: nil, metadata: nil, card_exp: nil, card_last_four: nil, cardholder: nil, card_brand: nil, brand: nil, brands: nil, currency: nil, service_provider: nil, service_providers: nil, gateway_transaction_id: nil, bank_transfer_payment_statuses: nil, bank_transfer_latest_deposit_date_from: nil, bank_transfer_latest_deposit_date_to: nil, limit: 10, cursor: nil, cursor_direction: CursorDirectionQuery::DESC) ⇒ ApiResponse

Returns a paginated, searchable history of charges and refunds for a single store, combining both resource types into a single unified row shape. of the store. environment mode. characters of a resource's UUID. Must be exactly 6 characters. this date. Accepts epoch-millis or an ISO-8601 date-time. Must not be later than to. date. Accepts epoch-millis or an ISO-8601 date-time. Must not be earlier than from. status. Accepts any charge or refund status value. type. cardholder/customer name and email. Wrap a value in quotes ("first last") for an exact-phrase match; an unquoted value matches partially. refund ID. yyyy-MM format. digits of the card. Must be exactly 4 characters. Partial match by default; wrap in quotes for an exact-phrase match. alias of brand; use brand instead. Repeatable via the [] suffix (e.g. card_brand[]=visa&card_brand[]=jcb). Raw brand identifiers vary by payment type — see the user_data.brand field on this endpoint's response. Repeatable via the [] suffix (e.g. brand[]=visa&brand[]=jcb). Raw brand identifiers vary by payment type — see the user_data.brand field on this endpoint's response. of brand; use brand instead. Repeatable via the [] suffix (e.g. brands[]=visa&brands[]=jcb). Raw brand identifiers vary by payment type — see the user_data.brand field on this endpoint's response. (ISO-4217). parameter: Filter by service provider. Optional parameter: Filter by service provider. Repeatable via the [] suffix (e.g. service_providers[]=credit&service_providers[]=paidy). Must not be empty; duplicate values are deduplicated. gateway's own transaction ID (free text). Optional parameter: Filter bank transfer rows by payment status. Repeatable via the [] suffix (e.g. bank_transfer_payment_statuses[]=unpaid&bank_transfer_payment_statuses[]= exact). Start of the range (inclusive) for bank_transfer_latest_deposit_date. Accepts epoch-millis or an ISO-8601 date-time. End of the range (inclusive) for bank_transfer_latest_deposit_date. Accepts epoch-millis or an ISO-8601 date-time. return in one page. resource after which pagination should continue. Pagination direction relative to the supplied cursor.

Parameters:

  • store_id (UUID | String)

    Required parameter: The unique identifier

  • mode (TransactionHistoryMode) (defaults to: nil)

    Optional parameter: Filter by

  • short_id (String) (defaults to: nil)

    Optional parameter: Filter by the last 6

  • from (String) (defaults to: nil)

    Optional parameter: Show rows created on or after

  • to (String) (defaults to: nil)

    Optional parameter: Show rows created on or before this

  • status (TransactionHistoryStatus) (defaults to: nil)

    Optional parameter: Filter by

  • type (TransactionHistoryType) (defaults to: nil)

    Optional parameter: Filter by row

  • search (String) (defaults to: nil)

    Optional parameter: Free-text search across

  • email (String) (defaults to: nil)

    Optional parameter: Filter by email address.

  • id (UUID | String) (defaults to: nil)

    Optional parameter: Filter by exact charge or

  • metadata (String) (defaults to: nil)

    Optional parameter: Filter by metadata.

  • card_exp (String) (defaults to: nil)

    Optional parameter: Filter by card expiration, in

  • card_last_four (String) (defaults to: nil)

    Optional parameter: Filter by the last 4

  • cardholder (String) (defaults to: nil)

    Optional parameter: Filter by cardholder name.

  • card_brand (Array[String]) (defaults to: nil)

    Optional parameter: Deprecated legacy

  • brand (Array[String]) (defaults to: nil)

    Optional parameter: Filter by brand.

  • brands (Array[String]) (defaults to: nil)

    Optional parameter: Deprecated legacy alias

  • currency (String) (defaults to: nil)

    Optional parameter: Filter by currency

  • service_provider (TransactionHistoryServiceProvider) (defaults to: nil)

    Optional

  • service_providers (Array[TransactionHistoryServiceProvider]) (defaults to: nil)
  • gateway_transaction_id (String) (defaults to: nil)

    Optional parameter: Filter by the

  • bank_transfer_payment_statuses (Array[BankTransferPaymentStatus]) (defaults to: nil)
  • bank_transfer_latest_deposit_date_from (String) (defaults to: nil)

    Optional parameter:

  • bank_transfer_latest_deposit_date_to (String) (defaults to: nil)

    Optional parameter:

  • limit (Integer) (defaults to: 10)

    Optional parameter: Maximum number of resources to

  • cursor (UUID | String) (defaults to: nil)

    Optional parameter: Cursor pointing to the

  • cursor_direction (CursorDirectionQuery) (defaults to: CursorDirectionQuery::DESC)

    Optional parameter:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/univapay_client_sdk/apis/transaction_history_api.rb', line 249

def list_store_transaction_history(store_id,
                                   mode: nil,
                                   short_id: nil,
                                   from: nil,
                                   to: nil,
                                   status: nil,
                                   type: nil,
                                   search: nil,
                                   email: nil,
                                   id: nil,
                                   metadata: nil,
                                   card_exp: nil,
                                   card_last_four: nil,
                                   cardholder: nil,
                                   card_brand: nil,
                                   brand: nil,
                                   brands: nil,
                                   currency: nil,
                                   service_provider: nil,
                                   service_providers: nil,
                                   gateway_transaction_id: nil,
                                   bank_transfer_payment_statuses: nil,
                                   bank_transfer_latest_deposit_date_from: nil,
                                   bank_transfer_latest_deposit_date_to: nil,
                                   limit: 10,
                                   cursor: nil,
                                   cursor_direction: CursorDirectionQuery::DESC)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/stores/{storeId}/transaction_history',
                                 Server::DEFAULT)
               .template_param(new_parameter(store_id, key: 'storeId')
                                .is_required(true)
                                .should_encode(true))
               .query_param(new_parameter(mode, key: 'mode'))
               .query_param(new_parameter(short_id, key: 'short_id'))
               .query_param(new_parameter(from, key: 'from'))
               .query_param(new_parameter(to, key: 'to'))
               .query_param(new_parameter(status, key: 'status'))
               .query_param(new_parameter(type, key: 'type'))
               .query_param(new_parameter(search, key: 'search'))
               .query_param(new_parameter(email, key: 'email'))
               .query_param(new_parameter(id, key: 'id'))
               .query_param(new_parameter(, key: 'metadata'))
               .query_param(new_parameter(card_exp, key: 'card_exp'))
               .query_param(new_parameter(card_last_four, key: 'card_last_four'))
               .query_param(new_parameter(cardholder, key: 'cardholder'))
               .query_param(new_parameter(card_brand, key: 'card_brand[]'))
               .query_param(new_parameter(brand, key: 'brand[]'))
               .query_param(new_parameter(brands, key: 'brands[]'))
               .query_param(new_parameter(currency, key: 'currency'))
               .query_param(new_parameter(service_provider, key: 'service_provider'))
               .query_param(new_parameter(service_providers, key: 'service_providers[]'))
               .query_param(new_parameter(gateway_transaction_id, key: 'gateway_transaction_id'))
               .query_param(new_parameter(bank_transfer_payment_statuses, key: 'bank_transfer_payment_statuses[]'))
               .query_param(new_parameter(bank_transfer_latest_deposit_date_from, key: 'bank_transfer_latest_deposit_date.from'))
               .query_param(new_parameter(bank_transfer_latest_deposit_date_to, key: 'bank_transfer_latest_deposit_date.to'))
               .query_param(new_parameter(limit, key: 'limit'))
               .query_param(new_parameter(cursor, key: 'cursor'))
               .query_param(new_parameter(cursor_direction, key: 'cursor_direction'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('JWT_TOKEN'))
               .array_serialization_format(ArraySerializationFormat::UN_INDEXED))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(TransactionHistoryList.method(:from_hash))
                .is_api_response(true)
                .local_error_template('400',
                                      'HTTP 400 Bad Request: {$response.body#/code}',
                                      ApiErrorException)
                .local_error_template('401',
                                      'HTTP 401 Unauthorized: {$response.body#/code}',
                                      ApiErrorException)
                .local_error_template('403',
                                      'HTTP 403 Forbidden: {$response.body#/code}',
                                      ApiErrorException)
                .local_error_template('404',
                                      'HTTP 404 Not Found: {$response.body#/code}',
                                      ApiErrorException)
                .local_error_template('429',
                                      'HTTP 429 Rate Limited: {$response.body#/code}',
                                      APIException)
                .local_error_template('409',
                                      'HTTP 409 Conflict: {$response.body#/code}',
                                      APIException)
                .local_error_template('500',
                                      'HTTP 500 Server Error: {$response.body#/code}',
                                      APIException)
                .local_error_template('503',
                                      'HTTP 503 Unavailable: {$response.body#/code}',
                                      APIException)
                .local_error_template('504',
                                      'HTTP 504 Timeout: {$response.body#/code}',
                                      APIException)
                .local_error_template('default',
                                      'HTTP {$statusCode}: {$response.body#/code}',
                                      APIException))
    .execute
end

#list_transaction_history(mode: nil, short_id: nil, from: nil, to: nil, status: nil, type: nil, search: nil, email: nil, id: nil, metadata: nil, card_exp: nil, card_last_four: nil, cardholder: nil, card_brand: nil, brand: nil, brands: nil, currency: nil, service_provider: nil, service_providers: nil, gateway_transaction_id: nil, bank_transfer_payment_statuses: nil, bank_transfer_latest_deposit_date_from: nil, bank_transfer_latest_deposit_date_to: nil, limit: 10, cursor: nil, cursor_direction: CursorDirectionQuery::DESC) ⇒ ApiResponse

Returns a paginated, searchable history of charges and refunds across all of the merchant's stores, combining both resource types into a single unified row shape. environment mode. characters of a resource's UUID. Must be exactly 6 characters. this date. Accepts epoch-millis or an ISO-8601 date-time. Must not be later than to. date. Accepts epoch-millis or an ISO-8601 date-time. Must not be earlier than from. status. Accepts any charge or refund status value. type. cardholder/customer name and email. Wrap a value in quotes ("first last") for an exact-phrase match; an unquoted value matches partially. refund ID. yyyy-MM format. digits of the card. Must be exactly 4 characters. Partial match by default; wrap in quotes for an exact-phrase match. alias of brand; use brand instead. Repeatable via the [] suffix (e.g. card_brand[]=visa&card_brand[]=jcb). Raw brand identifiers vary by payment type — see the user_data.brand field on this endpoint's response. Repeatable via the [] suffix (e.g. brand[]=visa&brand[]=jcb). Raw brand identifiers vary by payment type — see the user_data.brand field on this endpoint's response. of brand; use brand instead. Repeatable via the [] suffix (e.g. brands[]=visa&brands[]=jcb). Raw brand identifiers vary by payment type — see the user_data.brand field on this endpoint's response. (ISO-4217). parameter: Filter by service provider. Optional parameter: Filter by service provider. Repeatable via the [] suffix (e.g. service_providers[]=credit&service_providers[]=paidy). Must not be empty; duplicate values are deduplicated. gateway's own transaction ID (free text). Optional parameter: Filter bank transfer rows by payment status. Repeatable via the [] suffix (e.g. bank_transfer_payment_statuses[]=unpaid&bank_transfer_payment_statuses[]= exact). Start of the range (inclusive) for bank_transfer_latest_deposit_date. Accepts epoch-millis or an ISO-8601 date-time. End of the range (inclusive) for bank_transfer_latest_deposit_date. Accepts epoch-millis or an ISO-8601 date-time. return in one page. resource after which pagination should continue. Pagination direction relative to the supplied cursor.

Parameters:

  • mode (TransactionHistoryMode) (defaults to: nil)

    Optional parameter: Filter by

  • short_id (String) (defaults to: nil)

    Optional parameter: Filter by the last 6

  • from (String) (defaults to: nil)

    Optional parameter: Show rows created on or after

  • to (String) (defaults to: nil)

    Optional parameter: Show rows created on or before this

  • status (TransactionHistoryStatus) (defaults to: nil)

    Optional parameter: Filter by

  • type (TransactionHistoryType) (defaults to: nil)

    Optional parameter: Filter by row

  • search (String) (defaults to: nil)

    Optional parameter: Free-text search across

  • email (String) (defaults to: nil)

    Optional parameter: Filter by email address.

  • id (UUID | String) (defaults to: nil)

    Optional parameter: Filter by exact charge or

  • metadata (String) (defaults to: nil)

    Optional parameter: Filter by metadata.

  • card_exp (String) (defaults to: nil)

    Optional parameter: Filter by card expiration, in

  • card_last_four (String) (defaults to: nil)

    Optional parameter: Filter by the last 4

  • cardholder (String) (defaults to: nil)

    Optional parameter: Filter by cardholder name.

  • card_brand (Array[String]) (defaults to: nil)

    Optional parameter: Deprecated legacy

  • brand (Array[String]) (defaults to: nil)

    Optional parameter: Filter by brand.

  • brands (Array[String]) (defaults to: nil)

    Optional parameter: Deprecated legacy alias

  • currency (String) (defaults to: nil)

    Optional parameter: Filter by currency

  • service_provider (TransactionHistoryServiceProvider) (defaults to: nil)

    Optional

  • service_providers (Array[TransactionHistoryServiceProvider]) (defaults to: nil)
  • gateway_transaction_id (String) (defaults to: nil)

    Optional parameter: Filter by the

  • bank_transfer_payment_statuses (Array[BankTransferPaymentStatus]) (defaults to: nil)
  • bank_transfer_latest_deposit_date_from (String) (defaults to: nil)

    Optional parameter:

  • bank_transfer_latest_deposit_date_to (String) (defaults to: nil)

    Optional parameter:

  • limit (Integer) (defaults to: 10)

    Optional parameter: Maximum number of resources to

  • cursor (UUID | String) (defaults to: nil)

    Optional parameter: Cursor pointing to the

  • cursor_direction (CursorDirectionQuery) (defaults to: CursorDirectionQuery::DESC)

    Optional parameter:

Returns:

  • (ApiResponse)

    Complete http response with raw body and status code.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/univapay_client_sdk/apis/transaction_history_api.rb', line 80

def list_transaction_history(mode: nil,
                             short_id: nil,
                             from: nil,
                             to: nil,
                             status: nil,
                             type: nil,
                             search: nil,
                             email: nil,
                             id: nil,
                             metadata: nil,
                             card_exp: nil,
                             card_last_four: nil,
                             cardholder: nil,
                             card_brand: nil,
                             brand: nil,
                             brands: nil,
                             currency: nil,
                             service_provider: nil,
                             service_providers: nil,
                             gateway_transaction_id: nil,
                             bank_transfer_payment_statuses: nil,
                             bank_transfer_latest_deposit_date_from: nil,
                             bank_transfer_latest_deposit_date_to: nil,
                             limit: 10,
                             cursor: nil,
                             cursor_direction: CursorDirectionQuery::DESC)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/transaction_history',
                                 Server::DEFAULT)
               .query_param(new_parameter(mode, key: 'mode'))
               .query_param(new_parameter(short_id, key: 'short_id'))
               .query_param(new_parameter(from, key: 'from'))
               .query_param(new_parameter(to, key: 'to'))
               .query_param(new_parameter(status, key: 'status'))
               .query_param(new_parameter(type, key: 'type'))
               .query_param(new_parameter(search, key: 'search'))
               .query_param(new_parameter(email, key: 'email'))
               .query_param(new_parameter(id, key: 'id'))
               .query_param(new_parameter(, key: 'metadata'))
               .query_param(new_parameter(card_exp, key: 'card_exp'))
               .query_param(new_parameter(card_last_four, key: 'card_last_four'))
               .query_param(new_parameter(cardholder, key: 'cardholder'))
               .query_param(new_parameter(card_brand, key: 'card_brand[]'))
               .query_param(new_parameter(brand, key: 'brand[]'))
               .query_param(new_parameter(brands, key: 'brands[]'))
               .query_param(new_parameter(currency, key: 'currency'))
               .query_param(new_parameter(service_provider, key: 'service_provider'))
               .query_param(new_parameter(service_providers, key: 'service_providers[]'))
               .query_param(new_parameter(gateway_transaction_id, key: 'gateway_transaction_id'))
               .query_param(new_parameter(bank_transfer_payment_statuses, key: 'bank_transfer_payment_statuses[]'))
               .query_param(new_parameter(bank_transfer_latest_deposit_date_from, key: 'bank_transfer_latest_deposit_date.from'))
               .query_param(new_parameter(bank_transfer_latest_deposit_date_to, key: 'bank_transfer_latest_deposit_date.to'))
               .query_param(new_parameter(limit, key: 'limit'))
               .query_param(new_parameter(cursor, key: 'cursor'))
               .query_param(new_parameter(cursor_direction, key: 'cursor_direction'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('JWT_TOKEN'))
               .array_serialization_format(ArraySerializationFormat::UN_INDEXED))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(TransactionHistoryList.method(:from_hash))
                .is_api_response(true)
                .local_error_template('400',
                                      'HTTP 400 Bad Request: {$response.body#/code}',
                                      ApiErrorException)
                .local_error_template('401',
                                      'HTTP 401 Unauthorized: {$response.body#/code}',
                                      ApiErrorException)
                .local_error_template('403',
                                      'HTTP 403 Forbidden: {$response.body#/code}',
                                      ApiErrorException)
                .local_error_template('429',
                                      'HTTP 429 Rate Limited: {$response.body#/code}',
                                      APIException)
                .local_error_template('404',
                                      'HTTP 404 Not Found: {$response.body#/code}',
                                      APIException)
                .local_error_template('409',
                                      'HTTP 409 Conflict: {$response.body#/code}',
                                      APIException)
                .local_error_template('500',
                                      'HTTP 500 Server Error: {$response.body#/code}',
                                      APIException)
                .local_error_template('503',
                                      'HTTP 503 Unavailable: {$response.body#/code}',
                                      APIException)
                .local_error_template('504',
                                      'HTTP 504 Timeout: {$response.body#/code}',
                                      APIException)
                .local_error_template('default',
                                      'HTTP {$statusCode}: {$response.body#/code}',
                                      APIException))
    .execute
end