Class: STP::Structs::PaymentOrder

Inherits:
Object
  • Object
show all
Defined in:
lib/stp/structs/payment_order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePaymentOrder

Returns a new instance of PaymentOrder.



41
42
43
# File 'lib/stp/structs/payment_order.rb', line 41

def initialize
  @company = STP.company
end

Instance Attribute Details

#amountObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def amount
  @amount
end

#beneficiary_accountObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def 
  @beneficiary_account
end

#beneficiary_account_typeObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def 
  @beneficiary_account_type
end

#beneficiary_emailObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def beneficiary_email
  @beneficiary_email
end

#beneficiary_nameObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def beneficiary_name
  @beneficiary_name
end

#beneficiary_rfcObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def beneficiary_rfc
  @beneficiary_rfc
end

#collection_referenceObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def collection_reference
  @collection_reference
end

#companyObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def company
  @company
end

#counterpart_institutionObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def counterpart_institution
  @counterpart_institution
end

#delivery_methodObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def delivery_method
  @delivery_method
end

#folioObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def folio
  @folio
end

#ivaObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def iva
  @iva
end

#number_referenceObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def number_reference
  @number_reference
end

#operant_institutionObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def operant_institution
  @operant_institution
end

#operation_dateObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def operation_date
  @operation_date
end

#operation_typeObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def operation_type
  @operation_type
end

#original_chainObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def original_chain
  @original_chain
end

#payer_accountObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def 
  @payer_account
end

#payer_account_typeObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def 
  @payer_account_type
end

#payer_nameObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def payer_name
  @payer_name
end

#payer_rfcObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def payer_rfc
  @payer_rfc
end

#payment_conceptObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def payment_concept
  @payment_concept
end

#payment_keyObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def payment_key
  @payment_key
end

#payment_secondary_conceptObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def payment_secondary_concept
  @payment_secondary_concept
end

#payment_typeObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def payment_type
  @payment_type
end

#priorityObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def priority
  @priority
end

#secondary_beneficiary_accountObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def 
  @secondary_beneficiary_account
end

#secondary_beneficiary_account_typeObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def 
  @secondary_beneficiary_account_type
end

#secondary_beneficiary_nameObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def secondary_beneficiary_name
  @secondary_beneficiary_name
end

#secondary_beneficiary_rfcObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def secondary_beneficiary_rfc
  @secondary_beneficiary_rfc
end

#secondary_user_catalog_keyObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def secondary_user_catalog_key
  @secondary_user_catalog_key
end

#signatureObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def signature
  @signature
end

#topologyObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def topology
  @topology
end

#tracking_keyObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def tracking_key
  @tracking_key
end

#userObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def user
  @user
end

#user_catalog_keyObject

a - Institución contraparte



4
5
6
# File 'lib/stp/structs/payment_order.rb', line 4

def user_catalog_key
  @user_catalog_key
end

Instance Method Details

#as_json(_options = {}) ⇒ Object



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/stp/structs/payment_order.rb', line 82

def as_json(_options = {})
  {
    claveRastreo: @tracking_key,
    conceptoPago: @payment_concept,
    cuentaBeneficiario: @beneficiary_account,
    cuentaOrdenante: @payer_account,
    empresa: @company,
    fechaOperacion: @operation_date,
    firma: @signature,
    folioOrigen: @folio,
    institucionContraparte: @counterpart_institution,
    institucionOperante: @operant_institution,
    monto: @amount,
    nombreBeneficiario: @beneficiary_name,
    nombreOrdenante: @payer_name,
    referenciaNumerica: @number_reference,
    rfcCurpBeneficiario: @beneficiary_rfc,
    rfcCurpOrdenante: @payer_rfc,
    tipoCuentaBeneficiario: @beneficiary_account_type,
    tipoCuentaOrdenante: @payer_account_type,
    tipoPago: @payment_type,
  }.compact
end

#to_json(*options) ⇒ Object



106
107
108
# File 'lib/stp/structs/payment_order.rb', line 106

def to_json(*options)
  as_json(*options).to_json(*options)
end