ci_power 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ci_power/action.rb +25 -23
- data/lib/ci_power/address.rb +41 -39
- data/lib/ci_power/communication.rb +2 -2
- data/lib/ci_power/debt_claim.rb +26 -24
- data/lib/ci_power/dossier_data.rb +42 -40
- data/lib/ci_power/record.rb +2 -2
- data/lib/ci_power/version.rb +1 -1
- metadata +2 -2
    
        data/lib/ci_power/action.rb
    CHANGED
    
    | @@ -32,30 +32,32 @@ module CiPower | |
| 32 32 | 
             
                  end
         | 
| 33 33 | 
             
                end
         | 
| 34 34 |  | 
| 35 | 
            -
                def to_cip
         | 
| 35 | 
            +
                def to_cip(with_line_terminator = true)
         | 
| 36 36 | 
             
                  cip_default_data << fill_up(
         | 
| 37 | 
            -
                     | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 37 | 
            +
                    {
         | 
| 38 | 
            +
                      action_date => 10,
         | 
| 39 | 
            +
                      action => 10,
         | 
| 40 | 
            +
                      mkz => 10,
         | 
| 41 | 
            +
                      amount => 15,
         | 
| 42 | 
            +
                      currency => 10,
         | 
| 43 | 
            +
                      exchange_rate => 15,
         | 
| 44 | 
            +
                      value_date => 10,
         | 
| 45 | 
            +
                      comment_1 => 32,
         | 
| 46 | 
            +
                      comment_2 => 32,
         | 
| 47 | 
            +
                      op_no => 32,
         | 
| 48 | 
            +
                      op_membership => 32,
         | 
| 49 | 
            +
                      cip_dossier_no => 25,
         | 
| 50 | 
            +
                      external_dossier_no => 32,
         | 
| 51 | 
            +
                      cip_identification => 7,
         | 
| 52 | 
            +
                      debt_claim_group => 32,
         | 
| 53 | 
            +
                      customer_specific_field_1 => 10,
         | 
| 54 | 
            +
                      customer_specific_field_2 => 10,
         | 
| 55 | 
            +
                      customer_specific_field_3 => 10,
         | 
| 56 | 
            +
                      customer_specific_field_4 => 32,
         | 
| 57 | 
            +
                      customer_specific_field_5 => 32,
         | 
| 58 | 
            +
                      reserve_field => 62,
         | 
| 59 | 
            +
                      internal_note => 1500
         | 
| 60 | 
            +
                    }, with_line_terminator
         | 
| 59 61 | 
             
                  )
         | 
| 60 62 | 
             
                end
         | 
| 61 63 | 
             
              end
         | 
    
        data/lib/ci_power/address.rb
    CHANGED
    
    | @@ -49,46 +49,48 @@ module CiPower | |
| 49 49 | 
             
                  end
         | 
| 50 50 | 
             
                end
         | 
| 51 51 |  | 
| 52 | 
            -
                def to_cip
         | 
| 52 | 
            +
                def to_cip(with_line_terminator = true)
         | 
| 53 53 | 
             
                  cip_default_data << fill_up(
         | 
| 54 | 
            -
                     | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 68 | 
            -
             | 
| 69 | 
            -
             | 
| 70 | 
            -
             | 
| 71 | 
            -
             | 
| 72 | 
            -
             | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 79 | 
            -
             | 
| 80 | 
            -
             | 
| 81 | 
            -
             | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
| 84 | 
            -
             | 
| 85 | 
            -
             | 
| 86 | 
            -
             | 
| 87 | 
            -
             | 
| 88 | 
            -
             | 
| 89 | 
            -
             | 
| 90 | 
            -
             | 
| 91 | 
            -
             | 
| 54 | 
            +
                    {
         | 
| 55 | 
            +
                      address_type_company => 1,
         | 
| 56 | 
            +
                      title => 32,
         | 
| 57 | 
            +
                      salutation =>  10,
         | 
| 58 | 
            +
                      lastname => 32,
         | 
| 59 | 
            +
                      firstname => 32,
         | 
| 60 | 
            +
                      name_affix => 32,
         | 
| 61 | 
            +
                      address => 32,
         | 
| 62 | 
            +
                      po_box => 32,
         | 
| 63 | 
            +
                      postal_code => 10,
         | 
| 64 | 
            +
                      city => 32,
         | 
| 65 | 
            +
                      country => 10,
         | 
| 66 | 
            +
                      contact_salutation => 10,
         | 
| 67 | 
            +
                      contact_lastname => 32,
         | 
| 68 | 
            +
                      contact_firstname => 32,
         | 
| 69 | 
            +
                      language => 10,
         | 
| 70 | 
            +
                      method_of_payment => 10,
         | 
| 71 | 
            +
                      account_no => 32,
         | 
| 72 | 
            +
                      commercial_register_no => 15,
         | 
| 73 | 
            +
                      vat_no => 15,
         | 
| 74 | 
            +
                      industry => 10,
         | 
| 75 | 
            +
                      region => 10,
         | 
| 76 | 
            +
                      reserve_field => 10,
         | 
| 77 | 
            +
                      customer_specific_field_1 => 10,
         | 
| 78 | 
            +
                      customer_specific_field_2 => 10,
         | 
| 79 | 
            +
                      customer_specific_field_3 => 10,
         | 
| 80 | 
            +
                      customer_specific_field_4 => 32,
         | 
| 81 | 
            +
                      customer_specific_field_5 => 32,
         | 
| 82 | 
            +
                      customer_specific_field_6 => 64,
         | 
| 83 | 
            +
                      customer_specific_field_7 => 64,
         | 
| 84 | 
            +
                      customer_specific_field_8 => 64,
         | 
| 85 | 
            +
                      customer_specific_field_9 => 64,
         | 
| 86 | 
            +
                      customer_specific_field_10 => 64,
         | 
| 87 | 
            +
                      customer_specific_field_11 => 64,
         | 
| 88 | 
            +
                      customer_specific_field_12 => 64,
         | 
| 89 | 
            +
                      customer_specific_field_13 => 64,
         | 
| 90 | 
            +
                      customer_specific_field_14 => 64,
         | 
| 91 | 
            +
                      customer_specific_field_15 => 64,
         | 
| 92 | 
            +
                      customer_specific_field_16 => 64
         | 
| 93 | 
            +
                    }, with_line_terminator
         | 
| 92 94 | 
             
                  )
         | 
