class Ingenico::Connect::SDK::Merchant::Payments::PaymentsClient

Payments client. Thread-safe.

Public Class Methods

new(parent, path_context) click to toggle source

@param parent [Ingenico::Connect::SDK::ApiResource] @param path_context [Hash]

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 36
def initialize(parent, path_context)
  super(parent, path_context)
end

Public Instance Methods

approve(payment_id, body, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/approve - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/approve.html Approve payment} @param payment_id [String] @param body [Ingenico::Connect::SDK::Domain::Payment::ApprovePaymentRequest] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::PaymentApprovalResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 265
def approve(payment_id, body, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/approve', path_context)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Connect::SDK::Domain::Payment::PaymentApprovalResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
cancel(payment_id, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/cancel - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/cancel.html Cancel payment} @param payment_id [String] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::CancelPaymentResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 452
def cancel(payment_id, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/cancel', path_context)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    nil,
    Ingenico::Connect::SDK::Domain::Payment::CancelPaymentResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
cancelapproval(payment_id, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/cancelapproval - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/cancelapproval.html Undo capture payment} @param payment_id [String] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::CancelApprovalPaymentResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 328
def cancelapproval(payment_id, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/cancelapproval', path_context)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    nil,
    Ingenico::Connect::SDK::Domain::Payment::CancelApprovalPaymentResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
capture(payment_id, body, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/capture - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/capture.html Capture payment} @param payment_id [String] @param body [Ingenico::Connect::SDK::Domain::Payment::CapturePaymentRequest] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Capture::CaptureResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 297
def capture(payment_id, body, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/capture', path_context)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Connect::SDK::Domain::Capture::CaptureResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
captures(payment_id, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/captures - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/captures.html Get captures of payment} @param payment_id [String] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Capture::CapturesResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 359
def captures(payment_id, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/captures', path_context)
  return @communicator.get(
    uri,
    client_headers,
    nil,
    Ingenico::Connect::SDK::Domain::Capture::CapturesResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
complete(payment_id, body, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/complete - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/complete.html Complete payment} @param payment_id [String] @param body [Ingenico::Connect::SDK::Domain::Payment::CompletePaymentRequest] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::CompletePaymentResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 140
def complete(payment_id, body, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/complete', path_context)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Connect::SDK::Domain::Payment::CompletePaymentResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
create(body, context=nil) click to toggle source

Resource /!{merchantId}/payments - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/create.html Create payment} @param body [Ingenico::Connect::SDK::Domain::Payment::CreatePaymentRequest] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::CreatePaymentResponse] @raise [Ingenico::Connect::SDK::DeclinedPaymentException] if the Ingenico ePayments platform declined / rejected the payment. The payment result will be available from the exception. @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 54
def create(body, context=nil)
  uri = instantiate_uri('/v1/{merchantId}/payments', nil)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Connect::SDK::Domain::Payment::CreatePaymentResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Payment::PaymentErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
devicefingerprint(payment_id, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/devicefingerprint - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/devicefingerprint.html Get Device Fingerprint details} @param payment_id [String] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::DeviceFingerprintDetails] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 545
def devicefingerprint(payment_id, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/devicefingerprint', path_context)
  return @communicator.get(
    uri,
    client_headers,
    nil,
    Ingenico::Connect::SDK::Domain::Payment::DeviceFingerprintDetails,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
dispute(payment_id, body, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/dispute - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/dispute.html Create dispute} @param payment_id [String] @param body [Ingenico::Connect::SDK::Domain::Dispute::CreateDisputeRequest] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Dispute::DisputeResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 484
def dispute(payment_id, body, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/dispute', path_context)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Connect::SDK::Domain::Dispute::DisputeResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
disputes(payment_id, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/disputes - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/disputes.html Get disputes} @param payment_id [String] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Dispute::DisputesResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 515
def disputes(payment_id, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/disputes', path_context)
  return @communicator.get(
    uri,
    client_headers,
    nil,
    Ingenico::Connect::SDK::Domain::Dispute::DisputesResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
find(query, context=nil) click to toggle source

Resource /!{merchantId}/payments - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/find.html Find payments} @param query [Ingenico::Connect::SDK::Merchant::Payments::FindPaymentsParams] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::FindPaymentsResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 82
def find(query, context=nil)
  uri = instantiate_uri('/v1/{merchantId}/payments', nil)
  return @communicator.get(
    uri,
    client_headers,
    query,
    Ingenico::Connect::SDK::Domain::Payment::FindPaymentsResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
get(payment_id, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId} - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/get.html Get payment} @param payment_id [String] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::PaymentResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 109
def get(payment_id, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}', path_context)
  return @communicator.get(
    uri,
    client_headers,
    nil,
    Ingenico::Connect::SDK::Domain::Payment::PaymentResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
processchallenged(payment_id, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/processchallenged - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/processchallenged.html Approves challenged payment} @param payment_id [String] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::PaymentResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 233
def processchallenged(payment_id, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/processchallenged', path_context)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    nil,
    Ingenico::Connect::SDK::Domain::Payment::PaymentResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
refund(payment_id, body, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/refund - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/refund.html Create refund} @param payment_id [String] @param body [Ingenico::Connect::SDK::Domain::Refund::RefundRequest] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Refund::RefundResponse] @raise [Ingenico::Connect::SDK::DeclinedRefundException] if the Ingenico ePayments platform declined / rejected the refund. The refund result will be available from the exception. @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 391
def refund(payment_id, body, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/refund', path_context)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Connect::SDK::Domain::Refund::RefundResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Refund::RefundErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
refunds(payment_id, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/refunds - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/refunds.html Get refunds of payment} @param payment_id [String] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Refund::RefundsResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 422
def refunds(payment_id, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/refunds', path_context)
  return @communicator.get(
    uri,
    client_headers,
    nil,
    Ingenico::Connect::SDK::Domain::Refund::RefundsResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
third_party_status(payment_id, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/thirdpartystatus - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/thirdPartyStatus.html Third party status poll} @param payment_id [String] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Payment::ThirdPartyStatusResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 171
def third_party_status(payment_id, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/thirdpartystatus', path_context)
  return @communicator.get(
    uri,
    client_headers,
    nil,
    Ingenico::Connect::SDK::Domain::Payment::ThirdPartyStatusResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end
tokenize(payment_id, body, context=nil) click to toggle source

Resource /!{merchantId}/payments/!{paymentId}/tokenize - {epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/tokenize.html Create a token from payment} @param payment_id [String] @param body [Ingenico::Connect::SDK::Domain::Payment::TokenizePaymentRequest] @param context [Ingenico::Connect::SDK::CallContext] @return [Ingenico::Connect::SDK::Domain::Token::CreateTokenResponse] @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400) @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403) @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409) @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,

or there was a conflict (HTTP status code 404, 409 or 410)

@raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,

the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)

@raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error

# File lib/ingenico/connect/sdk/merchant/payments/payments_client.rb, line 202
def tokenize(payment_id, body, context=nil)
  path_context = {
    'paymentId'.freeze => payment_id,
  }
  uri = instantiate_uri('/v1/{merchantId}/payments/{paymentId}/tokenize', path_context)
  return @communicator.post(
    uri,
    client_headers,
    nil,
    body,
    Ingenico::Connect::SDK::Domain::Token::CreateTokenResponse,
    context)
rescue ResponseException => e
  error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
  raise create_exception(e.status_code, e.body, error_object, context)
end