Class: GreenButtonData::ApplicationInformation
- Includes:
- Enumerations, Utilities
- Defined in:
- lib/green-button-data/application_information.rb
Constant Summary
Constants included from Enumerations
Enumerations::ACCUMULATION, Enumerations::AUTHORIZATION_STATUS, Enumerations::COMMODITY, Enumerations::CURRENCY, Enumerations::DATA_CUSTODIAN_APPLICATION_STATUS, Enumerations::DATA_QUALIFIER, Enumerations::ESPI_SERVICE_STATUS, Enumerations::FLOW_DIRECTION, Enumerations::MEASUREMENT, Enumerations::PHASE_CODE, Enumerations::QUALITY_OF_READING, Enumerations::SERVICE, Enumerations::THIRD_PARTY_APPLICATION_STATUS, Enumerations::THIRD_PARTY_APPLICATION_TYPE, Enumerations::THIRD_PARTY_APPLICATION_USE, Enumerations::TIME_ATTRIBUTE, Enumerations::TIME_PERIOD_OF_INTEREST, Enumerations::UNIT_MULTIPLIER, Enumerations::UNIT_SYMBOL
Instance Attribute Summary collapse
-
#authorization_server_authorization_endpoint ⇒ Object
Returns the value of attribute authorization_server_authorization_endpoint.
-
#authorization_server_registration_endpoint ⇒ Object
Returns the value of attribute authorization_server_registration_endpoint.
-
#authorization_server_token_endpoint ⇒ Object
Returns the value of attribute authorization_server_token_endpoint.
-
#authorization_server_uri ⇒ Object
Returns the value of attribute authorization_server_uri.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_name ⇒ Object
Returns the value of attribute client_name.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#contacts ⇒ Object
Returns the value of attribute contacts.
-
#data_custodian_bulk_request_uri ⇒ Object
Returns the value of attribute data_custodian_bulk_request_uri.
-
#data_custodian_id ⇒ Object
Returns the value of attribute data_custodian_id.
-
#data_custodian_resource_endpoint ⇒ Object
Returns the value of attribute data_custodian_resource_endpoint.
-
#data_custodian_scope_selection_screen_uri ⇒ Object
Returns the value of attribute data_custodian_scope_selection_screen_uri.
-
#grant_types ⇒ Object
Returns the value of attribute grant_types.
-
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
-
#registration_access_token ⇒ Object
Returns the value of attribute registration_access_token.
-
#registration_client_uri ⇒ Object
Returns the value of attribute registration_client_uri.
-
#response_types ⇒ Object
Returns the value of attribute response_types.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
-
#software_id ⇒ Object
Returns the value of attribute software_id.
-
#software_version ⇒ Object
Returns the value of attribute software_version.
-
#third_party_application_description ⇒ Object
Returns the value of attribute third_party_application_description.
-
#third_party_notify_uri ⇒ Object
Returns the value of attribute third_party_notify_uri.
-
#third_party_phone ⇒ Object
Returns the value of attribute third_party_phone.
-
#third_party_scope_selection_screen_uri ⇒ Object
Returns the value of attribute third_party_scope_selection_screen_uri.
-
#third_party_user_portal_screen_uri ⇒ Object
Returns the value of attribute third_party_user_portal_screen_uri.
-
#token_endpoint_auth_method ⇒ Object
Returns the value of attribute token_endpoint_auth_method.
Attributes inherited from Entry
Instance Method Summary collapse
- #client_id_issued_at(kwargs = {}) ⇒ Object
- #client_secret_expires_at(kwargs = {}) ⇒ Object
- #data_custodian_application_status ⇒ Object
- #third_party_application_type ⇒ Object
- #third_party_application_use ⇒ Object
- #to_h ⇒ Object
Methods included from Utilities
#attributes_to_hash, #class_from_name, #epoch_to_time, #first_sunday_of, #last_weekday_of, #normalize_epoch, #nth_weekday_of, #parse_datetime, #weekday_offset
Methods inherited from Entry
Methods included from Fetchable
Constructor Details
This class inherits a constructor from GreenButtonData::Entry
Instance Attribute Details
#authorization_server_authorization_endpoint ⇒ Object
Returns the value of attribute authorization_server_authorization_endpoint.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def end |
#authorization_server_registration_endpoint ⇒ Object
Returns the value of attribute authorization_server_registration_endpoint.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def end |
#authorization_server_token_endpoint ⇒ Object
Returns the value of attribute authorization_server_token_endpoint.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def end |
#authorization_server_uri ⇒ Object
Returns the value of attribute authorization_server_uri.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def end |
#client_id ⇒ Object
Returns the value of attribute client_id.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def client_id @client_id end |
#client_name ⇒ Object
Returns the value of attribute client_name.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def client_name @client_name end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def client_secret @client_secret end |
#contacts ⇒ Object
Returns the value of attribute contacts.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def contacts @contacts end |
#data_custodian_bulk_request_uri ⇒ Object
Returns the value of attribute data_custodian_bulk_request_uri.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def data_custodian_bulk_request_uri @data_custodian_bulk_request_uri end |
#data_custodian_id ⇒ Object
Returns the value of attribute data_custodian_id.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def data_custodian_id @data_custodian_id end |
#data_custodian_resource_endpoint ⇒ Object
Returns the value of attribute data_custodian_resource_endpoint.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def data_custodian_resource_endpoint @data_custodian_resource_endpoint end |
#data_custodian_scope_selection_screen_uri ⇒ Object
Returns the value of attribute data_custodian_scope_selection_screen_uri.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def data_custodian_scope_selection_screen_uri @data_custodian_scope_selection_screen_uri end |
#grant_types ⇒ Object
Returns the value of attribute grant_types.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def grant_types @grant_types end |
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def redirect_uri @redirect_uri end |
#registration_access_token ⇒ Object
Returns the value of attribute registration_access_token.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def registration_access_token @registration_access_token end |
#registration_client_uri ⇒ Object
Returns the value of attribute registration_client_uri.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def registration_client_uri @registration_client_uri end |
#response_types ⇒ Object
Returns the value of attribute response_types.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def response_types @response_types end |
#scopes ⇒ Object
Returns the value of attribute scopes.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def scopes @scopes end |
#software_id ⇒ Object
Returns the value of attribute software_id.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def software_id @software_id end |
#software_version ⇒ Object
Returns the value of attribute software_version.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def software_version @software_version end |
#third_party_application_description ⇒ Object
Returns the value of attribute third_party_application_description.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def third_party_application_description @third_party_application_description end |
#third_party_notify_uri ⇒ Object
Returns the value of attribute third_party_notify_uri.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def third_party_notify_uri @third_party_notify_uri end |
#third_party_phone ⇒ Object
Returns the value of attribute third_party_phone.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def third_party_phone @third_party_phone end |
#third_party_scope_selection_screen_uri ⇒ Object
Returns the value of attribute third_party_scope_selection_screen_uri.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def third_party_scope_selection_screen_uri @third_party_scope_selection_screen_uri end |
#third_party_user_portal_screen_uri ⇒ Object
Returns the value of attribute third_party_user_portal_screen_uri.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def third_party_user_portal_screen_uri @third_party_user_portal_screen_uri end |
#token_endpoint_auth_method ⇒ Object
Returns the value of attribute token_endpoint_auth_method.
6 7 8 |
# File 'lib/green-button-data/application_information.rb', line 6 def token_endpoint_auth_method @token_endpoint_auth_method end |
Instance Method Details
#client_id_issued_at(kwargs = {}) ⇒ Object
33 34 35 |
# File 'lib/green-button-data/application_information.rb', line 33 def client_id_issued_at(kwargs = {}) epoch_to_time @client_id_issued_at, kwargs end |
#client_secret_expires_at(kwargs = {}) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/green-button-data/application_information.rb', line 37 def client_secret_expires_at(kwargs = {}) if @client_secret_expires_at == 0 # Maximum Fixnum = 4611686018427387903 max_fixnum = 2 ** (@client_secret_expires_at.size * 8 - 2) - 1 # Roughly 146 billion years into the future; Sun would be long dead by # this time; so for all intents and purposes, never expires time = Time.at(max_fixnum) if kwargs[:local] == true return time.localtime else return time.utc end else epoch_to_time(@client_secret_expires_at, kwargs) end end |
#data_custodian_application_status ⇒ Object
56 57 58 59 |
# File 'lib/green-button-data/application_information.rb', line 56 def data_custodian_application_status get_enum_symbol DATA_CUSTODIAN_APPLICATION_STATUS, @data_custodian_application_status end |
#third_party_application_type ⇒ Object
61 62 63 64 |
# File 'lib/green-button-data/application_information.rb', line 61 def third_party_application_type get_enum_symbol THIRD_PARTY_APPLICATION_TYPE, @third_party_application_type end |
#third_party_application_use ⇒ Object
66 67 68 |
# File 'lib/green-button-data/application_information.rb', line 66 def third_party_application_use get_enum_symbol THIRD_PARTY_APPLICATION_USE, @third_party_application_use end |
#to_h ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/green-button-data/application_information.rb', line 70 def to_h { authorization_server_authorization_endpoint: , authorization_server_registration_endpoint: , authorization_server_token_endpoint: , authorization_server_uri: , contacts: contacts, client_id: client_id, client_id_issued_at: client_id_issued_at, client_name: client_name, client_secret: client_secret, client_secret_expires_at: client_secret_expires_at, data_custodian_application_status: data_custodian_application_status, data_custodian_bulk_request_uri: data_custodian_bulk_request_uri, data_custodian_id: data_custodian_id, data_custodian_resource_endpoint: data_custodian_resource_endpoint, data_custodian_scope_selection_screen_uri: data_custodian_scope_selection_screen_uri, grant_types: grant_types, redirect_uri: redirect_uri, registration_access_token: registration_access_token, registration_client_uri: registration_client_uri, response_types: response_types, scopes: scopes, software_id: software_id, software_version: software_version, third_party_application_description: third_party_application_description, third_party_application_type: third_party_application_type, third_party_application_use: third_party_application_use, third_party_notify_uri: third_party_notify_uri, third_party_phone: third_party_phone, third_party_scope_selection_screen_uri: third_party_scope_selection_screen_uri, third_party_user_portal_screen_uri: third_party_user_portal_screen_uri, token_endpoint_auth_method: token_endpoint_auth_method } end |