Module: ActAsApiClient::Clients::AuthorizeNetNotificationsClient

Includes:
AuthorizeNetWebhooksClient
Defined in:
lib/act_as_api_client/clients/authorize_net_notifications_client.rb

Constant Summary

Constants included from AuthorizeNetWebhooksClient

ActAsApiClient::Clients::AuthorizeNetWebhooksClient::DEFAULT_OPTIONS

Instance Method Summary collapse

Methods included from AuthorizeNetWebhooksClient

#initialize

Instance Method Details

#find(uuid) ⇒ Object

Raises:

  • (StandardError)


22
23
24
25
26
27
# File 'lib/act_as_api_client/clients/authorize_net_notifications_client.rb', line 22

def find(uuid)
  raise StandardError, "uuid is not provided" if uuid.empty?

  get("https://#{base_uri}/rest/v1/notifications/#{uuid}",
      headers: { "Authorization" => auth })
end

#where(parameters = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/act_as_api_client/clients/authorize_net_notifications_client.rb', line 12

def where(parameters = {})
  # GET https://apitest.authorize.net/rest/v1/notifications?from_date=2017-03-01&to_date=2017-03-13&offset=0&limit=100
  # GET https://apitest.authorize.net/rest/v1/notifications?deliveryStatus=Failed
  # [:from_date, :to_date, :offset, :limit, :deliveryStatus]

  get("https://#{base_uri}/rest/v1/notifications/",
      headers: { "Authorization" => auth },
      params: parameters)
end