Class: CyberSourceMergedSpec::AgreementInformation9
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::AgreementInformation9
- Defined in:
- lib/cyber_source_merged_spec/models/agreement_information9.rb
Overview
AgreementInformation9 Model.
Instance Attribute Summary collapse
-
#date_created ⇒ String
Date the mandate has been created.
-
#date_revoked ⇒ String
Date the mandate has been revoked.
-
#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.
-
#frequency ⇒ Frequency
Regularity with which the event occurs.
-
#id ⇒ String
Identifier for the mandate.
-
#transaction_id ⇒ String
The Billing Agreement ID returned by processor (PayPal).
-
#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, date_revoked: SKIP, type: SKIP, frequency: SKIP, encoded_html: SKIP, encoded_html_popup: SKIP, url: SKIP, transaction_id: SKIP, additional_properties: nil) ⇒ AgreementInformation9
constructor
A new instance of AgreementInformation9.
-
#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, date_revoked: SKIP, type: SKIP, frequency: SKIP, encoded_html: SKIP, encoded_html_popup: SKIP, url: SKIP, transaction_id: SKIP, additional_properties: nil) ⇒ AgreementInformation9
Returns a new instance of AgreementInformation9.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 91 def initialize(id: SKIP, date_signed: SKIP, date_created: SKIP, date_revoked: SKIP, type: SKIP, frequency: SKIP, encoded_html: SKIP, encoded_html_popup: SKIP, url: SKIP, transaction_id: 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 @date_revoked = date_revoked unless date_revoked == SKIP @type = type unless type == SKIP @frequency = frequency unless frequency == 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 @transaction_id = transaction_id unless transaction_id == 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_information9.rb', line 22 def date_created @date_created end |
#date_revoked ⇒ String
Date the mandate has been revoked. Format YYYYMMdd
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 26 def date_revoked @date_revoked end |
#date_signed ⇒ String
Date the mandate has been signed. Format YYYYMMdd
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 18 def date_signed @date_signed end |
#encoded_html ⇒ String
Base64 encoded html string
39 40 41 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 39 def encoded_html @encoded_html end |
#encoded_html_popup ⇒ String
Base64 encoded popup html string
43 44 45 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 43 def encoded_html_popup @encoded_html_popup end |
#frequency ⇒ Frequency
Regularity with which the event occurs.
35 36 37 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 35 def frequency @frequency end |
#id ⇒ String
Identifier for the mandate.
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 14 def id @id end |
#transaction_id ⇒ String
The Billing Agreement ID returned by processor (PayPal).
52 53 54 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 52 def transaction_id @transaction_id end |
#type ⇒ Type1
Identifies the type of schedule as either recurring, one-off, split or usage.
31 32 33 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 31 def type @type end |
#url ⇒ String
URL for redirecting the customer for creating the mandate.
48 49 50 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 48 def url @url end |
Class Method Details
.from_element(root) ⇒ Object
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 149 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) date_revoked = XmlUtilities.from_element(root, 'dateRevoked', String) type = XmlUtilities.from_element(root, 'type', String) frequency = XmlUtilities.from_element(root, 'frequency', 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) transaction_id = XmlUtilities.from_element(root, 'transactionId', String) new(id: id, date_signed: date_signed, date_created: date_created, date_revoked: date_revoked, type: type, frequency: frequency, encoded_html: encoded_html, encoded_html_popup: encoded_html_popup, url: url, transaction_id: transaction_id, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
112 113 114 115 116 117 118 119 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 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 112 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 date_revoked = hash.key?('dateRevoked') ? hash['dateRevoked'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP frequency = hash.key?('frequency') ? hash['frequency'] : 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 transaction_id = hash.key?('transactionId') ? hash['transactionId'] : 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. AgreementInformation9.new(id: id, date_signed: date_signed, date_created: date_created, date_revoked: date_revoked, type: type, frequency: frequency, encoded_html: encoded_html, encoded_html_popup: encoded_html_popup, url: url, transaction_id: transaction_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 55 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['date_signed'] = 'dateSigned' @_hash['date_created'] = 'dateCreated' @_hash['date_revoked'] = 'dateRevoked' @_hash['type'] = 'type' @_hash['frequency'] = 'frequency' @_hash['encoded_html'] = 'encodedHtml' @_hash['encoded_html_popup'] = 'encodedHtmlPopup' @_hash['url'] = 'url' @_hash['transaction_id'] = 'transactionId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
87 88 89 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 87 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 71 def self.optionals %w[ id date_signed date_created date_revoked type frequency encoded_html encoded_html_popup url transaction_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
205 206 207 208 209 210 211 212 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 205 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, date_signed: #{@date_signed.inspect}, date_created:"\ " #{@date_created.inspect}, date_revoked: #{@date_revoked.inspect}, type: #{@type.inspect},"\ " frequency: #{@frequency.inspect}, encoded_html: #{@encoded_html.inspect},"\ " encoded_html_popup: #{@encoded_html_popup.inspect}, url: #{@url.inspect}, transaction_id:"\ " #{@transaction_id.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
196 197 198 199 200 201 202 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 196 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, date_signed: #{@date_signed}, date_created: #{@date_created},"\ " date_revoked: #{@date_revoked}, type: #{@type}, frequency: #{@frequency}, encoded_html:"\ " #{@encoded_html}, encoded_html_popup: #{@encoded_html_popup}, url: #{@url},"\ " transaction_id: #{@transaction_id}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/cyber_source_merged_spec/models/agreement_information9.rb', line 175 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, 'dateRevoked', date_revoked) XmlUtilities.add_as_subelement(doc, root, 'type', type) XmlUtilities.add_as_subelement(doc, root, 'frequency', frequency) 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, 'transactionId', transaction_id) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |