Class: OpenPayU::Models::Order

Inherits:
Model
  • Object
show all
Defined in:
lib/openpayu/models/order.rb

Constant Summary collapse

STATUSES =
%w(NEW PENDING CANCELLED REJECTED
COMPLETED WAITING_FOR_CONFIRMATION)

Instance Attribute Summary collapse

Attributes inherited from Model

#all_errors

Instance Method Summary collapse

Methods inherited from Model

#all_objects_valid?, #attributes, define_reader, define_writer, #get_instance_values, has_many_objects, has_one_object, #initialize, #prepare_data, #prepare_keys, #to_flatten_hash, #to_json, #validate_all_objects

Constructor Details

This class inherits a constructor from OpenPayU::Models::Model

Instance Attribute Details

#continue_urlObject

Returns the value of attribute continue_url.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def continue_url
  @continue_url
end

#currency_codeObject

Returns the value of attribute currency_code.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def currency_code
  @currency_code
end

#customer_ipObject

Returns the value of attribute customer_ip.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def customer_ip
  @customer_ip
end

#descriptionObject

Returns the value of attribute description.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def description
  @description
end

#ext_order_idObject

Returns the value of attribute ext_order_id.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def ext_order_id
  @ext_order_id
end

#merchant_pos_idObject

Returns the value of attribute merchant_pos_id.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def merchant_pos_id
  @merchant_pos_id
end

#notify_urlObject

Returns the value of attribute notify_url.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def notify_url
  @notify_url
end

#order_urlObject

Returns the value of attribute order_url.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def order_url
  @order_url
end

#propertiesObject

Returns the value of attribute properties.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def properties
  @properties
end

#ref_req_idObject

Returns the value of attribute ref_req_id.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def ref_req_id
  @ref_req_id
end

#req_idObject

Returns the value of attribute req_id.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def req_id
  @req_id
end

#total_amountObject

Returns the value of attribute total_amount.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def total_amount
  @total_amount
end

#validity_timeObject

Returns the value of attribute validity_time.



9
10
11
# File 'lib/openpayu/models/order.rb', line 9

def validity_time
  @validity_time
end

Instance Method Details

#after_initializeObject



19
20
21
22
23
24
# File 'lib/openpayu/models/order.rb', line 19

def after_initialize
  @req_id       ||= "{#{SecureRandom.uuid}}"
  @notify_url   ||= OpenPayU::Configuration.notify_url
  @order_url    ||= OpenPayU::Configuration.order_url
  @continue_url ||= OpenPayU::Configuration.continue_url
end