Class: Rev::Payment Deprecated

Inherits:
ApiSerializable show all
Defined in:
lib/rev-api/models/order_request.rb

Overview

Deprecated.

setting the payment is no longer necessary. All orders now default to :account_balance

Payment Info. Payment can only be done by debiting the user’s account balance.

Constant Summary collapse

TYPES =

use to correctly set payment type

{
  :account_balance => 'AccountBalance'
}
CC_ON_FILE_ID =
1

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiSerializable

#to_hash, #to_json

Constructor Details

#initialize(type) ⇒ Payment

Returns a new instance of Payment.

Parameters:

  • type (String)

    payment method



64
65
66
# File 'lib/rev-api/models/order_request.rb', line 64

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



54
55
56
# File 'lib/rev-api/models/order_request.rb', line 54

def type
  @type
end

Class Method Details

.with_account_balanceObject



69
70
71
# File 'lib/rev-api/models/order_request.rb', line 69

def ()
  Payment::new(TYPES[:account_balance])
end