Class: LitleOnline::LitleOnlineRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/LitleOnlineRequest.rb

Instance Method Summary collapse

Constructor Details

#initializeLitleOnlineRequest

Returns a new instance of LitleOnlineRequest.



30
31
32
33
34
# File 'lib/LitleOnlineRequest.rb', line 30

def initialize
  # load configuration data
  @config_hash = Configuration.new.config
  @litle_transaction = LitleTransaction.new
end

Instance Method Details

#activate(options) ⇒ Object



66
67
68
69
70
# File 'lib/LitleOnlineRequest.rb', line 66

def activate(options)
  transaction = @litle_transaction.activate(options)

  commit(transaction, :activate, options)
end

#activate_reversal(options) ⇒ Object



96
97
98
99
100
# File 'lib/LitleOnlineRequest.rb', line 96

def activate_reversal(options)
  transaction = @litle_transaction.activate_reversal(options)

  commit(transaction, :activateReversal, options)
end

#auth_reversal(options) ⇒ Object



144
145
146
147
148
# File 'lib/LitleOnlineRequest.rb', line 144

def auth_reversal(options)
  transaction = @litle_transaction.auth_reversal(options)

  commit(transaction, :authReversal, options)
end

#authorization(options) ⇒ Object



132
133
134
135
136
# File 'lib/LitleOnlineRequest.rb', line 132

def authorization(options)
  transaction = @litle_transaction.authorization(options)

  commit(transaction, :authorization, options)
end

#balance_inquiry(options) ⇒ Object



90
91
92
93
94
# File 'lib/LitleOnlineRequest.rb', line 90

def balance_inquiry(options)
  transaction = @litle_transaction.balance_inquiry(options)

  commit(transaction, :balanceInquiry, options)
end

#cancel_subscription(options) ⇒ Object



54
55
56
57
58
# File 'lib/LitleOnlineRequest.rb', line 54

def cancel_subscription(options)
  transaction = @litle_transaction.cancel_subscription(options)

  commit(transaction, :cancelSubscription, options)
end

#capture(options) ⇒ Object



174
175
176
177
178
# File 'lib/LitleOnlineRequest.rb', line 174

def capture(options)
  transaction = @litle_transaction.capture(options)

  commit(transaction, :captureTxn, options)
end

#capture_given_auth(options) ⇒ Object



180
181
182
183
184
# File 'lib/LitleOnlineRequest.rb', line 180

def capture_given_auth(options)
  transaction = @litle_transaction.capture_given_auth(options)

  commit(transaction, :captureGivenAuth, options)
end

#create_plan(options) ⇒ Object



42
43
44
45
46
# File 'lib/LitleOnlineRequest.rb', line 42

def create_plan(options)
  transaction = @litle_transaction.create_plan(options)

  commit(transaction, :createPlan, options)
end

#credit(options) ⇒ Object



150
151
152
153
154
# File 'lib/LitleOnlineRequest.rb', line 150

def credit(options)
  transaction = @litle_transaction.credit(options)

  commit(transaction, :credit, options)
end

#deactivate(options) ⇒ Object



72
73
74
75
76
# File 'lib/LitleOnlineRequest.rb', line 72

def deactivate(options)
  transaction = @litle_transaction.deactivate(options)

  commit(transaction, :deactivate, options)
end

#deactivate_reversal(options) ⇒ Object



114
115
116
117
118
# File 'lib/LitleOnlineRequest.rb', line 114

def deactivate_reversal(options)
  transaction = @litle_transaction.deactivate_reversal(options)

  commit(transaction, :deactivateReversal, options)
end

#deposit_reversal(options) ⇒ Object



102
103
104
105
106
# File 'lib/LitleOnlineRequest.rb', line 102

def deposit_reversal(options)
  transaction = @litle_transaction.deposit_reversal(options)

  commit(transaction, :depositReversal, options)
end

#echeck_credit(options) ⇒ Object



204
205
206
207
208
209
210
211
212
213
214
# File 'lib/LitleOnlineRequest.rb', line 204

def echeck_credit(options)
  transaction = @litle_transaction.echeck_credit(options)

  begin
    commit(transaction, :echeckCredit, options)
  rescue XML::MappingError => e
    response = LitleOnlineResponse.new
    response.message = "The content of element 'echeckCredit' is not complete"
    return response
  end
end

#echeck_redeposit(options) ⇒ Object



