Class: LitleOnline::LitleTransaction
- Inherits:
-
Object
- Object
- LitleOnline::LitleTransaction
- Defined in:
- lib/LitleTransaction.rb
Instance Method Summary collapse
- #account_update(options) ⇒ Object
- #activate(options) ⇒ Object
- #activate_reversal(options) ⇒ Object
- #auth_reversal(options) ⇒ Object
- #authorization(options) ⇒ Object
- #balance_inquiry(options) ⇒ Object
- #cancel_subscription(options) ⇒ Object
- #capture(options) ⇒ Object
- #capture_given_auth(options) ⇒ Object
- #create_plan(options) ⇒ Object
- #credit(options) ⇒ Object
- #deactivate(options) ⇒ Object
- #deactivate_reversal(options) ⇒ Object
- #deposit_reversal(options) ⇒ Object
- #echeck_credit(options) ⇒ Object
- #echeck_redeposit(options) ⇒ Object
- #echeck_sale(options) ⇒ Object
- #echeck_verification(options) ⇒ Object
- #echeck_void(options) ⇒ Object
- #force_capture(options) ⇒ Object
- #load_request(options) ⇒ Object
- #load_reversal(options) ⇒ Object
- #refund_reversal(options) ⇒ Object
- #register_token_request(options) ⇒ Object
- #sale(options) ⇒ Object
- #unload_request(options) ⇒ Object
- #unload_reversal(options) ⇒ Object
- #update_card_validation_num_on_token(options) ⇒ Object
- #update_plan(options) ⇒ Object
- #update_subscription(options) ⇒ Object
- #virtual_giftcard(options) ⇒ Object
- #void(options) ⇒ Object
Instance Method Details
#account_update(options) ⇒ Object
388 389 390 391 392 393 394 395 396 397 |
# File 'lib/LitleTransaction.rb', line 388 def account_update() transaction = AccountUpdate.new transaction.card = Card.from_hash() transaction.token = CardToken.from_hash(,'token') transaction.orderId = ['orderId'] add_account_info(transaction, ) return transaction end |
#activate(options) ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'lib/LitleTransaction.rb', line 56 def activate() transaction = Activate.new transaction.orderId = ['orderId'] transaction.orderSource = ['orderSource'] transaction.amount = ['amount'] transaction.card = Card.from_hash(,'card') transaction.virtualGiftCard = VirtualGiftCard.from_hash(,'virtualGiftCard') return transaction end |
#activate_reversal(options) ⇒ Object
160 161 162 163 164 |
# File 'lib/LitleTransaction.rb', line 160 def activate_reversal() transaction = ActivateReversal.new transaction.litleTxnId = ['litleTxnId'] return transaction end |
#auth_reversal(options) ⇒ Object
244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/LitleTransaction.rb', line 244 def auth_reversal() transaction = AuthReversal.new transaction.litleTxnId = ['litleTxnId'] transaction.amount = ['amount'] transaction.surchargeAmount = ['surchargeAmount'] transaction.payPalNotes = ['payPalNotes'] transaction.actionReason = ['actionReason'] add_account_info(transaction, ) return transaction end |
#authorization(options) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/LitleTransaction.rb', line 35 def () transaction = Authorization.new transaction.secondaryAmount = ['secondaryAmount'] transaction.surchargeAmount = ['surchargeAmount'] transaction.recurringRequest = RecurringRequest.from_hash(,'recurringRequest') transaction.debtRepayment = ['debtRepayment'] transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(, 'advancedFraudChecks') transaction.processingType = ['processingType'] transaction.originalNetworkTransactionId = ['originalNetworkTransactionId'] transaction.originalTransactionAmount = ['originalTransactionAmount'] add_transaction_info(transaction, ) return transaction end |
#balance_inquiry(options) ⇒ Object
92 93 94 95 96 97 98 |
# File 'lib/LitleTransaction.rb', line 92 def balance_inquiry() transaction = BalanceInquiry.new transaction.orderId = ['orderId'] transaction.orderSource = ['orderSource'] transaction.card = Card.from_hash(,'card') return transaction end |
#cancel_subscription(options) ⇒ Object
50 51 52 53 54 |
# File 'lib/LitleTransaction.rb', line 50 def cancel_subscription() transaction = CancelSubscription.new transaction.subscriptionId = ['subscriptionId'] return transaction end |
#capture(options) ⇒ Object
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/LitleTransaction.rb', line 295 def capture() transaction = Capture.new transaction.partial = ['partial'] transaction.litleTxnId = ['litleTxnId'] transaction.amount = ['amount'] transaction.surchargeAmount = ['surchargeAmount'] transaction.enhancedData = EnhancedData.from_hash() transaction.processingInstructions = ProcessingInstructions.from_hash() transaction.payPalOrderComplete = ['payPalOrderComplete'] transaction.payPalNotes = ['payPalNotes'] transaction.customBilling = ['customBilling'] add_account_info(transaction, ) return transaction end |
#capture_given_auth(options) ⇒ Object
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/LitleTransaction.rb', line 312 def capture_given_auth() transaction = CaptureGivenAuth.new add_order_info(transaction, ) transaction.secondaryAmount = ['secondaryAmount'] transaction.surchargeAmount = ['surchargeAmount'] transaction.authInformation = AuthInformation.from_hash() transaction.shipToAddress = Contact.from_hash(,'shipToAddress') transaction.customBilling = CustomBilling.from_hash() transaction.billMeLaterRequest = BillMeLaterRequest.from_hash() transaction.debtRepayment = ['debtRepayment'] transaction.processingType = ['processingType'] transaction.originalNetworkTransactionId = ['originalNetworkTransactionId'] transaction.originalTransactionAmount = ['originalTransactionAmount'] return transaction end |
#create_plan(options) ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/LitleTransaction.rb', line 132 def create_plan() transaction = CreatePlan.new transaction.planCode = ['planCode'] transaction.name=['name'] transaction.description=['description'] transaction.intervalType=['intervalType'] transaction.amount=['amount'] transaction.numberOfPayments=['numberOfPayments'] transaction.trialNumberOfIntervals=['trialNumberOfIntervals'] transaction.trialIntervalType=['trialIntervalType'] transaction.active=['active'] return transaction end |
#credit(options) ⇒ Object
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/LitleTransaction.rb', line 214 def credit() transaction = Credit.new transaction.litleTxnId = ['litleTxnId'] if(transaction.litleTxnId.nil?) transaction.orderId = ['orderId'] transaction.orderSource = ['orderSource'] transaction.taxType = ['taxType'] transaction.billToAddress = Contact.from_hash(,'billToAddress') transaction.amexAggregatorData = AmexAggregatorData.from_hash() transaction.card = Card.from_hash() transaction.token = CardToken.from_hash(,'token') transaction.paypage = CardPaypage.from_hash(,'paypage') transaction.mpos = Mpos.from_hash(,'mpos') end transaction.amount = ['amount'] transaction.secondaryAmount = ['secondaryAmount'] transaction.surchargeAmount = ['surchargeAmount'] transaction.customBilling = CustomBilling.from_hash() transaction.enhancedData = EnhancedData.from_hash() transaction.processingInstructions = ProcessingInstructions.from_hash() transaction.pos = Pos.from_hash() transaction.billMeLaterRequest = BillMeLaterRequest.from_hash() transaction.payPalNotes = ['payPalNotes'] transaction.actionReason = ['actionReason'] transaction.paypal = CreditPayPal.from_hash(,'paypal') add_account_info(transaction, ) return transaction end |
#deactivate(options) ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/LitleTransaction.rb', line 66 def deactivate() transaction = Deactivate.new transaction.orderId = ['orderId'] transaction.orderSource = ['orderSource'] transaction.card = Card.from_hash(,'card') return transaction end |
#deactivate_reversal(options) ⇒ Object
178 179 180 181 182 |
# File 'lib/LitleTransaction.rb', line 178 def deactivate_reversal() transaction = DeactivateReversal.new transaction.litleTxnId = ['litleTxnId'] return transaction end |
#deposit_reversal(options) ⇒ Object
166 167 168 169 170 |
# File 'lib/LitleTransaction.rb', line 166 def deposit_reversal() transaction = DepositReversal.new transaction.litleTxnId = ['litleTxnId'] return transaction end |
#echeck_credit(options) ⇒ Object
360 361 362 363 364 365 366 367 368 |
# File 'lib/LitleTransaction.rb', line 360 def echeck_credit() transaction = EcheckCredit.new transaction.customBilling = CustomBilling.from_hash() transaction.secondaryAmount = ['secondaryAmount'] add_echeck_order_info(transaction, ) add_echeck(transaction, ) return transaction end |
#echeck_redeposit(options) ⇒ Object
338 339 340 341 342 343 344 345 346 |
# File 'lib/LitleTransaction.rb', line 338 def echeck_redeposit() transaction = EcheckRedeposit.new add_echeck(transaction, ) transaction.litleTxnId = ['litleTxnId'] transaction.merchantData = MerchantData.from_hash() return transaction end |
#echeck_sale(options) ⇒ Object
348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/LitleTransaction.rb', line 348 def echeck_sale() transaction = EcheckSale.new add_echeck(transaction, ) add_echeck_order_info(transaction, ) transaction.secondaryAmount = ['secondaryAmount'] transaction.verify = ['verify'] transaction.shipToAddress = Contact.from_hash(,'shipToAddress') transaction.customBilling = CustomBilling.from_hash() return transaction end |
#echeck_verification(options) ⇒ Object
370 371 372 373 374 375 376 377 378 |
# File 'lib/LitleTransaction.rb', line 370 def echeck_verification() transaction = EcheckVerification.new add_echeck_order_info(transaction, ) add_echeck(transaction, ) transaction.merchantData = MerchantData.from_hash() return transaction end |
#echeck_void(options) ⇒ Object
380 381 382 383 384 385 386 |
# File 'lib/LitleTransaction.rb', line 380 def echeck_void() transaction = EcheckVoid.new transaction.litleTxnId = ['litleTxnId'] add_account_info(transaction, ) return transaction end |
#force_capture(options) ⇒ Object
283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/LitleTransaction.rb', line 283 def force_capture() transaction = ForceCapture.new transaction.secondaryAmount = ['secondaryAmount'] transaction.surchargeAmount = ['surchargeAmount'] transaction.customBilling = CustomBilling.from_hash() transaction.debtRepayment = ['debtRepayment'] transaction.processingType = ['processingType'] add_order_info(transaction, ) return transaction end |
#load_request(options) ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/LitleTransaction.rb', line 74 def load_request() transaction = Load.new transaction.orderId = ['orderId'] transaction.orderSource = ['orderSource'] transaction.amount = ['amount'] transaction.card = Card.from_hash(,'card') return transaction end |
#load_reversal(options) ⇒ Object
184 185 186 187 188 |
# File 'lib/LitleTransaction.rb', line 184 def load_reversal() transaction = LoadReversal.new transaction.litleTxnId = ['litleTxnId'] return transaction end |
#refund_reversal(options) ⇒ Object
172 173 174 175 176 |
# File 'lib/LitleTransaction.rb', line 172 def refund_reversal() transaction = RefundReversal.new transaction.litleTxnId = ['litleTxnId'] return transaction end |
#register_token_request(options) ⇒ Object
257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/LitleTransaction.rb', line 257 def register_token_request() transaction = RegisterTokenRequest.new transaction.orderId = ['orderId'] transaction.accountNumber = ['accountNumber'] transaction.echeckForToken = EcheckForToken.from_hash() transaction.paypageRegistrationId = ['paypageRegistrationId'] transaction.applepay = Applepay.from_hash(,'applepay') add_account_info(transaction, ) return transaction end |
#sale(options) ⇒ Object
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/LitleTransaction.rb', line 196 def sale() transaction = Sale.new add_transaction_info(transaction, ) transaction.secondaryAmount = ['secondaryAmount'] transaction.surchargeAmount = ['surchargeAmount'] transaction.fraudCheck = FraudCheck.from_hash(,'fraudCheck') transaction.payPalOrderComplete = ['payPalOrderComplete'] transaction.payPalNotes = ['payPalNotes'] transaction.recurringRequest = RecurringRequest.from_hash(,'recurringRequest') transaction.litleInternalRecurringRequest = LitleInternalRecurringRequest.from_hash(,'litleInternalRecurringRequest') transaction.debtRepayment = ['debtRepayment'] transaction.advancedFraudChecks = AdvancedFraudChecks.from_hash(, 'advancedFraudChecks') transaction.processingType = ['processingType'] transaction.originalNetworkTransactionId = ['originalNetworkTransactionId'] transaction.originalTransactionAmount = ['originalTransactionAmount'] return transaction end |
#unload_request(options) ⇒ Object
83 84 85 86 87 88 89 90 |
# File 'lib/LitleTransaction.rb', line 83 def unload_request() transaction = Unload.new transaction.orderId = ['orderId'] transaction.orderSource = ['orderSource'] transaction.amount = ['amount'] transaction.card = Card.from_hash(,'card') return transaction end |
#unload_reversal(options) ⇒ Object
190 191 192 193 194 |
# File 'lib/LitleTransaction.rb', line 190 def unload_reversal() transaction = UnloadReversal.new transaction.litleTxnId = ['litleTxnId'] return transaction end |
#update_card_validation_num_on_token(options) ⇒ Object
269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/LitleTransaction.rb', line 269 def update_card_validation_num_on_token() transaction = UpdateCardValidationNumOnToken.new transaction.orderId = ['orderId'] transaction.litleToken = ['litleToken'] transaction.cardValidationNum = ['cardValidationNum'] SchemaValidation.validate_length(transaction.litleToken, true, 13, 25, "updateCardValidationNumOnToken", "litleToken") SchemaValidation.validate_length(transaction.cardValidationNum, true, 1, 4, "updateCardValidationNumOnToken", "cardValidationNum") add_account_info(transaction, ) return transaction end |
#update_plan(options) ⇒ Object
146 147 148 149 150 151 |
# File 'lib/LitleTransaction.rb', line 146 def update_plan() transaction = UpdatePlan.new transaction.planCode = ['planCode'] transaction.active=['active'] return transaction end |
#update_subscription(options) ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/LitleTransaction.rb', line 100 def update_subscription() transaction = UpdateSubscription.new transaction.subscriptionId = ['subscriptionId'] transaction.planCode=['planCode'] transaction.billToAddress=Contact.from_hash(,'billToAddress') transaction.card=Card.from_hash(,'card') transaction.billingDate=['billingDate'] transaction.card = Card.from_hash() transaction.token = CardToken.from_hash(,'token') transaction.paypage = CardPaypage.from_hash(,'paypage') if(['createDiscount']) ['createDiscount'].each_index {| index | transaction.createDiscount << CreateDiscount.from_hash(, index,'createDiscount')} end if(['updateDiscount']) ['updateDiscount'].each_index {| index | transaction.updateDiscount << UpdateDiscount.from_hash(, index,'updateDiscount')} end if(['deleteDiscount']) ['deleteDiscount'].each_index {| index | transaction.deleteDiscount << DeleteDiscount.from_hash(, index,'deleteDiscount')} end if(['createAddOn']) ['createAddOn'].each_index {| index | transaction.createAddOn << CreateAddOn.from_hash(, index,'createAddOn')} end if(['updateAddOn']) ['updateAddOn'].each_index {| index | transaction.updateAddOn << UpdateAddOn.from_hash(, index,'updateAddOn')} end if(['deleteAddOn']) ['deleteAddOn'].each_index {| index | transaction.deleteAddOn << DeleteAddOn.from_hash(, index,'deleteAddOn')} end return transaction end |
#virtual_giftcard(options) ⇒ Object
153 154 155 156 157 158 |
# File 'lib/LitleTransaction.rb', line 153 def virtual_giftcard() transaction = VirtualGiftCard.new transaction.accountNumberLength = ['accountNumberLength'] transaction.giftCardBin = ['giftCardBin'] return transaction end |
#void(options) ⇒ Object
328 329 330 331 332 333 334 335 336 |
# File 'lib/LitleTransaction.rb', line 328 def void() transaction = Void.new transaction.litleTxnId = ['litleTxnId'] transaction.processingInstructions = ProcessingInstructions.from_hash() add_account_info(transaction, ) return transaction end |