Class: C2eCore::Drops::CompanyClientDrop
- Defined in:
- /build/app/mailers/c2e_core/drops/company_client_drop.rb
Instance Method Summary collapse
-
#address ⇒ AddressDrop
-
Address of company as drop object.
-
-
#cin ⇒ String
-
Corporate Identity Number of company.
-
-
#default_email ⇒ String
-
The company’s default email, e.g.
-
-
#default_phone ⇒ String
-
The company’s default phone, e.g.
-
-
#initialize(company) ⇒ CompanyClientDrop
constructor
A new instance of CompanyClientDrop.
-
#is_vat_payer ⇒ Boolean
-
Return true when company is VAT payer.
-
-
#name ⇒ String
-
Name of company.
-
-
#tin ⇒ String
-
Taxpayer Identification Number of company.
-
Constructor Details
#initialize(company) ⇒ CompanyClientDrop
Returns a new instance of CompanyClientDrop.
7 8 9 10 |
# File '/build/app/mailers/c2e_core/drops/company_client_drop.rb', line 7 def initialize(company) super() @company = company end |
Instance Method Details
#address ⇒ AddressDrop
Returns - Address of company as drop object.
18 19 20 21 22 |
# File '/build/app/mailers/c2e_core/drops/company_client_drop.rb', line 18 def address stored_value __method__ do AddressDrop.new(@company.default_address.location || {}) end end |
#cin ⇒ String
Returns - Corporate Identity Number of company. ICO in Czechia.
25 26 27 |
# File '/build/app/mailers/c2e_core/drops/company_client_drop.rb', line 25 def cin @company.number end |
#default_email ⇒ String
Returns - The company’s default email, e.g. "test@example.com"
.
43 44 45 46 47 |
# File '/build/app/mailers/c2e_core/drops/company_client_drop.rb', line 43 def default_email stored_value __method__ do @company.default_email.try(:[], "email") end end |
#default_phone ⇒ String
Returns - The company’s default phone, e.g. "+420123456789"
.
50 51 52 53 54 |
# File '/build/app/mailers/c2e_core/drops/company_client_drop.rb', line 50 def default_phone stored_value __method__ do @company.default_phone.try(:[], "phone") end end |
#is_vat_payer ⇒ Boolean
Returns - Return true when company is VAT payer.
37 38 39 |
# File '/build/app/mailers/c2e_core/drops/company_client_drop.rb', line 37 def is_vat_payer @company.vat_payer? end |
#name ⇒ String
Returns - Name of company. E.g.: “Monkey’s bar s.r.o.”.
13 14 15 |
# File '/build/app/mailers/c2e_core/drops/company_client_drop.rb', line 13 def name @company.name end |
#tin ⇒ String
Returns - Taxpayer Identification Number of company. DIC in Czechia.
30 31 32 |
# File '/build/app/mailers/c2e_core/drops/company_client_drop.rb', line 30 def tin @company.vat_ident end |