192
193
194
195
196
# File 'lib/LitleOnlineRequest.rb', line 192

def echeck_redeposit(options)
  transaction = @litle_transaction.echeck_redeposit(options)

  commit(transaction, :echeckRedeposit, options)
end

#echeck_sale(options) ⇒ Object



198
199
200
201
202
# File 'lib/LitleOnlineRequest.rb', line 198

def echeck_sale(options)
  transaction = @litle_transaction.echeck_sale(options)

  commit(transaction, :echeckSale, options)
end

#echeck_verification(options) ⇒ Object



216
217
218
219
220
# File 'lib/LitleOnlineRequest.rb', line 216

def echeck_verification(options)
  transaction = @litle_transaction.echeck_verification(options)

  commit(transaction, :echeckVerification, options)
end

#echeck_void(options) ⇒ Object



222
223
224
225
226
# File 'lib/LitleOnlineRequest.rb', line 222

def echeck_void(options)
  transaction = @litle_transaction.echeck_void(options)

  commit(transaction, :echeckVoid, options)
end

#force_capture(options) ⇒ Object



168
169
170
171
172
# File 'lib/LitleOnlineRequest.rb', line 168

def force_capture(options)
  transaction = @litle_transaction.force_capture(options)

  commit(transaction, :forceCapture, options)
end

#load_request(options) ⇒ Object



78
79
80
81
82
# File 'lib/LitleOnlineRequest.rb', line 78

def load_request(options)
  transaction = @litle_transaction.load_request(options)

  commit(transaction, :load, options)
end

#load_reversal(options) ⇒ Object



120
121
122
123
124
# File 'lib/LitleOnlineRequest.rb', line 120

def load_reversal(options)
  transaction = @litle_transaction.load_reversal(options)

  commit(transaction, :loadReversal, options)
end

#refund_reversal(options) ⇒ Object



108
109
110
111
112
# File 'lib/LitleOnlineRequest.rb', line 108

def refund_reversal(options)
  transaction = @litle_transaction.refund_reversal(options)

  commit(transaction, :refundReversal, options)
end

#register_token_request(options) ⇒ Object



156
157
158
159
160
# File 'lib/LitleOnlineRequest.rb', line 156

def register_token_request(options)
  transaction = @litle_transaction.register_token_request(options)

  commit(transaction, :registerTokenRequest, options)
end

#sale(options) ⇒ Object



138
139
140
141
142
# File 'lib/LitleOnlineRequest.rb', line 138

def sale(options)
  transaction = @litle_transaction.sale(options)

  commit(transaction, :sale, options)
end

#unload_request(options) ⇒ Object



84
85
86
87
88
# File 'lib/LitleOnlineRequest.rb', line 84

def unload_request(options)
  transaction = @litle_transaction.unload_request(options)

  commit(transaction, :unload, options)
end

#unload_reversal(options) ⇒ Object



126
127
128
129
130
# File 'lib/LitleOnlineRequest.rb', line 126

def unload_reversal(options)
  transaction = @litle_transaction.unload_reversal(options)

  commit(transaction, :unloadReversal, options)
end

#update_card_validation_num_on_token(options) ⇒ Object



162
163
164
165
166
# File 'lib/LitleOnlineRequest.rb', line 162

def update_card_validation_num_on_token(options)
  transaction = @litle_transaction.update_card_validation_num_on_token(options)

  commit(transaction, :updateCardValidationNumOnToken, options)
end

#update_plan(options) ⇒ Object



48
49
50
51
52
# File 'lib/LitleOnlineRequest.rb', line 48

def update_plan(options)
  transaction = @litle_transaction.update_plan(options)

  commit(transaction, :updatePlan, options)
end

#update_subscription(options) ⇒ Object



60
61
62
63
64
# File 'lib/LitleOnlineRequest.rb', line 60

def update_subscription(options)
  transaction = @litle_transaction.update_subscription(options)

  commit(transaction, :updateSubscription, options)
end

#virtual_giftcard(options) ⇒ Object



36
37
38
39
40
# File 'lib/LitleOnlineRequest.rb', line 36

def virtual_giftcard(options)
  transaction = @litle_transaction.virtual_giftcard(options)

  commit(transaction, :virtualGiftCard, options)
end

#void(options) ⇒ Object



186
187
188
189
190
# File 'lib/LitleOnlineRequest.rb', line 186

def void(options)
  transaction = @litle_transaction.void(options)

  commit(transaction, :void, options)
end