Module: Spreedly::Urls

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

Instance Method Summary collapse

Instance Method Details

#add_gateway_urlObject


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

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

#add_payment_method_urlObject


94
95
96
# File 'lib/spreedly/urls.rb', line 94

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

#add_receiver_urlObject


90
91
92
# File 'lib/spreedly/urls.rb', line 90

def add_receiver_url
  "#{base_url}/v1/receivers.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


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

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

#deliver_to_receiver_url(receiver_token) ⇒ Object


102
103
104
# File 'lib/spreedly/urls.rb', line 102

def deliver_to_receiver_url(receiver_token)
  "#{base_url}/v1/receivers/#{receiver_token}/deliver.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


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

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

#list_gateways_url(since_token) ⇒ Object


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

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


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

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


61
62
63
64
65
66
# File 'lib/spreedly/urls.rb', line 61

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

#receiver_options_urlObject


86
87
88
# File 'lib/spreedly/urls.rb', line 86

def receiver_options_url
  "#{base_url}/v1/receivers_options.xml"
end

#redact_gateway_url(gateway_token) ⇒ Object


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

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

#redact_payment_method_url(payment_method_token) ⇒ Object


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

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

#refund_transaction_url(token) ⇒ Object


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

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

#retain_payment_method_url(payment_method_token) ⇒ Object


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

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

#store_url(gateway_token) ⇒ Object


57
58
59
# File 'lib/spreedly/urls.rb', line 57

def store_url(gateway_token)
  "#{base_url}/v1/gateways/#{gateway_token}/store.xml"
end

#update_payment_method_url(token) ⇒ Object


98
99
100
# File 'lib/spreedly/urls.rb', line 98

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

#verify_url(gateway_token) ⇒ Object


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

def verify_url(gateway_token)
  "#{base_url}/v1/gateways/#{gateway_token}/verify.xml"
end

#void_transaction_url(token) ⇒ Object


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

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