| 93 95 | 
             
                end
         | 
| 94 96 | 
             
              end
         | 
    
        data/lib/ci_power/debt_claim.rb
    CHANGED
    
    | @@ -41,31 +41,33 @@ module CiPower | |
| 41 41 | 
             
                  @amount_type ||= @amount < 0 ? 'GU-GL' : 'RG-GL'
         | 
| 42 42 | 
             
                end
         | 
| 43 43 |  | 
| 44 | 
            -
                def to_cip
         | 
| 44 | 
            +
                def to_cip(with_line_terminator = true)
         | 
| 45 45 | 
             
                  cip_default_data << fill_up(
         | 
| 46 | 
            -
                     | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 68 | 
            -
             | 
| 46 | 
            +
                    {
         | 
| 47 | 
            +
                      op_no => 25,
         | 
| 48 | 
            +
                      amount_type => 10,
         | 
| 49 | 
            +
                      value_date => 10,
         | 
| 50 | 
            +
                      amount => 15,
         | 
| 51 | 
            +
                      invoice_date => 10,
         | 
| 52 | 
            +
                      invoice_text => 32,
         | 
| 53 | 
            +
                      customer_specific_field_1 => 32,
         | 
| 54 | 
            +
                      customer_specific_field_2 => 32,
         | 
| 55 | 
            +
                      dossier_currency => 10,
         | 
| 56 | 
            +
                      exchange_rate => 15,
         | 
| 57 | 
            +
                      customer_specific_field_3 => 32,
         | 
| 58 | 
            +
                      customer_specific_field_4 => 32,
         | 
| 59 | 
            +
                      customer_specific_field_5 => 32,
         | 
| 60 | 
            +
                      customer_specific_field_6 => 32,
         | 
| 61 | 
            +
                      customer_specific_field_7 => 32,
         | 
| 62 | 
            +
                      customer_specific_field_8 => 32,
         | 
| 63 | 
            +
                      customer_specific_field_9 => 32,
         | 
| 64 | 
            +
                      customer_specific_field_10 => 32,
         | 
| 65 | 
            +
                      customer_specific_field_11 => 32,
         | 
| 66 | 
            +
                      customer_specific_field_12 => 32,
         | 
| 67 | 
            +
                      customer_specific_field_13 => 32,
         | 
| 68 | 
            +
                      customer_specific_field_14 => 32,
         | 
| 69 | 
            +
                      customer_specific_field_15 => 32
         | 
| 70 | 
            +
                    }, with_line_terminator
         | 
| 69 71 | 
             
                  )
         | 
| 70 72 | 
             
                end
         | 
| 71 73 | 
             
              end
         | 
| @@ -42,47 +42,49 @@ module CiPower | |
| 42 42 | 
             
                  end
         | 
| 43 43 | 
             
                end
         | 
| 44 44 |  | 
| 45 | 
            -
                def to_cip
         | 
| 45 | 
            +
                def to_cip(with_line_terminator = true)
         | 
