Class: Google4R::Checkout::AnonymousAddress
- Inherits:
-
Object
- Object
- Google4R::Checkout::AnonymousAddress
- Defined in:
- lib/google4r/checkout/shared.rb
Overview
This address is used in merchant calculation callback
Direct Known Subclasses
Instance Attribute Summary collapse
-
#address_id ⇒ Object
The address ID (String).
-
#city ⇒ Object
The buyer’s city name (String).
-
#country_code ⇒ Object
The buyer’s country code (String, 2 chars, ISO 3166).
-
#postal_code ⇒ Object
The buyers postal/zip code (String).
-
#region ⇒ Object
The buyer’s geographical region (String).
Class Method Summary collapse
-
.create_from_element(element) ⇒ Object
Creates a new AnonymousAddress from the given REXML::Element instance.
Instance Attribute Details
#address_id ⇒ Object
The address ID (String)
1146 1147 1148 |
# File 'lib/google4r/checkout/shared.rb', line 1146 def address_id @address_id end |
#city ⇒ Object
The buyer’s city name (String).
1149 1150 1151 |
# File 'lib/google4r/checkout/shared.rb', line 1149 def city @city end |
#country_code ⇒ Object
The buyer’s country code (String, 2 chars, ISO 3166).
1158 1159 1160 |
# File 'lib/google4r/checkout/shared.rb', line 1158 def country_code @country_code end |
#postal_code ⇒ Object
The buyers postal/zip code (String).
1152 1153 1154 |
# File 'lib/google4r/checkout/shared.rb', line 1152 def postal_code @postal_code end |
#region ⇒ Object
The buyer’s geographical region (String).
1155 1156 1157 |
# File 'lib/google4r/checkout/shared.rb', line 1155 def region @region end |
Class Method Details
.create_from_element(element) ⇒ Object
Creates a new AnonymousAddress from the given REXML::Element instance.
1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 |
# File 'lib/google4r/checkout/shared.rb', line 1161 def self.create_from_element(element) result = AnonymousAddress.new result.address_id = element.attributes['id'] result.city = element.elements['city'].text result.country_code = element.elements['country-code'].text result.postal_code = element.elements['postal-code'].text result.region = element.elements['region'].text return result end |