Class: CyberSourceMergedSpec::AgreementInformation7
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::AgreementInformation7
- Defined in:
- lib/cyber_source_merged_spec/models/agreement_information7.rb
Overview
AgreementInformation7 Model.
Instance Attribute Summary collapse
-
#date_created ⇒ String
Date the mandate has been created.
-
#date_signed ⇒ String
Date the mandate has been signed.
-
#encoded_html ⇒ String
Base64 encoded html string.
-
#encoded_html_popup ⇒ String
Base64 encoded popup html string.
-
#end_date ⇒ String
End date of the schedule.
-
#frequency ⇒ Frequency
Regularity with which the event occurs.
-
#id ⇒ String
Identifier for the mandate.
-
#occurrences_per_period ⇒ Integer
Number of occurrences during the specified period.
-
#start_date ⇒ String
Start date of the schedule.
-
#type ⇒ Type1
Identifies the type of schedule as either recurring, one-off, split or usage.
-
#url ⇒ String
URL for redirecting the customer for creating the mandate.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(id: SKIP, date_signed: SKIP, date_created: SKIP, type: SKIP, frequency: SKIP, occurrences_per_period: SKIP, start_date: SKIP, end_date: SKIP, encoded_html: SKIP, encoded_html_popup: SKIP, url: SKIP, additional_properties: nil) ⇒ AgreementInformation7
constructor
A new instance of AgreementInformation7.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ Object
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(id: SKIP, date_signed: SKIP, date_created: SKIP, type: SKIP, frequency: SKIP, occurrences_per_period: SKIP, start_date: SKIP, end_date: SKIP, encoded_html: SKIP, encoded_html_popup: SKIP, url: SKIP, additional_properties: nil) ⇒ AgreementInformation7
Returns a new instance of AgreementInformation7.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 97 def initialize(id: SKIP, date_signed: SKIP, date_created: SKIP, type: SKIP, frequency: SKIP, occurrences_per_period: SKIP, start_date: SKIP, end_date: SKIP, encoded_html: SKIP, encoded_html_popup: SKIP, url: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id unless id == SKIP @date_signed = date_signed unless date_signed == SKIP @date_created = date_created unless date_created == SKIP @type = type unless type == SKIP @frequency = frequency unless frequency == SKIP @occurrences_per_period = occurrences_per_period unless occurrences_per_period == SKIP @start_date = start_date unless start_date == SKIP @end_date = end_date unless end_date == SKIP @encoded_html = encoded_html unless encoded_html == SKIP @encoded_html_popup = encoded_html_popup unless encoded_html_popup == SKIP @url = url unless url == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#date_created ⇒ String
Date the mandate has been created. Format YYYYMMdd
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 22 def date_created @date_created end |
#date_signed ⇒ String
Date the mandate has been signed. Format YYYYMMdd
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 18 def date_signed @date_signed end |
#encoded_html ⇒ String
Base64 encoded html string
47 48 49 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 47 def encoded_html @encoded_html end |
#encoded_html_popup ⇒ String
Base64 encoded popup html string
51 52 53 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 51 def encoded_html_popup @encoded_html_popup end |
#end_date ⇒ String
End date of the schedule. Format YYYYMMdd
43 44 45 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 43 def end_date @end_date end |
#frequency ⇒ Frequency
Regularity with which the event occurs.
31 32 33 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 31 def frequency @frequency end |
#id ⇒ String
Identifier for the mandate.
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 14 def id @id end |
#occurrences_per_period ⇒ Integer
Number of occurrences during the specified period.
35 36 37 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 35 def occurrences_per_period @occurrences_per_period end |
#start_date ⇒ String
Start date of the schedule. Format YYYYMMdd
39 40 41 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 39 def start_date @start_date end |
#type ⇒ Type1
Identifies the type of schedule as either recurring, one-off, split or usage.
27 28 29 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 27 def type @type end |
#url ⇒ String
URL for redirecting the customer for creating the mandate.
56 57 58 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 56 def url @url end |
Class Method Details
.from_element(root) ⇒ Object
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 160 def self.from_element(root) id = XmlUtilities.from_element(root, 'id', String) date_signed = XmlUtilities.from_element(root, 'dateSigned', String) date_created = XmlUtilities.from_element(root, 'dateCreated', String) type = XmlUtilities.from_element(root, 'type', String) frequency = XmlUtilities.from_element(root, 'frequency', String) occurrences_per_period = XmlUtilities.from_element(root, 'occurrencesPerPeriod', Integer) start_date = XmlUtilities.from_element(root, 'startDate', String) end_date = XmlUtilities.from_element(root, 'endDate', String) encoded_html = XmlUtilities.from_element(root, 'encodedHtml', String) encoded_html_popup = XmlUtilities.from_element(root, 'encodedHtmlPopup', String) url = XmlUtilities.from_element(root, 'url', String) new(id: id, date_signed: date_signed, date_created: date_created, type: type, frequency: frequency, occurrences_per_period: occurrences_per_period, start_date: start_date, end_date: end_date, encoded_html: encoded_html, encoded_html_popup: encoded_html_popup, url: url, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 120 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP date_signed = hash.key?('dateSigned') ? hash['dateSigned'] : SKIP date_created = hash.key?('dateCreated') ? hash['dateCreated'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP frequency = hash.key?('frequency') ? hash['frequency'] : SKIP occurrences_per_period = hash.key?('occurrencesPerPeriod') ? hash['occurrencesPerPeriod'] : SKIP start_date = hash.key?('startDate') ? hash['startDate'] : SKIP end_date = hash.key?('endDate') ? hash['endDate'] : SKIP encoded_html = hash.key?('encodedHtml') ? hash['encodedHtml'] : SKIP encoded_html_popup = hash.key?('encodedHtmlPopup') ? hash['encodedHtmlPopup'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. AgreementInformation7.new(id: id, date_signed: date_signed, date_created: date_created, type: type, frequency: frequency, occurrences_per_period: occurrences_per_period, start_date: start_date, end_date: end_date, encoded_html: encoded_html, encoded_html_popup: encoded_html_popup, url: url, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 59 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['date_signed'] = 'dateSigned' @_hash['date_created'] = 'dateCreated' @_hash['type'] = 'type' @_hash['frequency'] = 'frequency' @_hash['occurrences_per_period'] = 'occurrencesPerPeriod' @_hash['start_date'] = 'startDate' @_hash['end_date'] = 'endDate' @_hash['encoded_html'] = 'encodedHtml' @_hash['encoded_html_popup'] = 'encodedHtmlPopup' @_hash['url'] = 'url' @_hash end |
.nullables ⇒ Object
An array for nullable fields
93 94 95 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 93 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 76 def self.optionals %w[ id date_signed date_created type frequency occurrences_per_period start_date end_date encoded_html encoded_html_popup url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
223 224 225 226 227 228 229 230 231 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 223 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, date_signed: #{@date_signed.inspect}, date_created:"\ " #{@date_created.inspect}, type: #{@type.inspect}, frequency: #{@frequency.inspect},"\ " occurrences_per_period: #{@occurrences_per_period.inspect}, start_date:"\ " #{@start_date.inspect}, end_date: #{@end_date.inspect}, encoded_html:"\ " #{@encoded_html.inspect}, encoded_html_popup: #{@encoded_html_popup.inspect}, url:"\ " #{@url.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
213 214 215 216 217 218 219 220 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 213 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, date_signed: #{@date_signed}, date_created: #{@date_created},"\ " type: #{@type}, frequency: #{@frequency}, occurrences_per_period:"\ " #{@occurrences_per_period}, start_date: #{@start_date}, end_date: #{@end_date},"\ " encoded_html: #{@encoded_html}, encoded_html_popup: #{@encoded_html_popup}, url: #{@url},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/cyber_source_merged_spec/models/agreement_information7.rb', line 190 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'id', id) XmlUtilities.add_as_subelement(doc, root, 'dateSigned', date_signed) XmlUtilities.add_as_subelement(doc, root, 'dateCreated', date_created) XmlUtilities.add_as_subelement(doc, root, 'type', type) XmlUtilities.add_as_subelement(doc, root, 'frequency', frequency) XmlUtilities.add_as_subelement(doc, root, 'occurrencesPerPeriod', occurrences_per_period) XmlUtilities.add_as_subelement(doc, root, 'startDate', start_date) XmlUtilities.add_as_subelement(doc, root, 'endDate', end_date) XmlUtilities.add_as_subelement(doc, root, 'encodedHtml', encoded_html) XmlUtilities.add_as_subelement(doc, root, 'encodedHtmlPopup', encoded_html_popup) XmlUtilities.add_as_subelement(doc, root, 'url', url) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |