Class: Allorails::Response::OnetimeValidateCodesResponse

Inherits:
ApiMappingResponse show all
Defined in:
lib/allorails/response/onetime_validate_codes_response.rb

Overview

Class defining a onetime validate-codes request’s response

Constant Summary collapse

VALIDATESCODES_SUCCESS =

The validation is successful

0
VALIDATESCODES_FAILED =

The validation failed

1

Instance Attribute Summary

Attributes inherited from ApiMappingResponse

#xml

Instance Method Summary collapse

Methods inherited from ApiMappingResponse

#_verify, attribute_reader, #initialize, node_reader

Methods inherited from ApiResponse

#_verify, #initialize

Constructor Details

This class inherits a constructor from Allorails::Response::ApiMappingResponse

Instance Method Details

#access_typeObject

Provides access type

@return (string) access type


19
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 19

node_reader :access_type

#affiliateObject

Provides the affiliation code

@return (string) affiliation code


73
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 73

node_reader :affiliate

#codesObject

Provides the codes you tried to validate

@return (Array) list of Code objects


59
60
61
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 59

def codes
  xml.css('codes code').map{|c| Allorails::Code.new(c)}
end

#customer_countryObject

Provides the customer country

@return (string) customer country


51
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 51

node_reader :customer_country

#customer_ipObject

Provides the customer ip

@return (string) customer ip


47
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 47

node_reader :customer_ip

#dataObject

Provides the client data

@return (string) client data


69
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 69

node_reader :data

#expected_number_of_codesObject

Provides the expected number of codes

@return (int) expected number of codes


55
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 55

node_reader :expected_number_of_codes, Integer

#merchant_transaction_idObject

Provides the merchant transaction id

@return (string) merchant transaction id


65
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 65

node_reader :merchant_transaction_id

Provides paid price information

@return (Price) paid price information


31
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 31

node_reader :paid, Allorails::Price

#partnersObject

Provides information about the associated partners

@return (list) partners information (list of Partner objects)


77
78
79
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 77

def partners
  xml.css('partners partner').map{|c| Allorails::Partner.new(c)}
end

#priceObject

Provides price information

@return (Price) price information


27
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 27

node_reader :price, Allorails::Price

#product_nameObject

Provides the product name

@return (string) product name


39
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 39

node_reader :product_name

#statusObject

Provides the validation status

@return (int) validation status


11
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 11

node_reader :status, Integer

#status_descriptionObject

Provides the validation status description

@return (string) validation status description


15
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 15

node_reader :status_description

#transaction_idObject

Provides the transaction id

@return (string) transaction id


23
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 23

node_reader :transaction_id

#validation_dateObject

Provides the validation date

@return (datetime.datetime) validation date


35
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 35

node_reader :validation_date, DateTime

#websiteObject

Provides the website

@return (Website) website


43
# File 'lib/allorails/response/onetime_validate_codes_response.rb', line 43

node_reader :website, Allorails::Website