| 46 46 | 
             
                  fill_up(
         | 
| 47 | 
            -
                     | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 68 | 
            -
             | 
| 69 | 
            -
             | 
| 70 | 
            -
             | 
| 71 | 
            -
             | 
| 72 | 
            -
             | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 76 | 
            -
             | 
| 77 | 
            -
             | 
| 78 | 
            -
             | 
| 79 | 
            -
             | 
| 80 | 
            -
             | 
| 81 | 
            -
             | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
| 84 | 
            -
             | 
| 85 | 
            -
             | 
| 47 | 
            +
                    {
         | 
| 48 | 
            +
                      record_type => 2,
         | 
| 49 | 
            +
                      group_no => 7,
         | 
| 50 | 
            +
                      address_identification_debtee => 25,
         | 
| 51 | 
            +
                      '' => 25,
         | 
| 52 | 
            +
                      address_identification_debtor => 25,
         | 
| 53 | 
            +
                      debt_claim_reason => 64,
         | 
| 54 | 
            +
                      reference_1 => 32,
         | 
| 55 | 
            +
                      ikv => 10,
         | 
| 56 | 
            +
                      feature_1 => 10,
         | 
| 57 | 
            +
                      '' => 22,
         | 
| 58 | 
            +
                      feature_2 => 10,
         | 
| 59 | 
            +
                      '' => 22,
         | 
| 60 | 
            +
                      interest_rate => 10,
         | 
| 61 | 
            +
                      currency => 10,
         | 
| 62 | 
            +
                      notes => 240,
         | 
| 63 | 
            +
                      external_dossier_no => 32,
         | 
| 64 | 
            +
                      reference_2 => 32,
         | 
| 65 | 
            +
                      reference_3 => 32,
         | 
| 66 | 
            +
                      reference_4 => 32,
         | 
| 67 | 
            +
                      customer_specific_field_1 => 10,
         | 
| 68 | 
            +
                      customer_specific_field_2 => 10,
         | 
| 69 | 
            +
                      customer_specific_field_3 => 10,
         | 
| 70 | 
            +
                      customer_specific_field_4 => 32,
         | 
| 71 | 
            +
                      customer_specific_field_5 => 32,
         | 
| 72 | 
            +
                      customer_specific_field_6 => 32,
         | 
| 73 | 
            +
                      customer_specific_field_7 => 32,
         | 
| 74 | 
            +
                      customer_specific_field_8 => 32,
         | 
| 75 | 
            +
                      customer_specific_field_9 => 32,
         | 
| 76 | 
            +
                      customer_specific_field_10 => 32,
         | 
| 77 | 
            +
                      customer_specific_field_11 => 32,
         | 
| 78 | 
            +
                      customer_specific_field_12 => 32,
         | 
| 79 | 
            +
                      customer_specific_field_13 => 32,
         | 
| 80 | 
            +
                      customer_specific_field_14 => 32,
         | 
| 81 | 
            +
                      customer_specific_field_15 => 32,
         | 
| 82 | 
            +
                      customer_specific_field_16 => 32,
         | 
| 83 | 
            +
                      customer_specific_field_17 => 32,
         | 
| 84 | 
            +
                      customer_specific_field_18 => 32,
         | 
| 85 | 
            +
                      customer_specific_field_19 => 32,
         | 
| 86 | 
            +
                      customer_specific_field_20 => 32
         | 
| 87 | 
            +
                    }, with_line_terminator
         | 
| 86 88 | 
             
                  )
         | 
| 87 89 | 
             
                end
         | 
| 88 90 | 
             
              end
         | 
    
        data/lib/ci_power/record.rb
    CHANGED
    
    | @@ -9,8 +9,8 @@ module CiPower | |
| 9 9 | 
             
                  _fill_up(record_type => 2, group_no => 7, address_identification_debtee => 25, address_identification_debtor => 25)
         | 
| 10 10 | 
             
                end
         | 
| 11 11 |  | 
| 12 | 
            -
                def fill_up(data)
         | 
| 13 | 
            -
                  _fill_up(data) + line_terminator
         | 
| 12 | 
            +
                def fill_up(data, with_line_terminator = true)
         | 
| 13 | 
            +
                  _fill_up(data) + (with_line_terminator ? line_terminator : '')
         | 
| 14 14 | 
             
                end
         | 
| 15 15 |  | 
| 16 16 | 
             
                def line_terminator
         | 
    
        data/lib/ci_power/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -2,7 +2,7 @@ | |
| 2 2 | 
             
            name: ci_power
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 4 | 
             
              prerelease: 
         | 
| 5 | 
            -
              version: 0.0. | 
| 5 | 
            +
              version: 0.0.6
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors: 
         | 
| 8 8 | 
             
              - Maik Duff
         | 
| @@ -10,7 +10,7 @@ autorequire: | |
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 12 |  | 
| 13 | 
            -
            date: 2012-01- | 
| 13 | 
            +
            date: 2012-01-18 00:00:00 +01:00
         | 
| 14 14 | 
             
            default_executable: 
         | 
| 15 15 | 
             
            dependencies: 
         | 
| 16 16 | 
             
              - !ruby/object:Gem::Dependency 
         |