Class: EwayRapid::CreateAccessCodeResponse
- Inherits:
-
Object
- Object
- EwayRapid::CreateAccessCodeResponse
- Defined in:
- lib/eway_rapid/entities/create_access_code_response.rb
Instance Attribute Summary collapse
-
#access_code ⇒ Object
Returns the value of attribute access_code.
-
#amex_ec_data ⇒ Object
Returns the value of attribute amex_ec_data.
-
#card_expiry_month ⇒ Object
Returns the value of attribute card_expiry_month.
-
#card_expiry_year ⇒ Object
Returns the value of attribute card_expiry_year.
-
#card_issue_number ⇒ Object
Returns the value of attribute card_issue_number.
-
#card_name ⇒ Object
Returns the value of attribute card_name.
-
#card_number ⇒ Object
Returns the value of attribute card_number.
-
#card_start_month ⇒ Object
Returns the value of attribute card_start_month.
-
#card_start_year ⇒ Object
Returns the value of attribute card_start_year.
-
#city ⇒ Object
Returns the value of attribute city.
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#company_name ⇒ Object
Returns the value of attribute company_name.
-
#complete_checkout_url ⇒ Object
Returns the value of attribute complete_checkout_url.
-
#country ⇒ Object
Returns the value of attribute country.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#email ⇒ Object
Returns the value of attribute email.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#fax ⇒ Object
Returns the value of attribute fax.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#form_action_url ⇒ Object
Returns the value of attribute form_action_url.
-
#invoice_description ⇒ Object
Returns the value of attribute invoice_description.
-
#invoice_number ⇒ Object
Returns the value of attribute invoice_number.
-
#invoice_reference ⇒ Object
Returns the value of attribute invoice_reference.
-
#job_description ⇒ Object
Returns the value of attribute job_description.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#mobile ⇒ Object
Returns the value of attribute mobile.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#state ⇒ Object
Returns the value of attribute state.
-
#street1 ⇒ Object
Returns the value of attribute street1.
-
#street2 ⇒ Object
Returns the value of attribute street2.
-
#title ⇒ Object
Returns the value of attribute title.
-
#token_customer_id ⇒ Object
Returns the value of attribute token_customer_id.
-
#total_amount ⇒ Object
Returns the value of attribute total_amount.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#access_code ⇒ Object
Returns the value of attribute access_code.
5 6 7 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 5 def access_code @access_code end |
#amex_ec_data ⇒ Object
Returns the value of attribute amex_ec_data.
40 41 42 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 40 def amex_ec_data @amex_ec_data end |
#card_expiry_month ⇒ Object
Returns the value of attribute card_expiry_month.
35 36 37 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 35 def card_expiry_month @card_expiry_month end |
#card_expiry_year ⇒ Object
Returns the value of attribute card_expiry_year.
36 37 38 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 36 def card_expiry_year @card_expiry_year end |
#card_issue_number ⇒ Object
Returns the value of attribute card_issue_number.
39 40 41 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 39 def card_issue_number @card_issue_number end |
#card_name ⇒ Object
Returns the value of attribute card_name.
34 35 36 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 34 def card_name @card_name end |
#card_number ⇒ Object
Returns the value of attribute card_number.
33 34 35 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 33 def card_number @card_number end |
#card_start_month ⇒ Object
Returns the value of attribute card_start_month.
37 38 39 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 37 def card_start_month @card_start_month end |
#card_start_year ⇒ Object
Returns the value of attribute card_start_year.
38 39 40 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 38 def card_start_year @card_start_year end |
#city ⇒ Object
Returns the value of attribute city.
23 24 25 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 23 def city @city end |
#comments ⇒ Object
Returns the value of attribute comments.
30 31 32 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 30 def comments @comments end |
#company_name ⇒ Object
Returns the value of attribute company_name.
19 20 21 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 19 def company_name @company_name end |
#complete_checkout_url ⇒ Object
Returns the value of attribute complete_checkout_url.
8 9 10 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 8 def complete_checkout_url @complete_checkout_url end |
#country ⇒ Object
Returns the value of attribute country.
26 27 28 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 26 def country @country end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
13 14 15 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 13 def currency_code @currency_code end |
#customer ⇒ Object
Returns the value of attribute customer.
3 4 5 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 3 def customer @customer end |
#email ⇒ Object
Returns the value of attribute email.
27 28 29 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 27 def email @email end |
#errors ⇒ Object
Returns the value of attribute errors.
7 8 9 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 7 def errors @errors end |
#fax ⇒ Object
Returns the value of attribute fax.
31 32 33 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 31 def fax @fax end |
#first_name ⇒ Object
Returns the value of attribute first_name.
17 18 19 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 17 def first_name @first_name end |
#form_action_url ⇒ Object
Returns the value of attribute form_action_url.
6 7 8 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 6 def form_action_url @form_action_url end |
#invoice_description ⇒ Object
Returns the value of attribute invoice_description.
11 12 13 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 11 def invoice_description @invoice_description end |
#invoice_number ⇒ Object
Returns the value of attribute invoice_number.
10 11 12 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 10 def invoice_number @invoice_number end |
#invoice_reference ⇒ Object
Returns the value of attribute invoice_reference.
12 13 14 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 12 def invoice_reference @invoice_reference end |
#job_description ⇒ Object
Returns the value of attribute job_description.
20 21 22 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 20 def job_description @job_description end |
#last_name ⇒ Object
Returns the value of attribute last_name.
18 19 20 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 18 def last_name @last_name end |
#mobile ⇒ Object
Returns the value of attribute mobile.
29 30 31 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 29 def mobile @mobile end |
#payment ⇒ Object
Returns the value of attribute payment.
4 5 6 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 4 def payment @payment end |
#phone ⇒ Object
Returns the value of attribute phone.
28 29 30 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 28 def phone @phone end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
25 26 27 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 25 def postal_code @postal_code end |
#reference ⇒ Object
Returns the value of attribute reference.
15 16 17 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 15 def reference @reference end |
#state ⇒ Object
Returns the value of attribute state.
24 25 26 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 24 def state @state end |
#street1 ⇒ Object
Returns the value of attribute street1.
21 22 23 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 21 def street1 @street1 end |
#street2 ⇒ Object
Returns the value of attribute street2.
22 23 24 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 22 def street2 @street2 end |
#title ⇒ Object
Returns the value of attribute title.
16 17 18 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 16 def title @title end |
#token_customer_id ⇒ Object
Returns the value of attribute token_customer_id.
14 15 16 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 14 def token_customer_id @token_customer_id end |
#total_amount ⇒ Object
Returns the value of attribute total_amount.
9 10 11 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 9 def total_amount @total_amount end |
#url ⇒ Object
Returns the value of attribute url.
32 33 34 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 32 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 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 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 88 def self.from_hash(hash) create_access_code_response = CreateAccessCodeResponse.new create_access_code_response.customer = InternalModels::Customer.from_hash(hash[Constants::CUSTOMER]) create_access_code_response.payment = InternalModels::Payment.from_hash(hash[Constants::PAYMENT]) create_access_code_response.access_code = hash[Constants::ACCESS_CODE] create_access_code_response.form_action_url = hash[Constants::FORM_ACTION_URL] create_access_code_response.errors = hash[Constants::ERRORS_CAPITALIZED] create_access_code_response.complete_checkout_url = hash[Constants::COMPLETE_CHECKOUT_URL] create_access_code_response.total_amount = hash[Constants::TOTAL_AMOUNT] create_access_code_response.invoice_number = hash[Constants::INVOICE_NUMBER] create_access_code_response.invoice_description = hash[Constants::INVOICE_DESCRIPTION] create_access_code_response.invoice_reference = hash[Constants::INVOICE_REFERENCE] create_access_code_response.currency_code = hash[Constants::CURRENCY_CODE] create_access_code_response.token_customer_id = hash[Constants::TOKEN_CUSTOMER_ID] create_access_code_response.reference = hash[Constants::REFERENCE] create_access_code_response.title = hash[Constants::TITLE] create_access_code_response.first_name = hash[Constants::FIRST_NAME] create_access_code_response.last_name = hash[Constants::LAST_NAME] create_access_code_response.company_name = hash[Constants::COMPANY_NAME] create_access_code_response.job_description = hash[Constants::JOB_DESCRIPTION] create_access_code_response.street1 = hash[Constants::STREET1] create_access_code_response.street2 = hash[Constants::STREET2] create_access_code_response.city = hash[Constants::CITY] create_access_code_response.state = hash[Constants::STATE] create_access_code_response.postal_code = hash[Constants::POSTAL_CODE] create_access_code_response.country = hash[Constants::COUNTRY] create_access_code_response.email = hash[Constants::EMAIL] create_access_code_response.phone = hash[Constants::PHONE] create_access_code_response.mobile = hash[Constants::MOBILE] create_access_code_response.comments = hash[Constants::COMMENTS] create_access_code_response.fax = hash[Constants::FAX] create_access_code_response.url = hash[Constants::URL] create_access_code_response.card_number = hash[Constants::CARD_NUMBER] create_access_code_response.card_name = hash[Constants::CARD_NAME] create_access_code_response.card_expiry_month = hash[Constants::CARD_EXPIRY_MONTH] create_access_code_response.card_expiry_year = hash[Constants::CARD_EXPIRY_YEAR] create_access_code_response.card_start_month = hash[Constants::CARD_START_MONTH] create_access_code_response.card_start_year = hash[Constants::CARD_START_YEAR] create_access_code_response.card_issue_number = hash[Constants::CARD_ISSUE_NUMBER] create_access_code_response.amex_ec_data = hash[Constants::AMEX_EC_DATA] create_access_code_response end |
.from_json(json) ⇒ Object
83 84 85 86 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 83 def self.from_json(json) hash = JSON.parse(json) from_hash(hash) end |
Instance Method Details
#to_json(options = {}) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/eway_rapid/entities/create_access_code_response.rb', line 42 def to_json(={}) {Constants::CUSTOMER => customer, Constants::PAYMENT => payment, Constants::ACCESS_CODE => access_code, Constants::FORM_ACTION_URL => form_action_url, Constants::ERRORS_CAPITALIZED => errors, Constants::COMPLETE_CHECKOUT_URL => complete_checkout_url, Constants::TOTAL_AMOUNT => total_amount, Constants::INVOICE_NUMBER => invoice_number, Constants::INVOICE_DESCRIPTION => invoice_description, Constants::INVOICE_REFERENCE => invoice_reference, Constants::CURRENCY_CODE => currency_code, Constants::TOKEN_CUSTOMER_ID => token_customer_id, Constants::REFERENCE => reference, Constants::TITLE => title, Constants::FIRST_NAME => first_name, Constants::LAST_NAME => last_name, Constants::COMPANY_NAME => company_name, Constants::JOB_DESCRIPTION => job_description, Constants::STREET1 => street1, Constants::STREET2 => street2, Constants::CITY => city, Constants::STATE => state, Constants::POSTAL_CODE => postal_code, Constants::COUNTRY => country, Constants::EMAIL => email, Constants::PHONE => phone, Constants::MOBILE => mobile, Constants::COMMENTS => comments, Constants::FAX => fax, Constants::URL => url, Constants::CARD_NUMBER => card_number, Constants::CARD_NAME => card_name, Constants::CARD_EXPIRY_MONTH => card_expiry_month, Constants::CARD_EXPIRY_YEAR => card_expiry_year, Constants::CARD_START_MONTH => card_start_month, Constants::CARD_START_YEAR => card_start_year, Constants::CARD_ISSUE_NUMBER => card_issue_number, Constants::AMEX_EC_DATA => amex_ec_data}.to_json end |