Module: Spreedly::Urls

Included in:
Environment
Defined in:
lib/spreedly/urls.rb

Instance Method Summary collapse

Instance Method Details

#add_gateway_urlObject



74
75
76
# File 'lib/spreedly/urls.rb', line 74

def add_gateway_url
  "#{base_url}/v1/gateways.xml"
end

#add_payment_method_urlObject



78
79
80
# File 'lib/spreedly/urls.rb', line 78

def add_payment_method_url
  "#{base_url}/v1/payment_methods.xml"
end

#authorize_url(gateway_token) ⇒ Object



25
26
27
# File 'lib/spreedly/urls.rb', line 25

def authorize_url(gateway_token)
  "#{base_url}/v1/gateways/#{gateway_token}/authorize.xml"
end

#capture_url(authorization_token) ⇒ Object



29
30
31
# File 'lib/spreedly/urls.rb', line 29

def capture_url(authorization_token)
  "#{base_url}/v1/transactions/#{authorization_token}/capture.xml"
end

#find_gateway_url(token) ⇒ Object



17
18
19
# File 'lib/spreedly/urls.rb', line 17

def find_gateway_url(token)
  "#{base_url}/v1/gateways/#{token}.xml"
end

#find_payment_method_url(token) ⇒ Object



5
6
7
# File 'lib/spreedly/urls.rb', line 5

def find_payment_method_url(token)
  "#{base_url}/v1/payment_methods/#{token}.xml"
end

#find_transaction_url(token) ⇒ Object



9
10
11
# File 'lib/spreedly/urls.rb', line 9

def find_transaction_url(token)
  "#{base_url}/v1/transactions/#{token}.xml"
end

#find_transcript_url(transaction_token) ⇒ Object



13
14
15
# File 'lib/spreedly/urls.rb', line 13

def find_transcript_url(transaction_token)
  "#{base_url}/v1/transactions/#{transaction_token}/transcript"
end

#gateway_options_urlObject



70
71
72
# File 'lib/spreedly/urls.rb', line 70

def gateway_options_url
  "#{base_url}/v1/gateways.xml"
end

#list_gateways_url(since_token) ⇒ Object



65
66
67
68
# File 'lib/spreedly/urls.rb', line 65

def list_gateways_url(since_token)
  since_param = "?since_token=#{since_token}" if since_token
  "#{base_url}/v1/gateways.xml#{since_param}"
end

#list_payment_methods_url(since_token) ⇒ Object



60
61
62
63
# File 'lib/spreedly/urls.rb', line 60

def list_payment_methods_url(since_token)
  since_param = "?since_token=#{since_token}" if since_token
  "#{base_url}/v1/payment_methods.xml#{since_param}"
end

#list_transactions_url(since_token, payment_method_token) ⇒ Object



53
54
55
56
57
58
# File 'lib/spreedly/urls.rb', line 53

def list_transactions_url(since_token, payment_method_token)
  since_param = "?since_token=#{since_token}" if since_token
  return "#{base_url}/v1/transactions.xml#{since_param}" unless payment_method_token

  "#{base_url}/v1/payment_methods/#{payment_method_token}/transactions.xml#{since_param}"
end

#purchase_url(gateway_token) ⇒ Object



21
22
23
# File 'lib/spreedly/urls.rb', line 21

def purchase_url(gateway_token)
  "#{base_url}/v1/gateways/#{gateway_token}/purchase.xml"
end

#redact_gateway_url(gateway_token) ⇒ Object



49
50
51
# File 'lib/spreedly/urls.rb', line 49

def redact_gateway_url(gateway_token)
  "#{base_url}/v1/gateways/#{gateway_token}/redact.xml"
end

#redact_payment_method_url(payment_method_token) ⇒ Object



45
46
47
# File 'lib/spreedly/urls.rb', line 45

def redact_payment_method_url(payment_method_token)
  "#{base_url}/v1/payment_methods/#{payment_method_token}/redact.xml"
end

#refund_transaction_url(token) ⇒ Object



37
38
39
# File 'lib/spreedly/urls.rb', line 37

def refund_transaction_url(token)
  "#{base_url}/v1/transactions/#{token}/credit.xml"
end

#retain_payment_method_url(payment_method_token) ⇒ Object



41
42
43
# File 'lib/spreedly/urls.rb', line 41

def retain_payment_method_url(payment_method_token)
  "#{base_url}/v1/payment_methods/#{payment_method_token}/retain.xml"
end

#update_payment_method_url(token) ⇒ Object



82
83
84
# File 'lib/spreedly/urls.rb', line 82

def update_payment_method_url(token)
  "#{base_url}/v1/payment_methods/#{token}.xml"
end

#void_transaction_url(token) ⇒ Object



33
34
35
# File 'lib/spreedly/urls.rb', line 33

def void_transaction_url(token)
  "#{base_url}/v1/transactions/#{token}/void.xml"
end