Class: Sendly::TenDlcBrand
- Inherits:
-
Object
- Object
- Sendly::TenDlcBrand
- Defined in:
- lib/sendly/tendlc_resource.rb
Overview
A business identity registered for carrier review. The status starts
"pending" and moves to "verified" (campaigns can be created) or
"failed" (see failure_reasons).
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#dba ⇒ Object
readonly
Returns the value of attribute dba.
-
#ein ⇒ Object
readonly
Returns the value of attribute ein.
-
#entity_type ⇒ Object
readonly
Returns the value of attribute entity_type.
-
#failure_reasons ⇒ Object
readonly
Returns the value of attribute failure_reasons.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#identity_status ⇒ Object
readonly
Returns the value of attribute identity_status.
-
#legal_name ⇒ Object
readonly
Returns the value of attribute legal_name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#vertical ⇒ Object
readonly
Returns the value of attribute vertical.
-
#website ⇒ Object
readonly
Returns the value of attribute website.
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(data) ⇒ TenDlcBrand
constructor
A new instance of TenDlcBrand.
- #pending? ⇒ Boolean
- #to_h ⇒ Object
- #verified? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ TenDlcBrand
Returns a new instance of TenDlcBrand.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/sendly/tendlc_resource.rb', line 12 def initialize(data) @id = data["id"] @legal_name = data["legalName"] || data["legal_name"] @dba = data["dba"] @entity_type = data["entityType"] || data["entity_type"] @ein = data["ein"] @vertical = data["vertical"] @website = data["website"] @status = data["status"] @identity_status = data["identityStatus"] || data["identity_status"] @failure_reasons = data["failureReasons"] || data["failure_reasons"] @created_at = data["createdAt"] || data["created_at"] @updated_at = data["updatedAt"] || data["updated_at"] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def created_at @created_at end |
#dba ⇒ Object (readonly)
Returns the value of attribute dba.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def dba @dba end |
#ein ⇒ Object (readonly)
Returns the value of attribute ein.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def ein @ein end |
#entity_type ⇒ Object (readonly)
Returns the value of attribute entity_type.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def entity_type @entity_type end |
#failure_reasons ⇒ Object (readonly)
Returns the value of attribute failure_reasons.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def failure_reasons @failure_reasons end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def id @id end |
#identity_status ⇒ Object (readonly)
Returns the value of attribute identity_status.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def identity_status @identity_status end |
#legal_name ⇒ Object (readonly)
Returns the value of attribute legal_name.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def legal_name @legal_name end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def status @status end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def updated_at @updated_at end |
#vertical ⇒ Object (readonly)
Returns the value of attribute vertical.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def vertical @vertical end |
#website ⇒ Object (readonly)
Returns the value of attribute website.
8 9 10 |
# File 'lib/sendly/tendlc_resource.rb', line 8 def website @website end |
Instance Method Details
#failed? ⇒ Boolean
35 36 37 |
# File 'lib/sendly/tendlc_resource.rb', line 35 def failed? status == "failed" end |
#pending? ⇒ Boolean
27 28 29 |
# File 'lib/sendly/tendlc_resource.rb', line 27 def pending? status == "pending" end |
#to_h ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/sendly/tendlc_resource.rb', line 39 def to_h { id: id, legal_name: legal_name, dba: dba, entity_type: entity_type, ein: ein, vertical: vertical, website: website, status: status, identity_status: identity_status, failure_reasons: failure_reasons, created_at: created_at, updated_at: updated_at }.compact end |
#verified? ⇒ Boolean
31 32 33 |
# File 'lib/sendly/tendlc_resource.rb', line 31 def verified? status == "verified" end |