class Jet::Client::Refunds

Refunds client

Constants

STATUSES

Public Class Methods

new(client) click to toggle source
# File lib/jet/client/refunds.rb, line 12
def initialize(client)
  @client = client
end

Public Instance Methods

check_for_created_refunds(status) click to toggle source
# File lib/jet/client/refunds.rb, line 24
def check_for_created_refunds(status)
  query_status = STATUSES[status]
  @client.rest_get_with_token("/refunds/#{query_status}")
end
check_refund_state(refund_authorization_id) click to toggle source
# File lib/jet/client/refunds.rb, line 20
def check_refund_state(refund_authorization_id)
  @client.rest_get_with_token("/refunds/state/#{refund_authorization_id}")
end
create_merchant_initiated_refund(order_id, alt_refund_id, body = {}) click to toggle source
# File lib/jet/client/refunds.rb, line 16
def create_merchant_initiated_refund(order_id, alt_refund_id, body = {})
  @client.rest_post_with_token("/refunds/#{order_id}/#{alt_refund_id}", body)
end